generated-configure.sh revision 1782:8f998d77a50c
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_JAVAC_SERVER
636ENABLE_SJAVAC
637SJAVAC_SERVER_JAVA_FLAGS
638SJAVAC_SERVER_JAVA
639JAVA_TOOL_FLAGS_SMALL
640JAVA_FLAGS_SMALL
641JAVA_FLAGS_BIG
642JAVA_FLAGS
643JOBS
644MEMORY_SIZE
645NUM_CORES
646ENABLE_INTREE_EC
647SALIB_NAME
648HOTSPOT_MAKE_ARGS
649LIBZIP_CAN_USE_MMAP
650LIBDL
651LIBM
652USE_EXTERNAL_LCMS
653LCMS_LIBS
654LCMS_CFLAGS
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661LLVM_LIBS
662LLVM_LDFLAGS
663LLVM_CFLAGS
664LLVM_CONFIG
665LIBFFI_LIBS
666LIBFFI_CFLAGS
667ALSA_LIBS
668ALSA_CFLAGS
669FREETYPE_BUNDLE_LIB_PATH
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672CUPS_CFLAGS
673X_EXTRA_LIBS
674X_LIBS
675X_PRE_LIBS
676X_CFLAGS
677XMKMF
678MSVCP_DLL
679MSVCR_DLL
680LIBCXX
681STATIC_CXX_SETTING
682FIXPATH
683GCOV_ENABLED
684ZIP_DEBUGINFO_FILES
685ENABLE_DEBUG_SYMBOLS
686CFLAGS_WARNINGS_ARE_ERRORS
687DISABLE_WARNING_PREFIX
688WARNINGS_AS_ERRORS
689COMPILER_SUPPORTS_TARGET_BITS_FLAG
690ZERO_ARCHFLAG
691LDFLAGS_TESTEXE
692LDFLAGS_TESTLIB
693LDFLAGS_CXX_JDK
694JDKEXE_LIBS
695JDKLIB_LIBS
696LDFLAGS_JDKEXE
697LDFLAGS_JDKLIB
698CXXFLAGS_TESTEXE
699CXXFLAGS_TESTLIB
700CFLAGS_TESTEXE
701CFLAGS_TESTLIB
702CXXFLAGS_JDKEXE
703CXXFLAGS_JDKLIB
704CFLAGS_JDKEXE
705CFLAGS_JDKLIB
706MACOSX_VERSION_MIN
707CXX_O_FLAG_NONE
708CXX_O_FLAG_DEBUG
709CXX_O_FLAG_NORM
710CXX_O_FLAG_HI
711CXX_O_FLAG_HIGHEST
712C_O_FLAG_NONE
713C_O_FLAG_DEBUG
714C_O_FLAG_NORM
715C_O_FLAG_HI
716C_O_FLAG_HIGHEST
717CXXFLAGS_DEBUG_SYMBOLS
718CFLAGS_DEBUG_SYMBOLS
719CXX_FLAG_DEPS
720C_FLAG_DEPS
721SET_SHARED_LIBRARY_MAPFILE
722SET_SHARED_LIBRARY_NAME
723SET_SHARED_LIBRARY_ORIGIN
724SET_EXECUTABLE_ORIGIN
725CXX_FLAG_REORDER
726C_FLAG_REORDER
727RC_FLAGS
728AR_OUT_OPTION
729LD_OUT_OPTION
730EXE_OUT_OPTION
731CC_OUT_OPTION
732STRIPFLAGS
733ARFLAGS
734COMPILER_TARGET_BITS_FLAG
735JT_HOME
736JTREGEXE
737USING_BROKEN_SUSE_LD
738PACKAGE_PATH
739USE_CLANG
740HOTSPOT_LD
741HOTSPOT_CXX
742HOTSPOT_RC
743HOTSPOT_MT
744BUILD_LD
745BUILD_CXX
746BUILD_CC
747BUILD_SYSROOT_LDFLAGS
748BUILD_SYSROOT_CFLAGS
749ac_ct_OBJDUMP
750OBJDUMP
751ac_ct_OBJCOPY
752OBJCOPY
753ac_ct_NM
754ac_ct_STRIP
755GNM
756NM
757STRIP
758MSBUILD
759DUMPBIN
760RC
761MT
762LIPO
763ac_ct_AR
764AR
765AS
766LDCXX
767LD
768CXXCPP
769CPP
770ac_ct_CXX
771CXXFLAGS
772CXX
773ac_ct_PROPER_COMPILER_CXX
774PROPER_COMPILER_CXX
775TOOLCHAIN_PATH_CXX
776POTENTIAL_CXX
777OBJEXT
778EXEEXT
779ac_ct_CC
780CPPFLAGS
781LDFLAGS
782CFLAGS
783CC
784ac_ct_PROPER_COMPILER_CC
785PROPER_COMPILER_CC
786TOOLCHAIN_PATH_CC
787POTENTIAL_CC
788VS_LIB
789VS_INCLUDE
790VS_PATH
791CYGWIN_LINK
792SYSROOT_LDFLAGS
793SYSROOT_CFLAGS
794LEGACY_EXTRA_LDFLAGS
795LEGACY_EXTRA_CXXFLAGS
796LEGACY_EXTRA_CFLAGS
797EXE_SUFFIX
798OBJ_SUFFIX
799STATIC_LIBRARY
800SHARED_LIBRARY
801STATIC_LIBRARY_SUFFIX
802SHARED_LIBRARY_SUFFIX
803LIBRARY_PREFIX
804TOOLCHAIN_TYPE
805BUILD_HOTSPOT
806HOTSPOT_DIST
807BUILD_OUTPUT
808OVERRIDE_SRC_ROOT
809ADD_SRC_ROOT
810JDK_TOPDIR
811NASHORN_TOPDIR
812HOTSPOT_TOPDIR
813JAXWS_TOPDIR
814JAXP_TOPDIR
815CORBA_TOPDIR
816LANGTOOLS_TOPDIR
817BOOT_JDK_BITS
818JAVAC_FLAGS
819BOOT_JDK_SOURCETARGET
820JARSIGNER
821JAR
822JAVAH
823JAVAC
824JAVA
825BOOT_JDK
826JAVA_CHECK
827JAVAC_CHECK
828VERSION_IS_GA
829VERSION_SHORT
830VERSION_STRING
831VERSION_NUMBER_FOUR_POSITIONS
832VERSION_NUMBER
833VERSION_OPT
834VERSION_BUILD
835VERSION_PRE
836VERSION_PATCH
837VERSION_SECURITY
838VERSION_MINOR
839VERSION_MAJOR
840MACOSX_BUNDLE_ID_BASE
841MACOSX_BUNDLE_NAME_BASE
842COMPANY_NAME
843JDK_RC_PLATFORM_NAME
844PRODUCT_SUFFIX
845PRODUCT_NAME
846LAUNCHER_NAME
847COPYRIGHT_YEAR
848COMPRESS_JARS
849UNLIMITED_CRYPTO
850CACERTS_FILE
851TEST_IN_BUILD
852BUILD_HEADLESS
853SUPPORT_HEADFUL
854SUPPORT_HEADLESS
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860SETFILE
861CODESIGN
862XATTR
863DSYMUTIL
864IS_GNU_TIME
865PATCH
866TIME
867STAT
868HG
869READELF
870OTOOL
871LDD
872ZIP
873UNZIP
874FIND_DELETE
875OUTPUT_SYNC
876OUTPUT_SYNC_SUPPORTED
877CHECK_TOOLSDIR_MAKE
878CHECK_TOOLSDIR_GMAKE
879CHECK_MAKE
880CHECK_GMAKE
881MAKE
882PKGHANDLER
883CONFIGURESUPPORT_OUTPUTDIR
884OUTPUT_ROOT
885CONF_NAME
886SPEC
887SDKROOT
888XCODEBUILD
889BUILD_VARIANT_RELEASE
890DEBUG_CLASSFILES
891FASTDEBUG
892VARIANT
893DEBUG_LEVEL
894MACOSX_UNIVERSAL
895INCLUDE_SA
896JVM_VARIANT_CORE
897JVM_VARIANT_ZEROSHARK
898JVM_VARIANT_ZERO
899JVM_VARIANT_KERNEL
900JVM_VARIANT_MINIMAL1
901JVM_VARIANT_CLIENT
902JVM_VARIANT_SERVER
903JVM_VARIANTS
904JVM_INTERPRETER
905JDK_VARIANT
906SET_OPENJDK
907CANONICAL_TOPDIR
908ORIGINAL_TOPDIR
909TOPDIR
910PATH_SEP
911ZERO_ARCHDEF
912DEFINE_CROSS_COMPILE_ARCH
913LP64
914OPENJDK_TARGET_OS_EXPORT_DIR
915OPENJDK_TARGET_CPU_JLI_CFLAGS
916OPENJDK_TARGET_CPU_OSARCH
917OPENJDK_TARGET_CPU_ISADIR
918OPENJDK_TARGET_CPU_LIBDIR
919OPENJDK_TARGET_CPU_LEGACY_LIB
920OPENJDK_TARGET_CPU_LEGACY
921REQUIRED_OS_VERSION
922REQUIRED_OS_NAME
923COMPILE_TYPE
924OPENJDK_TARGET_CPU_ENDIAN
925OPENJDK_TARGET_CPU_BITS
926OPENJDK_TARGET_CPU_ARCH
927OPENJDK_TARGET_CPU
928OPENJDK_TARGET_OS_ENV
929OPENJDK_TARGET_OS_TYPE
930OPENJDK_TARGET_OS
931OPENJDK_BUILD_CPU_ENDIAN
932OPENJDK_BUILD_CPU_BITS
933OPENJDK_BUILD_CPU_ARCH
934OPENJDK_BUILD_CPU
935OPENJDK_BUILD_OS_ENV
936OPENJDK_BUILD_OS_TYPE
937OPENJDK_BUILD_OS
938OPENJDK_BUILD_AUTOCONF_NAME
939OPENJDK_TARGET_AUTOCONF_NAME
940target_os
941target_vendor
942target_cpu
943target
944host_os
945host_vendor
946host_cpu
947host
948build_os
949build_vendor
950build_cpu
951build
952NICE
953CPIO
954DF
955READLINK
956CYGPATH
957SED
958FGREP
959EGREP
960GREP
961AWK
962XARGS
963WHICH
964WC
965UNIQ
966UNAME
967TR
968TOUCH
969TEE
970TAR
971TAIL
972SORT
973SH
974RMDIR
975RM
976PRINTF
977NAWK
978MV
979MKTEMP
980MKDIR
981LS
982LN
983HEAD
984FIND
985FILE
986EXPR
987ECHO
988DIRNAME
989DIFF
990DATE
991CUT
992CP
993COMM
994CMP
995CHMOD
996CAT
997BASH
998BASENAME
999DATE_WHEN_CONFIGURED
1000ORIGINAL_PATH
1001CONFIGURE_COMMAND_LINE
1002target_alias
1003host_alias
1004build_alias
1005LIBS
1006ECHO_T
1007ECHO_N
1008ECHO_C
1009DEFS
1010mandir
1011localedir
1012libdir
1013psdir
1014pdfdir
1015dvidir
1016htmldir
1017infodir
1018docdir
1019oldincludedir
1020includedir
1021localstatedir
1022sharedstatedir
1023sysconfdir
1024datadir
1025datarootdir
1026libexecdir
1027sbindir
1028bindir
1029program_transform_name
1030prefix
1031exec_prefix
1032PACKAGE_URL
1033PACKAGE_BUGREPORT
1034PACKAGE_STRING
1035PACKAGE_VERSION
1036PACKAGE_TARNAME
1037PACKAGE_NAME
1038PATH_SEPARATOR
1039SHELL'
1040ac_subst_files=''
1041ac_user_opts='
1042enable_option_checking
1043with_target_bits
1044enable_openjdk_only
1045with_custom_make_dir
1046with_jdk_variant
1047with_jvm_interpreter
1048with_jvm_variants
1049enable_debug
1050with_debug_level
1051with_devkit
1052with_sys_root
1053with_sysroot
1054with_tools_dir
1055with_toolchain_path
1056with_extra_path
1057with_sdk_name
1058with_conf_name
1059with_output_sync
1060enable_headful
1061enable_hotspot_test_in_build
1062with_cacerts_file
1063enable_unlimited_crypto
1064with_copyright_year
1065with_milestone
1066with_update_version
1067with_user_release_suffix
1068with_build_number
1069with_version_string
1070with_version_pre
1071with_version_opt
1072with_version_build
1073with_version_major
1074with_version_minor
1075with_version_security
1076with_version_patch
1077with_boot_jdk
1078with_add_source_root
1079with_override_source_root
1080with_adds_and_overrides
1081with_override_langtools
1082with_override_corba
1083with_override_jaxp
1084with_override_jaxws
1085with_override_hotspot
1086with_override_nashorn
1087with_override_jdk
1088with_import_hotspot
1089with_toolchain_type
1090with_extra_cflags
1091with_extra_cxxflags
1092with_extra_ldflags
1093with_toolchain_version
1094with_build_devkit
1095with_jtreg
1096enable_warnings_as_errors
1097enable_debug_symbols
1098enable_zip_debug_info
1099enable_native_coverage
1100with_stdc__lib
1101with_msvcr_dll
1102with_msvcp_dll
1103with_x
1104with_cups
1105with_cups_include
1106with_freetype
1107with_freetype_include
1108with_freetype_lib
1109with_freetype_src
1110enable_freetype_bundling
1111with_alsa
1112with_alsa_include
1113with_alsa_lib
1114with_libffi
1115with_libffi_include
1116with_libffi_lib
1117with_libjpeg
1118with_giflib
1119with_libpng
1120with_zlib
1121with_lcms
1122with_dxsdk
1123with_dxsdk_lib
1124with_dxsdk_include
1125with_num_cores
1126with_memory_size
1127with_jobs
1128with_boot_jdk_jvmargs
1129with_sjavac_server_java
1130enable_sjavac
1131enable_javac_server
1132enable_precompiled_headers
1133enable_ccache
1134with_ccache_dir
1135'
1136      ac_precious_vars='build_alias
1137host_alias
1138target_alias
1139BASENAME
1140BASH
1141CAT
1142CHMOD
1143CMP
1144COMM
1145CP
1146CUT
1147DATE
1148DIFF
1149DIRNAME
1150ECHO
1151EXPR
1152FILE
1153FIND
1154HEAD
1155LN
1156LS
1157MKDIR
1158MKTEMP
1159MV
1160NAWK
1161PRINTF
1162RM
1163RMDIR
1164SH
1165SORT
1166TAIL
1167TAR
1168TEE
1169TOUCH
1170TR
1171UNAME
1172UNIQ
1173WC
1174WHICH
1175XARGS
1176AWK
1177GREP
1178EGREP
1179FGREP
1180SED
1181CYGPATH
1182READLINK
1183DF
1184CPIO
1185NICE
1186MAKE
1187UNZIP
1188ZIP
1189LDD
1190OTOOL
1191READELF
1192HG
1193STAT
1194TIME
1195PATCH
1196DSYMUTIL
1197XATTR
1198CODESIGN
1199SETFILE
1200PKG_CONFIG
1201JAVA
1202JAVAC
1203JAVAH
1204JAR
1205JARSIGNER
1206CC
1207CFLAGS
1208LDFLAGS
1209LIBS
1210CPPFLAGS
1211CXX
1212CXXFLAGS
1213CCC
1214CPP
1215CXXCPP
1216AS
1217AR
1218LIPO
1219STRIP
1220NM
1221GNM
1222OBJCOPY
1223OBJDUMP
1224BUILD_CC
1225BUILD_CXX
1226JTREGEXE
1227XMKMF
1228FREETYPE_CFLAGS
1229FREETYPE_LIBS
1230ALSA_CFLAGS
1231ALSA_LIBS
1232LIBFFI_CFLAGS
1233LIBFFI_LIBS
1234PNG_CFLAGS
1235PNG_LIBS
1236LCMS_CFLAGS
1237LCMS_LIBS
1238CCACHE'
1239
1240
1241# Initialize some variables set by options.
1242ac_init_help=
1243ac_init_version=false
1244ac_unrecognized_opts=
1245ac_unrecognized_sep=
1246# The variables have the same names as the options, with
1247# dashes changed to underlines.
1248cache_file=/dev/null
1249exec_prefix=NONE
1250no_create=
1251no_recursion=
1252prefix=NONE
1253program_prefix=NONE
1254program_suffix=NONE
1255program_transform_name=s,x,x,
1256silent=
1257site=
1258srcdir=
1259verbose=
1260x_includes=NONE
1261x_libraries=NONE
1262
1263# Installation directory options.
1264# These are left unexpanded so users can "make install exec_prefix=/foo"
1265# and all the variables that are supposed to be based on exec_prefix
1266# by default will actually change.
1267# Use braces instead of parens because sh, perl, etc. also accept them.
1268# (The list follows the same order as the GNU Coding Standards.)
1269bindir='${exec_prefix}/bin'
1270sbindir='${exec_prefix}/sbin'
1271libexecdir='${exec_prefix}/libexec'
1272datarootdir='${prefix}/share'
1273datadir='${datarootdir}'
1274sysconfdir='${prefix}/etc'
1275sharedstatedir='${prefix}/com'
1276localstatedir='${prefix}/var'
1277includedir='${prefix}/include'
1278oldincludedir='/usr/include'
1279docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1280infodir='${datarootdir}/info'
1281htmldir='${docdir}'
1282dvidir='${docdir}'
1283pdfdir='${docdir}'
1284psdir='${docdir}'
1285libdir='${exec_prefix}/lib'
1286localedir='${datarootdir}/locale'
1287mandir='${datarootdir}/man'
1288
1289ac_prev=
1290ac_dashdash=
1291for ac_option
1292do
1293  # If the previous option needs an argument, assign it.
1294  if test -n "$ac_prev"; then
1295    eval $ac_prev=\$ac_option
1296    ac_prev=
1297    continue
1298  fi
1299
1300  case $ac_option in
1301  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1302  *=)   ac_optarg= ;;
1303  *)    ac_optarg=yes ;;
1304  esac
1305
1306  # Accept the important Cygnus configure options, so we can diagnose typos.
1307
1308  case $ac_dashdash$ac_option in
1309  --)
1310    ac_dashdash=yes ;;
1311
1312  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1313    ac_prev=bindir ;;
1314  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1315    bindir=$ac_optarg ;;
1316
1317  -build | --build | --buil | --bui | --bu)
1318    ac_prev=build_alias ;;
1319  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1320    build_alias=$ac_optarg ;;
1321
1322  -cache-file | --cache-file | --cache-fil | --cache-fi \
1323  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1324    ac_prev=cache_file ;;
1325  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1326  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1327    cache_file=$ac_optarg ;;
1328
1329  --config-cache | -C)
1330    cache_file=config.cache ;;
1331
1332  -datadir | --datadir | --datadi | --datad)
1333    ac_prev=datadir ;;
1334  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1335    datadir=$ac_optarg ;;
1336
1337  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1338  | --dataroo | --dataro | --datar)
1339    ac_prev=datarootdir ;;
1340  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1341  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1342    datarootdir=$ac_optarg ;;
1343
1344  -disable-* | --disable-*)
1345    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1346    # Reject names that are not valid shell variable names.
1347    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1348      as_fn_error $? "invalid feature name: $ac_useropt"
1349    ac_useropt_orig=$ac_useropt
1350    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1351    case $ac_user_opts in
1352      *"
1353"enable_$ac_useropt"
1354"*) ;;
1355      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1356	 ac_unrecognized_sep=', ';;
1357    esac
1358    eval enable_$ac_useropt=no ;;
1359
1360  -docdir | --docdir | --docdi | --doc | --do)
1361    ac_prev=docdir ;;
1362  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1363    docdir=$ac_optarg ;;
1364
1365  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1366    ac_prev=dvidir ;;
1367  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1368    dvidir=$ac_optarg ;;
1369
1370  -enable-* | --enable-*)
1371    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1372    # Reject names that are not valid shell variable names.
1373    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1374      as_fn_error $? "invalid feature name: $ac_useropt"
1375    ac_useropt_orig=$ac_useropt
1376    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1377    case $ac_user_opts in
1378      *"
1379"enable_$ac_useropt"
1380"*) ;;
1381      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1382	 ac_unrecognized_sep=', ';;
1383    esac
1384    eval enable_$ac_useropt=\$ac_optarg ;;
1385
1386  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1387  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1388  | --exec | --exe | --ex)
1389    ac_prev=exec_prefix ;;
1390  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1391  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1392  | --exec=* | --exe=* | --ex=*)
1393    exec_prefix=$ac_optarg ;;
1394
1395  -gas | --gas | --ga | --g)
1396    # Obsolete; use --with-gas.
1397    with_gas=yes ;;
1398
1399  -help | --help | --hel | --he | -h)
1400    ac_init_help=long ;;
1401  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1402    ac_init_help=recursive ;;
1403  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1404    ac_init_help=short ;;
1405
1406  -host | --host | --hos | --ho)
1407    ac_prev=host_alias ;;
1408  -host=* | --host=* | --hos=* | --ho=*)
1409    host_alias=$ac_optarg ;;
1410
1411  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1412    ac_prev=htmldir ;;
1413  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1414  | --ht=*)
1415    htmldir=$ac_optarg ;;
1416
1417  -includedir | --includedir | --includedi | --included | --include \
1418  | --includ | --inclu | --incl | --inc)
1419    ac_prev=includedir ;;
1420  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1421  | --includ=* | --inclu=* | --incl=* | --inc=*)
1422    includedir=$ac_optarg ;;
1423
1424  -infodir | --infodir | --infodi | --infod | --info | --inf)
1425    ac_prev=infodir ;;
1426  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1427    infodir=$ac_optarg ;;
1428
1429  -libdir | --libdir | --libdi | --libd)
1430    ac_prev=libdir ;;
1431  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1432    libdir=$ac_optarg ;;
1433
1434  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1435  | --libexe | --libex | --libe)
1436    ac_prev=libexecdir ;;
1437  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1438  | --libexe=* | --libex=* | --libe=*)
1439    libexecdir=$ac_optarg ;;
1440
1441  -localedir | --localedir | --localedi | --localed | --locale)
1442    ac_prev=localedir ;;
1443  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1444    localedir=$ac_optarg ;;
1445
1446  -localstatedir | --localstatedir | --localstatedi | --localstated \
1447  | --localstate | --localstat | --localsta | --localst | --locals)
1448    ac_prev=localstatedir ;;
1449  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1450  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1451    localstatedir=$ac_optarg ;;
1452
1453  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1454    ac_prev=mandir ;;
1455  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1456    mandir=$ac_optarg ;;
1457
1458  -nfp | --nfp | --nf)
1459    # Obsolete; use --without-fp.
1460    with_fp=no ;;
1461
1462  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1463  | --no-cr | --no-c | -n)
1464    no_create=yes ;;
1465
1466  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1467  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1468    no_recursion=yes ;;
1469
1470  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1471  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1472  | --oldin | --oldi | --old | --ol | --o)
1473    ac_prev=oldincludedir ;;
1474  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1475  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1476  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1477    oldincludedir=$ac_optarg ;;
1478
1479  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1480    ac_prev=prefix ;;
1481  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1482    prefix=$ac_optarg ;;
1483
1484  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1485  | --program-pre | --program-pr | --program-p)
1486    ac_prev=program_prefix ;;
1487  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1488  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1489    program_prefix=$ac_optarg ;;
1490
1491  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1492  | --program-suf | --program-su | --program-s)
1493    ac_prev=program_suffix ;;
1494  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1495  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1496    program_suffix=$ac_optarg ;;
1497
1498  -program-transform-name | --program-transform-name \
1499  | --program-transform-nam | --program-transform-na \
1500  | --program-transform-n | --program-transform- \
1501  | --program-transform | --program-transfor \
1502  | --program-transfo | --program-transf \
1503  | --program-trans | --program-tran \
1504  | --progr-tra | --program-tr | --program-t)
1505    ac_prev=program_transform_name ;;
1506  -program-transform-name=* | --program-transform-name=* \
1507  | --program-transform-nam=* | --program-transform-na=* \
1508  | --program-transform-n=* | --program-transform-=* \
1509  | --program-transform=* | --program-transfor=* \
1510  | --program-transfo=* | --program-transf=* \
1511  | --program-trans=* | --program-tran=* \
1512  | --progr-tra=* | --program-tr=* | --program-t=*)
1513    program_transform_name=$ac_optarg ;;
1514
1515  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1516    ac_prev=pdfdir ;;
1517  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1518    pdfdir=$ac_optarg ;;
1519
1520  -psdir | --psdir | --psdi | --psd | --ps)
1521    ac_prev=psdir ;;
1522  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1523    psdir=$ac_optarg ;;
1524
1525  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1526  | -silent | --silent | --silen | --sile | --sil)
1527    silent=yes ;;
1528
1529  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1530    ac_prev=sbindir ;;
1531  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1532  | --sbi=* | --sb=*)
1533    sbindir=$ac_optarg ;;
1534
1535  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1536  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1537  | --sharedst | --shareds | --shared | --share | --shar \
1538  | --sha | --sh)
1539    ac_prev=sharedstatedir ;;
1540  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1541  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1542  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1543  | --sha=* | --sh=*)
1544    sharedstatedir=$ac_optarg ;;
1545
1546  -site | --site | --sit)
1547    ac_prev=site ;;
1548  -site=* | --site=* | --sit=*)
1549    site=$ac_optarg ;;
1550
1551  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1552    ac_prev=srcdir ;;
1553  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1554    srcdir=$ac_optarg ;;
1555
1556  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1557  | --syscon | --sysco | --sysc | --sys | --sy)
1558    ac_prev=sysconfdir ;;
1559  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1560  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1561    sysconfdir=$ac_optarg ;;
1562
1563  -target | --target | --targe | --targ | --tar | --ta | --t)
1564    ac_prev=target_alias ;;
1565  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1566    target_alias=$ac_optarg ;;
1567
1568  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1569    verbose=yes ;;
1570
1571  -version | --version | --versio | --versi | --vers | -V)
1572    ac_init_version=: ;;
1573
1574  -with-* | --with-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=\$ac_optarg ;;
1589
1590  -without-* | --without-*)
1591    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1592    # Reject names that are not valid shell variable names.
1593    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1594      as_fn_error $? "invalid package name: $ac_useropt"
1595    ac_useropt_orig=$ac_useropt
1596    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1597    case $ac_user_opts in
1598      *"
1599"with_$ac_useropt"
1600"*) ;;
1601      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1602	 ac_unrecognized_sep=', ';;
1603    esac
1604    eval with_$ac_useropt=no ;;
1605
1606  --x)
1607    # Obsolete; use --with-x.
1608    with_x=yes ;;
1609
1610  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1611  | --x-incl | --x-inc | --x-in | --x-i)
1612    ac_prev=x_includes ;;
1613  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1614  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1615    x_includes=$ac_optarg ;;
1616
1617  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1618  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1619    ac_prev=x_libraries ;;
1620  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1621  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1622    x_libraries=$ac_optarg ;;
1623
1624  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1625Try \`$0 --help' for more information"
1626    ;;
1627
1628  *=*)
1629    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1630    # Reject names that are not valid shell variable names.
1631    case $ac_envvar in #(
1632      '' | [0-9]* | *[!_$as_cr_alnum]* )
1633      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1634    esac
1635    eval $ac_envvar=\$ac_optarg
1636    export $ac_envvar ;;
1637
1638  *)
1639    # FIXME: should be removed in autoconf 3.0.
1640    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1641    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1642      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1643    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1644    ;;
1645
1646  esac
1647done
1648
1649if test -n "$ac_prev"; then
1650  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1651  as_fn_error $? "missing argument to $ac_option"
1652fi
1653
1654if test -n "$ac_unrecognized_opts"; then
1655  case $enable_option_checking in
1656    no) ;;
1657    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1658    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1659  esac
1660fi
1661
1662# Check all directory arguments for consistency.
1663for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1664		datadir sysconfdir sharedstatedir localstatedir includedir \
1665		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1666		libdir localedir mandir
1667do
1668  eval ac_val=\$$ac_var
1669  # Remove trailing slashes.
1670  case $ac_val in
1671    */ )
1672      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1673      eval $ac_var=\$ac_val;;
1674  esac
1675  # Be sure to have absolute directory names.
1676  case $ac_val in
1677    [\\/$]* | ?:[\\/]* )  continue;;
1678    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1679  esac
1680  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1681done
1682
1683# There might be people who depend on the old broken behavior: `$host'
1684# used to hold the argument of --host etc.
1685# FIXME: To remove some day.
1686build=$build_alias
1687host=$host_alias
1688target=$target_alias
1689
1690# FIXME: To remove some day.
1691if test "x$host_alias" != x; then
1692  if test "x$build_alias" = x; then
1693    cross_compiling=maybe
1694  elif test "x$build_alias" != "x$host_alias"; then
1695    cross_compiling=yes
1696  fi
1697fi
1698
1699ac_tool_prefix=
1700test -n "$host_alias" && ac_tool_prefix=$host_alias-
1701
1702test "$silent" = yes && exec 6>/dev/null
1703
1704
1705ac_pwd=`pwd` && test -n "$ac_pwd" &&
1706ac_ls_di=`ls -di .` &&
1707ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1708  as_fn_error $? "working directory cannot be determined"
1709test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1710  as_fn_error $? "pwd does not report name of working directory"
1711
1712
1713# Find the source files, if location was not specified.
1714if test -z "$srcdir"; then
1715  ac_srcdir_defaulted=yes
1716  # Try the directory containing this script, then the parent directory.
1717  ac_confdir=`$as_dirname -- "$as_myself" ||
1718$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1719	 X"$as_myself" : 'X\(//\)[^/]' \| \
1720	 X"$as_myself" : 'X\(//\)$' \| \
1721	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1722$as_echo X"$as_myself" |
1723    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1724	    s//\1/
1725	    q
1726	  }
1727	  /^X\(\/\/\)[^/].*/{
1728	    s//\1/
1729	    q
1730	  }
1731	  /^X\(\/\/\)$/{
1732	    s//\1/
1733	    q
1734	  }
1735	  /^X\(\/\).*/{
1736	    s//\1/
1737	    q
1738	  }
1739	  s/.*/./; q'`
1740  srcdir=$ac_confdir
1741  if test ! -r "$srcdir/$ac_unique_file"; then
1742    srcdir=..
1743  fi
1744else
1745  ac_srcdir_defaulted=no
1746fi
1747if test ! -r "$srcdir/$ac_unique_file"; then
1748  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1749  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1750fi
1751ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1752ac_abs_confdir=`(
1753	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1754	pwd)`
1755# When building in place, set srcdir=.
1756if test "$ac_abs_confdir" = "$ac_pwd"; then
1757  srcdir=.
1758fi
1759# Remove unnecessary trailing slashes from srcdir.
1760# Double slashes in file names in object file debugging info
1761# mess up M-x gdb in Emacs.
1762case $srcdir in
1763*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1764esac
1765for ac_var in $ac_precious_vars; do
1766  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1767  eval ac_env_${ac_var}_value=\$${ac_var}
1768  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1769  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1770done
1771
1772#
1773# Report the --help message.
1774#
1775if test "$ac_init_help" = "long"; then
1776  # Omit some internal or obsolete options to make the list less imposing.
1777  # This message is too long to be a string in the A/UX 3.1 sh.
1778  cat <<_ACEOF
1779\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1780
1781Usage: $0 [OPTION]... [VAR=VALUE]...
1782
1783To assign environment variables (e.g., CC, CFLAGS...), specify them as
1784VAR=VALUE.  See below for descriptions of some of the useful variables.
1785
1786Defaults for the options are specified in brackets.
1787
1788Configuration:
1789  -h, --help              display this help and exit
1790      --help=short        display options specific to this package
1791      --help=recursive    display the short help of all the included packages
1792  -V, --version           display version information and exit
1793  -q, --quiet, --silent   do not print \`checking ...' messages
1794      --cache-file=FILE   cache test results in FILE [disabled]
1795  -C, --config-cache      alias for \`--cache-file=config.cache'
1796  -n, --no-create         do not create output files
1797      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1798
1799Installation directories:
1800  --prefix=PREFIX         install architecture-independent files in PREFIX
1801                          [$ac_default_prefix]
1802  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1803                          [PREFIX]
1804
1805By default, \`make install' will install all the files in
1806\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1807an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1808for instance \`--prefix=\$HOME'.
1809
1810For better control, use the options below.
1811
1812Fine tuning of the installation directories:
1813  --bindir=DIR            user executables [EPREFIX/bin]
1814  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1815  --libexecdir=DIR        program executables [EPREFIX/libexec]
1816  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1817  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1818  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1819  --libdir=DIR            object code libraries [EPREFIX/lib]
1820  --includedir=DIR        C header files [PREFIX/include]
1821  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1822  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1823  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1824  --infodir=DIR           info documentation [DATAROOTDIR/info]
1825  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1826  --mandir=DIR            man documentation [DATAROOTDIR/man]
1827  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1828  --htmldir=DIR           html documentation [DOCDIR]
1829  --dvidir=DIR            dvi documentation [DOCDIR]
1830  --pdfdir=DIR            pdf documentation [DOCDIR]
1831  --psdir=DIR             ps documentation [DOCDIR]
1832_ACEOF
1833
1834  cat <<\_ACEOF
1835
1836X features:
1837  --x-includes=DIR    X include files are in DIR
1838  --x-libraries=DIR   X library files are in DIR
1839
1840System types:
1841  --build=BUILD     configure for building on BUILD [guessed]
1842  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1843  --target=TARGET   configure for building compilers for TARGET [HOST]
1844_ACEOF
1845fi
1846
1847if test -n "$ac_init_help"; then
1848  case $ac_init_help in
1849     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1850   esac
1851  cat <<\_ACEOF
1852
1853Optional Features:
1854  --disable-option-checking  ignore unrecognized --enable/--with options
1855  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1856  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1857  --enable-openjdk-only   suppress building custom source even if present
1858                          [disabled]
1859  --enable-debug          set the debug level to fastdebug (shorthand for
1860                          --with-debug-level=fastdebug) [disabled]
1861  --disable-headful       disable building headful support (graphical UI
1862                          support) [enabled]
1863  --enable-hotspot-test-in-build
1864                          run the Queens test after Hotspot build [disabled]
1865  --enable-unlimited-crypto
1866                          Enable unlimited crypto policy [disabled]
1867  --disable-warnings-as-errors
1868                          do not consider native warnings to be an error
1869                          [enabled]
1870  --disable-debug-symbols disable generation of debug symbols [enabled]
1871  --disable-zip-debug-info
1872                          disable zipping of debug-info files [enabled]
1873  --enable-native-coverage
1874                          enable native compilation with code coverage
1875                          data[disabled]
1876  --disable-freetype-bundling
1877                          disable bundling of the freetype library with the
1878                          build result [enabled on Windows or when using
1879                          --with-freetype, disabled otherwise]
1880  --enable-sjavac         use sjavac to do fast incremental compiles
1881                          [disabled]
1882  --enable-javac-server   use only the server part of sjavac for faster javac
1883                          compiles [disabled]
1884  --disable-precompiled-headers
1885                          disable using precompiled headers when compiling C++
1886                          [enabled]
1887  --enable-ccache         enable using ccache to speed up recompilations
1888                          [disabled]
1889
1890Optional Packages:
1891  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1892  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1893  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1894                          support it), e.g. --with-target-bits=32 [guessed]
1895  --with-custom-make-dir  Deprecated. Option is kept for backwards
1896                          compatibility and is ignored
1897  --with-jdk-variant      JDK variant to build (normal) [normal]
1898  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1899  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1900                          client, minimal1, kernel, zero, zeroshark, core)
1901                          [server]
1902  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1903                          optimized (HotSpot build only)) [release]
1904  --with-devkit           use this devkit for compilers, tools and resources
1905  --with-sys-root         alias for --with-sysroot for backwards compatability
1906  --with-sysroot          use this directory as sysroot
1907  --with-tools-dir        alias for --with-toolchain-path for backwards
1908                          compatibility
1909  --with-toolchain-path   prepend these directories when searching for
1910                          toolchain binaries (compilers etc)
1911  --with-extra-path       prepend these directories to the default path
1912  --with-sdk-name         use the platform SDK of the given name. [macosx]
1913  --with-conf-name        use this as the name of the configuration [generated
1914                          from important configuration options]
1915  --with-output-sync      set make output sync type if supported by make.
1916                          [recurse]
1917  --with-cacerts-file     specify alternative cacerts file
1918  --with-copyright-year   Set copyright year value for build [current year]
1919  --with-milestone        Deprecated. Option is kept for backwards
1920                          compatibility and is ignored
1921  --with-update-version   Deprecated. Option is kept for backwards
1922                          compatibility and is ignored
1923  --with-user-release-suffix
1924                          Deprecated. Option is kept for backwards
1925                          compatibility and is ignored
1926  --with-build-number     Deprecated. Option is kept for backwards
1927                          compatibility and is ignored
1928  --with-version-string   Set version string [calculated]
1929  --with-version-pre      Set the base part of the version 'PRE' field
1930                          (pre-release identifier) ['internal']
1931  --with-version-opt      Set version 'OPT' field (build metadata)
1932                          [<timestamp>.<user>.<dirname>]
1933  --with-version-build    Set version 'BUILD' field (build number) [not
1934                          specified]
1935  --with-version-major    Set version 'MAJOR' field (first number) [current
1936                          source value]
1937  --with-version-minor    Set version 'MINOR' field (second number) [current
1938                          source value]
1939  --with-version-security Set version 'SECURITY' field (third number) [current
1940                          source value]
1941  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1942                          specified]
1943  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1944  --with-add-source-root  for each and every source directory, look in this
1945                          additional source root for the same directory; if it
1946                          exists and have files in it, include it in the build
1947  --with-override-source-root
1948                          for each and every source directory, look in this
1949                          override source root for the same directory; if it
1950                          exists, use that directory instead and ignore the
1951                          directory in the original source root
1952  --with-adds-and-overrides
1953                          use the subdirs 'adds' and 'overrides' in the
1954                          specified directory as add-source-root and
1955                          override-source-root
1956  --with-override-langtools
1957                          use this langtools dir for the build
1958  --with-override-corba   use this corba dir for the build
1959  --with-override-jaxp    use this jaxp dir for the build
1960  --with-override-jaxws   use this jaxws dir for the build
1961  --with-override-hotspot use this hotspot dir for the build
1962  --with-override-nashorn use this nashorn dir for the build
1963  --with-override-jdk     use this jdk dir for the build
1964  --with-import-hotspot   import hotspot binaries from this jdk image or
1965                          hotspot build dist dir instead of building from
1966                          source
1967  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1968                          to show possible values [platform dependent]
1969  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1970  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1971  --with-extra-ldflags    extra flags to be used when linking jdk
1972  --with-toolchain-version
1973                          the version of the toolchain to look for, use
1974                          '--help' to show possible values [platform
1975                          dependent]
1976  --with-build-devkit     Devkit to use for the build platform toolchain
1977  --with-jtreg            Regression Test Harness [probed]
1978  --with-stdc++lib=<static>,<dynamic>,<default>
1979                          force linking of the C++ runtime on Linux to either
1980                          static or dynamic, default is static with dynamic as
1981                          fallback
1982  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1983                          (Windows only) [probed]
1984  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1985                          (Windows only) [probed]
1986  --with-x                use the X Window System
1987  --with-cups             specify prefix directory for the cups package
1988                          (expecting the headers under PATH/include)
1989  --with-cups-include     specify directory for the cups include files
1990  --with-freetype         specify prefix directory for the freetype package
1991                          (expecting the libraries under PATH/lib and the
1992                          headers under PATH/include)
1993  --with-freetype-include specify directory for the freetype include files
1994  --with-freetype-lib     specify directory for the freetype library
1995  --with-freetype-src     specify directory with freetype sources to
1996                          automatically build the library (experimental,
1997                          Windows-only)
1998  --with-alsa             specify prefix directory for the alsa package
1999                          (expecting the libraries under PATH/lib and the
2000                          headers under PATH/include)
2001  --with-alsa-include     specify directory for the alsa include files
2002  --with-alsa-lib         specify directory for the alsa library
2003  --with-libffi           specify prefix directory for the libffi package
2004                          (expecting the libraries under PATH/lib and the
2005                          headers under PATH/include)
2006  --with-libffi-include   specify directory for the libffi include files
2007  --with-libffi-lib       specify directory for the libffi library
2008  --with-libjpeg          use libjpeg from build system or OpenJDK source
2009                          (system, bundled) [bundled]
2010  --with-giflib           use giflib from build system or OpenJDK source
2011                          (system, bundled) [bundled]
2012  --with-libpng           use libpng from build system or OpenJDK source
2013                          (system, bundled) [bundled]
2014  --with-zlib             use zlib from build system or OpenJDK source
2015                          (system, bundled) [bundled]
2016  --with-lcms             use lcms2 from build system or OpenJDK source
2017                          (system, bundled) [bundled]
2018  --with-dxsdk            Deprecated. Option is kept for backwards
2019                          compatibility and is ignored
2020  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2021                          compatibility and is ignored
2022  --with-dxsdk-include    Deprecated. Option is kept for backwards
2023                          compatibility and is ignored
2024  --with-num-cores        number of cores in the build system, e.g.
2025                          --with-num-cores=8 [probed]
2026  --with-memory-size      memory (in MB) available in the build system, e.g.
2027                          --with-memory-size=1024 [probed]
2028  --with-jobs             number of parallel jobs to let make run [calculated
2029                          based on cores and memory]
2030  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2031                          invocations of boot JDK, overriding the default
2032                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2033                          -enableassertions"
2034  --with-sjavac-server-java
2035                          use this java binary for running the sjavac
2036                          background server [Boot JDK java]
2037  --with-ccache-dir       where to store ccache files [~/.ccache]
2038
2039Some influential environment variables:
2040  BASENAME    Override default value for BASENAME
2041  BASH        Override default value for BASH
2042  CAT         Override default value for CAT
2043  CHMOD       Override default value for CHMOD
2044  CMP         Override default value for CMP
2045  COMM        Override default value for COMM
2046  CP          Override default value for CP
2047  CUT         Override default value for CUT
2048  DATE        Override default value for DATE
2049  DIFF        Override default value for DIFF
2050  DIRNAME     Override default value for DIRNAME
2051  ECHO        Override default value for ECHO
2052  EXPR        Override default value for EXPR
2053  FILE        Override default value for FILE
2054  FIND        Override default value for FIND
2055  HEAD        Override default value for HEAD
2056  LN          Override default value for LN
2057  LS          Override default value for LS
2058  MKDIR       Override default value for MKDIR
2059  MKTEMP      Override default value for MKTEMP
2060  MV          Override default value for MV
2061  NAWK        Override default value for NAWK
2062  PRINTF      Override default value for PRINTF
2063  RM          Override default value for RM
2064  RMDIR       Override default value for RMDIR
2065  SH          Override default value for SH
2066  SORT        Override default value for SORT
2067  TAIL        Override default value for TAIL
2068  TAR         Override default value for TAR
2069  TEE         Override default value for TEE
2070  TOUCH       Override default value for TOUCH
2071  TR          Override default value for TR
2072  UNAME       Override default value for UNAME
2073  UNIQ        Override default value for UNIQ
2074  WC          Override default value for WC
2075  WHICH       Override default value for WHICH
2076  XARGS       Override default value for XARGS
2077  AWK         Override default value for AWK
2078  GREP        Override default value for GREP
2079  EGREP       Override default value for EGREP
2080  FGREP       Override default value for FGREP
2081  SED         Override default value for SED
2082  CYGPATH     Override default value for CYGPATH
2083  READLINK    Override default value for READLINK
2084  DF          Override default value for DF
2085  CPIO        Override default value for CPIO
2086  NICE        Override default value for NICE
2087  MAKE        Override default value for MAKE
2088  UNZIP       Override default value for UNZIP
2089  ZIP         Override default value for ZIP
2090  LDD         Override default value for LDD
2091  OTOOL       Override default value for OTOOL
2092  READELF     Override default value for READELF
2093  HG          Override default value for HG
2094  STAT        Override default value for STAT
2095  TIME        Override default value for TIME
2096  PATCH       Override default value for PATCH
2097  DSYMUTIL    Override default value for DSYMUTIL
2098  XATTR       Override default value for XATTR
2099  CODESIGN    Override default value for CODESIGN
2100  SETFILE     Override default value for SETFILE
2101  PKG_CONFIG  path to pkg-config utility
2102  JAVA        Override default value for JAVA
2103  JAVAC       Override default value for JAVAC
2104  JAVAH       Override default value for JAVAH
2105  JAR         Override default value for JAR
2106  JARSIGNER   Override default value for JARSIGNER
2107  CC          C compiler command
2108  CFLAGS      C compiler flags
2109  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2110              nonstandard directory <lib dir>
2111  LIBS        libraries to pass to the linker, e.g. -l<library>
2112  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2113              you have headers in a nonstandard directory <include dir>
2114  CXX         C++ compiler command
2115  CXXFLAGS    C++ compiler flags
2116  CPP         C preprocessor
2117  CXXCPP      C++ preprocessor
2118  AS          Override default value for AS
2119  AR          Override default value for AR
2120  LIPO        Override default value for LIPO
2121  STRIP       Override default value for STRIP
2122  NM          Override default value for NM
2123  GNM         Override default value for GNM
2124  OBJCOPY     Override default value for OBJCOPY
2125  OBJDUMP     Override default value for OBJDUMP
2126  BUILD_CC    Override default value for BUILD_CC
2127  BUILD_CXX   Override default value for BUILD_CXX
2128  JTREGEXE    Override default value for JTREGEXE
2129  XMKMF       Path to xmkmf, Makefile generator for X Window System
2130  FREETYPE_CFLAGS
2131              C compiler flags for FREETYPE, overriding pkg-config
2132  FREETYPE_LIBS
2133              linker flags for FREETYPE, overriding pkg-config
2134  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2135  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2136  LIBFFI_CFLAGS
2137              C compiler flags for LIBFFI, overriding pkg-config
2138  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2139  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2140  PNG_LIBS    linker flags for PNG, overriding pkg-config
2141  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2142  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2143  CCACHE      Override default value for CCACHE
2144
2145Use these variables to override the choices made by `configure' or to help
2146it to find libraries and programs with nonstandard names/locations.
2147
2148Report bugs to <build-dev@openjdk.java.net>.
2149OpenJDK home page: <http://openjdk.java.net>.
2150_ACEOF
2151ac_status=$?
2152fi
2153
2154if test "$ac_init_help" = "recursive"; then
2155  # If there are subdirs, report their specific --help.
2156  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2157    test -d "$ac_dir" ||
2158      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2159      continue
2160    ac_builddir=.
2161
2162case "$ac_dir" in
2163.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2164*)
2165  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2166  # A ".." for each directory in $ac_dir_suffix.
2167  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2168  case $ac_top_builddir_sub in
2169  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2170  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2171  esac ;;
2172esac
2173ac_abs_top_builddir=$ac_pwd
2174ac_abs_builddir=$ac_pwd$ac_dir_suffix
2175# for backward compatibility:
2176ac_top_builddir=$ac_top_build_prefix
2177
2178case $srcdir in
2179  .)  # We are building in place.
2180    ac_srcdir=.
2181    ac_top_srcdir=$ac_top_builddir_sub
2182    ac_abs_top_srcdir=$ac_pwd ;;
2183  [\\/]* | ?:[\\/]* )  # Absolute name.
2184    ac_srcdir=$srcdir$ac_dir_suffix;
2185    ac_top_srcdir=$srcdir
2186    ac_abs_top_srcdir=$srcdir ;;
2187  *) # Relative name.
2188    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2189    ac_top_srcdir=$ac_top_build_prefix$srcdir
2190    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2191esac
2192ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2193
2194    cd "$ac_dir" || { ac_status=$?; continue; }
2195    # Check for guested configure.
2196    if test -f "$ac_srcdir/configure.gnu"; then
2197      echo &&
2198      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2199    elif test -f "$ac_srcdir/configure"; then
2200      echo &&
2201      $SHELL "$ac_srcdir/configure" --help=recursive
2202    else
2203      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2204    fi || ac_status=$?
2205    cd "$ac_pwd" || { ac_status=$?; break; }
2206  done
2207fi
2208
2209test -n "$ac_init_help" && exit $ac_status
2210if $ac_init_version; then
2211  cat <<\_ACEOF
2212OpenJDK configure jdk9
2213generated by GNU Autoconf 2.69
2214
2215Copyright (C) 2012 Free Software Foundation, Inc.
2216This configure script is free software; the Free Software Foundation
2217gives unlimited permission to copy, distribute and modify it.
2218_ACEOF
2219  exit
2220fi
2221
2222## ------------------------ ##
2223## Autoconf initialization. ##
2224## ------------------------ ##
2225
2226# ac_fn_c_try_compile LINENO
2227# --------------------------
2228# Try to compile conftest.$ac_ext, and return whether this succeeded.
2229ac_fn_c_try_compile ()
2230{
2231  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2232  rm -f conftest.$ac_objext
2233  if { { ac_try="$ac_compile"
2234case "(($ac_try" in
2235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2236  *) ac_try_echo=$ac_try;;
2237esac
2238eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2239$as_echo "$ac_try_echo"; } >&5
2240  (eval "$ac_compile") 2>conftest.err
2241  ac_status=$?
2242  if test -s conftest.err; then
2243    grep -v '^ *+' conftest.err >conftest.er1
2244    cat conftest.er1 >&5
2245    mv -f conftest.er1 conftest.err
2246  fi
2247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2248  test $ac_status = 0; } && {
2249	 test -z "$ac_c_werror_flag" ||
2250	 test ! -s conftest.err
2251       } && test -s conftest.$ac_objext; then :
2252  ac_retval=0
2253else
2254  $as_echo "$as_me: failed program was:" >&5
2255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257	ac_retval=1
2258fi
2259  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260  as_fn_set_status $ac_retval
2261
2262} # ac_fn_c_try_compile
2263
2264# ac_fn_cxx_try_compile LINENO
2265# ----------------------------
2266# Try to compile conftest.$ac_ext, and return whether this succeeded.
2267ac_fn_cxx_try_compile ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  rm -f conftest.$ac_objext
2271  if { { ac_try="$ac_compile"
2272case "(($ac_try" in
2273  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2274  *) ac_try_echo=$ac_try;;
2275esac
2276eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2277$as_echo "$ac_try_echo"; } >&5
2278  (eval "$ac_compile") 2>conftest.err
2279  ac_status=$?
2280  if test -s conftest.err; then
2281    grep -v '^ *+' conftest.err >conftest.er1
2282    cat conftest.er1 >&5
2283    mv -f conftest.er1 conftest.err
2284  fi
2285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2286  test $ac_status = 0; } && {
2287	 test -z "$ac_cxx_werror_flag" ||
2288	 test ! -s conftest.err
2289       } && test -s conftest.$ac_objext; then :
2290  ac_retval=0
2291else
2292  $as_echo "$as_me: failed program was:" >&5
2293sed 's/^/| /' conftest.$ac_ext >&5
2294
2295	ac_retval=1
2296fi
2297  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298  as_fn_set_status $ac_retval
2299
2300} # ac_fn_cxx_try_compile
2301
2302# ac_fn_c_try_cpp LINENO
2303# ----------------------
2304# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2305ac_fn_c_try_cpp ()
2306{
2307  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308  if { { ac_try="$ac_cpp conftest.$ac_ext"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } > conftest.i && {
2324	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2325	 test ! -s conftest.err
2326       }; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332    ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_c_try_cpp
2338
2339# ac_fn_cxx_try_cpp LINENO
2340# ------------------------
2341# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_cxx_try_cpp ()
2343{
2344  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345  if { { ac_try="$ac_cpp conftest.$ac_ext"
2346case "(($ac_try" in
2347  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2348  *) ac_try_echo=$ac_try;;
2349esac
2350eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2351$as_echo "$ac_try_echo"; } >&5
2352  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2353  ac_status=$?
2354  if test -s conftest.err; then
2355    grep -v '^ *+' conftest.err >conftest.er1
2356    cat conftest.er1 >&5
2357    mv -f conftest.er1 conftest.err
2358  fi
2359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2360  test $ac_status = 0; } > conftest.i && {
2361	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2362	 test ! -s conftest.err
2363       }; then :
2364  ac_retval=0
2365else
2366  $as_echo "$as_me: failed program was:" >&5
2367sed 's/^/| /' conftest.$ac_ext >&5
2368
2369    ac_retval=1
2370fi
2371  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2372  as_fn_set_status $ac_retval
2373
2374} # ac_fn_cxx_try_cpp
2375
2376# ac_fn_c_try_link LINENO
2377# -----------------------
2378# Try to link conftest.$ac_ext, and return whether this succeeded.
2379ac_fn_c_try_link ()
2380{
2381  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382  rm -f conftest.$ac_objext conftest$ac_exeext
2383  if { { ac_try="$ac_link"
2384case "(($ac_try" in
2385  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2386  *) ac_try_echo=$ac_try;;
2387esac
2388eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2389$as_echo "$ac_try_echo"; } >&5
2390  (eval "$ac_link") 2>conftest.err
2391  ac_status=$?
2392  if test -s conftest.err; then
2393    grep -v '^ *+' conftest.err >conftest.er1
2394    cat conftest.er1 >&5
2395    mv -f conftest.er1 conftest.err
2396  fi
2397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2398  test $ac_status = 0; } && {
2399	 test -z "$ac_c_werror_flag" ||
2400	 test ! -s conftest.err
2401       } && test -s conftest$ac_exeext && {
2402	 test "$cross_compiling" = yes ||
2403	 test -x conftest$ac_exeext
2404       }; then :
2405  ac_retval=0
2406else
2407  $as_echo "$as_me: failed program was:" >&5
2408sed 's/^/| /' conftest.$ac_ext >&5
2409
2410	ac_retval=1
2411fi
2412  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2413  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2414  # interfere with the next link command; also delete a directory that is
2415  # left behind by Apple's compiler.  We do this before executing the actions.
2416  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_c_try_link
2421
2422# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2423# ---------------------------------------------------------
2424# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2425# the include files in INCLUDES and setting the cache variable VAR
2426# accordingly.
2427ac_fn_cxx_check_header_mongrel ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  if eval \${$3+:} false; then :
2431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2432$as_echo_n "checking for $2... " >&6; }
2433if eval \${$3+:} false; then :
2434  $as_echo_n "(cached) " >&6
2435fi
2436eval ac_res=\$$3
2437	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438$as_echo "$ac_res" >&6; }
2439else
2440  # Is the header compilable?
2441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2442$as_echo_n "checking $2 usability... " >&6; }
2443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444/* end confdefs.h.  */
2445$4
2446#include <$2>
2447_ACEOF
2448if ac_fn_cxx_try_compile "$LINENO"; then :
2449  ac_header_compiler=yes
2450else
2451  ac_header_compiler=no
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2455$as_echo "$ac_header_compiler" >&6; }
2456
2457# Is the header present?
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2459$as_echo_n "checking $2 presence... " >&6; }
2460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2461/* end confdefs.h.  */
2462#include <$2>
2463_ACEOF
2464if ac_fn_cxx_try_cpp "$LINENO"; then :
2465  ac_header_preproc=yes
2466else
2467  ac_header_preproc=no
2468fi
2469rm -f conftest.err conftest.i conftest.$ac_ext
2470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2471$as_echo "$ac_header_preproc" >&6; }
2472
2473# So?  What about this header?
2474case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2475  yes:no: )
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2477$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480    ;;
2481  no:yes:* )
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2483$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2485$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2487$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2489$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2491$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2492( $as_echo "## ----------------------------------------- ##
2493## Report this to build-dev@openjdk.java.net ##
2494## ----------------------------------------- ##"
2495     ) | sed "s/^/$as_me: WARNING:     /" >&2
2496    ;;
2497esac
2498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2499$as_echo_n "checking for $2... " >&6; }
2500if eval \${$3+:} false; then :
2501  $as_echo_n "(cached) " >&6
2502else
2503  eval "$3=\$ac_header_compiler"
2504fi
2505eval ac_res=\$$3
2506	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2507$as_echo "$ac_res" >&6; }
2508fi
2509  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2510
2511} # ac_fn_cxx_check_header_mongrel
2512
2513# ac_fn_cxx_try_run LINENO
2514# ------------------------
2515# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2516# that executables *can* be run.
2517ac_fn_cxx_try_run ()
2518{
2519  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520  if { { ac_try="$ac_link"
2521case "(($ac_try" in
2522  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2523  *) ac_try_echo=$ac_try;;
2524esac
2525eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2526$as_echo "$ac_try_echo"; } >&5
2527  (eval "$ac_link") 2>&5
2528  ac_status=$?
2529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2530  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2531  { { case "(($ac_try" in
2532  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2533  *) ac_try_echo=$ac_try;;
2534esac
2535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2536$as_echo "$ac_try_echo"; } >&5
2537  (eval "$ac_try") 2>&5
2538  ac_status=$?
2539  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540  test $ac_status = 0; }; }; then :
2541  ac_retval=0
2542else
2543  $as_echo "$as_me: program exited with status $ac_status" >&5
2544       $as_echo "$as_me: failed program was:" >&5
2545sed 's/^/| /' conftest.$ac_ext >&5
2546
2547       ac_retval=$ac_status
2548fi
2549  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2550  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2551  as_fn_set_status $ac_retval
2552
2553} # ac_fn_cxx_try_run
2554
2555# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2556# ---------------------------------------------------------
2557# Tests whether HEADER exists and can be compiled using the include files in
2558# INCLUDES, setting the cache variable VAR accordingly.
2559ac_fn_cxx_check_header_compile ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563$as_echo_n "checking for $2... " >&6; }
2564if eval \${$3+:} false; then :
2565  $as_echo_n "(cached) " >&6
2566else
2567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570#include <$2>
2571_ACEOF
2572if ac_fn_cxx_try_compile "$LINENO"; then :
2573  eval "$3=yes"
2574else
2575  eval "$3=no"
2576fi
2577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578fi
2579eval ac_res=\$$3
2580	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581$as_echo "$ac_res" >&6; }
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583
2584} # ac_fn_cxx_check_header_compile
2585
2586# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2587# ----------------------------------------------
2588# Tries to find the compile-time value of EXPR in a program that includes
2589# INCLUDES, setting VAR accordingly. Returns whether the value could be
2590# computed
2591ac_fn_cxx_compute_int ()
2592{
2593  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2594  if test "$cross_compiling" = yes; then
2595    # Depending upon the size, compute the lo and hi bounds.
2596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2597/* end confdefs.h.  */
2598$4
2599int
2600main ()
2601{
2602static int test_array [1 - 2 * !(($2) >= 0)];
2603test_array [0] = 0;
2604return test_array [0];
2605
2606  ;
2607  return 0;
2608}
2609_ACEOF
2610if ac_fn_cxx_try_compile "$LINENO"; then :
2611  ac_lo=0 ac_mid=0
2612  while :; do
2613    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616int
2617main ()
2618{
2619static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2620test_array [0] = 0;
2621return test_array [0];
2622
2623  ;
2624  return 0;
2625}
2626_ACEOF
2627if ac_fn_cxx_try_compile "$LINENO"; then :
2628  ac_hi=$ac_mid; break
2629else
2630  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2631			if test $ac_lo -le $ac_mid; then
2632			  ac_lo= ac_hi=
2633			  break
2634			fi
2635			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2636fi
2637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2638  done
2639else
2640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2641/* end confdefs.h.  */
2642$4
2643int
2644main ()
2645{
2646static int test_array [1 - 2 * !(($2) < 0)];
2647test_array [0] = 0;
2648return test_array [0];
2649
2650  ;
2651  return 0;
2652}
2653_ACEOF
2654if ac_fn_cxx_try_compile "$LINENO"; then :
2655  ac_hi=-1 ac_mid=-1
2656  while :; do
2657    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658/* end confdefs.h.  */
2659$4
2660int
2661main ()
2662{
2663static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2664test_array [0] = 0;
2665return test_array [0];
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_compile "$LINENO"; then :
2672  ac_lo=$ac_mid; break
2673else
2674  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2675			if test $ac_mid -le $ac_hi; then
2676			  ac_lo= ac_hi=
2677			  break
2678			fi
2679			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682  done
2683else
2684  ac_lo= ac_hi=
2685fi
2686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687fi
2688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689# Binary search between lo and hi bounds.
2690while test "x$ac_lo" != "x$ac_hi"; do
2691  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2693/* end confdefs.h.  */
2694$4
2695int
2696main ()
2697{
2698static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2699test_array [0] = 0;
2700return test_array [0];
2701
2702  ;
2703  return 0;
2704}
2705_ACEOF
2706if ac_fn_cxx_try_compile "$LINENO"; then :
2707  ac_hi=$ac_mid
2708else
2709  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2710fi
2711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2712done
2713case $ac_lo in #((
2714?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2715'') ac_retval=1 ;;
2716esac
2717  else
2718    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719/* end confdefs.h.  */
2720$4
2721static long int longval () { return $2; }
2722static unsigned long int ulongval () { return $2; }
2723#include <stdio.h>
2724#include <stdlib.h>
2725int
2726main ()
2727{
2728
2729  FILE *f = fopen ("conftest.val", "w");
2730  if (! f)
2731    return 1;
2732  if (($2) < 0)
2733    {
2734      long int i = longval ();
2735      if (i != ($2))
2736	return 1;
2737      fprintf (f, "%ld", i);
2738    }
2739  else
2740    {
2741      unsigned long int i = ulongval ();
2742      if (i != ($2))
2743	return 1;
2744      fprintf (f, "%lu", i);
2745    }
2746  /* Do not output a trailing newline, as this causes \r\n confusion
2747     on some platforms.  */
2748  return ferror (f) || fclose (f) != 0;
2749
2750  ;
2751  return 0;
2752}
2753_ACEOF
2754if ac_fn_cxx_try_run "$LINENO"; then :
2755  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2756else
2757  ac_retval=1
2758fi
2759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2760  conftest.$ac_objext conftest.beam conftest.$ac_ext
2761rm -f conftest.val
2762
2763  fi
2764  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2765  as_fn_set_status $ac_retval
2766
2767} # ac_fn_cxx_compute_int
2768
2769# ac_fn_cxx_try_link LINENO
2770# -------------------------
2771# Try to link conftest.$ac_ext, and return whether this succeeded.
2772ac_fn_cxx_try_link ()
2773{
2774  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775  rm -f conftest.$ac_objext conftest$ac_exeext
2776  if { { ac_try="$ac_link"
2777case "(($ac_try" in
2778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2779  *) ac_try_echo=$ac_try;;
2780esac
2781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2782$as_echo "$ac_try_echo"; } >&5
2783  (eval "$ac_link") 2>conftest.err
2784  ac_status=$?
2785  if test -s conftest.err; then
2786    grep -v '^ *+' conftest.err >conftest.er1
2787    cat conftest.er1 >&5
2788    mv -f conftest.er1 conftest.err
2789  fi
2790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2791  test $ac_status = 0; } && {
2792	 test -z "$ac_cxx_werror_flag" ||
2793	 test ! -s conftest.err
2794       } && test -s conftest$ac_exeext && {
2795	 test "$cross_compiling" = yes ||
2796	 test -x conftest$ac_exeext
2797       }; then :
2798  ac_retval=0
2799else
2800  $as_echo "$as_me: failed program was:" >&5
2801sed 's/^/| /' conftest.$ac_ext >&5
2802
2803	ac_retval=1
2804fi
2805  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2806  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2807  # interfere with the next link command; also delete a directory that is
2808  # left behind by Apple's compiler.  We do this before executing the actions.
2809  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_try_link
2814
2815# ac_fn_cxx_check_func LINENO FUNC VAR
2816# ------------------------------------
2817# Tests whether FUNC exists, setting the cache variable VAR accordingly
2818ac_fn_cxx_check_func ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2822$as_echo_n "checking for $2... " >&6; }
2823if eval \${$3+:} false; then :
2824  $as_echo_n "(cached) " >&6
2825else
2826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2829   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2830#define $2 innocuous_$2
2831
2832/* System header to define __stub macros and hopefully few prototypes,
2833    which can conflict with char $2 (); below.
2834    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2835    <limits.h> exists even on freestanding compilers.  */
2836
2837#ifdef __STDC__
2838# include <limits.h>
2839#else
2840# include <assert.h>
2841#endif
2842
2843#undef $2
2844
2845/* Override any GCC internal prototype to avoid an error.
2846   Use char because int might match the return type of a GCC
2847   builtin and then its argument prototype would still apply.  */
2848#ifdef __cplusplus
2849extern "C"
2850#endif
2851char $2 ();
2852/* The GNU C library defines this for functions which it implements
2853    to always fail with ENOSYS.  Some functions are actually named
2854    something starting with __ and the normal name is an alias.  */
2855#if defined __stub_$2 || defined __stub___$2
2856choke me
2857#endif
2858
2859int
2860main ()
2861{
2862return $2 ();
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_link "$LINENO"; then :
2868  eval "$3=yes"
2869else
2870  eval "$3=no"
2871fi
2872rm -f core conftest.err conftest.$ac_objext \
2873    conftest$ac_exeext conftest.$ac_ext
2874fi
2875eval ac_res=\$$3
2876	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2877$as_echo "$ac_res" >&6; }
2878  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2879
2880} # ac_fn_cxx_check_func
2881
2882# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2883# -------------------------------------------------------
2884# Tests whether HEADER exists and can be compiled using the include files in
2885# INCLUDES, setting the cache variable VAR accordingly.
2886ac_fn_c_check_header_compile ()
2887{
2888  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2890$as_echo_n "checking for $2... " >&6; }
2891if eval \${$3+:} false; then :
2892  $as_echo_n "(cached) " >&6
2893else
2894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2895/* end confdefs.h.  */
2896$4
2897#include <$2>
2898_ACEOF
2899if ac_fn_c_try_compile "$LINENO"; then :
2900  eval "$3=yes"
2901else
2902  eval "$3=no"
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
2906eval ac_res=\$$3
2907	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2908$as_echo "$ac_res" >&6; }
2909  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2910
2911} # ac_fn_c_check_header_compile
2912cat >config.log <<_ACEOF
2913This file contains any messages produced by compilers while
2914running configure, to aid debugging if configure makes a mistake.
2915
2916It was created by OpenJDK $as_me jdk9, which was
2917generated by GNU Autoconf 2.69.  Invocation command line was
2918
2919  $ $0 $@
2920
2921_ACEOF
2922exec 5>>config.log
2923{
2924cat <<_ASUNAME
2925## --------- ##
2926## Platform. ##
2927## --------- ##
2928
2929hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2930uname -m = `(uname -m) 2>/dev/null || echo unknown`
2931uname -r = `(uname -r) 2>/dev/null || echo unknown`
2932uname -s = `(uname -s) 2>/dev/null || echo unknown`
2933uname -v = `(uname -v) 2>/dev/null || echo unknown`
2934
2935/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2936/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2937
2938/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2939/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2940/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2941/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2942/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2943/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2944/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2945
2946_ASUNAME
2947
2948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2949for as_dir in $PATH
2950do
2951  IFS=$as_save_IFS
2952  test -z "$as_dir" && as_dir=.
2953    $as_echo "PATH: $as_dir"
2954  done
2955IFS=$as_save_IFS
2956
2957} >&5
2958
2959cat >&5 <<_ACEOF
2960
2961
2962## ----------- ##
2963## Core tests. ##
2964## ----------- ##
2965
2966_ACEOF
2967
2968
2969# Keep a trace of the command line.
2970# Strip out --no-create and --no-recursion so they do not pile up.
2971# Strip out --silent because we don't want to record it for future runs.
2972# Also quote any args containing shell meta-characters.
2973# Make two passes to allow for proper duplicate-argument suppression.
2974ac_configure_args=
2975ac_configure_args0=
2976ac_configure_args1=
2977ac_must_keep_next=false
2978for ac_pass in 1 2
2979do
2980  for ac_arg
2981  do
2982    case $ac_arg in
2983    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2984    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2985    | -silent | --silent | --silen | --sile | --sil)
2986      continue ;;
2987    *\'*)
2988      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2989    esac
2990    case $ac_pass in
2991    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2992    2)
2993      as_fn_append ac_configure_args1 " '$ac_arg'"
2994      if test $ac_must_keep_next = true; then
2995	ac_must_keep_next=false # Got value, back to normal.
2996      else
2997	case $ac_arg in
2998	  *=* | --config-cache | -C | -disable-* | --disable-* \
2999	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3000	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3001	  | -with-* | --with-* | -without-* | --without-* | --x)
3002	    case "$ac_configure_args0 " in
3003	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3004	    esac
3005	    ;;
3006	  -* ) ac_must_keep_next=true ;;
3007	esac
3008      fi
3009      as_fn_append ac_configure_args " '$ac_arg'"
3010      ;;
3011    esac
3012  done
3013done
3014{ ac_configure_args0=; unset ac_configure_args0;}
3015{ ac_configure_args1=; unset ac_configure_args1;}
3016
3017# When interrupted or exit'd, cleanup temporary files, and complete
3018# config.log.  We remove comments because anyway the quotes in there
3019# would cause problems or look ugly.
3020# WARNING: Use '\'' to represent an apostrophe within the trap.
3021# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3022trap 'exit_status=$?
3023  # Save into config.log some information that might help in debugging.
3024  {
3025    echo
3026
3027    $as_echo "## ---------------- ##
3028## Cache variables. ##
3029## ---------------- ##"
3030    echo
3031    # The following way of writing the cache mishandles newlines in values,
3032(
3033  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3034    eval ac_val=\$$ac_var
3035    case $ac_val in #(
3036    *${as_nl}*)
3037      case $ac_var in #(
3038      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3039$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3040      esac
3041      case $ac_var in #(
3042      _ | IFS | as_nl) ;; #(
3043      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3044      *) { eval $ac_var=; unset $ac_var;} ;;
3045      esac ;;
3046    esac
3047  done
3048  (set) 2>&1 |
3049    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3050    *${as_nl}ac_space=\ *)
3051      sed -n \
3052	"s/'\''/'\''\\\\'\'''\''/g;
3053	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3054      ;; #(
3055    *)
3056      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3057      ;;
3058    esac |
3059    sort
3060)
3061    echo
3062
3063    $as_echo "## ----------------- ##
3064## Output variables. ##
3065## ----------------- ##"
3066    echo
3067    for ac_var in $ac_subst_vars
3068    do
3069      eval ac_val=\$$ac_var
3070      case $ac_val in
3071      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3072      esac
3073      $as_echo "$ac_var='\''$ac_val'\''"
3074    done | sort
3075    echo
3076
3077    if test -n "$ac_subst_files"; then
3078      $as_echo "## ------------------- ##
3079## File substitutions. ##
3080## ------------------- ##"
3081      echo
3082      for ac_var in $ac_subst_files
3083      do
3084	eval ac_val=\$$ac_var
3085	case $ac_val in
3086	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3087	esac
3088	$as_echo "$ac_var='\''$ac_val'\''"
3089      done | sort
3090      echo
3091    fi
3092
3093    if test -s confdefs.h; then
3094      $as_echo "## ----------- ##
3095## confdefs.h. ##
3096## ----------- ##"
3097      echo
3098      cat confdefs.h
3099      echo
3100    fi
3101    test "$ac_signal" != 0 &&
3102      $as_echo "$as_me: caught signal $ac_signal"
3103    $as_echo "$as_me: exit $exit_status"
3104  } >&5
3105  rm -f core *.core core.conftest.* &&
3106    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3107    exit $exit_status
3108' 0
3109for ac_signal in 1 2 13 15; do
3110  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3111done
3112ac_signal=0
3113
3114# confdefs.h avoids OS command line length limits that DEFS can exceed.
3115rm -f -r conftest* confdefs.h
3116
3117$as_echo "/* confdefs.h */" > confdefs.h
3118
3119# Predefined preprocessor variables.
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_NAME "$PACKAGE_NAME"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_VERSION "$PACKAGE_VERSION"
3131_ACEOF
3132
3133cat >>confdefs.h <<_ACEOF
3134#define PACKAGE_STRING "$PACKAGE_STRING"
3135_ACEOF
3136
3137cat >>confdefs.h <<_ACEOF
3138#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3139_ACEOF
3140
3141cat >>confdefs.h <<_ACEOF
3142#define PACKAGE_URL "$PACKAGE_URL"
3143_ACEOF
3144
3145
3146# Let the site file select an alternate cache file if it wants to.
3147# Prefer an explicitly selected file to automatically selected ones.
3148ac_site_file1=NONE
3149ac_site_file2=NONE
3150if test -n "$CONFIG_SITE"; then
3151  # We do not want a PATH search for config.site.
3152  case $CONFIG_SITE in #((
3153    -*)  ac_site_file1=./$CONFIG_SITE;;
3154    */*) ac_site_file1=$CONFIG_SITE;;
3155    *)   ac_site_file1=./$CONFIG_SITE;;
3156  esac
3157elif test "x$prefix" != xNONE; then
3158  ac_site_file1=$prefix/share/config.site
3159  ac_site_file2=$prefix/etc/config.site
3160else
3161  ac_site_file1=$ac_default_prefix/share/config.site
3162  ac_site_file2=$ac_default_prefix/etc/config.site
3163fi
3164for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3165do
3166  test "x$ac_site_file" = xNONE && continue
3167  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3168    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3169$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3170    sed 's/^/| /' "$ac_site_file" >&5
3171    . "$ac_site_file" \
3172      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3174as_fn_error $? "failed to load site script $ac_site_file
3175See \`config.log' for more details" "$LINENO" 5; }
3176  fi
3177done
3178
3179if test -r "$cache_file"; then
3180  # Some versions of bash will fail to source /dev/null (special files
3181  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3182  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3183    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3184$as_echo "$as_me: loading cache $cache_file" >&6;}
3185    case $cache_file in
3186      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3187      *)                      . "./$cache_file";;
3188    esac
3189  fi
3190else
3191  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3192$as_echo "$as_me: creating cache $cache_file" >&6;}
3193  >$cache_file
3194fi
3195
3196# Check that the precious variables saved in the cache have kept the same
3197# value.
3198ac_cache_corrupted=false
3199for ac_var in $ac_precious_vars; do
3200  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3201  eval ac_new_set=\$ac_env_${ac_var}_set
3202  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3203  eval ac_new_val=\$ac_env_${ac_var}_value
3204  case $ac_old_set,$ac_new_set in
3205    set,)
3206      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3207$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3208      ac_cache_corrupted=: ;;
3209    ,set)
3210      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3211$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3212      ac_cache_corrupted=: ;;
3213    ,);;
3214    *)
3215      if test "x$ac_old_val" != "x$ac_new_val"; then
3216	# differences in whitespace do not lead to failure.
3217	ac_old_val_w=`echo x $ac_old_val`
3218	ac_new_val_w=`echo x $ac_new_val`
3219	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3220	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3221$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3222	  ac_cache_corrupted=:
3223	else
3224	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3225$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3226	  eval $ac_var=\$ac_old_val
3227	fi
3228	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3229$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3230	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3231$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3232      fi;;
3233  esac
3234  # Pass precious variables to config.status.
3235  if test "$ac_new_set" = set; then
3236    case $ac_new_val in
3237    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3238    *) ac_arg=$ac_var=$ac_new_val ;;
3239    esac
3240    case " $ac_configure_args " in
3241      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3242      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3243    esac
3244  fi
3245done
3246if $ac_cache_corrupted; then
3247  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3249  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3250$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3251  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3252fi
3253## -------------------- ##
3254## Main body of script. ##
3255## -------------------- ##
3256
3257ac_ext=c
3258ac_cpp='$CPP $CPPFLAGS'
3259ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3260ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3261ac_compiler_gnu=$ac_cv_c_compiler_gnu
3262
3263
3264
3265ac_aux_dir=
3266for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3267  if test -f "$ac_dir/install-sh"; then
3268    ac_aux_dir=$ac_dir
3269    ac_install_sh="$ac_aux_dir/install-sh -c"
3270    break
3271  elif test -f "$ac_dir/install.sh"; then
3272    ac_aux_dir=$ac_dir
3273    ac_install_sh="$ac_aux_dir/install.sh -c"
3274    break
3275  elif test -f "$ac_dir/shtool"; then
3276    ac_aux_dir=$ac_dir
3277    ac_install_sh="$ac_aux_dir/shtool install -c"
3278    break
3279  fi
3280done
3281if test -z "$ac_aux_dir"; then
3282  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
3283fi
3284
3285# These three variables are undocumented and unsupported,
3286# and are intended to be withdrawn in a future Autoconf release.
3287# They can cause serious problems if a builder's source tree is in a directory
3288# whose full name contains unusual characters.
3289ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3290ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3291ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3292
3293
3294# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3295
3296#
3297# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3298# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3299#
3300# This code is free software; you can redistribute it and/or modify it
3301# under the terms of the GNU General Public License version 2 only, as
3302# published by the Free Software Foundation.  Oracle designates this
3303# particular file as subject to the "Classpath" exception as provided
3304# by Oracle in the LICENSE file that accompanied this code.
3305#
3306# This code is distributed in the hope that it will be useful, but WITHOUT
3307# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3308# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3309# version 2 for more details (a copy is included in the LICENSE file that
3310# accompanied this code).
3311#
3312# You should have received a copy of the GNU General Public License version
3313# 2 along with this work; if not, write to the Free Software Foundation,
3314# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3315#
3316# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317# or visit www.oracle.com if you need additional information or have any
3318# questions.
3319#
3320
3321#
3322# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3323#
3324# This program is free software; you can redistribute it and/or modify
3325# it under the terms of the GNU General Public License as published by
3326# the Free Software Foundation; either version 2 of the License, or
3327# (at your option) any later version.
3328#
3329# This program is distributed in the hope that it will be useful, but
3330# WITHOUT ANY WARRANTY; without even the implied warranty of
3331# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3332# General Public License for more details.
3333#
3334# You should have received a copy of the GNU General Public License
3335# along with this program; if not, write to the Free Software
3336# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3337#
3338# As a special exception to the GNU General Public License, if you
3339# distribute this file as part of a program that contains a
3340# configuration script generated by Autoconf, you may include it under
3341# the same distribution terms that you use for the rest of that program.
3342
3343# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3344# ----------------------------------
3345# PKG_PROG_PKG_CONFIG
3346
3347# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3348#
3349# Check to see whether a particular set of modules exists.  Similar
3350# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3351#
3352#
3353# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3354# this or PKG_CHECK_MODULES is called, or make sure to call
3355# PKG_CHECK_EXISTS manually
3356# --------------------------------------------------------------
3357
3358
3359
3360# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3361# ---------------------------------------------
3362# _PKG_CONFIG
3363
3364# _PKG_SHORT_ERRORS_SUPPORTED
3365# -----------------------------
3366# _PKG_SHORT_ERRORS_SUPPORTED
3367
3368
3369# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3370# [ACTION-IF-NOT-FOUND])
3371#
3372#
3373# Note that if there is a possibility the first call to
3374# PKG_CHECK_MODULES might not happen, you should be sure to include an
3375# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3376#
3377#
3378# --------------------------------------------------------------
3379# PKG_CHECK_MODULES
3380
3381
3382# Include these first...
3383#
3384# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3385# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3386#
3387# This code is free software; you can redistribute it and/or modify it
3388# under the terms of the GNU General Public License version 2 only, as
3389# published by the Free Software Foundation.  Oracle designates this
3390# particular file as subject to the "Classpath" exception as provided
3391# by Oracle in the LICENSE file that accompanied this code.
3392#
3393# This code is distributed in the hope that it will be useful, but WITHOUT
3394# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3395# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3396# version 2 for more details (a copy is included in the LICENSE file that
3397# accompanied this code).
3398#
3399# You should have received a copy of the GNU General Public License version
3400# 2 along with this work; if not, write to the Free Software Foundation,
3401# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3402#
3403# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3404# or visit www.oracle.com if you need additional information or have any
3405# questions.
3406#
3407
3408# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3409# If so, then append $1 to $2 \
3410# Also set JVM_ARG_OK to true/false depending on outcome.
3411
3412
3413# Appends a string to a path variable, only adding the : when needed.
3414
3415
3416# Prepends a string to a path variable, only adding the : when needed.
3417
3418
3419# This will make sure the given variable points to a full and proper
3420# path. This means:
3421# 1) There will be no spaces in the path. On unix platforms,
3422#    spaces in the path will result in an error. On Windows,
3423#    the path will be rewritten using short-style to be space-free.
3424# 2) The path will be absolute, and it will be in unix-style (on
3425#     cygwin).
3426# $1: The name of the variable to fix
3427
3428
3429# This will make sure the given variable points to a executable
3430# with a full and proper path. This means:
3431# 1) There will be no spaces in the path. On unix platforms,
3432#    spaces in the path will result in an error. On Windows,
3433#    the path will be rewritten using short-style to be space-free.
3434# 2) The path will be absolute, and it will be in unix-style (on
3435#     cygwin).
3436# Any arguments given to the executable is preserved.
3437# If the input variable does not have a directory specification, then
3438# it need to be in the PATH.
3439# $1: The name of the variable to fix
3440
3441
3442
3443
3444# Register a --with argument but mark it as deprecated
3445# $1: The name of the with argument to deprecate, not including --with-
3446
3447
3448# Register a --enable argument but mark it as deprecated
3449# $1: The name of the with argument to deprecate, not including --enable-
3450# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3451
3452
3453
3454
3455# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3456# $1: variable to check
3457
3458
3459# Check that there are no unprocessed overridden variables left.
3460# If so, they are an incorrect argument and we will exit with an error.
3461
3462
3463# Setup a tool for the given variable. If correctly specified by the user,
3464# use that value, otherwise search for the tool using the supplied code snippet.
3465# $1: variable to set
3466# $2: code snippet to call to look for the tool
3467# $3: code snippet to call if variable was used to find tool
3468
3469
3470# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3471# $1: variable to set
3472# $2: executable name (or list of names) to look for
3473
3474
3475# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3476# $1: variable to set
3477# $2: executable name (or list of names) to look for
3478
3479
3480# Like BASIC_PATH_PROGS but fails if no tool was found.
3481# $1: variable to set
3482# $2: executable name (or list of names) to look for
3483
3484
3485# Like BASIC_SETUP_TOOL but fails if no tool was found.
3486# $1: variable to set
3487# $2: autoconf macro to call to look for the special tool
3488
3489
3490# Setup the most fundamental tools that relies on not much else to set up,
3491# but is used by much of the early bootstrap code.
3492
3493
3494# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3495
3496
3497# Evaluates platform specific overrides for devkit variables.
3498# $1: Name of variable
3499
3500
3501
3502
3503
3504
3505#%%% Simple tools %%%
3506
3507# Check if we have found a usable version of make
3508# $1: the path to a potential make binary (or empty)
3509# $2: the description on how we found this
3510
3511
3512
3513
3514# Goes looking for a usable version of GNU make.
3515
3516
3517
3518
3519
3520
3521# Check if build directory is on local disk. If not possible to determine,
3522# we prefer to claim it's local.
3523# Argument 1: directory to test
3524# Argument 2: what to do if it is on local disk
3525# Argument 3: what to do otherwise (remote disk or failure)
3526
3527
3528# Check that source files have basic read permissions set. This might
3529# not be the case in cygwin in certain conditions.
3530
3531
3532
3533
3534# Check for support for specific options in bash
3535
3536
3537# Code to run after AC_OUTPUT
3538
3539
3540#
3541# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3542# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3543#
3544# This code is free software; you can redistribute it and/or modify it
3545# under the terms of the GNU General Public License version 2 only, as
3546# published by the Free Software Foundation.  Oracle designates this
3547# particular file as subject to the "Classpath" exception as provided
3548# by Oracle in the LICENSE file that accompanied this code.
3549#
3550# This code is distributed in the hope that it will be useful, but WITHOUT
3551# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3552# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3553# version 2 for more details (a copy is included in the LICENSE file that
3554# accompanied this code).
3555#
3556# You should have received a copy of the GNU General Public License version
3557# 2 along with this work; if not, write to the Free Software Foundation,
3558# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3559#
3560# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3561# or visit www.oracle.com if you need additional information or have any
3562# questions.
3563#
3564
3565
3566
3567
3568
3569# Helper function which possibly converts a path using DOS-style short mode.
3570# If so, the updated path is stored in $new_path.
3571# $1: The path to check
3572
3573
3574# Helper function which possibly converts a path using DOS-style short mode.
3575# If so, the updated path is stored in $new_path.
3576# $1: The path to check
3577
3578
3579# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3580# and could probably be heavily simplified. However, all changes in this
3581# area tend to need lot of testing in different scenarios, and in lack of
3582# proper unit testing, cleaning this up has not been deemed worth the effort
3583# at the moment.
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3594
3595
3596
3597
3598# ... then the rest
3599#
3600# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3601# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3602#
3603# This code is free software; you can redistribute it and/or modify it
3604# under the terms of the GNU General Public License version 2 only, as
3605# published by the Free Software Foundation.  Oracle designates this
3606# particular file as subject to the "Classpath" exception as provided
3607# by Oracle in the LICENSE file that accompanied this code.
3608#
3609# This code is distributed in the hope that it will be useful, but WITHOUT
3610# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3611# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3612# version 2 for more details (a copy is included in the LICENSE file that
3613# accompanied this code).
3614#
3615# You should have received a copy of the GNU General Public License version
3616# 2 along with this work; if not, write to the Free Software Foundation,
3617# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3618#
3619# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3620# or visit www.oracle.com if you need additional information or have any
3621# questions.
3622#
3623
3624########################################################################
3625# This file handles detection of the Boot JDK. The Boot JDK detection
3626# process has been developed as a response to solve a complex real-world
3627# problem. Initially, it was simple, but it has grown as platform after
3628# platform, idiosyncracy after idiosyncracy has been supported.
3629#
3630# The basic idea is this:
3631# 1) You need an acceptable *) JDK to use as a Boot JDK
3632# 2) There are several ways to locate a JDK, that are mostly platform
3633#    dependent **)
3634# 3) You can have multiple JDKs installed
3635# 4) If possible, configure should try to dig out an acceptable JDK
3636#    automatically, without having to resort to command-line options
3637#
3638# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3639#     javac) and not a JRE, etc.
3640#
3641# **) On Windows we typically use a well-known path.
3642#     On MacOSX we typically use the tool java_home.
3643#     On Linux we typically find javac in the $PATH, and then follow a
3644#     chain of symlinks that often ends up in a real JDK.
3645#
3646# This leads to the code where we check in different ways to locate a
3647# JDK, and if one is found, check if it is acceptable. If not, we print
3648# our reasons for rejecting it (useful when debugging non-working
3649# configure situations) and continue checking the next one.
3650########################################################################
3651
3652# Execute the check given as argument, and verify the result
3653# If the Boot JDK was previously found, do nothing
3654# $1 A command line (typically autoconf macro) to execute
3655
3656
3657# Test: Is bootjdk explicitely set by command line arguments?
3658
3659
3660# Test: Is $JAVA_HOME set?
3661
3662
3663# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3664
3665
3666# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3667# $1: Argument to the java_home binary (optional)
3668
3669
3670# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3671
3672
3673# Look for a jdk in the given path. If there are multiple, try to select the newest.
3674# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3675# $1 = Path to directory containing jdk installations.
3676# $2 = String to append to the found JDK directory to get the proper JDK home
3677
3678
3679# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3680# environmental variable as base for where to look.
3681# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3682
3683
3684# Test: Is there a JDK installed in default, well-known locations?
3685
3686
3687# Check that a command-line tool in the Boot JDK is correct
3688# $1 = name of variable to assign
3689# $2 = name of binary
3690
3691
3692###############################################################################
3693#
3694# We need a Boot JDK to bootstrap the build.
3695#
3696
3697
3698
3699
3700
3701#
3702# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3703# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3704#
3705# This code is free software; you can redistribute it and/or modify it
3706# under the terms of the GNU General Public License version 2 only, as
3707# published by the Free Software Foundation.  Oracle designates this
3708# particular file as subject to the "Classpath" exception as provided
3709# by Oracle in the LICENSE file that accompanied this code.
3710#
3711# This code is distributed in the hope that it will be useful, but WITHOUT
3712# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3713# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3714# version 2 for more details (a copy is included in the LICENSE file that
3715# accompanied this code).
3716#
3717# You should have received a copy of the GNU General Public License version
3718# 2 along with this work; if not, write to the Free Software Foundation,
3719# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3720#
3721# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3722# or visit www.oracle.com if you need additional information or have any
3723# questions.
3724#
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745#
3746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3748#
3749# This code is free software; you can redistribute it and/or modify it
3750# under the terms of the GNU General Public License version 2 only, as
3751# published by the Free Software Foundation.  Oracle designates this
3752# particular file as subject to the "Classpath" exception as provided
3753# by Oracle in the LICENSE file that accompanied this code.
3754#
3755# This code is distributed in the hope that it will be useful, but WITHOUT
3756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3758# version 2 for more details (a copy is included in the LICENSE file that
3759# accompanied this code).
3760#
3761# You should have received a copy of the GNU General Public License version
3762# 2 along with this work; if not, write to the Free Software Foundation,
3763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3764#
3765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3766# or visit www.oracle.com if you need additional information or have any
3767# questions.
3768#
3769
3770# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3771# corresponding configure arguments instead
3772
3773
3774# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3775# that configure can use them while detecting compilers.
3776# TOOLCHAIN_TYPE is available here.
3777# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3778
3779
3780
3781
3782
3783
3784# Documentation on common flags used for solstudio in HIGHEST.
3785#
3786# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3787#          done with care, there are some assumptions below that need to
3788#          be understood about the use of pointers, and IEEE behavior.
3789#
3790# -fns: Use non-standard floating point mode (not IEEE 754)
3791# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3792# -fsingle: Use single precision floating point with 'float'
3793# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3794#   (Source with excessing pointer casting and data access with mixed
3795#    pointer types are not recommended)
3796# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3797#   (If you expect perfect errno behavior, do not use this)
3798# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3799# -xrestrict: Pointer parameters to functions do not overlap
3800#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3801#    If you pass in multiple pointers to the same data, do not use this)
3802# -xlibmil: Inline some library routines
3803#   (If you expect perfect errno behavior, do not use this)
3804# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3805#   (If you expect perfect errno behavior, do not use this)
3806#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3807
3808    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3809    # Bug?
3810    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3811    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3812    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3813    #fi
3814
3815
3816
3817
3818
3819# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3820#                                   [RUN-IF-FALSE])
3821# ------------------------------------------------------------
3822# Check that the c and c++ compilers support an argument
3823
3824
3825# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3826#                                    [RUN-IF-FALSE])
3827# ------------------------------------------------------------
3828# Check that the linker support an argument
3829
3830
3831
3832
3833#
3834# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3835# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3836#
3837# This code is free software; you can redistribute it and/or modify it
3838# under the terms of the GNU General Public License version 2 only, as
3839# published by the Free Software Foundation.  Oracle designates this
3840# particular file as subject to the "Classpath" exception as provided
3841# by Oracle in the LICENSE file that accompanied this code.
3842#
3843# This code is distributed in the hope that it will be useful, but WITHOUT
3844# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3845# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3846# version 2 for more details (a copy is included in the LICENSE file that
3847# accompanied this code).
3848#
3849# You should have received a copy of the GNU General Public License version
3850# 2 along with this work; if not, write to the Free Software Foundation,
3851# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3852#
3853# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3854# or visit www.oracle.com if you need additional information or have any
3855# questions.
3856#
3857
3858
3859
3860
3861
3862cygwin_help() {
3863  case $1 in
3864    unzip)
3865      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3867      ;;
3868    zip)
3869      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3870      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3871      ;;
3872    make)
3873      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3874      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3875      ;;
3876    freetype)
3877      HELP_MSG="
3878The freetype library can now be build during the configure process.
3879Download the freetype sources and unpack them into an arbitrary directory:
3880
3881wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3882tar -xzf freetype-2.5.3.tar.gz
3883
3884Then run configure with '--with-freetype-src=<freetype_src>'. This will
3885automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3886builds or into '<freetype_src>/lib32' for 32-bit builds.
3887Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3888and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3889      ;;
3890  esac
3891}
3892
3893msys_help() {
3894  PKGHANDLER_COMMAND=""
3895}
3896
3897apt_help() {
3898  case $1 in
3899    reduced)
3900      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3901    devkit)
3902      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3903    openjdk)
3904      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3905    alsa)
3906      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3907    cups)
3908      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3909    freetype)
3910      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3911    ffi)
3912      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3913    x11)
3914      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3915    ccache)
3916      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3917  esac
3918}
3919
3920yum_help() {
3921  case $1 in
3922    devkit)
3923      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3924    openjdk)
3925      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3926    alsa)
3927      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3928    cups)
3929      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3930    freetype)
3931      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3932    x11)
3933      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3934    ccache)
3935      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3936  esac
3937}
3938
3939port_help() {
3940  PKGHANDLER_COMMAND=""
3941}
3942
3943pkgutil_help() {
3944  PKGHANDLER_COMMAND=""
3945}
3946
3947pkgadd_help() {
3948  PKGHANDLER_COMMAND=""
3949}
3950
3951# This function will check if we're called from the "configure" wrapper while
3952# printing --help. If so, we will print out additional information that can
3953# only be extracted within the autoconf script, and then exit. This must be
3954# called at the very beginning in configure.ac.
3955
3956
3957
3958
3959
3960
3961#
3962# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3963# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3964#
3965# This code is free software; you can redistribute it and/or modify it
3966# under the terms of the GNU General Public License version 2 only, as
3967# published by the Free Software Foundation.  Oracle designates this
3968# particular file as subject to the "Classpath" exception as provided
3969# by Oracle in the LICENSE file that accompanied this code.
3970#
3971# This code is distributed in the hope that it will be useful, but WITHOUT
3972# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3973# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3974# version 2 for more details (a copy is included in the LICENSE file that
3975# accompanied this code).
3976#
3977# You should have received a copy of the GNU General Public License version
3978# 2 along with this work; if not, write to the Free Software Foundation,
3979# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3980#
3981# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3982# or visit www.oracle.com if you need additional information or have any
3983# questions.
3984#
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995###############################################################################
3996#
3997# Should we build only OpenJDK even if closed sources are present?
3998#
3999
4000
4001
4002
4003
4004
4005###############################################################################
4006#
4007# Enable or disable the elliptic curve crypto implementation
4008#
4009
4010
4011
4012
4013
4014################################################################################
4015#
4016# Gcov coverage data for hotspot
4017#
4018
4019
4020#
4021# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4022# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4023#
4024# This code is free software; you can redistribute it and/or modify it
4025# under the terms of the GNU General Public License version 2 only, as
4026# published by the Free Software Foundation.  Oracle designates this
4027# particular file as subject to the "Classpath" exception as provided
4028# by Oracle in the LICENSE file that accompanied this code.
4029#
4030# This code is distributed in the hope that it will be useful, but WITHOUT
4031# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4032# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4033# version 2 for more details (a copy is included in the LICENSE file that
4034# accompanied this code).
4035#
4036# You should have received a copy of the GNU General Public License version
4037# 2 along with this work; if not, write to the Free Software Foundation,
4038# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4039#
4040# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4041# or visit www.oracle.com if you need additional information or have any
4042# questions.
4043#
4044
4045###############################################################################
4046#
4047# Setup version numbers
4048#
4049
4050# Verify that a given string represents a valid version number, and assign it
4051# to a variable.
4052
4053# Argument 1: the variable to assign to
4054# Argument 2: the value given by the user
4055
4056
4057
4058
4059#
4060# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4061# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4062#
4063# This code is free software; you can redistribute it and/or modify it
4064# under the terms of the GNU General Public License version 2 only, as
4065# published by the Free Software Foundation.  Oracle designates this
4066# particular file as subject to the "Classpath" exception as provided
4067# by Oracle in the LICENSE file that accompanied this code.
4068#
4069# This code is distributed in the hope that it will be useful, but WITHOUT
4070# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4071# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4072# version 2 for more details (a copy is included in the LICENSE file that
4073# accompanied this code).
4074#
4075# You should have received a copy of the GNU General Public License version
4076# 2 along with this work; if not, write to the Free Software Foundation,
4077# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4078#
4079# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4080# or visit www.oracle.com if you need additional information or have any
4081# questions.
4082#
4083
4084# Major library component reside in separate files.
4085#
4086# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4087# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088#
4089# This code is free software; you can redistribute it and/or modify it
4090# under the terms of the GNU General Public License version 2 only, as
4091# published by the Free Software Foundation.  Oracle designates this
4092# particular file as subject to the "Classpath" exception as provided
4093# by Oracle in the LICENSE file that accompanied this code.
4094#
4095# This code is distributed in the hope that it will be useful, but WITHOUT
4096# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098# version 2 for more details (a copy is included in the LICENSE file that
4099# accompanied this code).
4100#
4101# You should have received a copy of the GNU General Public License version
4102# 2 along with this work; if not, write to the Free Software Foundation,
4103# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104#
4105# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106# or visit www.oracle.com if you need additional information or have any
4107# questions.
4108#
4109
4110################################################################################
4111# Setup alsa (Advanced Linux Sound Architecture)
4112################################################################################
4113
4114
4115#
4116# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4117# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4118#
4119# This code is free software; you can redistribute it and/or modify it
4120# under the terms of the GNU General Public License version 2 only, as
4121# published by the Free Software Foundation.  Oracle designates this
4122# particular file as subject to the "Classpath" exception as provided
4123# by Oracle in the LICENSE file that accompanied this code.
4124#
4125# This code is distributed in the hope that it will be useful, but WITHOUT
4126# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4127# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4128# version 2 for more details (a copy is included in the LICENSE file that
4129# accompanied this code).
4130#
4131# You should have received a copy of the GNU General Public License version
4132# 2 along with this work; if not, write to the Free Software Foundation,
4133# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4134#
4135# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4136# or visit www.oracle.com if you need additional information or have any
4137# questions.
4138#
4139
4140################################################################################
4141# Setup bundled libraries.
4142#
4143# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4144# OpenJDK repository. Default is to use these libraries as bundled, but they
4145# might be replaced by en external version by the user.
4146################################################################################
4147
4148
4149################################################################################
4150# Setup libjpeg
4151################################################################################
4152
4153
4154################################################################################
4155# Setup giflib
4156################################################################################
4157
4158
4159################################################################################
4160# Setup libpng
4161################################################################################
4162
4163
4164################################################################################
4165# Setup zlib
4166################################################################################
4167
4168
4169################################################################################
4170# Setup lcms (Little CMS)
4171################################################################################
4172
4173
4174#
4175# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4176# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4177#
4178# This code is free software; you can redistribute it and/or modify it
4179# under the terms of the GNU General Public License version 2 only, as
4180# published by the Free Software Foundation.  Oracle designates this
4181# particular file as subject to the "Classpath" exception as provided
4182# by Oracle in the LICENSE file that accompanied this code.
4183#
4184# This code is distributed in the hope that it will be useful, but WITHOUT
4185# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4186# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4187# version 2 for more details (a copy is included in the LICENSE file that
4188# accompanied this code).
4189#
4190# You should have received a copy of the GNU General Public License version
4191# 2 along with this work; if not, write to the Free Software Foundation,
4192# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4193#
4194# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4195# or visit www.oracle.com if you need additional information or have any
4196# questions.
4197#
4198
4199################################################################################
4200# Setup cups (Common Unix Printing System)
4201################################################################################
4202
4203
4204#
4205# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4206# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4207#
4208# This code is free software; you can redistribute it and/or modify it
4209# under the terms of the GNU General Public License version 2 only, as
4210# published by the Free Software Foundation.  Oracle designates this
4211# particular file as subject to the "Classpath" exception as provided
4212# by Oracle in the LICENSE file that accompanied this code.
4213#
4214# This code is distributed in the hope that it will be useful, but WITHOUT
4215# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4216# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4217# version 2 for more details (a copy is included in the LICENSE file that
4218# accompanied this code).
4219#
4220# You should have received a copy of the GNU General Public License version
4221# 2 along with this work; if not, write to the Free Software Foundation,
4222# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4223#
4224# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4225# or visit www.oracle.com if you need additional information or have any
4226# questions.
4227#
4228
4229################################################################################
4230# Setup libffi (Foreign Function Interface)
4231################################################################################
4232
4233
4234#
4235# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4236# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4237#
4238# This code is free software; you can redistribute it and/or modify it
4239# under the terms of the GNU General Public License version 2 only, as
4240# published by the Free Software Foundation.  Oracle designates this
4241# particular file as subject to the "Classpath" exception as provided
4242# by Oracle in the LICENSE file that accompanied this code.
4243#
4244# This code is distributed in the hope that it will be useful, but WITHOUT
4245# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4246# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4247# version 2 for more details (a copy is included in the LICENSE file that
4248# accompanied this code).
4249#
4250# You should have received a copy of the GNU General Public License version
4251# 2 along with this work; if not, write to the Free Software Foundation,
4252# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4253#
4254# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4255# or visit www.oracle.com if you need additional information or have any
4256# questions.
4257#
4258
4259################################################################################
4260# Build the freetype lib from source
4261################################################################################
4262
4263
4264################################################################################
4265# Check if a potential freeype library match is correct and usable
4266################################################################################
4267
4268
4269################################################################################
4270# Setup freetype (The FreeType2 font rendering library)
4271################################################################################
4272
4273
4274#
4275# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4277#
4278# This code is free software; you can redistribute it and/or modify it
4279# under the terms of the GNU General Public License version 2 only, as
4280# published by the Free Software Foundation.  Oracle designates this
4281# particular file as subject to the "Classpath" exception as provided
4282# by Oracle in the LICENSE file that accompanied this code.
4283#
4284# This code is distributed in the hope that it will be useful, but WITHOUT
4285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4287# version 2 for more details (a copy is included in the LICENSE file that
4288# accompanied this code).
4289#
4290# You should have received a copy of the GNU General Public License version
4291# 2 along with this work; if not, write to the Free Software Foundation,
4292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4293#
4294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4295# or visit www.oracle.com if you need additional information or have any
4296# questions.
4297#
4298
4299################################################################################
4300# Setup the standard C/C++ runtime libraries.
4301#
4302# Most importantly, determine if stdc++ should be linked statically or
4303# dynamically.
4304################################################################################
4305
4306
4307#
4308# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4309# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4310#
4311# This code is free software; you can redistribute it and/or modify it
4312# under the terms of the GNU General Public License version 2 only, as
4313# published by the Free Software Foundation.  Oracle designates this
4314# particular file as subject to the "Classpath" exception as provided
4315# by Oracle in the LICENSE file that accompanied this code.
4316#
4317# This code is distributed in the hope that it will be useful, but WITHOUT
4318# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4319# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4320# version 2 for more details (a copy is included in the LICENSE file that
4321# accompanied this code).
4322#
4323# You should have received a copy of the GNU General Public License version
4324# 2 along with this work; if not, write to the Free Software Foundation,
4325# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4326#
4327# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4328# or visit www.oracle.com if you need additional information or have any
4329# questions.
4330#
4331
4332################################################################################
4333# Setup X11 Windows system
4334################################################################################
4335
4336
4337
4338################################################################################
4339# Determine which libraries are needed for this configuration
4340################################################################################
4341
4342
4343################################################################################
4344# Parse library options, and setup needed libraries
4345################################################################################
4346
4347
4348################################################################################
4349# Setup llvm (Low-Level VM)
4350################################################################################
4351
4352
4353################################################################################
4354# Setup various libraries, typically small system libraries
4355################################################################################
4356
4357
4358#
4359# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4360# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4361#
4362# This code is free software; you can redistribute it and/or modify it
4363# under the terms of the GNU General Public License version 2 only, as
4364# published by the Free Software Foundation.  Oracle designates this
4365# particular file as subject to the "Classpath" exception as provided
4366# by Oracle in the LICENSE file that accompanied this code.
4367#
4368# This code is distributed in the hope that it will be useful, but WITHOUT
4369# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4370# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4371# version 2 for more details (a copy is included in the LICENSE file that
4372# accompanied this code).
4373#
4374# You should have received a copy of the GNU General Public License version
4375# 2 along with this work; if not, write to the Free Software Foundation,
4376# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4377#
4378# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4379# or visit www.oracle.com if you need additional information or have any
4380# questions.
4381#
4382
4383# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4384# Converts autoconf style CPU name to OpenJDK style, into
4385# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4386
4387
4388# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4389# Converts autoconf style OS name to OpenJDK style, into
4390# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4391
4392
4393# Expects $host_os $host_cpu $build_os and $build_cpu
4394# and $with_target_bits to have been setup!
4395#
4396# Translate the standard triplet(quadruplet) definition
4397# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4398# OPENJDK_BUILD_OS, etc.
4399
4400
4401# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4402# accordingly. Must be done after setting up build and target system, but before
4403# doing anything else with these values.
4404
4405
4406# Setup the legacy variables, for controlling the old makefiles.
4407#
4408
4409
4410
4411
4412#%%% Build and target systems %%%
4413
4414
4415
4416
4417# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4418# Add -mX to various FLAGS variables.
4419
4420
4421
4422
4423
4424
4425#
4426# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4427# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4428#
4429# This code is free software; you can redistribute it and/or modify it
4430# under the terms of the GNU General Public License version 2 only, as
4431# published by the Free Software Foundation.  Oracle designates this
4432# particular file as subject to the "Classpath" exception as provided
4433# by Oracle in the LICENSE file that accompanied this code.
4434#
4435# This code is distributed in the hope that it will be useful, but WITHOUT
4436# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4437# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4438# version 2 for more details (a copy is included in the LICENSE file that
4439# accompanied this code).
4440#
4441# You should have received a copy of the GNU General Public License version
4442# 2 along with this work; if not, write to the Free Software Foundation,
4443# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4444#
4445# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4446# or visit www.oracle.com if you need additional information or have any
4447# questions.
4448#
4449
4450
4451
4452
4453
4454
4455
4456
4457#
4458# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4460#
4461# This code is free software; you can redistribute it and/or modify it
4462# under the terms of the GNU General Public License version 2 only, as
4463# published by the Free Software Foundation.  Oracle designates this
4464# particular file as subject to the "Classpath" exception as provided
4465# by Oracle in the LICENSE file that accompanied this code.
4466#
4467# This code is distributed in the hope that it will be useful, but WITHOUT
4468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4470# version 2 for more details (a copy is included in the LICENSE file that
4471# accompanied this code).
4472#
4473# You should have received a copy of the GNU General Public License version
4474# 2 along with this work; if not, write to the Free Software Foundation,
4475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4476#
4477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4478# or visit www.oracle.com if you need additional information or have any
4479# questions.
4480#
4481
4482########################################################################
4483# This file is responsible for detecting, verifying and setting up the
4484# toolchain, i.e. the compiler, linker and related utilities. It will setup
4485# proper paths to the binaries, but it will not setup any flags.
4486#
4487# The binaries used is determined by the toolchain type, which is the family of
4488# compilers and related tools that are used.
4489########################################################################
4490
4491
4492# All valid toolchains, regardless of platform (used by help.m4)
4493VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4494
4495# These toolchains are valid on different platforms
4496VALID_TOOLCHAINS_linux="gcc clang"
4497VALID_TOOLCHAINS_solaris="solstudio"
4498VALID_TOOLCHAINS_macosx="gcc clang"
4499VALID_TOOLCHAINS_aix="xlc"
4500VALID_TOOLCHAINS_windows="microsoft"
4501
4502# Toolchain descriptions
4503TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4504TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4505TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4506TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4507TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4508
4509# Setup a number of variables describing how native output files are
4510# named on this platform/toolchain.
4511
4512
4513# Determine which toolchain type to use, and make sure it is valid for this
4514# platform. Setup various information about the selected toolchain.
4515
4516
4517# Before we start detecting the toolchain executables, we might need some
4518# special setup, e.g. additional paths etc.
4519
4520
4521# Restore path, etc
4522
4523
4524# Check if a compiler is of the toolchain type we expect, and save the version
4525# information from it. If the compiler does not match the expected type,
4526# this function will abort using AC_MSG_ERROR. If it matches, the version will
4527# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4528# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4529#
4530# $1 = compiler to test (CC or CXX)
4531# $2 = human readable name of compiler (C or C++)
4532
4533
4534# Try to locate the given C or C++ compiler in the path, or otherwise.
4535#
4536# $1 = compiler to test (CC or CXX)
4537# $2 = human readable name of compiler (C or C++)
4538# $3 = list of compiler names to search for
4539
4540
4541# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4542# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4543# archiver (AR). Verify that the compilers are correct according to the
4544# toolchain type.
4545
4546
4547# Setup additional tools that is considered a part of the toolchain, but not the
4548# core part. Many of these are highly platform-specific and do not exist,
4549# and/or are not needed on all platforms.
4550
4551
4552# Setup the build tools (i.e, the compiler and linker used to build programs
4553# that should be run on the build platform, not the target platform, as a build
4554# helper). Since the non-cross-compile case uses the normal, target compilers
4555# for this, we can only do this after these have been setup.
4556
4557
4558# Setup legacy variables that are still needed as alternative ways to refer to
4559# parts of the toolchain.
4560
4561
4562# Do some additional checks on the detected tools.
4563
4564
4565# Setup the JTReg Regression Test Harness.
4566
4567
4568#
4569# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4570# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4571#
4572# This code is free software; you can redistribute it and/or modify it
4573# under the terms of the GNU General Public License version 2 only, as
4574# published by the Free Software Foundation.  Oracle designates this
4575# particular file as subject to the "Classpath" exception as provided
4576# by Oracle in the LICENSE file that accompanied this code.
4577#
4578# This code is distributed in the hope that it will be useful, but WITHOUT
4579# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4580# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4581# version 2 for more details (a copy is included in the LICENSE file that
4582# accompanied this code).
4583#
4584# You should have received a copy of the GNU General Public License version
4585# 2 along with this work; if not, write to the Free Software Foundation,
4586# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4587#
4588# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4589# or visit www.oracle.com if you need additional information or have any
4590# questions.
4591#
4592
4593################################################################################
4594# The order of these defines the priority by which we try to find them.
4595VALID_VS_VERSIONS="2013 2012 2010"
4596
4597VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4598VS_VERSION_INTERNAL_2010=100
4599VS_MSVCR_2010=msvcr100.dll
4600# We don't use msvcp on Visual Studio 2010
4601#VS_MSVCP_2010=msvcp100.dll
4602VS_ENVVAR_2010="VS100COMNTOOLS"
4603VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4604VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4605VS_VS_PLATFORM_NAME_2010="v100"
4606VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4607
4608VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4609VS_VERSION_INTERNAL_2012=110
4610VS_MSVCR_2012=msvcr110.dll
4611VS_MSVCP_2012=msvcp110.dll
4612VS_ENVVAR_2012="VS110COMNTOOLS"
4613VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4614VS_SDK_INSTALLDIR_2012=
4615VS_VS_PLATFORM_NAME_2012="v110"
4616VS_SDK_PLATFORM_NAME_2012=
4617
4618VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4619VS_VERSION_INTERNAL_2013=120
4620VS_MSVCR_2013=msvcr120.dll
4621VS_MSVCP_2013=msvcp120.dll
4622VS_ENVVAR_2013="VS120COMNTOOLS"
4623VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4624VS_SDK_INSTALLDIR_2013=
4625VS_VS_PLATFORM_NAME_2013="v120"
4626VS_SDK_PLATFORM_NAME_2013=
4627
4628################################################################################
4629
4630
4631
4632################################################################################
4633
4634
4635
4636################################################################################
4637# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4638# build environment and assigns it to VS_ENV_CMD
4639
4640
4641################################################################################
4642
4643
4644
4645################################################################################
4646# Check if the VS env variables were setup prior to running configure.
4647# If not, then find vcvarsall.bat and run it automatically, and integrate
4648# the set env variables into the spec file.
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663# This line needs to be here, verbatim, after all includes and the dummy hook
4664# definitions. It is replaced with custom functionality when building
4665# custom sources.
4666#CUSTOM_AUTOCONF_INCLUDE
4667
4668# Do not change or remove the following line, it is needed for consistency checks:
4669DATE_WHEN_GENERATED=1447122897
4670
4671###############################################################################
4672#
4673# Initialization / Boot-strapping
4674#
4675# The bootstrapping process needs to solve the "chicken or the egg" problem,
4676# thus it jumps back and forth, each time gaining something needed later on.
4677#
4678###############################################################################
4679
4680# If we are requested to print additional help, do that and then exit.
4681# This must be the very first call.
4682
4683  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4684    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4685    $PRINTF "Which are valid to use depends on the build platform.\n"
4686    for toolchain in $VALID_TOOLCHAINS_all; do
4687      # Use indirect variable referencing
4688      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4689      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4690      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4691    done
4692
4693    # And now exit directly
4694    exit 0
4695  fi
4696
4697
4698# Basic initialization that must happen first of all in the normal process.
4699
4700  # Save the original command line. This is passed to us by the wrapper configure script.
4701
4702  # Save the path variable before it gets changed
4703  ORIGINAL_PATH="$PATH"
4704
4705  DATE_WHEN_CONFIGURED=`LANG=C date`
4706
4707  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4708$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4710$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4711
4712
4713  # Start with tools that do not need have cross compilation support
4714  # and can be expected to be found in the default PATH. These tools are
4715  # used by configure.
4716
4717  # First are all the simple required tools.
4718
4719
4720
4721  # Publish this variable in the help.
4722
4723
4724  if [ -z "${BASENAME+x}" ]; then
4725    # The variable is not set by user, try to locate tool using the code snippet
4726    for ac_prog in basename
4727do
4728  # Extract the first word of "$ac_prog", so it can be a program name with args.
4729set dummy $ac_prog; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
4732if ${ac_cv_path_BASENAME+:} false; then :
4733  $as_echo_n "(cached) " >&6
4734else
4735  case $BASENAME in
4736  [\\/]* | ?:[\\/]*)
4737  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4738  ;;
4739  *)
4740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743  IFS=$as_save_IFS
4744  test -z "$as_dir" && as_dir=.
4745    for ac_exec_ext in '' $ac_executable_extensions; do
4746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4747    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749    break 2
4750  fi
4751done
4752  done
4753IFS=$as_save_IFS
4754
4755  ;;
4756esac
4757fi
4758BASENAME=$ac_cv_path_BASENAME
4759if test -n "$BASENAME"; then
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4761$as_echo "$BASENAME" >&6; }
4762else
4763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767
4768  test -n "$BASENAME" && break
4769done
4770
4771  else
4772    # The variable is set, but is it from the command line or the environment?
4773
4774    # Try to remove the string !BASENAME! from our list.
4775    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4776    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4777      # If it failed, the variable was not from the command line. Ignore it,
4778      # but warn the user (except for BASH, which is always set by the calling BASH).
4779      if test "xBASENAME" != xBASH; then
4780        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4781$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4782      fi
4783      # Try to locate tool using the code snippet
4784      for ac_prog in basename
4785do
4786  # Extract the first word of "$ac_prog", so it can be a program name with args.
4787set dummy $ac_prog; ac_word=$2
4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
4790if ${ac_cv_path_BASENAME+:} false; then :
4791  $as_echo_n "(cached) " >&6
4792else
4793  case $BASENAME in
4794  [\\/]* | ?:[\\/]*)
4795  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4796  ;;
4797  *)
4798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in $PATH
4800do
4801  IFS=$as_save_IFS
4802  test -z "$as_dir" && as_dir=.
4803    for ac_exec_ext in '' $ac_executable_extensions; do
4804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4805    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4807    break 2
4808  fi
4809done
4810  done
4811IFS=$as_save_IFS
4812
4813  ;;
4814esac
4815fi
4816BASENAME=$ac_cv_path_BASENAME
4817if test -n "$BASENAME"; then
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4819$as_echo "$BASENAME" >&6; }
4820else
4821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
4823fi
4824
4825
4826  test -n "$BASENAME" && break
4827done
4828
4829    else
4830      # If it succeeded, then it was overridden by the user. We will use it
4831      # for the tool.
4832
4833      # First remove it from the list of overridden variables, so we can test
4834      # for unknown variables in the end.
4835      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4836
4837      # Check if we try to supply an empty value
4838      if test "x$BASENAME" = x; then
4839        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4840$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4842$as_echo_n "checking for BASENAME... " >&6; }
4843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4844$as_echo "disabled" >&6; }
4845      else
4846        # Check if the provided tool contains a complete path.
4847        tool_specified="$BASENAME"
4848        tool_basename="${tool_specified##*/}"
4849        if test "x$tool_basename" = "x$tool_specified"; then
4850          # A command without a complete path is provided, search $PATH.
4851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4852$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4853          # Extract the first word of "$tool_basename", so it can be a program name with args.
4854set dummy $tool_basename; ac_word=$2
4855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4856$as_echo_n "checking for $ac_word... " >&6; }
4857if ${ac_cv_path_BASENAME+:} false; then :
4858  $as_echo_n "(cached) " >&6
4859else
4860  case $BASENAME in
4861  [\\/]* | ?:[\\/]*)
4862  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4863  ;;
4864  *)
4865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in $PATH
4867do
4868  IFS=$as_save_IFS
4869  test -z "$as_dir" && as_dir=.
4870    for ac_exec_ext in '' $ac_executable_extensions; do
4871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4872    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4874    break 2
4875  fi
4876done
4877  done
4878IFS=$as_save_IFS
4879
4880  ;;
4881esac
4882fi
4883BASENAME=$ac_cv_path_BASENAME
4884if test -n "$BASENAME"; then
4885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4886$as_echo "$BASENAME" >&6; }
4887else
4888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889$as_echo "no" >&6; }
4890fi
4891
4892
4893          if test "x$BASENAME" = x; then
4894            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4895          fi
4896        else
4897          # Otherwise we believe it is a complete path. Use it as it is.
4898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4899$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4900          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4901$as_echo_n "checking for BASENAME... " >&6; }
4902          if test ! -x "$tool_specified"; then
4903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4904$as_echo "not found" >&6; }
4905            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4906          fi
4907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4908$as_echo "$tool_specified" >&6; }
4909        fi
4910      fi
4911    fi
4912
4913  fi
4914
4915
4916
4917  if test "x$BASENAME" = x; then
4918    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4919  fi
4920
4921
4922
4923
4924
4925  # Publish this variable in the help.
4926
4927
4928  if [ -z "${BASH+x}" ]; then
4929    # The variable is not set by user, try to locate tool using the code snippet
4930    for ac_prog in bash
4931do
4932  # Extract the first word of "$ac_prog", so it can be a program name with args.
4933set dummy $ac_prog; ac_word=$2
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4935$as_echo_n "checking for $ac_word... " >&6; }
4936if ${ac_cv_path_BASH+:} false; then :
4937  $as_echo_n "(cached) " >&6
4938else
4939  case $BASH in
4940  [\\/]* | ?:[\\/]*)
4941  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4942  ;;
4943  *)
4944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947  IFS=$as_save_IFS
4948  test -z "$as_dir" && as_dir=.
4949    for ac_exec_ext in '' $ac_executable_extensions; do
4950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4951    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4953    break 2
4954  fi
4955done
4956  done
4957IFS=$as_save_IFS
4958
4959  ;;
4960esac
4961fi
4962BASH=$ac_cv_path_BASH
4963if test -n "$BASH"; then
4964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4965$as_echo "$BASH" >&6; }
4966else
4967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4968$as_echo "no" >&6; }
4969fi
4970
4971
4972  test -n "$BASH" && break
4973done
4974
4975  else
4976    # The variable is set, but is it from the command line or the environment?
4977
4978    # Try to remove the string !BASH! from our list.
4979    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4980    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4981      # If it failed, the variable was not from the command line. Ignore it,
4982      # but warn the user (except for BASH, which is always set by the calling BASH).
4983      if test "xBASH" != xBASH; then
4984        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4985$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4986      fi
4987      # Try to locate tool using the code snippet
4988      for ac_prog in bash
4989do
4990  # Extract the first word of "$ac_prog", so it can be a program name with args.
4991set dummy $ac_prog; ac_word=$2
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993$as_echo_n "checking for $ac_word... " >&6; }
4994if ${ac_cv_path_BASH+:} false; then :
4995  $as_echo_n "(cached) " >&6
4996else
4997  case $BASH in
4998  [\\/]* | ?:[\\/]*)
4999  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5000  ;;
5001  *)
5002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003for as_dir in $PATH
5004do
5005  IFS=$as_save_IFS
5006  test -z "$as_dir" && as_dir=.
5007    for ac_exec_ext in '' $ac_executable_extensions; do
5008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5009    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5011    break 2
5012  fi
5013done
5014  done
5015IFS=$as_save_IFS
5016
5017  ;;
5018esac
5019fi
5020BASH=$ac_cv_path_BASH
5021if test -n "$BASH"; then
5022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5023$as_echo "$BASH" >&6; }
5024else
5025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030  test -n "$BASH" && break
5031done
5032
5033    else
5034      # If it succeeded, then it was overridden by the user. We will use it
5035      # for the tool.
5036
5037      # First remove it from the list of overridden variables, so we can test
5038      # for unknown variables in the end.
5039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5040
5041      # Check if we try to supply an empty value
5042      if test "x$BASH" = x; then
5043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5044$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5046$as_echo_n "checking for BASH... " >&6; }
5047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5048$as_echo "disabled" >&6; }
5049      else
5050        # Check if the provided tool contains a complete path.
5051        tool_specified="$BASH"
5052        tool_basename="${tool_specified##*/}"
5053        if test "x$tool_basename" = "x$tool_specified"; then
5054          # A command without a complete path is provided, search $PATH.
5055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5056$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5057          # Extract the first word of "$tool_basename", so it can be a program name with args.
5058set dummy $tool_basename; ac_word=$2
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060$as_echo_n "checking for $ac_word... " >&6; }
5061if ${ac_cv_path_BASH+:} false; then :
5062  $as_echo_n "(cached) " >&6
5063else
5064  case $BASH in
5065  [\\/]* | ?:[\\/]*)
5066  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5067  ;;
5068  *)
5069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072  IFS=$as_save_IFS
5073  test -z "$as_dir" && as_dir=.
5074    for ac_exec_ext in '' $ac_executable_extensions; do
5075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5076    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5078    break 2
5079  fi
5080done
5081  done
5082IFS=$as_save_IFS
5083
5084  ;;
5085esac
5086fi
5087BASH=$ac_cv_path_BASH
5088if test -n "$BASH"; then
5089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5090$as_echo "$BASH" >&6; }
5091else
5092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093$as_echo "no" >&6; }
5094fi
5095
5096
5097          if test "x$BASH" = x; then
5098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5099          fi
5100        else
5101          # Otherwise we believe it is a complete path. Use it as it is.
5102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5103$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5105$as_echo_n "checking for BASH... " >&6; }
5106          if test ! -x "$tool_specified"; then
5107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5108$as_echo "not found" >&6; }
5109            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5110          fi
5111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5112$as_echo "$tool_specified" >&6; }
5113        fi
5114      fi
5115    fi
5116
5117  fi
5118
5119
5120
5121  if test "x$BASH" = x; then
5122    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5123  fi
5124
5125
5126
5127
5128
5129  # Publish this variable in the help.
5130
5131
5132  if [ -z "${CAT+x}" ]; then
5133    # The variable is not set by user, try to locate tool using the code snippet
5134    for ac_prog in cat
5135do
5136  # Extract the first word of "$ac_prog", so it can be a program name with args.
5137set dummy $ac_prog; ac_word=$2
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5139$as_echo_n "checking for $ac_word... " >&6; }
5140if ${ac_cv_path_CAT+:} false; then :
5141  $as_echo_n "(cached) " >&6
5142else
5143  case $CAT in
5144  [\\/]* | ?:[\\/]*)
5145  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5146  ;;
5147  *)
5148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5149for as_dir in $PATH
5150do
5151  IFS=$as_save_IFS
5152  test -z "$as_dir" && as_dir=.
5153    for ac_exec_ext in '' $ac_executable_extensions; do
5154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5155    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5157    break 2
5158  fi
5159done
5160  done
5161IFS=$as_save_IFS
5162
5163  ;;
5164esac
5165fi
5166CAT=$ac_cv_path_CAT
5167if test -n "$CAT"; then
5168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5169$as_echo "$CAT" >&6; }
5170else
5171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5172$as_echo "no" >&6; }
5173fi
5174
5175
5176  test -n "$CAT" && break
5177done
5178
5179  else
5180    # The variable is set, but is it from the command line or the environment?
5181
5182    # Try to remove the string !CAT! from our list.
5183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5185      # If it failed, the variable was not from the command line. Ignore it,
5186      # but warn the user (except for BASH, which is always set by the calling BASH).
5187      if test "xCAT" != xBASH; then
5188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5189$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5190      fi
5191      # Try to locate tool using the code snippet
5192      for ac_prog in cat
5193do
5194  # Extract the first word of "$ac_prog", so it can be a program name with args.
5195set dummy $ac_prog; ac_word=$2
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5197$as_echo_n "checking for $ac_word... " >&6; }
5198if ${ac_cv_path_CAT+:} false; then :
5199  $as_echo_n "(cached) " >&6
5200else
5201  case $CAT in
5202  [\\/]* | ?:[\\/]*)
5203  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5204  ;;
5205  *)
5206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5207for as_dir in $PATH
5208do
5209  IFS=$as_save_IFS
5210  test -z "$as_dir" && as_dir=.
5211    for ac_exec_ext in '' $ac_executable_extensions; do
5212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5213    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5215    break 2
5216  fi
5217done
5218  done
5219IFS=$as_save_IFS
5220
5221  ;;
5222esac
5223fi
5224CAT=$ac_cv_path_CAT
5225if test -n "$CAT"; then
5226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5227$as_echo "$CAT" >&6; }
5228else
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5230$as_echo "no" >&6; }
5231fi
5232
5233
5234  test -n "$CAT" && break
5235done
5236
5237    else
5238      # If it succeeded, then it was overridden by the user. We will use it
5239      # for the tool.
5240
5241      # First remove it from the list of overridden variables, so we can test
5242      # for unknown variables in the end.
5243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5244
5245      # Check if we try to supply an empty value
5246      if test "x$CAT" = x; then
5247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5248$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5250$as_echo_n "checking for CAT... " >&6; }
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5252$as_echo "disabled" >&6; }
5253      else
5254        # Check if the provided tool contains a complete path.
5255        tool_specified="$CAT"
5256        tool_basename="${tool_specified##*/}"
5257        if test "x$tool_basename" = "x$tool_specified"; then
5258          # A command without a complete path is provided, search $PATH.
5259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5260$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5261          # Extract the first word of "$tool_basename", so it can be a program name with args.
5262set dummy $tool_basename; ac_word=$2
5263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5264$as_echo_n "checking for $ac_word... " >&6; }
5265if ${ac_cv_path_CAT+:} false; then :
5266  $as_echo_n "(cached) " >&6
5267else
5268  case $CAT in
5269  [\\/]* | ?:[\\/]*)
5270  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5271  ;;
5272  *)
5273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5274for as_dir in $PATH
5275do
5276  IFS=$as_save_IFS
5277  test -z "$as_dir" && as_dir=.
5278    for ac_exec_ext in '' $ac_executable_extensions; do
5279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5280    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5282    break 2
5283  fi
5284done
5285  done
5286IFS=$as_save_IFS
5287
5288  ;;
5289esac
5290fi
5291CAT=$ac_cv_path_CAT
5292if test -n "$CAT"; then
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5294$as_echo "$CAT" >&6; }
5295else
5296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5297$as_echo "no" >&6; }
5298fi
5299
5300
5301          if test "x$CAT" = x; then
5302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5303          fi
5304        else
5305          # Otherwise we believe it is a complete path. Use it as it is.
5306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5307$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5309$as_echo_n "checking for CAT... " >&6; }
5310          if test ! -x "$tool_specified"; then
5311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5312$as_echo "not found" >&6; }
5313            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5314          fi
5315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5316$as_echo "$tool_specified" >&6; }
5317        fi
5318      fi
5319    fi
5320
5321  fi
5322
5323
5324
5325  if test "x$CAT" = x; then
5326    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5327  fi
5328
5329
5330
5331
5332
5333  # Publish this variable in the help.
5334
5335
5336  if [ -z "${CHMOD+x}" ]; then
5337    # The variable is not set by user, try to locate tool using the code snippet
5338    for ac_prog in chmod
5339do
5340  # Extract the first word of "$ac_prog", so it can be a program name with args.
5341set dummy $ac_prog; ac_word=$2
5342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5343$as_echo_n "checking for $ac_word... " >&6; }
5344if ${ac_cv_path_CHMOD+:} false; then :
5345  $as_echo_n "(cached) " >&6
5346else
5347  case $CHMOD in
5348  [\\/]* | ?:[\\/]*)
5349  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5350  ;;
5351  *)
5352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5353for as_dir in $PATH
5354do
5355  IFS=$as_save_IFS
5356  test -z "$as_dir" && as_dir=.
5357    for ac_exec_ext in '' $ac_executable_extensions; do
5358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5359    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5361    break 2
5362  fi
5363done
5364  done
5365IFS=$as_save_IFS
5366
5367  ;;
5368esac
5369fi
5370CHMOD=$ac_cv_path_CHMOD
5371if test -n "$CHMOD"; then
5372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5373$as_echo "$CHMOD" >&6; }
5374else
5375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5376$as_echo "no" >&6; }
5377fi
5378
5379
5380  test -n "$CHMOD" && break
5381done
5382
5383  else
5384    # The variable is set, but is it from the command line or the environment?
5385
5386    # Try to remove the string !CHMOD! from our list.
5387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5389      # If it failed, the variable was not from the command line. Ignore it,
5390      # but warn the user (except for BASH, which is always set by the calling BASH).
5391      if test "xCHMOD" != xBASH; then
5392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5393$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5394      fi
5395      # Try to locate tool using the code snippet
5396      for ac_prog in chmod
5397do
5398  # Extract the first word of "$ac_prog", so it can be a program name with args.
5399set dummy $ac_prog; ac_word=$2
5400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5401$as_echo_n "checking for $ac_word... " >&6; }
5402if ${ac_cv_path_CHMOD+:} false; then :
5403  $as_echo_n "(cached) " >&6
5404else
5405  case $CHMOD in
5406  [\\/]* | ?:[\\/]*)
5407  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5408  ;;
5409  *)
5410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5411for as_dir in $PATH
5412do
5413  IFS=$as_save_IFS
5414  test -z "$as_dir" && as_dir=.
5415    for ac_exec_ext in '' $ac_executable_extensions; do
5416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5417    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5419    break 2
5420  fi
5421done
5422  done
5423IFS=$as_save_IFS
5424
5425  ;;
5426esac
5427fi
5428CHMOD=$ac_cv_path_CHMOD
5429if test -n "$CHMOD"; then
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5431$as_echo "$CHMOD" >&6; }
5432else
5433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434$as_echo "no" >&6; }
5435fi
5436
5437
5438  test -n "$CHMOD" && break
5439done
5440
5441    else
5442      # If it succeeded, then it was overridden by the user. We will use it
5443      # for the tool.
5444
5445      # First remove it from the list of overridden variables, so we can test
5446      # for unknown variables in the end.
5447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5448
5449      # Check if we try to supply an empty value
5450      if test "x$CHMOD" = x; then
5451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5452$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5454$as_echo_n "checking for CHMOD... " >&6; }
5455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5456$as_echo "disabled" >&6; }
5457      else
5458        # Check if the provided tool contains a complete path.
5459        tool_specified="$CHMOD"
5460        tool_basename="${tool_specified##*/}"
5461        if test "x$tool_basename" = "x$tool_specified"; then
5462          # A command without a complete path is provided, search $PATH.
5463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5464$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5465          # Extract the first word of "$tool_basename", so it can be a program name with args.
5466set dummy $tool_basename; ac_word=$2
5467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5468$as_echo_n "checking for $ac_word... " >&6; }
5469if ${ac_cv_path_CHMOD+:} false; then :
5470  $as_echo_n "(cached) " >&6
5471else
5472  case $CHMOD in
5473  [\\/]* | ?:[\\/]*)
5474  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5475  ;;
5476  *)
5477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5478for as_dir in $PATH
5479do
5480  IFS=$as_save_IFS
5481  test -z "$as_dir" && as_dir=.
5482    for ac_exec_ext in '' $ac_executable_extensions; do
5483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5484    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5486    break 2
5487  fi
5488done
5489  done
5490IFS=$as_save_IFS
5491
5492  ;;
5493esac
5494fi
5495CHMOD=$ac_cv_path_CHMOD
5496if test -n "$CHMOD"; then
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5498$as_echo "$CHMOD" >&6; }
5499else
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5501$as_echo "no" >&6; }
5502fi
5503
5504
5505          if test "x$CHMOD" = x; then
5506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5507          fi
5508        else
5509          # Otherwise we believe it is a complete path. Use it as it is.
5510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5511$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5513$as_echo_n "checking for CHMOD... " >&6; }
5514          if test ! -x "$tool_specified"; then
5515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5516$as_echo "not found" >&6; }
5517            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5518          fi
5519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5520$as_echo "$tool_specified" >&6; }
5521        fi
5522      fi
5523    fi
5524
5525  fi
5526
5527
5528
5529  if test "x$CHMOD" = x; then
5530    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5531  fi
5532
5533
5534
5535
5536
5537  # Publish this variable in the help.
5538
5539
5540  if [ -z "${CMP+x}" ]; then
5541    # The variable is not set by user, try to locate tool using the code snippet
5542    for ac_prog in cmp
5543do
5544  # Extract the first word of "$ac_prog", so it can be a program name with args.
5545set dummy $ac_prog; ac_word=$2
5546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547$as_echo_n "checking for $ac_word... " >&6; }
5548if ${ac_cv_path_CMP+:} false; then :
5549  $as_echo_n "(cached) " >&6
5550else
5551  case $CMP in
5552  [\\/]* | ?:[\\/]*)
5553  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5554  ;;
5555  *)
5556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5557for as_dir in $PATH
5558do
5559  IFS=$as_save_IFS
5560  test -z "$as_dir" && as_dir=.
5561    for ac_exec_ext in '' $ac_executable_extensions; do
5562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5563    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5565    break 2
5566  fi
5567done
5568  done
5569IFS=$as_save_IFS
5570
5571  ;;
5572esac
5573fi
5574CMP=$ac_cv_path_CMP
5575if test -n "$CMP"; then
5576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5577$as_echo "$CMP" >&6; }
5578else
5579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5580$as_echo "no" >&6; }
5581fi
5582
5583
5584  test -n "$CMP" && break
5585done
5586
5587  else
5588    # The variable is set, but is it from the command line or the environment?
5589
5590    # Try to remove the string !CMP! from our list.
5591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5593      # If it failed, the variable was not from the command line. Ignore it,
5594      # but warn the user (except for BASH, which is always set by the calling BASH).
5595      if test "xCMP" != xBASH; then
5596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5597$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5598      fi
5599      # Try to locate tool using the code snippet
5600      for ac_prog in cmp
5601do
5602  # Extract the first word of "$ac_prog", so it can be a program name with args.
5603set dummy $ac_prog; ac_word=$2
5604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5605$as_echo_n "checking for $ac_word... " >&6; }
5606if ${ac_cv_path_CMP+:} false; then :
5607  $as_echo_n "(cached) " >&6
5608else
5609  case $CMP in
5610  [\\/]* | ?:[\\/]*)
5611  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5612  ;;
5613  *)
5614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5615for as_dir in $PATH
5616do
5617  IFS=$as_save_IFS
5618  test -z "$as_dir" && as_dir=.
5619    for ac_exec_ext in '' $ac_executable_extensions; do
5620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5621    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5623    break 2
5624  fi
5625done
5626  done
5627IFS=$as_save_IFS
5628
5629  ;;
5630esac
5631fi
5632CMP=$ac_cv_path_CMP
5633if test -n "$CMP"; then
5634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5635$as_echo "$CMP" >&6; }
5636else
5637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5638$as_echo "no" >&6; }
5639fi
5640
5641
5642  test -n "$CMP" && break
5643done
5644
5645    else
5646      # If it succeeded, then it was overridden by the user. We will use it
5647      # for the tool.
5648
5649      # First remove it from the list of overridden variables, so we can test
5650      # for unknown variables in the end.
5651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5652
5653      # Check if we try to supply an empty value
5654      if test "x$CMP" = x; then
5655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5656$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5658$as_echo_n "checking for CMP... " >&6; }
5659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5660$as_echo "disabled" >&6; }
5661      else
5662        # Check if the provided tool contains a complete path.
5663        tool_specified="$CMP"
5664        tool_basename="${tool_specified##*/}"
5665        if test "x$tool_basename" = "x$tool_specified"; then
5666          # A command without a complete path is provided, search $PATH.
5667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5668$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5669          # Extract the first word of "$tool_basename", so it can be a program name with args.
5670set dummy $tool_basename; ac_word=$2
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5672$as_echo_n "checking for $ac_word... " >&6; }
5673if ${ac_cv_path_CMP+:} false; then :
5674  $as_echo_n "(cached) " >&6
5675else
5676  case $CMP in
5677  [\\/]* | ?:[\\/]*)
5678  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5679  ;;
5680  *)
5681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5682for as_dir in $PATH
5683do
5684  IFS=$as_save_IFS
5685  test -z "$as_dir" && as_dir=.
5686    for ac_exec_ext in '' $ac_executable_extensions; do
5687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5688    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5690    break 2
5691  fi
5692done
5693  done
5694IFS=$as_save_IFS
5695
5696  ;;
5697esac
5698fi
5699CMP=$ac_cv_path_CMP
5700if test -n "$CMP"; then
5701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5702$as_echo "$CMP" >&6; }
5703else
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705$as_echo "no" >&6; }
5706fi
5707
5708
5709          if test "x$CMP" = x; then
5710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5711          fi
5712        else
5713          # Otherwise we believe it is a complete path. Use it as it is.
5714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5715$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5717$as_echo_n "checking for CMP... " >&6; }
5718          if test ! -x "$tool_specified"; then
5719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5720$as_echo "not found" >&6; }
5721            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5722          fi
5723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5724$as_echo "$tool_specified" >&6; }
5725        fi
5726      fi
5727    fi
5728
5729  fi
5730
5731
5732
5733  if test "x$CMP" = x; then
5734    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5735  fi
5736
5737
5738
5739
5740
5741  # Publish this variable in the help.
5742
5743
5744  if [ -z "${COMM+x}" ]; then
5745    # The variable is not set by user, try to locate tool using the code snippet
5746    for ac_prog in comm
5747do
5748  # Extract the first word of "$ac_prog", so it can be a program name with args.
5749set dummy $ac_prog; ac_word=$2
5750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5751$as_echo_n "checking for $ac_word... " >&6; }
5752if ${ac_cv_path_COMM+:} false; then :
5753  $as_echo_n "(cached) " >&6
5754else
5755  case $COMM in
5756  [\\/]* | ?:[\\/]*)
5757  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5758  ;;
5759  *)
5760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5761for as_dir in $PATH
5762do
5763  IFS=$as_save_IFS
5764  test -z "$as_dir" && as_dir=.
5765    for ac_exec_ext in '' $ac_executable_extensions; do
5766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5767    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5769    break 2
5770  fi
5771done
5772  done
5773IFS=$as_save_IFS
5774
5775  ;;
5776esac
5777fi
5778COMM=$ac_cv_path_COMM
5779if test -n "$COMM"; then
5780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5781$as_echo "$COMM" >&6; }
5782else
5783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5784$as_echo "no" >&6; }
5785fi
5786
5787
5788  test -n "$COMM" && break
5789done
5790
5791  else
5792    # The variable is set, but is it from the command line or the environment?
5793
5794    # Try to remove the string !COMM! from our list.
5795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5797      # If it failed, the variable was not from the command line. Ignore it,
5798      # but warn the user (except for BASH, which is always set by the calling BASH).
5799      if test "xCOMM" != xBASH; then
5800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5801$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5802      fi
5803      # Try to locate tool using the code snippet
5804      for ac_prog in comm
5805do
5806  # Extract the first word of "$ac_prog", so it can be a program name with args.
5807set dummy $ac_prog; ac_word=$2
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5809$as_echo_n "checking for $ac_word... " >&6; }
5810if ${ac_cv_path_COMM+:} false; then :
5811  $as_echo_n "(cached) " >&6
5812else
5813  case $COMM in
5814  [\\/]* | ?:[\\/]*)
5815  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5816  ;;
5817  *)
5818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5819for as_dir in $PATH
5820do
5821  IFS=$as_save_IFS
5822  test -z "$as_dir" && as_dir=.
5823    for ac_exec_ext in '' $ac_executable_extensions; do
5824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5825    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5827    break 2
5828  fi
5829done
5830  done
5831IFS=$as_save_IFS
5832
5833  ;;
5834esac
5835fi
5836COMM=$ac_cv_path_COMM
5837if test -n "$COMM"; then
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5839$as_echo "$COMM" >&6; }
5840else
5841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5842$as_echo "no" >&6; }
5843fi
5844
5845
5846  test -n "$COMM" && break
5847done
5848
5849    else
5850      # If it succeeded, then it was overridden by the user. We will use it
5851      # for the tool.
5852
5853      # First remove it from the list of overridden variables, so we can test
5854      # for unknown variables in the end.
5855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5856
5857      # Check if we try to supply an empty value
5858      if test "x$COMM" = x; then
5859        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5860$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5862$as_echo_n "checking for COMM... " >&6; }
5863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5864$as_echo "disabled" >&6; }
5865      else
5866        # Check if the provided tool contains a complete path.
5867        tool_specified="$COMM"
5868        tool_basename="${tool_specified##*/}"
5869        if test "x$tool_basename" = "x$tool_specified"; then
5870          # A command without a complete path is provided, search $PATH.
5871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5872$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5873          # Extract the first word of "$tool_basename", so it can be a program name with args.
5874set dummy $tool_basename; ac_word=$2
5875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5876$as_echo_n "checking for $ac_word... " >&6; }
5877if ${ac_cv_path_COMM+:} false; then :
5878  $as_echo_n "(cached) " >&6
5879else
5880  case $COMM in
5881  [\\/]* | ?:[\\/]*)
5882  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5883  ;;
5884  *)
5885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5886for as_dir in $PATH
5887do
5888  IFS=$as_save_IFS
5889  test -z "$as_dir" && as_dir=.
5890    for ac_exec_ext in '' $ac_executable_extensions; do
5891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5892    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5894    break 2
5895  fi
5896done
5897  done
5898IFS=$as_save_IFS
5899
5900  ;;
5901esac
5902fi
5903COMM=$ac_cv_path_COMM
5904if test -n "$COMM"; then
5905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5906$as_echo "$COMM" >&6; }
5907else
5908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5909$as_echo "no" >&6; }
5910fi
5911
5912
5913          if test "x$COMM" = x; then
5914            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5915          fi
5916        else
5917          # Otherwise we believe it is a complete path. Use it as it is.
5918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5919$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5920          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5921$as_echo_n "checking for COMM... " >&6; }
5922          if test ! -x "$tool_specified"; then
5923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5924$as_echo "not found" >&6; }
5925            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5926          fi
5927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5928$as_echo "$tool_specified" >&6; }
5929        fi
5930      fi
5931    fi
5932
5933  fi
5934
5935
5936
5937  if test "x$COMM" = x; then
5938    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5939  fi
5940
5941
5942
5943
5944
5945  # Publish this variable in the help.
5946
5947
5948  if [ -z "${CP+x}" ]; then
5949    # The variable is not set by user, try to locate tool using the code snippet
5950    for ac_prog in cp
5951do
5952  # Extract the first word of "$ac_prog", so it can be a program name with args.
5953set dummy $ac_prog; ac_word=$2
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5955$as_echo_n "checking for $ac_word... " >&6; }
5956if ${ac_cv_path_CP+:} false; then :
5957  $as_echo_n "(cached) " >&6
5958else
5959  case $CP in
5960  [\\/]* | ?:[\\/]*)
5961  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5962  ;;
5963  *)
5964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965for as_dir in $PATH
5966do
5967  IFS=$as_save_IFS
5968  test -z "$as_dir" && as_dir=.
5969    for ac_exec_ext in '' $ac_executable_extensions; do
5970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5971    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5973    break 2
5974  fi
5975done
5976  done
5977IFS=$as_save_IFS
5978
5979  ;;
5980esac
5981fi
5982CP=$ac_cv_path_CP
5983if test -n "$CP"; then
5984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5985$as_echo "$CP" >&6; }
5986else
5987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989fi
5990
5991
5992  test -n "$CP" && break
5993done
5994
5995  else
5996    # The variable is set, but is it from the command line or the environment?
5997
5998    # Try to remove the string !CP! from our list.
5999    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6000    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6001      # If it failed, the variable was not from the command line. Ignore it,
6002      # but warn the user (except for BASH, which is always set by the calling BASH).
6003      if test "xCP" != xBASH; then
6004        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6005$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6006      fi
6007      # Try to locate tool using the code snippet
6008      for ac_prog in cp
6009do
6010  # Extract the first word of "$ac_prog", so it can be a program name with args.
6011set dummy $ac_prog; ac_word=$2
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6013$as_echo_n "checking for $ac_word... " >&6; }
6014if ${ac_cv_path_CP+:} false; then :
6015  $as_echo_n "(cached) " >&6
6016else
6017  case $CP in
6018  [\\/]* | ?:[\\/]*)
6019  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6020  ;;
6021  *)
6022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6023for as_dir in $PATH
6024do
6025  IFS=$as_save_IFS
6026  test -z "$as_dir" && as_dir=.
6027    for ac_exec_ext in '' $ac_executable_extensions; do
6028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6029    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6031    break 2
6032  fi
6033done
6034  done
6035IFS=$as_save_IFS
6036
6037  ;;
6038esac
6039fi
6040CP=$ac_cv_path_CP
6041if test -n "$CP"; then
6042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6043$as_echo "$CP" >&6; }
6044else
6045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6046$as_echo "no" >&6; }
6047fi
6048
6049
6050  test -n "$CP" && break
6051done
6052
6053    else
6054      # If it succeeded, then it was overridden by the user. We will use it
6055      # for the tool.
6056
6057      # First remove it from the list of overridden variables, so we can test
6058      # for unknown variables in the end.
6059      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6060
6061      # Check if we try to supply an empty value
6062      if test "x$CP" = x; then
6063        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6064$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6066$as_echo_n "checking for CP... " >&6; }
6067        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6068$as_echo "disabled" >&6; }
6069      else
6070        # Check if the provided tool contains a complete path.
6071        tool_specified="$CP"
6072        tool_basename="${tool_specified##*/}"
6073        if test "x$tool_basename" = "x$tool_specified"; then
6074          # A command without a complete path is provided, search $PATH.
6075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6076$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6077          # Extract the first word of "$tool_basename", so it can be a program name with args.
6078set dummy $tool_basename; ac_word=$2
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6080$as_echo_n "checking for $ac_word... " >&6; }
6081if ${ac_cv_path_CP+:} false; then :
6082  $as_echo_n "(cached) " >&6
6083else
6084  case $CP in
6085  [\\/]* | ?:[\\/]*)
6086  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6087  ;;
6088  *)
6089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092  IFS=$as_save_IFS
6093  test -z "$as_dir" && as_dir=.
6094    for ac_exec_ext in '' $ac_executable_extensions; do
6095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6096    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6098    break 2
6099  fi
6100done
6101  done
6102IFS=$as_save_IFS
6103
6104  ;;
6105esac
6106fi
6107CP=$ac_cv_path_CP
6108if test -n "$CP"; then
6109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6110$as_echo "$CP" >&6; }
6111else
6112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
6114fi
6115
6116
6117          if test "x$CP" = x; then
6118            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6119          fi
6120        else
6121          # Otherwise we believe it is a complete path. Use it as it is.
6122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6123$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6124          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6125$as_echo_n "checking for CP... " >&6; }
6126          if test ! -x "$tool_specified"; then
6127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6128$as_echo "not found" >&6; }
6129            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6130          fi
6131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6132$as_echo "$tool_specified" >&6; }
6133        fi
6134      fi
6135    fi
6136
6137  fi
6138
6139
6140
6141  if test "x$CP" = x; then
6142    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6143  fi
6144
6145
6146
6147
6148
6149  # Publish this variable in the help.
6150
6151
6152  if [ -z "${CUT+x}" ]; then
6153    # The variable is not set by user, try to locate tool using the code snippet
6154    for ac_prog in cut
6155do
6156  # Extract the first word of "$ac_prog", so it can be a program name with args.
6157set dummy $ac_prog; ac_word=$2
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6159$as_echo_n "checking for $ac_word... " >&6; }
6160if ${ac_cv_path_CUT+:} false; then :
6161  $as_echo_n "(cached) " >&6
6162else
6163  case $CUT in
6164  [\\/]* | ?:[\\/]*)
6165  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6166  ;;
6167  *)
6168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH
6170do
6171  IFS=$as_save_IFS
6172  test -z "$as_dir" && as_dir=.
6173    for ac_exec_ext in '' $ac_executable_extensions; do
6174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6175    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6177    break 2
6178  fi
6179done
6180  done
6181IFS=$as_save_IFS
6182
6183  ;;
6184esac
6185fi
6186CUT=$ac_cv_path_CUT
6187if test -n "$CUT"; then
6188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6189$as_echo "$CUT" >&6; }
6190else
6191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6192$as_echo "no" >&6; }
6193fi
6194
6195
6196  test -n "$CUT" && break
6197done
6198
6199  else
6200    # The variable is set, but is it from the command line or the environment?
6201
6202    # Try to remove the string !CUT! from our list.
6203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6205      # If it failed, the variable was not from the command line. Ignore it,
6206      # but warn the user (except for BASH, which is always set by the calling BASH).
6207      if test "xCUT" != xBASH; then
6208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6209$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6210      fi
6211      # Try to locate tool using the code snippet
6212      for ac_prog in cut
6213do
6214  # Extract the first word of "$ac_prog", so it can be a program name with args.
6215set dummy $ac_prog; ac_word=$2
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6217$as_echo_n "checking for $ac_word... " >&6; }
6218if ${ac_cv_path_CUT+:} false; then :
6219  $as_echo_n "(cached) " >&6
6220else
6221  case $CUT in
6222  [\\/]* | ?:[\\/]*)
6223  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6224  ;;
6225  *)
6226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH
6228do
6229  IFS=$as_save_IFS
6230  test -z "$as_dir" && as_dir=.
6231    for ac_exec_ext in '' $ac_executable_extensions; do
6232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6233    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235    break 2
6236  fi
6237done
6238  done
6239IFS=$as_save_IFS
6240
6241  ;;
6242esac
6243fi
6244CUT=$ac_cv_path_CUT
6245if test -n "$CUT"; then
6246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6247$as_echo "$CUT" >&6; }
6248else
6249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6250$as_echo "no" >&6; }
6251fi
6252
6253
6254  test -n "$CUT" && break
6255done
6256
6257    else
6258      # If it succeeded, then it was overridden by the user. We will use it
6259      # for the tool.
6260
6261      # First remove it from the list of overridden variables, so we can test
6262      # for unknown variables in the end.
6263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6264
6265      # Check if we try to supply an empty value
6266      if test "x$CUT" = x; then
6267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6268$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6270$as_echo_n "checking for CUT... " >&6; }
6271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6272$as_echo "disabled" >&6; }
6273      else
6274        # Check if the provided tool contains a complete path.
6275        tool_specified="$CUT"
6276        tool_basename="${tool_specified##*/}"
6277        if test "x$tool_basename" = "x$tool_specified"; then
6278          # A command without a complete path is provided, search $PATH.
6279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6280$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6281          # Extract the first word of "$tool_basename", so it can be a program name with args.
6282set dummy $tool_basename; ac_word=$2
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284$as_echo_n "checking for $ac_word... " >&6; }
6285if ${ac_cv_path_CUT+:} false; then :
6286  $as_echo_n "(cached) " >&6
6287else
6288  case $CUT in
6289  [\\/]* | ?:[\\/]*)
6290  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6291  ;;
6292  *)
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6300    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308  ;;
6309esac
6310fi
6311CUT=$ac_cv_path_CUT
6312if test -n "$CUT"; then
6313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6314$as_echo "$CUT" >&6; }
6315else
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318fi
6319
6320
6321          if test "x$CUT" = x; then
6322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6323          fi
6324        else
6325          # Otherwise we believe it is a complete path. Use it as it is.
6326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6327$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6329$as_echo_n "checking for CUT... " >&6; }
6330          if test ! -x "$tool_specified"; then
6331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6332$as_echo "not found" >&6; }
6333            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6334          fi
6335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6336$as_echo "$tool_specified" >&6; }
6337        fi
6338      fi
6339    fi
6340
6341  fi
6342
6343
6344
6345  if test "x$CUT" = x; then
6346    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6347  fi
6348
6349
6350
6351
6352
6353  # Publish this variable in the help.
6354
6355
6356  if [ -z "${DATE+x}" ]; then
6357    # The variable is not set by user, try to locate tool using the code snippet
6358    for ac_prog in date
6359do
6360  # Extract the first word of "$ac_prog", so it can be a program name with args.
6361set dummy $ac_prog; ac_word=$2
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6363$as_echo_n "checking for $ac_word... " >&6; }
6364if ${ac_cv_path_DATE+:} false; then :
6365  $as_echo_n "(cached) " >&6
6366else
6367  case $DATE in
6368  [\\/]* | ?:[\\/]*)
6369  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6370  ;;
6371  *)
6372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6373for as_dir in $PATH
6374do
6375  IFS=$as_save_IFS
6376  test -z "$as_dir" && as_dir=.
6377    for ac_exec_ext in '' $ac_executable_extensions; do
6378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6379    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6381    break 2
6382  fi
6383done
6384  done
6385IFS=$as_save_IFS
6386
6387  ;;
6388esac
6389fi
6390DATE=$ac_cv_path_DATE
6391if test -n "$DATE"; then
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6393$as_echo "$DATE" >&6; }
6394else
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
6399
6400  test -n "$DATE" && break
6401done
6402
6403  else
6404    # The variable is set, but is it from the command line or the environment?
6405
6406    # Try to remove the string !DATE! from our list.
6407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6409      # If it failed, the variable was not from the command line. Ignore it,
6410      # but warn the user (except for BASH, which is always set by the calling BASH).
6411      if test "xDATE" != xBASH; then
6412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6413$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6414      fi
6415      # Try to locate tool using the code snippet
6416      for ac_prog in date
6417do
6418  # Extract the first word of "$ac_prog", so it can be a program name with args.
6419set dummy $ac_prog; ac_word=$2
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6421$as_echo_n "checking for $ac_word... " >&6; }
6422if ${ac_cv_path_DATE+:} false; then :
6423  $as_echo_n "(cached) " >&6
6424else
6425  case $DATE in
6426  [\\/]* | ?:[\\/]*)
6427  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6428  ;;
6429  *)
6430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6431for as_dir in $PATH
6432do
6433  IFS=$as_save_IFS
6434  test -z "$as_dir" && as_dir=.
6435    for ac_exec_ext in '' $ac_executable_extensions; do
6436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6437    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6439    break 2
6440  fi
6441done
6442  done
6443IFS=$as_save_IFS
6444
6445  ;;
6446esac
6447fi
6448DATE=$ac_cv_path_DATE
6449if test -n "$DATE"; then
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6451$as_echo "$DATE" >&6; }
6452else
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454$as_echo "no" >&6; }
6455fi
6456
6457
6458  test -n "$DATE" && break
6459done
6460
6461    else
6462      # If it succeeded, then it was overridden by the user. We will use it
6463      # for the tool.
6464
6465      # First remove it from the list of overridden variables, so we can test
6466      # for unknown variables in the end.
6467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6468
6469      # Check if we try to supply an empty value
6470      if test "x$DATE" = x; then
6471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6472$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6474$as_echo_n "checking for DATE... " >&6; }
6475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6476$as_echo "disabled" >&6; }
6477      else
6478        # Check if the provided tool contains a complete path.
6479        tool_specified="$DATE"
6480        tool_basename="${tool_specified##*/}"
6481        if test "x$tool_basename" = "x$tool_specified"; then
6482          # A command without a complete path is provided, search $PATH.
6483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6484$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6485          # Extract the first word of "$tool_basename", so it can be a program name with args.
6486set dummy $tool_basename; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_DATE+:} false; then :
6490  $as_echo_n "(cached) " >&6
6491else
6492  case $DATE in
6493  [\\/]* | ?:[\\/]*)
6494  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6495  ;;
6496  *)
6497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500  IFS=$as_save_IFS
6501  test -z "$as_dir" && as_dir=.
6502    for ac_exec_ext in '' $ac_executable_extensions; do
6503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506    break 2
6507  fi
6508done
6509  done
6510IFS=$as_save_IFS
6511
6512  ;;
6513esac
6514fi
6515DATE=$ac_cv_path_DATE
6516if test -n "$DATE"; then
6517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6518$as_echo "$DATE" >&6; }
6519else
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525          if test "x$DATE" = x; then
6526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6527          fi
6528        else
6529          # Otherwise we believe it is a complete path. Use it as it is.
6530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6531$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6533$as_echo_n "checking for DATE... " >&6; }
6534          if test ! -x "$tool_specified"; then
6535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6536$as_echo "not found" >&6; }
6537            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6538          fi
6539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6540$as_echo "$tool_specified" >&6; }
6541        fi
6542      fi
6543    fi
6544
6545  fi
6546
6547
6548
6549  if test "x$DATE" = x; then
6550    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6551  fi
6552
6553
6554
6555
6556
6557  # Publish this variable in the help.
6558
6559
6560  if [ -z "${DIFF+x}" ]; then
6561    # The variable is not set by user, try to locate tool using the code snippet
6562    for ac_prog in gdiff diff
6563do
6564  # Extract the first word of "$ac_prog", so it can be a program name with args.
6565set dummy $ac_prog; ac_word=$2
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6567$as_echo_n "checking for $ac_word... " >&6; }
6568if ${ac_cv_path_DIFF+:} false; then :
6569  $as_echo_n "(cached) " >&6
6570else
6571  case $DIFF in
6572  [\\/]* | ?:[\\/]*)
6573  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6574  ;;
6575  *)
6576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6577for as_dir in $PATH
6578do
6579  IFS=$as_save_IFS
6580  test -z "$as_dir" && as_dir=.
6581    for ac_exec_ext in '' $ac_executable_extensions; do
6582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6583    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6585    break 2
6586  fi
6587done
6588  done
6589IFS=$as_save_IFS
6590
6591  ;;
6592esac
6593fi
6594DIFF=$ac_cv_path_DIFF
6595if test -n "$DIFF"; then
6596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6597$as_echo "$DIFF" >&6; }
6598else
6599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
6601fi
6602
6603
6604  test -n "$DIFF" && break
6605done
6606
6607  else
6608    # The variable is set, but is it from the command line or the environment?
6609
6610    # Try to remove the string !DIFF! from our list.
6611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6613      # If it failed, the variable was not from the command line. Ignore it,
6614      # but warn the user (except for BASH, which is always set by the calling BASH).
6615      if test "xDIFF" != xBASH; then
6616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6617$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6618      fi
6619      # Try to locate tool using the code snippet
6620      for ac_prog in gdiff diff
6621do
6622  # Extract the first word of "$ac_prog", so it can be a program name with args.
6623set dummy $ac_prog; ac_word=$2
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6625$as_echo_n "checking for $ac_word... " >&6; }
6626if ${ac_cv_path_DIFF+:} false; then :
6627  $as_echo_n "(cached) " >&6
6628else
6629  case $DIFF in
6630  [\\/]* | ?:[\\/]*)
6631  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6632  ;;
6633  *)
6634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6635for as_dir in $PATH
6636do
6637  IFS=$as_save_IFS
6638  test -z "$as_dir" && as_dir=.
6639    for ac_exec_ext in '' $ac_executable_extensions; do
6640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6641    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6643    break 2
6644  fi
6645done
6646  done
6647IFS=$as_save_IFS
6648
6649  ;;
6650esac
6651fi
6652DIFF=$ac_cv_path_DIFF
6653if test -n "$DIFF"; then
6654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6655$as_echo "$DIFF" >&6; }
6656else
6657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658$as_echo "no" >&6; }
6659fi
6660
6661
6662  test -n "$DIFF" && break
6663done
6664
6665    else
6666      # If it succeeded, then it was overridden by the user. We will use it
6667      # for the tool.
6668
6669      # First remove it from the list of overridden variables, so we can test
6670      # for unknown variables in the end.
6671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6672
6673      # Check if we try to supply an empty value
6674      if test "x$DIFF" = x; then
6675        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6676$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6678$as_echo_n "checking for DIFF... " >&6; }
6679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6680$as_echo "disabled" >&6; }
6681      else
6682        # Check if the provided tool contains a complete path.
6683        tool_specified="$DIFF"
6684        tool_basename="${tool_specified##*/}"
6685        if test "x$tool_basename" = "x$tool_specified"; then
6686          # A command without a complete path is provided, search $PATH.
6687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6688$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6689          # Extract the first word of "$tool_basename", so it can be a program name with args.
6690set dummy $tool_basename; ac_word=$2
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6692$as_echo_n "checking for $ac_word... " >&6; }
6693if ${ac_cv_path_DIFF+:} false; then :
6694  $as_echo_n "(cached) " >&6
6695else
6696  case $DIFF in
6697  [\\/]* | ?:[\\/]*)
6698  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6699  ;;
6700  *)
6701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6702for as_dir in $PATH
6703do
6704  IFS=$as_save_IFS
6705  test -z "$as_dir" && as_dir=.
6706    for ac_exec_ext in '' $ac_executable_extensions; do
6707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6708    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6710    break 2
6711  fi
6712done
6713  done
6714IFS=$as_save_IFS
6715
6716  ;;
6717esac
6718fi
6719DIFF=$ac_cv_path_DIFF
6720if test -n "$DIFF"; then
6721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6722$as_echo "$DIFF" >&6; }
6723else
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727
6728
6729          if test "x$DIFF" = x; then
6730            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6731          fi
6732        else
6733          # Otherwise we believe it is a complete path. Use it as it is.
6734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6735$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6736          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6737$as_echo_n "checking for DIFF... " >&6; }
6738          if test ! -x "$tool_specified"; then
6739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6740$as_echo "not found" >&6; }
6741            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6742          fi
6743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6744$as_echo "$tool_specified" >&6; }
6745        fi
6746      fi
6747    fi
6748
6749  fi
6750
6751
6752
6753  if test "x$DIFF" = x; then
6754    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6755  fi
6756
6757
6758
6759
6760
6761  # Publish this variable in the help.
6762
6763
6764  if [ -z "${DIRNAME+x}" ]; then
6765    # The variable is not set by user, try to locate tool using the code snippet
6766    for ac_prog in dirname
6767do
6768  # Extract the first word of "$ac_prog", so it can be a program name with args.
6769set dummy $ac_prog; ac_word=$2
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6771$as_echo_n "checking for $ac_word... " >&6; }
6772if ${ac_cv_path_DIRNAME+:} false; then :
6773  $as_echo_n "(cached) " >&6
6774else
6775  case $DIRNAME in
6776  [\\/]* | ?:[\\/]*)
6777  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6778  ;;
6779  *)
6780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6781for as_dir in $PATH
6782do
6783  IFS=$as_save_IFS
6784  test -z "$as_dir" && as_dir=.
6785    for ac_exec_ext in '' $ac_executable_extensions; do
6786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6787    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6789    break 2
6790  fi
6791done
6792  done
6793IFS=$as_save_IFS
6794
6795  ;;
6796esac
6797fi
6798DIRNAME=$ac_cv_path_DIRNAME
6799if test -n "$DIRNAME"; then
6800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6801$as_echo "$DIRNAME" >&6; }
6802else
6803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6804$as_echo "no" >&6; }
6805fi
6806
6807
6808  test -n "$DIRNAME" && break
6809done
6810
6811  else
6812    # The variable is set, but is it from the command line or the environment?
6813
6814    # Try to remove the string !DIRNAME! from our list.
6815    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6816    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6817      # If it failed, the variable was not from the command line. Ignore it,
6818      # but warn the user (except for BASH, which is always set by the calling BASH).
6819      if test "xDIRNAME" != xBASH; then
6820        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6821$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6822      fi
6823      # Try to locate tool using the code snippet
6824      for ac_prog in dirname
6825do
6826  # Extract the first word of "$ac_prog", so it can be a program name with args.
6827set dummy $ac_prog; ac_word=$2
6828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6829$as_echo_n "checking for $ac_word... " >&6; }
6830if ${ac_cv_path_DIRNAME+:} false; then :
6831  $as_echo_n "(cached) " >&6
6832else
6833  case $DIRNAME in
6834  [\\/]* | ?:[\\/]*)
6835  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6836  ;;
6837  *)
6838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6839for as_dir in $PATH
6840do
6841  IFS=$as_save_IFS
6842  test -z "$as_dir" && as_dir=.
6843    for ac_exec_ext in '' $ac_executable_extensions; do
6844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6845    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6847    break 2
6848  fi
6849done
6850  done
6851IFS=$as_save_IFS
6852
6853  ;;
6854esac
6855fi
6856DIRNAME=$ac_cv_path_DIRNAME
6857if test -n "$DIRNAME"; then
6858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6859$as_echo "$DIRNAME" >&6; }
6860else
6861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6862$as_echo "no" >&6; }
6863fi
6864
6865
6866  test -n "$DIRNAME" && break
6867done
6868
6869    else
6870      # If it succeeded, then it was overridden by the user. We will use it
6871      # for the tool.
6872
6873      # First remove it from the list of overridden variables, so we can test
6874      # for unknown variables in the end.
6875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6876
6877      # Check if we try to supply an empty value
6878      if test "x$DIRNAME" = x; then
6879        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6880$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6882$as_echo_n "checking for DIRNAME... " >&6; }
6883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6884$as_echo "disabled" >&6; }
6885      else
6886        # Check if the provided tool contains a complete path.
6887        tool_specified="$DIRNAME"
6888        tool_basename="${tool_specified##*/}"
6889        if test "x$tool_basename" = "x$tool_specified"; then
6890          # A command without a complete path is provided, search $PATH.
6891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6892$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6893          # Extract the first word of "$tool_basename", so it can be a program name with args.
6894set dummy $tool_basename; ac_word=$2
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6896$as_echo_n "checking for $ac_word... " >&6; }
6897if ${ac_cv_path_DIRNAME+:} false; then :
6898  $as_echo_n "(cached) " >&6
6899else
6900  case $DIRNAME in
6901  [\\/]* | ?:[\\/]*)
6902  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6903  ;;
6904  *)
6905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6906for as_dir in $PATH
6907do
6908  IFS=$as_save_IFS
6909  test -z "$as_dir" && as_dir=.
6910    for ac_exec_ext in '' $ac_executable_extensions; do
6911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6912    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6914    break 2
6915  fi
6916done
6917  done
6918IFS=$as_save_IFS
6919
6920  ;;
6921esac
6922fi
6923DIRNAME=$ac_cv_path_DIRNAME
6924if test -n "$DIRNAME"; then
6925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6926$as_echo "$DIRNAME" >&6; }
6927else
6928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929$as_echo "no" >&6; }
6930fi
6931
6932
6933          if test "x$DIRNAME" = x; then
6934            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6935          fi
6936        else
6937          # Otherwise we believe it is a complete path. Use it as it is.
6938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6939$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6940          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6941$as_echo_n "checking for DIRNAME... " >&6; }
6942          if test ! -x "$tool_specified"; then
6943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6944$as_echo "not found" >&6; }
6945            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6946          fi
6947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6948$as_echo "$tool_specified" >&6; }
6949        fi
6950      fi
6951    fi
6952
6953  fi
6954
6955
6956
6957  if test "x$DIRNAME" = x; then
6958    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6959  fi
6960
6961
6962
6963
6964
6965  # Publish this variable in the help.
6966
6967
6968  if [ -z "${ECHO+x}" ]; then
6969    # The variable is not set by user, try to locate tool using the code snippet
6970    for ac_prog in echo
6971do
6972  # Extract the first word of "$ac_prog", so it can be a program name with args.
6973set dummy $ac_prog; ac_word=$2
6974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6975$as_echo_n "checking for $ac_word... " >&6; }
6976if ${ac_cv_path_ECHO+:} false; then :
6977  $as_echo_n "(cached) " >&6
6978else
6979  case $ECHO in
6980  [\\/]* | ?:[\\/]*)
6981  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6982  ;;
6983  *)
6984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6985for as_dir in $PATH
6986do
6987  IFS=$as_save_IFS
6988  test -z "$as_dir" && as_dir=.
6989    for ac_exec_ext in '' $ac_executable_extensions; do
6990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6991    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6993    break 2
6994  fi
6995done
6996  done
6997IFS=$as_save_IFS
6998
6999  ;;
7000esac
7001fi
7002ECHO=$ac_cv_path_ECHO
7003if test -n "$ECHO"; then
7004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7005$as_echo "$ECHO" >&6; }
7006else
7007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7008$as_echo "no" >&6; }
7009fi
7010
7011
7012  test -n "$ECHO" && break
7013done
7014
7015  else
7016    # The variable is set, but is it from the command line or the environment?
7017
7018    # Try to remove the string !ECHO! from our list.
7019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7021      # If it failed, the variable was not from the command line. Ignore it,
7022      # but warn the user (except for BASH, which is always set by the calling BASH).
7023      if test "xECHO" != xBASH; then
7024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7025$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7026      fi
7027      # Try to locate tool using the code snippet
7028      for ac_prog in echo
7029do
7030  # Extract the first word of "$ac_prog", so it can be a program name with args.
7031set dummy $ac_prog; ac_word=$2
7032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7033$as_echo_n "checking for $ac_word... " >&6; }
7034if ${ac_cv_path_ECHO+:} false; then :
7035  $as_echo_n "(cached) " >&6
7036else
7037  case $ECHO in
7038  [\\/]* | ?:[\\/]*)
7039  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7040  ;;
7041  *)
7042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7043for as_dir in $PATH
7044do
7045  IFS=$as_save_IFS
7046  test -z "$as_dir" && as_dir=.
7047    for ac_exec_ext in '' $ac_executable_extensions; do
7048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7049    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7051    break 2
7052  fi
7053done
7054  done
7055IFS=$as_save_IFS
7056
7057  ;;
7058esac
7059fi
7060ECHO=$ac_cv_path_ECHO
7061if test -n "$ECHO"; then
7062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7063$as_echo "$ECHO" >&6; }
7064else
7065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7066$as_echo "no" >&6; }
7067fi
7068
7069
7070  test -n "$ECHO" && break
7071done
7072
7073    else
7074      # If it succeeded, then it was overridden by the user. We will use it
7075      # for the tool.
7076
7077      # First remove it from the list of overridden variables, so we can test
7078      # for unknown variables in the end.
7079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7080
7081      # Check if we try to supply an empty value
7082      if test "x$ECHO" = x; then
7083        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7084$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7086$as_echo_n "checking for ECHO... " >&6; }
7087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7088$as_echo "disabled" >&6; }
7089      else
7090        # Check if the provided tool contains a complete path.
7091        tool_specified="$ECHO"
7092        tool_basename="${tool_specified##*/}"
7093        if test "x$tool_basename" = "x$tool_specified"; then
7094          # A command without a complete path is provided, search $PATH.
7095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7096$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7097          # Extract the first word of "$tool_basename", so it can be a program name with args.
7098set dummy $tool_basename; ac_word=$2
7099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7100$as_echo_n "checking for $ac_word... " >&6; }
7101if ${ac_cv_path_ECHO+:} false; then :
7102  $as_echo_n "(cached) " >&6
7103else
7104  case $ECHO in
7105  [\\/]* | ?:[\\/]*)
7106  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7107  ;;
7108  *)
7109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7110for as_dir in $PATH
7111do
7112  IFS=$as_save_IFS
7113  test -z "$as_dir" && as_dir=.
7114    for ac_exec_ext in '' $ac_executable_extensions; do
7115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7116    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7118    break 2
7119  fi
7120done
7121  done
7122IFS=$as_save_IFS
7123
7124  ;;
7125esac
7126fi
7127ECHO=$ac_cv_path_ECHO
7128if test -n "$ECHO"; then
7129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7130$as_echo "$ECHO" >&6; }
7131else
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133$as_echo "no" >&6; }
7134fi
7135
7136
7137          if test "x$ECHO" = x; then
7138            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7139          fi
7140        else
7141          # Otherwise we believe it is a complete path. Use it as it is.
7142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7143$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7144          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7145$as_echo_n "checking for ECHO... " >&6; }
7146          if test ! -x "$tool_specified"; then
7147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7148$as_echo "not found" >&6; }
7149            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7150          fi
7151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7152$as_echo "$tool_specified" >&6; }
7153        fi
7154      fi
7155    fi
7156
7157  fi
7158
7159
7160
7161  if test "x$ECHO" = x; then
7162    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7163  fi
7164
7165
7166
7167
7168
7169  # Publish this variable in the help.
7170
7171
7172  if [ -z "${EXPR+x}" ]; then
7173    # The variable is not set by user, try to locate tool using the code snippet
7174    for ac_prog in expr
7175do
7176  # Extract the first word of "$ac_prog", so it can be a program name with args.
7177set dummy $ac_prog; ac_word=$2
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7179$as_echo_n "checking for $ac_word... " >&6; }
7180if ${ac_cv_path_EXPR+:} false; then :
7181  $as_echo_n "(cached) " >&6
7182else
7183  case $EXPR in
7184  [\\/]* | ?:[\\/]*)
7185  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7186  ;;
7187  *)
7188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7189for as_dir in $PATH
7190do
7191  IFS=$as_save_IFS
7192  test -z "$as_dir" && as_dir=.
7193    for ac_exec_ext in '' $ac_executable_extensions; do
7194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7195    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7197    break 2
7198  fi
7199done
7200  done
7201IFS=$as_save_IFS
7202
7203  ;;
7204esac
7205fi
7206EXPR=$ac_cv_path_EXPR
7207if test -n "$EXPR"; then
7208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7209$as_echo "$EXPR" >&6; }
7210else
7211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7212$as_echo "no" >&6; }
7213fi
7214
7215
7216  test -n "$EXPR" && break
7217done
7218
7219  else
7220    # The variable is set, but is it from the command line or the environment?
7221
7222    # Try to remove the string !EXPR! from our list.
7223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7225      # If it failed, the variable was not from the command line. Ignore it,
7226      # but warn the user (except for BASH, which is always set by the calling BASH).
7227      if test "xEXPR" != xBASH; then
7228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7229$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7230      fi
7231      # Try to locate tool using the code snippet
7232      for ac_prog in expr
7233do
7234  # Extract the first word of "$ac_prog", so it can be a program name with args.
7235set dummy $ac_prog; ac_word=$2
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7237$as_echo_n "checking for $ac_word... " >&6; }
7238if ${ac_cv_path_EXPR+:} false; then :
7239  $as_echo_n "(cached) " >&6
7240else
7241  case $EXPR in
7242  [\\/]* | ?:[\\/]*)
7243  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7244  ;;
7245  *)
7246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7247for as_dir in $PATH
7248do
7249  IFS=$as_save_IFS
7250  test -z "$as_dir" && as_dir=.
7251    for ac_exec_ext in '' $ac_executable_extensions; do
7252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7253    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7255    break 2
7256  fi
7257done
7258  done
7259IFS=$as_save_IFS
7260
7261  ;;
7262esac
7263fi
7264EXPR=$ac_cv_path_EXPR
7265if test -n "$EXPR"; then
7266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7267$as_echo "$EXPR" >&6; }
7268else
7269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270$as_echo "no" >&6; }
7271fi
7272
7273
7274  test -n "$EXPR" && break
7275done
7276
7277    else
7278      # If it succeeded, then it was overridden by the user. We will use it
7279      # for the tool.
7280
7281      # First remove it from the list of overridden variables, so we can test
7282      # for unknown variables in the end.
7283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7284
7285      # Check if we try to supply an empty value
7286      if test "x$EXPR" = x; then
7287        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7288$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7290$as_echo_n "checking for EXPR... " >&6; }
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7292$as_echo "disabled" >&6; }
7293      else
7294        # Check if the provided tool contains a complete path.
7295        tool_specified="$EXPR"
7296        tool_basename="${tool_specified##*/}"
7297        if test "x$tool_basename" = "x$tool_specified"; then
7298          # A command without a complete path is provided, search $PATH.
7299          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7300$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7301          # Extract the first word of "$tool_basename", so it can be a program name with args.
7302set dummy $tool_basename; ac_word=$2
7303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7304$as_echo_n "checking for $ac_word... " >&6; }
7305if ${ac_cv_path_EXPR+:} false; then :
7306  $as_echo_n "(cached) " >&6
7307else
7308  case $EXPR in
7309  [\\/]* | ?:[\\/]*)
7310  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7311  ;;
7312  *)
7313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7314for as_dir in $PATH
7315do
7316  IFS=$as_save_IFS
7317  test -z "$as_dir" && as_dir=.
7318    for ac_exec_ext in '' $ac_executable_extensions; do
7319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7320    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7322    break 2
7323  fi
7324done
7325  done
7326IFS=$as_save_IFS
7327
7328  ;;
7329esac
7330fi
7331EXPR=$ac_cv_path_EXPR
7332if test -n "$EXPR"; then
7333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7334$as_echo "$EXPR" >&6; }
7335else
7336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337$as_echo "no" >&6; }
7338fi
7339
7340
7341          if test "x$EXPR" = x; then
7342            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7343          fi
7344        else
7345          # Otherwise we believe it is a complete path. Use it as it is.
7346          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7347$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7348          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7349$as_echo_n "checking for EXPR... " >&6; }
7350          if test ! -x "$tool_specified"; then
7351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7352$as_echo "not found" >&6; }
7353            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7354          fi
7355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7356$as_echo "$tool_specified" >&6; }
7357        fi
7358      fi
7359    fi
7360
7361  fi
7362
7363
7364
7365  if test "x$EXPR" = x; then
7366    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7367  fi
7368
7369
7370
7371
7372
7373  # Publish this variable in the help.
7374
7375
7376  if [ -z "${FILE+x}" ]; then
7377    # The variable is not set by user, try to locate tool using the code snippet
7378    for ac_prog in file
7379do
7380  # Extract the first word of "$ac_prog", so it can be a program name with args.
7381set dummy $ac_prog; ac_word=$2
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383$as_echo_n "checking for $ac_word... " >&6; }
7384if ${ac_cv_path_FILE+:} false; then :
7385  $as_echo_n "(cached) " >&6
7386else
7387  case $FILE in
7388  [\\/]* | ?:[\\/]*)
7389  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7390  ;;
7391  *)
7392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395  IFS=$as_save_IFS
7396  test -z "$as_dir" && as_dir=.
7397    for ac_exec_ext in '' $ac_executable_extensions; do
7398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401    break 2
7402  fi
7403done
7404  done
7405IFS=$as_save_IFS
7406
7407  ;;
7408esac
7409fi
7410FILE=$ac_cv_path_FILE
7411if test -n "$FILE"; then
7412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7413$as_echo "$FILE" >&6; }
7414else
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420  test -n "$FILE" && break
7421done
7422
7423  else
7424    # The variable is set, but is it from the command line or the environment?
7425
7426    # Try to remove the string !FILE! from our list.
7427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7429      # If it failed, the variable was not from the command line. Ignore it,
7430      # but warn the user (except for BASH, which is always set by the calling BASH).
7431      if test "xFILE" != xBASH; then
7432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7433$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7434      fi
7435      # Try to locate tool using the code snippet
7436      for ac_prog in file
7437do
7438  # Extract the first word of "$ac_prog", so it can be a program name with args.
7439set dummy $ac_prog; ac_word=$2
7440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7441$as_echo_n "checking for $ac_word... " >&6; }
7442if ${ac_cv_path_FILE+:} false; then :
7443  $as_echo_n "(cached) " >&6
7444else
7445  case $FILE in
7446  [\\/]* | ?:[\\/]*)
7447  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7448  ;;
7449  *)
7450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7451for as_dir in $PATH
7452do
7453  IFS=$as_save_IFS
7454  test -z "$as_dir" && as_dir=.
7455    for ac_exec_ext in '' $ac_executable_extensions; do
7456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7457    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7459    break 2
7460  fi
7461done
7462  done
7463IFS=$as_save_IFS
7464
7465  ;;
7466esac
7467fi
7468FILE=$ac_cv_path_FILE
7469if test -n "$FILE"; then
7470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7471$as_echo "$FILE" >&6; }
7472else
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
7475fi
7476
7477
7478  test -n "$FILE" && break
7479done
7480
7481    else
7482      # If it succeeded, then it was overridden by the user. We will use it
7483      # for the tool.
7484
7485      # First remove it from the list of overridden variables, so we can test
7486      # for unknown variables in the end.
7487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7488
7489      # Check if we try to supply an empty value
7490      if test "x$FILE" = x; then
7491        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7492$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7494$as_echo_n "checking for FILE... " >&6; }
7495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7496$as_echo "disabled" >&6; }
7497      else
7498        # Check if the provided tool contains a complete path.
7499        tool_specified="$FILE"
7500        tool_basename="${tool_specified##*/}"
7501        if test "x$tool_basename" = "x$tool_specified"; then
7502          # A command without a complete path is provided, search $PATH.
7503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7504$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7505          # Extract the first word of "$tool_basename", so it can be a program name with args.
7506set dummy $tool_basename; ac_word=$2
7507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7508$as_echo_n "checking for $ac_word... " >&6; }
7509if ${ac_cv_path_FILE+:} false; then :
7510  $as_echo_n "(cached) " >&6
7511else
7512  case $FILE in
7513  [\\/]* | ?:[\\/]*)
7514  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7515  ;;
7516  *)
7517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7518for as_dir in $PATH
7519do
7520  IFS=$as_save_IFS
7521  test -z "$as_dir" && as_dir=.
7522    for ac_exec_ext in '' $ac_executable_extensions; do
7523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7524    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7526    break 2
7527  fi
7528done
7529  done
7530IFS=$as_save_IFS
7531
7532  ;;
7533esac
7534fi
7535FILE=$ac_cv_path_FILE
7536if test -n "$FILE"; then
7537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7538$as_echo "$FILE" >&6; }
7539else
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7541$as_echo "no" >&6; }
7542fi
7543
7544
7545          if test "x$FILE" = x; then
7546            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7547          fi
7548        else
7549          # Otherwise we believe it is a complete path. Use it as it is.
7550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7551$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7553$as_echo_n "checking for FILE... " >&6; }
7554          if test ! -x "$tool_specified"; then
7555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7556$as_echo "not found" >&6; }
7557            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7558          fi
7559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7560$as_echo "$tool_specified" >&6; }
7561        fi
7562      fi
7563    fi
7564
7565  fi
7566
7567
7568
7569  if test "x$FILE" = x; then
7570    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7571  fi
7572
7573
7574
7575
7576
7577  # Publish this variable in the help.
7578
7579
7580  if [ -z "${FIND+x}" ]; then
7581    # The variable is not set by user, try to locate tool using the code snippet
7582    for ac_prog in find
7583do
7584  # Extract the first word of "$ac_prog", so it can be a program name with args.
7585set dummy $ac_prog; ac_word=$2
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7587$as_echo_n "checking for $ac_word... " >&6; }
7588if ${ac_cv_path_FIND+:} false; then :
7589  $as_echo_n "(cached) " >&6
7590else
7591  case $FIND in
7592  [\\/]* | ?:[\\/]*)
7593  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7594  ;;
7595  *)
7596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7597for as_dir in $PATH
7598do
7599  IFS=$as_save_IFS
7600  test -z "$as_dir" && as_dir=.
7601    for ac_exec_ext in '' $ac_executable_extensions; do
7602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7603    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7605    break 2
7606  fi
7607done
7608  done
7609IFS=$as_save_IFS
7610
7611  ;;
7612esac
7613fi
7614FIND=$ac_cv_path_FIND
7615if test -n "$FIND"; then
7616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7617$as_echo "$FIND" >&6; }
7618else
7619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7620$as_echo "no" >&6; }
7621fi
7622
7623
7624  test -n "$FIND" && break
7625done
7626
7627  else
7628    # The variable is set, but is it from the command line or the environment?
7629
7630    # Try to remove the string !FIND! from our list.
7631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7633      # If it failed, the variable was not from the command line. Ignore it,
7634      # but warn the user (except for BASH, which is always set by the calling BASH).
7635      if test "xFIND" != xBASH; then
7636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7637$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7638      fi
7639      # Try to locate tool using the code snippet
7640      for ac_prog in find
7641do
7642  # Extract the first word of "$ac_prog", so it can be a program name with args.
7643set dummy $ac_prog; ac_word=$2
7644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7645$as_echo_n "checking for $ac_word... " >&6; }
7646if ${ac_cv_path_FIND+:} false; then :
7647  $as_echo_n "(cached) " >&6
7648else
7649  case $FIND in
7650  [\\/]* | ?:[\\/]*)
7651  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7652  ;;
7653  *)
7654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7655for as_dir in $PATH
7656do
7657  IFS=$as_save_IFS
7658  test -z "$as_dir" && as_dir=.
7659    for ac_exec_ext in '' $ac_executable_extensions; do
7660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7661    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7663    break 2
7664  fi
7665done
7666  done
7667IFS=$as_save_IFS
7668
7669  ;;
7670esac
7671fi
7672FIND=$ac_cv_path_FIND
7673if test -n "$FIND"; then
7674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7675$as_echo "$FIND" >&6; }
7676else
7677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7678$as_echo "no" >&6; }
7679fi
7680
7681
7682  test -n "$FIND" && break
7683done
7684
7685    else
7686      # If it succeeded, then it was overridden by the user. We will use it
7687      # for the tool.
7688
7689      # First remove it from the list of overridden variables, so we can test
7690      # for unknown variables in the end.
7691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7692
7693      # Check if we try to supply an empty value
7694      if test "x$FIND" = x; then
7695        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7696$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7697        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7698$as_echo_n "checking for FIND... " >&6; }
7699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7700$as_echo "disabled" >&6; }
7701      else
7702        # Check if the provided tool contains a complete path.
7703        tool_specified="$FIND"
7704        tool_basename="${tool_specified##*/}"
7705        if test "x$tool_basename" = "x$tool_specified"; then
7706          # A command without a complete path is provided, search $PATH.
7707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7708$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7709          # Extract the first word of "$tool_basename", so it can be a program name with args.
7710set dummy $tool_basename; ac_word=$2
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
7713if ${ac_cv_path_FIND+:} false; then :
7714  $as_echo_n "(cached) " >&6
7715else
7716  case $FIND in
7717  [\\/]* | ?:[\\/]*)
7718  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7719  ;;
7720  *)
7721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7722for as_dir in $PATH
7723do
7724  IFS=$as_save_IFS
7725  test -z "$as_dir" && as_dir=.
7726    for ac_exec_ext in '' $ac_executable_extensions; do
7727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7728    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7730    break 2
7731  fi
7732done
7733  done
7734IFS=$as_save_IFS
7735
7736  ;;
7737esac
7738fi
7739FIND=$ac_cv_path_FIND
7740if test -n "$FIND"; then
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7742$as_echo "$FIND" >&6; }
7743else
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
7746fi
7747
7748
7749          if test "x$FIND" = x; then
7750            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7751          fi
7752        else
7753          # Otherwise we believe it is a complete path. Use it as it is.
7754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7755$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7756          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7757$as_echo_n "checking for FIND... " >&6; }
7758          if test ! -x "$tool_specified"; then
7759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7760$as_echo "not found" >&6; }
7761            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7762          fi
7763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7764$as_echo "$tool_specified" >&6; }
7765        fi
7766      fi
7767    fi
7768
7769  fi
7770
7771
7772
7773  if test "x$FIND" = x; then
7774    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7775  fi
7776
7777
7778
7779
7780
7781  # Publish this variable in the help.
7782
7783
7784  if [ -z "${HEAD+x}" ]; then
7785    # The variable is not set by user, try to locate tool using the code snippet
7786    for ac_prog in head
7787do
7788  # Extract the first word of "$ac_prog", so it can be a program name with args.
7789set dummy $ac_prog; ac_word=$2
7790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7791$as_echo_n "checking for $ac_word... " >&6; }
7792if ${ac_cv_path_HEAD+:} false; then :
7793  $as_echo_n "(cached) " >&6
7794else
7795  case $HEAD in
7796  [\\/]* | ?:[\\/]*)
7797  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7798  ;;
7799  *)
7800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7801for as_dir in $PATH
7802do
7803  IFS=$as_save_IFS
7804  test -z "$as_dir" && as_dir=.
7805    for ac_exec_ext in '' $ac_executable_extensions; do
7806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7807    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7809    break 2
7810  fi
7811done
7812  done
7813IFS=$as_save_IFS
7814
7815  ;;
7816esac
7817fi
7818HEAD=$ac_cv_path_HEAD
7819if test -n "$HEAD"; then
7820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7821$as_echo "$HEAD" >&6; }
7822else
7823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7824$as_echo "no" >&6; }
7825fi
7826
7827
7828  test -n "$HEAD" && break
7829done
7830
7831  else
7832    # The variable is set, but is it from the command line or the environment?
7833
7834    # Try to remove the string !HEAD! from our list.
7835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7837      # If it failed, the variable was not from the command line. Ignore it,
7838      # but warn the user (except for BASH, which is always set by the calling BASH).
7839      if test "xHEAD" != xBASH; then
7840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7841$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7842      fi
7843      # Try to locate tool using the code snippet
7844      for ac_prog in head
7845do
7846  # Extract the first word of "$ac_prog", so it can be a program name with args.
7847set dummy $ac_prog; ac_word=$2
7848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7849$as_echo_n "checking for $ac_word... " >&6; }
7850if ${ac_cv_path_HEAD+:} false; then :
7851  $as_echo_n "(cached) " >&6
7852else
7853  case $HEAD in
7854  [\\/]* | ?:[\\/]*)
7855  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7856  ;;
7857  *)
7858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859for as_dir in $PATH
7860do
7861  IFS=$as_save_IFS
7862  test -z "$as_dir" && as_dir=.
7863    for ac_exec_ext in '' $ac_executable_extensions; do
7864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7865    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7867    break 2
7868  fi
7869done
7870  done
7871IFS=$as_save_IFS
7872
7873  ;;
7874esac
7875fi
7876HEAD=$ac_cv_path_HEAD
7877if test -n "$HEAD"; then
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7879$as_echo "$HEAD" >&6; }
7880else
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7882$as_echo "no" >&6; }
7883fi
7884
7885
7886  test -n "$HEAD" && break
7887done
7888
7889    else
7890      # If it succeeded, then it was overridden by the user. We will use it
7891      # for the tool.
7892
7893      # First remove it from the list of overridden variables, so we can test
7894      # for unknown variables in the end.
7895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7896
7897      # Check if we try to supply an empty value
7898      if test "x$HEAD" = x; then
7899        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7900$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7902$as_echo_n "checking for HEAD... " >&6; }
7903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7904$as_echo "disabled" >&6; }
7905      else
7906        # Check if the provided tool contains a complete path.
7907        tool_specified="$HEAD"
7908        tool_basename="${tool_specified##*/}"
7909        if test "x$tool_basename" = "x$tool_specified"; then
7910          # A command without a complete path is provided, search $PATH.
7911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7912$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7913          # Extract the first word of "$tool_basename", so it can be a program name with args.
7914set dummy $tool_basename; ac_word=$2
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7916$as_echo_n "checking for $ac_word... " >&6; }
7917if ${ac_cv_path_HEAD+:} false; then :
7918  $as_echo_n "(cached) " >&6
7919else
7920  case $HEAD in
7921  [\\/]* | ?:[\\/]*)
7922  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7923  ;;
7924  *)
7925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7926for as_dir in $PATH
7927do
7928  IFS=$as_save_IFS
7929  test -z "$as_dir" && as_dir=.
7930    for ac_exec_ext in '' $ac_executable_extensions; do
7931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7932    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7934    break 2
7935  fi
7936done
7937  done
7938IFS=$as_save_IFS
7939
7940  ;;
7941esac
7942fi
7943HEAD=$ac_cv_path_HEAD
7944if test -n "$HEAD"; then
7945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7946$as_echo "$HEAD" >&6; }
7947else
7948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7949$as_echo "no" >&6; }
7950fi
7951
7952
7953          if test "x$HEAD" = x; then
7954            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7955          fi
7956        else
7957          # Otherwise we believe it is a complete path. Use it as it is.
7958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7959$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7960          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7961$as_echo_n "checking for HEAD... " >&6; }
7962          if test ! -x "$tool_specified"; then
7963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7964$as_echo "not found" >&6; }
7965            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7966          fi
7967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7968$as_echo "$tool_specified" >&6; }
7969        fi
7970      fi
7971    fi
7972
7973  fi
7974
7975
7976
7977  if test "x$HEAD" = x; then
7978    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7979  fi
7980
7981
7982
7983
7984
7985  # Publish this variable in the help.
7986
7987
7988  if [ -z "${LN+x}" ]; then
7989    # The variable is not set by user, try to locate tool using the code snippet
7990    for ac_prog in ln
7991do
7992  # Extract the first word of "$ac_prog", so it can be a program name with args.
7993set dummy $ac_prog; ac_word=$2
7994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7995$as_echo_n "checking for $ac_word... " >&6; }
7996if ${ac_cv_path_LN+:} false; then :
7997  $as_echo_n "(cached) " >&6
7998else
7999  case $LN in
8000  [\\/]* | ?:[\\/]*)
8001  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8002  ;;
8003  *)
8004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8005for as_dir in $PATH
8006do
8007  IFS=$as_save_IFS
8008  test -z "$as_dir" && as_dir=.
8009    for ac_exec_ext in '' $ac_executable_extensions; do
8010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8011    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8013    break 2
8014  fi
8015done
8016  done
8017IFS=$as_save_IFS
8018
8019  ;;
8020esac
8021fi
8022LN=$ac_cv_path_LN
8023if test -n "$LN"; then
8024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8025$as_echo "$LN" >&6; }
8026else
8027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8028$as_echo "no" >&6; }
8029fi
8030
8031
8032  test -n "$LN" && break
8033done
8034
8035  else
8036    # The variable is set, but is it from the command line or the environment?
8037
8038    # Try to remove the string !LN! from our list.
8039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8041      # If it failed, the variable was not from the command line. Ignore it,
8042      # but warn the user (except for BASH, which is always set by the calling BASH).
8043      if test "xLN" != xBASH; then
8044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8045$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8046      fi
8047      # Try to locate tool using the code snippet
8048      for ac_prog in ln
8049do
8050  # Extract the first word of "$ac_prog", so it can be a program name with args.
8051set dummy $ac_prog; ac_word=$2
8052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8053$as_echo_n "checking for $ac_word... " >&6; }
8054if ${ac_cv_path_LN+:} false; then :
8055  $as_echo_n "(cached) " >&6
8056else
8057  case $LN in
8058  [\\/]* | ?:[\\/]*)
8059  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8060  ;;
8061  *)
8062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8063for as_dir in $PATH
8064do
8065  IFS=$as_save_IFS
8066  test -z "$as_dir" && as_dir=.
8067    for ac_exec_ext in '' $ac_executable_extensions; do
8068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8069    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8071    break 2
8072  fi
8073done
8074  done
8075IFS=$as_save_IFS
8076
8077  ;;
8078esac
8079fi
8080LN=$ac_cv_path_LN
8081if test -n "$LN"; then
8082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8083$as_echo "$LN" >&6; }
8084else
8085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8086$as_echo "no" >&6; }
8087fi
8088
8089
8090  test -n "$LN" && break
8091done
8092
8093    else
8094      # If it succeeded, then it was overridden by the user. We will use it
8095      # for the tool.
8096
8097      # First remove it from the list of overridden variables, so we can test
8098      # for unknown variables in the end.
8099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8100
8101      # Check if we try to supply an empty value
8102      if test "x$LN" = x; then
8103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8104$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8106$as_echo_n "checking for LN... " >&6; }
8107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8108$as_echo "disabled" >&6; }
8109      else
8110        # Check if the provided tool contains a complete path.
8111        tool_specified="$LN"
8112        tool_basename="${tool_specified##*/}"
8113        if test "x$tool_basename" = "x$tool_specified"; then
8114          # A command without a complete path is provided, search $PATH.
8115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8116$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8117          # Extract the first word of "$tool_basename", so it can be a program name with args.
8118set dummy $tool_basename; ac_word=$2
8119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120$as_echo_n "checking for $ac_word... " >&6; }
8121if ${ac_cv_path_LN+:} false; then :
8122  $as_echo_n "(cached) " >&6
8123else
8124  case $LN in
8125  [\\/]* | ?:[\\/]*)
8126  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8127  ;;
8128  *)
8129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8130for as_dir in $PATH
8131do
8132  IFS=$as_save_IFS
8133  test -z "$as_dir" && as_dir=.
8134    for ac_exec_ext in '' $ac_executable_extensions; do
8135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8136    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8138    break 2
8139  fi
8140done
8141  done
8142IFS=$as_save_IFS
8143
8144  ;;
8145esac
8146fi
8147LN=$ac_cv_path_LN
8148if test -n "$LN"; then
8149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8150$as_echo "$LN" >&6; }
8151else
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8153$as_echo "no" >&6; }
8154fi
8155
8156
8157          if test "x$LN" = x; then
8158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8159          fi
8160        else
8161          # Otherwise we believe it is a complete path. Use it as it is.
8162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8163$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8165$as_echo_n "checking for LN... " >&6; }
8166          if test ! -x "$tool_specified"; then
8167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8168$as_echo "not found" >&6; }
8169            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8170          fi
8171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8172$as_echo "$tool_specified" >&6; }
8173        fi
8174      fi
8175    fi
8176
8177  fi
8178
8179
8180
8181  if test "x$LN" = x; then
8182    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8183  fi
8184
8185
8186
8187
8188
8189  # Publish this variable in the help.
8190
8191
8192  if [ -z "${LS+x}" ]; then
8193    # The variable is not set by user, try to locate tool using the code snippet
8194    for ac_prog in ls
8195do
8196  # Extract the first word of "$ac_prog", so it can be a program name with args.
8197set dummy $ac_prog; ac_word=$2
8198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8199$as_echo_n "checking for $ac_word... " >&6; }
8200if ${ac_cv_path_LS+:} false; then :
8201  $as_echo_n "(cached) " >&6
8202else
8203  case $LS in
8204  [\\/]* | ?:[\\/]*)
8205  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8206  ;;
8207  *)
8208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8209for as_dir in $PATH
8210do
8211  IFS=$as_save_IFS
8212  test -z "$as_dir" && as_dir=.
8213    for ac_exec_ext in '' $ac_executable_extensions; do
8214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8215    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8217    break 2
8218  fi
8219done
8220  done
8221IFS=$as_save_IFS
8222
8223  ;;
8224esac
8225fi
8226LS=$ac_cv_path_LS
8227if test -n "$LS"; then
8228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8229$as_echo "$LS" >&6; }
8230else
8231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
8233fi
8234
8235
8236  test -n "$LS" && break
8237done
8238
8239  else
8240    # The variable is set, but is it from the command line or the environment?
8241
8242    # Try to remove the string !LS! from our list.
8243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8245      # If it failed, the variable was not from the command line. Ignore it,
8246      # but warn the user (except for BASH, which is always set by the calling BASH).
8247      if test "xLS" != xBASH; then
8248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8249$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8250      fi
8251      # Try to locate tool using the code snippet
8252      for ac_prog in ls
8253do
8254  # Extract the first word of "$ac_prog", so it can be a program name with args.
8255set dummy $ac_prog; ac_word=$2
8256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8257$as_echo_n "checking for $ac_word... " >&6; }
8258if ${ac_cv_path_LS+:} false; then :
8259  $as_echo_n "(cached) " >&6
8260else
8261  case $LS in
8262  [\\/]* | ?:[\\/]*)
8263  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8264  ;;
8265  *)
8266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8267for as_dir in $PATH
8268do
8269  IFS=$as_save_IFS
8270  test -z "$as_dir" && as_dir=.
8271    for ac_exec_ext in '' $ac_executable_extensions; do
8272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8273    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8275    break 2
8276  fi
8277done
8278  done
8279IFS=$as_save_IFS
8280
8281  ;;
8282esac
8283fi
8284LS=$ac_cv_path_LS
8285if test -n "$LS"; then
8286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8287$as_echo "$LS" >&6; }
8288else
8289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8290$as_echo "no" >&6; }
8291fi
8292
8293
8294  test -n "$LS" && break
8295done
8296
8297    else
8298      # If it succeeded, then it was overridden by the user. We will use it
8299      # for the tool.
8300
8301      # First remove it from the list of overridden variables, so we can test
8302      # for unknown variables in the end.
8303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8304
8305      # Check if we try to supply an empty value
8306      if test "x$LS" = x; then
8307        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8308$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8310$as_echo_n "checking for LS... " >&6; }
8311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8312$as_echo "disabled" >&6; }
8313      else
8314        # Check if the provided tool contains a complete path.
8315        tool_specified="$LS"
8316        tool_basename="${tool_specified##*/}"
8317        if test "x$tool_basename" = "x$tool_specified"; then
8318          # A command without a complete path is provided, search $PATH.
8319          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8320$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8321          # Extract the first word of "$tool_basename", so it can be a program name with args.
8322set dummy $tool_basename; ac_word=$2
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8324$as_echo_n "checking for $ac_word... " >&6; }
8325if ${ac_cv_path_LS+:} false; then :
8326  $as_echo_n "(cached) " >&6
8327else
8328  case $LS in
8329  [\\/]* | ?:[\\/]*)
8330  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8331  ;;
8332  *)
8333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8334for as_dir in $PATH
8335do
8336  IFS=$as_save_IFS
8337  test -z "$as_dir" && as_dir=.
8338    for ac_exec_ext in '' $ac_executable_extensions; do
8339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8340    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8342    break 2
8343  fi
8344done
8345  done
8346IFS=$as_save_IFS
8347
8348  ;;
8349esac
8350fi
8351LS=$ac_cv_path_LS
8352if test -n "$LS"; then
8353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8354$as_echo "$LS" >&6; }
8355else
8356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8357$as_echo "no" >&6; }
8358fi
8359
8360
8361          if test "x$LS" = x; then
8362            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8363          fi
8364        else
8365          # Otherwise we believe it is a complete path. Use it as it is.
8366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8367$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8369$as_echo_n "checking for LS... " >&6; }
8370          if test ! -x "$tool_specified"; then
8371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8372$as_echo "not found" >&6; }
8373            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8374          fi
8375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8376$as_echo "$tool_specified" >&6; }
8377        fi
8378      fi
8379    fi
8380
8381  fi
8382
8383
8384
8385  if test "x$LS" = x; then
8386    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8387  fi
8388
8389
8390
8391
8392
8393  # Publish this variable in the help.
8394
8395
8396  if [ -z "${MKDIR+x}" ]; then
8397    # The variable is not set by user, try to locate tool using the code snippet
8398    for ac_prog in mkdir
8399do
8400  # Extract the first word of "$ac_prog", so it can be a program name with args.
8401set dummy $ac_prog; ac_word=$2
8402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8403$as_echo_n "checking for $ac_word... " >&6; }
8404if ${ac_cv_path_MKDIR+:} false; then :
8405  $as_echo_n "(cached) " >&6
8406else
8407  case $MKDIR in
8408  [\\/]* | ?:[\\/]*)
8409  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8410  ;;
8411  *)
8412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8413for as_dir in $PATH
8414do
8415  IFS=$as_save_IFS
8416  test -z "$as_dir" && as_dir=.
8417    for ac_exec_ext in '' $ac_executable_extensions; do
8418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8419    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8421    break 2
8422  fi
8423done
8424  done
8425IFS=$as_save_IFS
8426
8427  ;;
8428esac
8429fi
8430MKDIR=$ac_cv_path_MKDIR
8431if test -n "$MKDIR"; then
8432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8433$as_echo "$MKDIR" >&6; }
8434else
8435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8436$as_echo "no" >&6; }
8437fi
8438
8439
8440  test -n "$MKDIR" && break
8441done
8442
8443  else
8444    # The variable is set, but is it from the command line or the environment?
8445
8446    # Try to remove the string !MKDIR! from our list.
8447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8449      # If it failed, the variable was not from the command line. Ignore it,
8450      # but warn the user (except for BASH, which is always set by the calling BASH).
8451      if test "xMKDIR" != xBASH; then
8452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8453$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8454      fi
8455      # Try to locate tool using the code snippet
8456      for ac_prog in mkdir
8457do
8458  # Extract the first word of "$ac_prog", so it can be a program name with args.
8459set dummy $ac_prog; ac_word=$2
8460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8461$as_echo_n "checking for $ac_word... " >&6; }
8462if ${ac_cv_path_MKDIR+:} false; then :
8463  $as_echo_n "(cached) " >&6
8464else
8465  case $MKDIR in
8466  [\\/]* | ?:[\\/]*)
8467  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8468  ;;
8469  *)
8470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8471for as_dir in $PATH
8472do
8473  IFS=$as_save_IFS
8474  test -z "$as_dir" && as_dir=.
8475    for ac_exec_ext in '' $ac_executable_extensions; do
8476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8477    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8479    break 2
8480  fi
8481done
8482  done
8483IFS=$as_save_IFS
8484
8485  ;;
8486esac
8487fi
8488MKDIR=$ac_cv_path_MKDIR
8489if test -n "$MKDIR"; then
8490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8491$as_echo "$MKDIR" >&6; }
8492else
8493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8494$as_echo "no" >&6; }
8495fi
8496
8497
8498  test -n "$MKDIR" && break
8499done
8500
8501    else
8502      # If it succeeded, then it was overridden by the user. We will use it
8503      # for the tool.
8504
8505      # First remove it from the list of overridden variables, so we can test
8506      # for unknown variables in the end.
8507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8508
8509      # Check if we try to supply an empty value
8510      if test "x$MKDIR" = x; then
8511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8512$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8514$as_echo_n "checking for MKDIR... " >&6; }
8515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8516$as_echo "disabled" >&6; }
8517      else
8518        # Check if the provided tool contains a complete path.
8519        tool_specified="$MKDIR"
8520        tool_basename="${tool_specified##*/}"
8521        if test "x$tool_basename" = "x$tool_specified"; then
8522          # A command without a complete path is provided, search $PATH.
8523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8524$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8525          # Extract the first word of "$tool_basename", so it can be a program name with args.
8526set dummy $tool_basename; ac_word=$2
8527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8528$as_echo_n "checking for $ac_word... " >&6; }
8529if ${ac_cv_path_MKDIR+:} false; then :
8530  $as_echo_n "(cached) " >&6
8531else
8532  case $MKDIR in
8533  [\\/]* | ?:[\\/]*)
8534  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8535  ;;
8536  *)
8537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8538for as_dir in $PATH
8539do
8540  IFS=$as_save_IFS
8541  test -z "$as_dir" && as_dir=.
8542    for ac_exec_ext in '' $ac_executable_extensions; do
8543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8544    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8546    break 2
8547  fi
8548done
8549  done
8550IFS=$as_save_IFS
8551
8552  ;;
8553esac
8554fi
8555MKDIR=$ac_cv_path_MKDIR
8556if test -n "$MKDIR"; then
8557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8558$as_echo "$MKDIR" >&6; }
8559else
8560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8561$as_echo "no" >&6; }
8562fi
8563
8564
8565          if test "x$MKDIR" = x; then
8566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8567          fi
8568        else
8569          # Otherwise we believe it is a complete path. Use it as it is.
8570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8571$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8573$as_echo_n "checking for MKDIR... " >&6; }
8574          if test ! -x "$tool_specified"; then
8575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8576$as_echo "not found" >&6; }
8577            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8578          fi
8579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8580$as_echo "$tool_specified" >&6; }
8581        fi
8582      fi
8583    fi
8584
8585  fi
8586
8587
8588
8589  if test "x$MKDIR" = x; then
8590    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8591  fi
8592
8593
8594
8595
8596
8597  # Publish this variable in the help.
8598
8599
8600  if [ -z "${MKTEMP+x}" ]; then
8601    # The variable is not set by user, try to locate tool using the code snippet
8602    for ac_prog in mktemp
8603do
8604  # Extract the first word of "$ac_prog", so it can be a program name with args.
8605set dummy $ac_prog; ac_word=$2
8606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8607$as_echo_n "checking for $ac_word... " >&6; }
8608if ${ac_cv_path_MKTEMP+:} false; then :
8609  $as_echo_n "(cached) " >&6
8610else
8611  case $MKTEMP in
8612  [\\/]* | ?:[\\/]*)
8613  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8614  ;;
8615  *)
8616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8617for as_dir in $PATH
8618do
8619  IFS=$as_save_IFS
8620  test -z "$as_dir" && as_dir=.
8621    for ac_exec_ext in '' $ac_executable_extensions; do
8622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8623    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8625    break 2
8626  fi
8627done
8628  done
8629IFS=$as_save_IFS
8630
8631  ;;
8632esac
8633fi
8634MKTEMP=$ac_cv_path_MKTEMP
8635if test -n "$MKTEMP"; then
8636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8637$as_echo "$MKTEMP" >&6; }
8638else
8639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8640$as_echo "no" >&6; }
8641fi
8642
8643
8644  test -n "$MKTEMP" && break
8645done
8646
8647  else
8648    # The variable is set, but is it from the command line or the environment?
8649
8650    # Try to remove the string !MKTEMP! from our list.
8651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8653      # If it failed, the variable was not from the command line. Ignore it,
8654      # but warn the user (except for BASH, which is always set by the calling BASH).
8655      if test "xMKTEMP" != xBASH; then
8656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8657$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8658      fi
8659      # Try to locate tool using the code snippet
8660      for ac_prog in mktemp
8661do
8662  # Extract the first word of "$ac_prog", so it can be a program name with args.
8663set dummy $ac_prog; ac_word=$2
8664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8665$as_echo_n "checking for $ac_word... " >&6; }
8666if ${ac_cv_path_MKTEMP+:} false; then :
8667  $as_echo_n "(cached) " >&6
8668else
8669  case $MKTEMP in
8670  [\\/]* | ?:[\\/]*)
8671  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8672  ;;
8673  *)
8674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8675for as_dir in $PATH
8676do
8677  IFS=$as_save_IFS
8678  test -z "$as_dir" && as_dir=.
8679    for ac_exec_ext in '' $ac_executable_extensions; do
8680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8681    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8683    break 2
8684  fi
8685done
8686  done
8687IFS=$as_save_IFS
8688
8689  ;;
8690esac
8691fi
8692MKTEMP=$ac_cv_path_MKTEMP
8693if test -n "$MKTEMP"; then
8694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8695$as_echo "$MKTEMP" >&6; }
8696else
8697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8698$as_echo "no" >&6; }
8699fi
8700
8701
8702  test -n "$MKTEMP" && break
8703done
8704
8705    else
8706      # If it succeeded, then it was overridden by the user. We will use it
8707      # for the tool.
8708
8709      # First remove it from the list of overridden variables, so we can test
8710      # for unknown variables in the end.
8711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8712
8713      # Check if we try to supply an empty value
8714      if test "x$MKTEMP" = x; then
8715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8716$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8718$as_echo_n "checking for MKTEMP... " >&6; }
8719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8720$as_echo "disabled" >&6; }
8721      else
8722        # Check if the provided tool contains a complete path.
8723        tool_specified="$MKTEMP"
8724        tool_basename="${tool_specified##*/}"
8725        if test "x$tool_basename" = "x$tool_specified"; then
8726          # A command without a complete path is provided, search $PATH.
8727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8728$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8729          # Extract the first word of "$tool_basename", so it can be a program name with args.
8730set dummy $tool_basename; ac_word=$2
8731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8732$as_echo_n "checking for $ac_word... " >&6; }
8733if ${ac_cv_path_MKTEMP+:} false; then :
8734  $as_echo_n "(cached) " >&6
8735else
8736  case $MKTEMP in
8737  [\\/]* | ?:[\\/]*)
8738  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8739  ;;
8740  *)
8741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8742for as_dir in $PATH
8743do
8744  IFS=$as_save_IFS
8745  test -z "$as_dir" && as_dir=.
8746    for ac_exec_ext in '' $ac_executable_extensions; do
8747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8748    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8750    break 2
8751  fi
8752done
8753  done
8754IFS=$as_save_IFS
8755
8756  ;;
8757esac
8758fi
8759MKTEMP=$ac_cv_path_MKTEMP
8760if test -n "$MKTEMP"; then
8761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8762$as_echo "$MKTEMP" >&6; }
8763else
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8765$as_echo "no" >&6; }
8766fi
8767
8768
8769          if test "x$MKTEMP" = x; then
8770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8771          fi
8772        else
8773          # Otherwise we believe it is a complete path. Use it as it is.
8774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8775$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8777$as_echo_n "checking for MKTEMP... " >&6; }
8778          if test ! -x "$tool_specified"; then
8779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8780$as_echo "not found" >&6; }
8781            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8782          fi
8783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8784$as_echo "$tool_specified" >&6; }
8785        fi
8786      fi
8787    fi
8788
8789  fi
8790
8791
8792
8793  if test "x$MKTEMP" = x; then
8794    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8795  fi
8796
8797
8798
8799
8800
8801  # Publish this variable in the help.
8802
8803
8804  if [ -z "${MV+x}" ]; then
8805    # The variable is not set by user, try to locate tool using the code snippet
8806    for ac_prog in mv
8807do
8808  # Extract the first word of "$ac_prog", so it can be a program name with args.
8809set dummy $ac_prog; ac_word=$2
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if ${ac_cv_path_MV+:} false; then :
8813  $as_echo_n "(cached) " >&6
8814else
8815  case $MV in
8816  [\\/]* | ?:[\\/]*)
8817  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8818  ;;
8819  *)
8820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821for as_dir in $PATH
8822do
8823  IFS=$as_save_IFS
8824  test -z "$as_dir" && as_dir=.
8825    for ac_exec_ext in '' $ac_executable_extensions; do
8826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829    break 2
8830  fi
8831done
8832  done
8833IFS=$as_save_IFS
8834
8835  ;;
8836esac
8837fi
8838MV=$ac_cv_path_MV
8839if test -n "$MV"; then
8840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8841$as_echo "$MV" >&6; }
8842else
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8844$as_echo "no" >&6; }
8845fi
8846
8847
8848  test -n "$MV" && break
8849done
8850
8851  else
8852    # The variable is set, but is it from the command line or the environment?
8853
8854    # Try to remove the string !MV! from our list.
8855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8857      # If it failed, the variable was not from the command line. Ignore it,
8858      # but warn the user (except for BASH, which is always set by the calling BASH).
8859      if test "xMV" != xBASH; then
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8861$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8862      fi
8863      # Try to locate tool using the code snippet
8864      for ac_prog in mv
8865do
8866  # Extract the first word of "$ac_prog", so it can be a program name with args.
8867set dummy $ac_prog; ac_word=$2
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869$as_echo_n "checking for $ac_word... " >&6; }
8870if ${ac_cv_path_MV+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  case $MV in
8874  [\\/]* | ?:[\\/]*)
8875  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8876  ;;
8877  *)
8878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8879for as_dir in $PATH
8880do
8881  IFS=$as_save_IFS
8882  test -z "$as_dir" && as_dir=.
8883    for ac_exec_ext in '' $ac_executable_extensions; do
8884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8885    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8887    break 2
8888  fi
8889done
8890  done
8891IFS=$as_save_IFS
8892
8893  ;;
8894esac
8895fi
8896MV=$ac_cv_path_MV
8897if test -n "$MV"; then
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8899$as_echo "$MV" >&6; }
8900else
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
8903fi
8904
8905
8906  test -n "$MV" && break
8907done
8908
8909    else
8910      # If it succeeded, then it was overridden by the user. We will use it
8911      # for the tool.
8912
8913      # First remove it from the list of overridden variables, so we can test
8914      # for unknown variables in the end.
8915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8916
8917      # Check if we try to supply an empty value
8918      if test "x$MV" = x; then
8919        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8920$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8922$as_echo_n "checking for MV... " >&6; }
8923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8924$as_echo "disabled" >&6; }
8925      else
8926        # Check if the provided tool contains a complete path.
8927        tool_specified="$MV"
8928        tool_basename="${tool_specified##*/}"
8929        if test "x$tool_basename" = "x$tool_specified"; then
8930          # A command without a complete path is provided, search $PATH.
8931          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8932$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8933          # Extract the first word of "$tool_basename", so it can be a program name with args.
8934set dummy $tool_basename; ac_word=$2
8935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8936$as_echo_n "checking for $ac_word... " >&6; }
8937if ${ac_cv_path_MV+:} false; then :
8938  $as_echo_n "(cached) " >&6
8939else
8940  case $MV in
8941  [\\/]* | ?:[\\/]*)
8942  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8943  ;;
8944  *)
8945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8946for as_dir in $PATH
8947do
8948  IFS=$as_save_IFS
8949  test -z "$as_dir" && as_dir=.
8950    for ac_exec_ext in '' $ac_executable_extensions; do
8951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8952    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8954    break 2
8955  fi
8956done
8957  done
8958IFS=$as_save_IFS
8959
8960  ;;
8961esac
8962fi
8963MV=$ac_cv_path_MV
8964if test -n "$MV"; then
8965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8966$as_echo "$MV" >&6; }
8967else
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8969$as_echo "no" >&6; }
8970fi
8971
8972
8973          if test "x$MV" = x; then
8974            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8975          fi
8976        else
8977          # Otherwise we believe it is a complete path. Use it as it is.
8978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8979$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8980          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8981$as_echo_n "checking for MV... " >&6; }
8982          if test ! -x "$tool_specified"; then
8983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8984$as_echo "not found" >&6; }
8985            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8986          fi
8987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8988$as_echo "$tool_specified" >&6; }
8989        fi
8990      fi
8991    fi
8992
8993  fi
8994
8995
8996
8997  if test "x$MV" = x; then
8998    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8999  fi
9000
9001
9002
9003
9004
9005  # Publish this variable in the help.
9006
9007
9008  if [ -z "${NAWK+x}" ]; then
9009    # The variable is not set by user, try to locate tool using the code snippet
9010    for ac_prog in nawk gawk awk
9011do
9012  # Extract the first word of "$ac_prog", so it can be a program name with args.
9013set dummy $ac_prog; ac_word=$2
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9015$as_echo_n "checking for $ac_word... " >&6; }
9016if ${ac_cv_path_NAWK+:} false; then :
9017  $as_echo_n "(cached) " >&6
9018else
9019  case $NAWK in
9020  [\\/]* | ?:[\\/]*)
9021  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9022  ;;
9023  *)
9024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9025for as_dir in $PATH
9026do
9027  IFS=$as_save_IFS
9028  test -z "$as_dir" && as_dir=.
9029    for ac_exec_ext in '' $ac_executable_extensions; do
9030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9033    break 2
9034  fi
9035done
9036  done
9037IFS=$as_save_IFS
9038
9039  ;;
9040esac
9041fi
9042NAWK=$ac_cv_path_NAWK
9043if test -n "$NAWK"; then
9044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9045$as_echo "$NAWK" >&6; }
9046else
9047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048$as_echo "no" >&6; }
9049fi
9050
9051
9052  test -n "$NAWK" && break
9053done
9054
9055  else
9056    # The variable is set, but is it from the command line or the environment?
9057
9058    # Try to remove the string !NAWK! from our list.
9059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9061      # If it failed, the variable was not from the command line. Ignore it,
9062      # but warn the user (except for BASH, which is always set by the calling BASH).
9063      if test "xNAWK" != xBASH; then
9064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9065$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9066      fi
9067      # Try to locate tool using the code snippet
9068      for ac_prog in nawk gawk awk
9069do
9070  # Extract the first word of "$ac_prog", so it can be a program name with args.
9071set dummy $ac_prog; ac_word=$2
9072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9073$as_echo_n "checking for $ac_word... " >&6; }
9074if ${ac_cv_path_NAWK+:} false; then :
9075  $as_echo_n "(cached) " >&6
9076else
9077  case $NAWK in
9078  [\\/]* | ?:[\\/]*)
9079  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9080  ;;
9081  *)
9082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9083for as_dir in $PATH
9084do
9085  IFS=$as_save_IFS
9086  test -z "$as_dir" && as_dir=.
9087    for ac_exec_ext in '' $ac_executable_extensions; do
9088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9089    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9091    break 2
9092  fi
9093done
9094  done
9095IFS=$as_save_IFS
9096
9097  ;;
9098esac
9099fi
9100NAWK=$ac_cv_path_NAWK
9101if test -n "$NAWK"; then
9102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9103$as_echo "$NAWK" >&6; }
9104else
9105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106$as_echo "no" >&6; }
9107fi
9108
9109
9110  test -n "$NAWK" && break
9111done
9112
9113    else
9114      # If it succeeded, then it was overridden by the user. We will use it
9115      # for the tool.
9116
9117      # First remove it from the list of overridden variables, so we can test
9118      # for unknown variables in the end.
9119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9120
9121      # Check if we try to supply an empty value
9122      if test "x$NAWK" = x; then
9123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9124$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9126$as_echo_n "checking for NAWK... " >&6; }
9127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9128$as_echo "disabled" >&6; }
9129      else
9130        # Check if the provided tool contains a complete path.
9131        tool_specified="$NAWK"
9132        tool_basename="${tool_specified##*/}"
9133        if test "x$tool_basename" = "x$tool_specified"; then
9134          # A command without a complete path is provided, search $PATH.
9135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9136$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9137          # Extract the first word of "$tool_basename", so it can be a program name with args.
9138set dummy $tool_basename; ac_word=$2
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9140$as_echo_n "checking for $ac_word... " >&6; }
9141if ${ac_cv_path_NAWK+:} false; then :
9142  $as_echo_n "(cached) " >&6
9143else
9144  case $NAWK in
9145  [\\/]* | ?:[\\/]*)
9146  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9147  ;;
9148  *)
9149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9150for as_dir in $PATH
9151do
9152  IFS=$as_save_IFS
9153  test -z "$as_dir" && as_dir=.
9154    for ac_exec_ext in '' $ac_executable_extensions; do
9155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9156    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9158    break 2
9159  fi
9160done
9161  done
9162IFS=$as_save_IFS
9163
9164  ;;
9165esac
9166fi
9167NAWK=$ac_cv_path_NAWK
9168if test -n "$NAWK"; then
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9170$as_echo "$NAWK" >&6; }
9171else
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
9174fi
9175
9176
9177          if test "x$NAWK" = x; then
9178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9179          fi
9180        else
9181          # Otherwise we believe it is a complete path. Use it as it is.
9182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9183$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9185$as_echo_n "checking for NAWK... " >&6; }
9186          if test ! -x "$tool_specified"; then
9187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9188$as_echo "not found" >&6; }
9189            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9190          fi
9191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9192$as_echo "$tool_specified" >&6; }
9193        fi
9194      fi
9195    fi
9196
9197  fi
9198
9199
9200
9201  if test "x$NAWK" = x; then
9202    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9203  fi
9204
9205
9206
9207
9208
9209  # Publish this variable in the help.
9210
9211
9212  if [ -z "${PRINTF+x}" ]; then
9213    # The variable is not set by user, try to locate tool using the code snippet
9214    for ac_prog in printf
9215do
9216  # Extract the first word of "$ac_prog", so it can be a program name with args.
9217set dummy $ac_prog; ac_word=$2
9218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9219$as_echo_n "checking for $ac_word... " >&6; }
9220if ${ac_cv_path_PRINTF+:} false; then :
9221  $as_echo_n "(cached) " >&6
9222else
9223  case $PRINTF in
9224  [\\/]* | ?:[\\/]*)
9225  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9226  ;;
9227  *)
9228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9229for as_dir in $PATH
9230do
9231  IFS=$as_save_IFS
9232  test -z "$as_dir" && as_dir=.
9233    for ac_exec_ext in '' $ac_executable_extensions; do
9234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9235    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9237    break 2
9238  fi
9239done
9240  done
9241IFS=$as_save_IFS
9242
9243  ;;
9244esac
9245fi
9246PRINTF=$ac_cv_path_PRINTF
9247if test -n "$PRINTF"; then
9248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9249$as_echo "$PRINTF" >&6; }
9250else
9251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9252$as_echo "no" >&6; }
9253fi
9254
9255
9256  test -n "$PRINTF" && break
9257done
9258
9259  else
9260    # The variable is set, but is it from the command line or the environment?
9261
9262    # Try to remove the string !PRINTF! from our list.
9263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9265      # If it failed, the variable was not from the command line. Ignore it,
9266      # but warn the user (except for BASH, which is always set by the calling BASH).
9267      if test "xPRINTF" != xBASH; then
9268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9269$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9270      fi
9271      # Try to locate tool using the code snippet
9272      for ac_prog in printf
9273do
9274  # Extract the first word of "$ac_prog", so it can be a program name with args.
9275set dummy $ac_prog; ac_word=$2
9276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9277$as_echo_n "checking for $ac_word... " >&6; }
9278if ${ac_cv_path_PRINTF+:} false; then :
9279  $as_echo_n "(cached) " >&6
9280else
9281  case $PRINTF in
9282  [\\/]* | ?:[\\/]*)
9283  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9284  ;;
9285  *)
9286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9287for as_dir in $PATH
9288do
9289  IFS=$as_save_IFS
9290  test -z "$as_dir" && as_dir=.
9291    for ac_exec_ext in '' $ac_executable_extensions; do
9292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9293    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9295    break 2
9296  fi
9297done
9298  done
9299IFS=$as_save_IFS
9300
9301  ;;
9302esac
9303fi
9304PRINTF=$ac_cv_path_PRINTF
9305if test -n "$PRINTF"; then
9306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9307$as_echo "$PRINTF" >&6; }
9308else
9309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9310$as_echo "no" >&6; }
9311fi
9312
9313
9314  test -n "$PRINTF" && break
9315done
9316
9317    else
9318      # If it succeeded, then it was overridden by the user. We will use it
9319      # for the tool.
9320
9321      # First remove it from the list of overridden variables, so we can test
9322      # for unknown variables in the end.
9323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9324
9325      # Check if we try to supply an empty value
9326      if test "x$PRINTF" = x; then
9327        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9328$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9329        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9330$as_echo_n "checking for PRINTF... " >&6; }
9331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9332$as_echo "disabled" >&6; }
9333      else
9334        # Check if the provided tool contains a complete path.
9335        tool_specified="$PRINTF"
9336        tool_basename="${tool_specified##*/}"
9337        if test "x$tool_basename" = "x$tool_specified"; then
9338          # A command without a complete path is provided, search $PATH.
9339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9340$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9341          # Extract the first word of "$tool_basename", so it can be a program name with args.
9342set dummy $tool_basename; ac_word=$2
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344$as_echo_n "checking for $ac_word... " >&6; }
9345if ${ac_cv_path_PRINTF+:} false; then :
9346  $as_echo_n "(cached) " >&6
9347else
9348  case $PRINTF in
9349  [\\/]* | ?:[\\/]*)
9350  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9351  ;;
9352  *)
9353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354for as_dir in $PATH
9355do
9356  IFS=$as_save_IFS
9357  test -z "$as_dir" && as_dir=.
9358    for ac_exec_ext in '' $ac_executable_extensions; do
9359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9362    break 2
9363  fi
9364done
9365  done
9366IFS=$as_save_IFS
9367
9368  ;;
9369esac
9370fi
9371PRINTF=$ac_cv_path_PRINTF
9372if test -n "$PRINTF"; then
9373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9374$as_echo "$PRINTF" >&6; }
9375else
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
9378fi
9379
9380
9381          if test "x$PRINTF" = x; then
9382            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9383          fi
9384        else
9385          # Otherwise we believe it is a complete path. Use it as it is.
9386          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9387$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9388          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9389$as_echo_n "checking for PRINTF... " >&6; }
9390          if test ! -x "$tool_specified"; then
9391            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9392$as_echo "not found" >&6; }
9393            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9394          fi
9395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9396$as_echo "$tool_specified" >&6; }
9397        fi
9398      fi
9399    fi
9400
9401  fi
9402
9403
9404
9405  if test "x$PRINTF" = x; then
9406    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9407  fi
9408
9409
9410
9411
9412
9413  # Publish this variable in the help.
9414
9415
9416  if [ -z "${RM+x}" ]; then
9417    # The variable is not set by user, try to locate tool using the code snippet
9418    for ac_prog in rm
9419do
9420  # Extract the first word of "$ac_prog", so it can be a program name with args.
9421set dummy $ac_prog; ac_word=$2
9422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9423$as_echo_n "checking for $ac_word... " >&6; }
9424if ${ac_cv_path_RM+:} false; then :
9425  $as_echo_n "(cached) " >&6
9426else
9427  case $RM in
9428  [\\/]* | ?:[\\/]*)
9429  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9430  ;;
9431  *)
9432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9433for as_dir in $PATH
9434do
9435  IFS=$as_save_IFS
9436  test -z "$as_dir" && as_dir=.
9437    for ac_exec_ext in '' $ac_executable_extensions; do
9438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9439    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9441    break 2
9442  fi
9443done
9444  done
9445IFS=$as_save_IFS
9446
9447  ;;
9448esac
9449fi
9450RM=$ac_cv_path_RM
9451if test -n "$RM"; then
9452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9453$as_echo "$RM" >&6; }
9454else
9455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9456$as_echo "no" >&6; }
9457fi
9458
9459
9460  test -n "$RM" && break
9461done
9462
9463  else
9464    # The variable is set, but is it from the command line or the environment?
9465
9466    # Try to remove the string !RM! from our list.
9467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9469      # If it failed, the variable was not from the command line. Ignore it,
9470      # but warn the user (except for BASH, which is always set by the calling BASH).
9471      if test "xRM" != xBASH; then
9472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9473$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9474      fi
9475      # Try to locate tool using the code snippet
9476      for ac_prog in rm
9477do
9478  # Extract the first word of "$ac_prog", so it can be a program name with args.
9479set dummy $ac_prog; ac_word=$2
9480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9481$as_echo_n "checking for $ac_word... " >&6; }
9482if ${ac_cv_path_RM+:} false; then :
9483  $as_echo_n "(cached) " >&6
9484else
9485  case $RM in
9486  [\\/]* | ?:[\\/]*)
9487  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9488  ;;
9489  *)
9490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9491for as_dir in $PATH
9492do
9493  IFS=$as_save_IFS
9494  test -z "$as_dir" && as_dir=.
9495    for ac_exec_ext in '' $ac_executable_extensions; do
9496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9497    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9499    break 2
9500  fi
9501done
9502  done
9503IFS=$as_save_IFS
9504
9505  ;;
9506esac
9507fi
9508RM=$ac_cv_path_RM
9509if test -n "$RM"; then
9510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9511$as_echo "$RM" >&6; }
9512else
9513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9514$as_echo "no" >&6; }
9515fi
9516
9517
9518  test -n "$RM" && break
9519done
9520
9521    else
9522      # If it succeeded, then it was overridden by the user. We will use it
9523      # for the tool.
9524
9525      # First remove it from the list of overridden variables, so we can test
9526      # for unknown variables in the end.
9527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9528
9529      # Check if we try to supply an empty value
9530      if test "x$RM" = x; then
9531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9532$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9534$as_echo_n "checking for RM... " >&6; }
9535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9536$as_echo "disabled" >&6; }
9537      else
9538        # Check if the provided tool contains a complete path.
9539        tool_specified="$RM"
9540        tool_basename="${tool_specified##*/}"
9541        if test "x$tool_basename" = "x$tool_specified"; then
9542          # A command without a complete path is provided, search $PATH.
9543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9544$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9545          # Extract the first word of "$tool_basename", so it can be a program name with args.
9546set dummy $tool_basename; ac_word=$2
9547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9548$as_echo_n "checking for $ac_word... " >&6; }
9549if ${ac_cv_path_RM+:} false; then :
9550  $as_echo_n "(cached) " >&6
9551else
9552  case $RM in
9553  [\\/]* | ?:[\\/]*)
9554  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9555  ;;
9556  *)
9557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9558for as_dir in $PATH
9559do
9560  IFS=$as_save_IFS
9561  test -z "$as_dir" && as_dir=.
9562    for ac_exec_ext in '' $ac_executable_extensions; do
9563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9564    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9566    break 2
9567  fi
9568done
9569  done
9570IFS=$as_save_IFS
9571
9572  ;;
9573esac
9574fi
9575RM=$ac_cv_path_RM
9576if test -n "$RM"; then
9577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9578$as_echo "$RM" >&6; }
9579else
9580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9581$as_echo "no" >&6; }
9582fi
9583
9584
9585          if test "x$RM" = x; then
9586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9587          fi
9588        else
9589          # Otherwise we believe it is a complete path. Use it as it is.
9590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9591$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9593$as_echo_n "checking for RM... " >&6; }
9594          if test ! -x "$tool_specified"; then
9595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9596$as_echo "not found" >&6; }
9597            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9598          fi
9599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9600$as_echo "$tool_specified" >&6; }
9601        fi
9602      fi
9603    fi
9604
9605  fi
9606
9607
9608
9609  if test "x$RM" = x; then
9610    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9611  fi
9612
9613
9614
9615
9616
9617  # Publish this variable in the help.
9618
9619
9620  if [ -z "${RMDIR+x}" ]; then
9621    # The variable is not set by user, try to locate tool using the code snippet
9622    for ac_prog in rmdir
9623do
9624  # Extract the first word of "$ac_prog", so it can be a program name with args.
9625set dummy $ac_prog; ac_word=$2
9626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9627$as_echo_n "checking for $ac_word... " >&6; }
9628if ${ac_cv_path_RMDIR+:} false; then :
9629  $as_echo_n "(cached) " >&6
9630else
9631  case $RMDIR in
9632  [\\/]* | ?:[\\/]*)
9633  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9634  ;;
9635  *)
9636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9637for as_dir in $PATH
9638do
9639  IFS=$as_save_IFS
9640  test -z "$as_dir" && as_dir=.
9641    for ac_exec_ext in '' $ac_executable_extensions; do
9642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9643    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9645    break 2
9646  fi
9647done
9648  done
9649IFS=$as_save_IFS
9650
9651  ;;
9652esac
9653fi
9654RMDIR=$ac_cv_path_RMDIR
9655if test -n "$RMDIR"; then
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9657$as_echo "$RMDIR" >&6; }
9658else
9659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9660$as_echo "no" >&6; }
9661fi
9662
9663
9664  test -n "$RMDIR" && break
9665done
9666
9667  else
9668    # The variable is set, but is it from the command line or the environment?
9669
9670    # Try to remove the string !RMDIR! from our list.
9671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9673      # If it failed, the variable was not from the command line. Ignore it,
9674      # but warn the user (except for BASH, which is always set by the calling BASH).
9675      if test "xRMDIR" != xBASH; then
9676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9677$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9678      fi
9679      # Try to locate tool using the code snippet
9680      for ac_prog in rmdir
9681do
9682  # Extract the first word of "$ac_prog", so it can be a program name with args.
9683set dummy $ac_prog; ac_word=$2
9684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9685$as_echo_n "checking for $ac_word... " >&6; }
9686if ${ac_cv_path_RMDIR+:} false; then :
9687  $as_echo_n "(cached) " >&6
9688else
9689  case $RMDIR in
9690  [\\/]* | ?:[\\/]*)
9691  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9692  ;;
9693  *)
9694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9695for as_dir in $PATH
9696do
9697  IFS=$as_save_IFS
9698  test -z "$as_dir" && as_dir=.
9699    for ac_exec_ext in '' $ac_executable_extensions; do
9700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9701    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9703    break 2
9704  fi
9705done
9706  done
9707IFS=$as_save_IFS
9708
9709  ;;
9710esac
9711fi
9712RMDIR=$ac_cv_path_RMDIR
9713if test -n "$RMDIR"; then
9714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9715$as_echo "$RMDIR" >&6; }
9716else
9717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9718$as_echo "no" >&6; }
9719fi
9720
9721
9722  test -n "$RMDIR" && break
9723done
9724
9725    else
9726      # If it succeeded, then it was overridden by the user. We will use it
9727      # for the tool.
9728
9729      # First remove it from the list of overridden variables, so we can test
9730      # for unknown variables in the end.
9731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9732
9733      # Check if we try to supply an empty value
9734      if test "x$RMDIR" = x; then
9735        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9736$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9738$as_echo_n "checking for RMDIR... " >&6; }
9739        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9740$as_echo "disabled" >&6; }
9741      else
9742        # Check if the provided tool contains a complete path.
9743        tool_specified="$RMDIR"
9744        tool_basename="${tool_specified##*/}"
9745        if test "x$tool_basename" = "x$tool_specified"; then
9746          # A command without a complete path is provided, search $PATH.
9747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9748$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9749          # Extract the first word of "$tool_basename", so it can be a program name with args.
9750set dummy $tool_basename; ac_word=$2
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9752$as_echo_n "checking for $ac_word... " >&6; }
9753if ${ac_cv_path_RMDIR+:} false; then :
9754  $as_echo_n "(cached) " >&6
9755else
9756  case $RMDIR in
9757  [\\/]* | ?:[\\/]*)
9758  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9759  ;;
9760  *)
9761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9762for as_dir in $PATH
9763do
9764  IFS=$as_save_IFS
9765  test -z "$as_dir" && as_dir=.
9766    for ac_exec_ext in '' $ac_executable_extensions; do
9767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9768    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9770    break 2
9771  fi
9772done
9773  done
9774IFS=$as_save_IFS
9775
9776  ;;
9777esac
9778fi
9779RMDIR=$ac_cv_path_RMDIR
9780if test -n "$RMDIR"; then
9781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9782$as_echo "$RMDIR" >&6; }
9783else
9784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
9786fi
9787
9788
9789          if test "x$RMDIR" = x; then
9790            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9791          fi
9792        else
9793          # Otherwise we believe it is a complete path. Use it as it is.
9794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9795$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9796          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9797$as_echo_n "checking for RMDIR... " >&6; }
9798          if test ! -x "$tool_specified"; then
9799            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9800$as_echo "not found" >&6; }
9801            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9802          fi
9803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9804$as_echo "$tool_specified" >&6; }
9805        fi
9806      fi
9807    fi
9808
9809  fi
9810
9811
9812
9813  if test "x$RMDIR" = x; then
9814    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9815  fi
9816
9817
9818
9819
9820
9821  # Publish this variable in the help.
9822
9823
9824  if [ -z "${SH+x}" ]; then
9825    # The variable is not set by user, try to locate tool using the code snippet
9826    for ac_prog in sh
9827do
9828  # Extract the first word of "$ac_prog", so it can be a program name with args.
9829set dummy $ac_prog; ac_word=$2
9830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9831$as_echo_n "checking for $ac_word... " >&6; }
9832if ${ac_cv_path_SH+:} false; then :
9833  $as_echo_n "(cached) " >&6
9834else
9835  case $SH in
9836  [\\/]* | ?:[\\/]*)
9837  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9838  ;;
9839  *)
9840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9841for as_dir in $PATH
9842do
9843  IFS=$as_save_IFS
9844  test -z "$as_dir" && as_dir=.
9845    for ac_exec_ext in '' $ac_executable_extensions; do
9846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9847    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9849    break 2
9850  fi
9851done
9852  done
9853IFS=$as_save_IFS
9854
9855  ;;
9856esac
9857fi
9858SH=$ac_cv_path_SH
9859if test -n "$SH"; then
9860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9861$as_echo "$SH" >&6; }
9862else
9863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864$as_echo "no" >&6; }
9865fi
9866
9867
9868  test -n "$SH" && break
9869done
9870
9871  else
9872    # The variable is set, but is it from the command line or the environment?
9873
9874    # Try to remove the string !SH! from our list.
9875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9877      # If it failed, the variable was not from the command line. Ignore it,
9878      # but warn the user (except for BASH, which is always set by the calling BASH).
9879      if test "xSH" != xBASH; then
9880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9881$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9882      fi
9883      # Try to locate tool using the code snippet
9884      for ac_prog in sh
9885do
9886  # Extract the first word of "$ac_prog", so it can be a program name with args.
9887set dummy $ac_prog; ac_word=$2
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9889$as_echo_n "checking for $ac_word... " >&6; }
9890if ${ac_cv_path_SH+:} false; then :
9891  $as_echo_n "(cached) " >&6
9892else
9893  case $SH in
9894  [\\/]* | ?:[\\/]*)
9895  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9896  ;;
9897  *)
9898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9899for as_dir in $PATH
9900do
9901  IFS=$as_save_IFS
9902  test -z "$as_dir" && as_dir=.
9903    for ac_exec_ext in '' $ac_executable_extensions; do
9904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9905    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9907    break 2
9908  fi
9909done
9910  done
9911IFS=$as_save_IFS
9912
9913  ;;
9914esac
9915fi
9916SH=$ac_cv_path_SH
9917if test -n "$SH"; then
9918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9919$as_echo "$SH" >&6; }
9920else
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
9923fi
9924
9925
9926  test -n "$SH" && break
9927done
9928
9929    else
9930      # If it succeeded, then it was overridden by the user. We will use it
9931      # for the tool.
9932
9933      # First remove it from the list of overridden variables, so we can test
9934      # for unknown variables in the end.
9935      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9936
9937      # Check if we try to supply an empty value
9938      if test "x$SH" = x; then
9939        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9940$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9942$as_echo_n "checking for SH... " >&6; }
9943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9944$as_echo "disabled" >&6; }
9945      else
9946        # Check if the provided tool contains a complete path.
9947        tool_specified="$SH"
9948        tool_basename="${tool_specified##*/}"
9949        if test "x$tool_basename" = "x$tool_specified"; then
9950          # A command without a complete path is provided, search $PATH.
9951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9952$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9953          # Extract the first word of "$tool_basename", so it can be a program name with args.
9954set dummy $tool_basename; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if ${ac_cv_path_SH+:} false; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  case $SH in
9961  [\\/]* | ?:[\\/]*)
9962  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9963  ;;
9964  *)
9965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968  IFS=$as_save_IFS
9969  test -z "$as_dir" && as_dir=.
9970    for ac_exec_ext in '' $ac_executable_extensions; do
9971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9972    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974    break 2
9975  fi
9976done
9977  done
9978IFS=$as_save_IFS
9979
9980  ;;
9981esac
9982fi
9983SH=$ac_cv_path_SH
9984if test -n "$SH"; then
9985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9986$as_echo "$SH" >&6; }
9987else
9988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993          if test "x$SH" = x; then
9994            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9995          fi
9996        else
9997          # Otherwise we believe it is a complete path. Use it as it is.
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9999$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10000          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10001$as_echo_n "checking for SH... " >&6; }
10002          if test ! -x "$tool_specified"; then
10003            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10004$as_echo "not found" >&6; }
10005            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10006          fi
10007          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10008$as_echo "$tool_specified" >&6; }
10009        fi
10010      fi
10011    fi
10012
10013  fi
10014
10015
10016
10017  if test "x$SH" = x; then
10018    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10019  fi
10020
10021
10022
10023
10024
10025  # Publish this variable in the help.
10026
10027
10028  if [ -z "${SORT+x}" ]; then
10029    # The variable is not set by user, try to locate tool using the code snippet
10030    for ac_prog in sort
10031do
10032  # Extract the first word of "$ac_prog", so it can be a program name with args.
10033set dummy $ac_prog; ac_word=$2
10034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10035$as_echo_n "checking for $ac_word... " >&6; }
10036if ${ac_cv_path_SORT+:} false; then :
10037  $as_echo_n "(cached) " >&6
10038else
10039  case $SORT in
10040  [\\/]* | ?:[\\/]*)
10041  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10042  ;;
10043  *)
10044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10045for as_dir in $PATH
10046do
10047  IFS=$as_save_IFS
10048  test -z "$as_dir" && as_dir=.
10049    for ac_exec_ext in '' $ac_executable_extensions; do
10050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10051    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10053    break 2
10054  fi
10055done
10056  done
10057IFS=$as_save_IFS
10058
10059  ;;
10060esac
10061fi
10062SORT=$ac_cv_path_SORT
10063if test -n "$SORT"; then
10064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10065$as_echo "$SORT" >&6; }
10066else
10067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
10069fi
10070
10071
10072  test -n "$SORT" && break
10073done
10074
10075  else
10076    # The variable is set, but is it from the command line or the environment?
10077
10078    # Try to remove the string !SORT! from our list.
10079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10081      # If it failed, the variable was not from the command line. Ignore it,
10082      # but warn the user (except for BASH, which is always set by the calling BASH).
10083      if test "xSORT" != xBASH; then
10084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10085$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10086      fi
10087      # Try to locate tool using the code snippet
10088      for ac_prog in sort
10089do
10090  # Extract the first word of "$ac_prog", so it can be a program name with args.
10091set dummy $ac_prog; ac_word=$2
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10093$as_echo_n "checking for $ac_word... " >&6; }
10094if ${ac_cv_path_SORT+:} false; then :
10095  $as_echo_n "(cached) " >&6
10096else
10097  case $SORT in
10098  [\\/]* | ?:[\\/]*)
10099  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10100  ;;
10101  *)
10102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10103for as_dir in $PATH
10104do
10105  IFS=$as_save_IFS
10106  test -z "$as_dir" && as_dir=.
10107    for ac_exec_ext in '' $ac_executable_extensions; do
10108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10109    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10111    break 2
10112  fi
10113done
10114  done
10115IFS=$as_save_IFS
10116
10117  ;;
10118esac
10119fi
10120SORT=$ac_cv_path_SORT
10121if test -n "$SORT"; then
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10123$as_echo "$SORT" >&6; }
10124else
10125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126$as_echo "no" >&6; }
10127fi
10128
10129
10130  test -n "$SORT" && break
10131done
10132
10133    else
10134      # If it succeeded, then it was overridden by the user. We will use it
10135      # for the tool.
10136
10137      # First remove it from the list of overridden variables, so we can test
10138      # for unknown variables in the end.
10139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10140
10141      # Check if we try to supply an empty value
10142      if test "x$SORT" = x; then
10143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10144$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10146$as_echo_n "checking for SORT... " >&6; }
10147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10148$as_echo "disabled" >&6; }
10149      else
10150        # Check if the provided tool contains a complete path.
10151        tool_specified="$SORT"
10152        tool_basename="${tool_specified##*/}"
10153        if test "x$tool_basename" = "x$tool_specified"; then
10154          # A command without a complete path is provided, search $PATH.
10155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10156$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10157          # Extract the first word of "$tool_basename", so it can be a program name with args.
10158set dummy $tool_basename; ac_word=$2
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160$as_echo_n "checking for $ac_word... " >&6; }
10161if ${ac_cv_path_SORT+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164  case $SORT in
10165  [\\/]* | ?:[\\/]*)
10166  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10167  ;;
10168  *)
10169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170for as_dir in $PATH
10171do
10172  IFS=$as_save_IFS
10173  test -z "$as_dir" && as_dir=.
10174    for ac_exec_ext in '' $ac_executable_extensions; do
10175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178    break 2
10179  fi
10180done
10181  done
10182IFS=$as_save_IFS
10183
10184  ;;
10185esac
10186fi
10187SORT=$ac_cv_path_SORT
10188if test -n "$SORT"; then
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10190$as_echo "$SORT" >&6; }
10191else
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194fi
10195
10196
10197          if test "x$SORT" = x; then
10198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10199          fi
10200        else
10201          # Otherwise we believe it is a complete path. Use it as it is.
10202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10203$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10205$as_echo_n "checking for SORT... " >&6; }
10206          if test ! -x "$tool_specified"; then
10207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10208$as_echo "not found" >&6; }
10209            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10210          fi
10211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10212$as_echo "$tool_specified" >&6; }
10213        fi
10214      fi
10215    fi
10216
10217  fi
10218
10219
10220
10221  if test "x$SORT" = x; then
10222    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10223  fi
10224
10225
10226
10227
10228
10229  # Publish this variable in the help.
10230
10231
10232  if [ -z "${TAIL+x}" ]; then
10233    # The variable is not set by user, try to locate tool using the code snippet
10234    for ac_prog in tail
10235do
10236  # Extract the first word of "$ac_prog", so it can be a program name with args.
10237set dummy $ac_prog; ac_word=$2
10238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10239$as_echo_n "checking for $ac_word... " >&6; }
10240if ${ac_cv_path_TAIL+:} false; then :
10241  $as_echo_n "(cached) " >&6
10242else
10243  case $TAIL in
10244  [\\/]* | ?:[\\/]*)
10245  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10246  ;;
10247  *)
10248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10249for as_dir in $PATH
10250do
10251  IFS=$as_save_IFS
10252  test -z "$as_dir" && as_dir=.
10253    for ac_exec_ext in '' $ac_executable_extensions; do
10254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10255    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10257    break 2
10258  fi
10259done
10260  done
10261IFS=$as_save_IFS
10262
10263  ;;
10264esac
10265fi
10266TAIL=$ac_cv_path_TAIL
10267if test -n "$TAIL"; then
10268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10269$as_echo "$TAIL" >&6; }
10270else
10271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272$as_echo "no" >&6; }
10273fi
10274
10275
10276  test -n "$TAIL" && break
10277done
10278
10279  else
10280    # The variable is set, but is it from the command line or the environment?
10281
10282    # Try to remove the string !TAIL! from our list.
10283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10285      # If it failed, the variable was not from the command line. Ignore it,
10286      # but warn the user (except for BASH, which is always set by the calling BASH).
10287      if test "xTAIL" != xBASH; then
10288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10289$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10290      fi
10291      # Try to locate tool using the code snippet
10292      for ac_prog in tail
10293do
10294  # Extract the first word of "$ac_prog", so it can be a program name with args.
10295set dummy $ac_prog; ac_word=$2
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10297$as_echo_n "checking for $ac_word... " >&6; }
10298if ${ac_cv_path_TAIL+:} false; then :
10299  $as_echo_n "(cached) " >&6
10300else
10301  case $TAIL in
10302  [\\/]* | ?:[\\/]*)
10303  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10304  ;;
10305  *)
10306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10307for as_dir in $PATH
10308do
10309  IFS=$as_save_IFS
10310  test -z "$as_dir" && as_dir=.
10311    for ac_exec_ext in '' $ac_executable_extensions; do
10312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10313    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10315    break 2
10316  fi
10317done
10318  done
10319IFS=$as_save_IFS
10320
10321  ;;
10322esac
10323fi
10324TAIL=$ac_cv_path_TAIL
10325if test -n "$TAIL"; then
10326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10327$as_echo "$TAIL" >&6; }
10328else
10329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10330$as_echo "no" >&6; }
10331fi
10332
10333
10334  test -n "$TAIL" && break
10335done
10336
10337    else
10338      # If it succeeded, then it was overridden by the user. We will use it
10339      # for the tool.
10340
10341      # First remove it from the list of overridden variables, so we can test
10342      # for unknown variables in the end.
10343      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10344
10345      # Check if we try to supply an empty value
10346      if test "x$TAIL" = x; then
10347        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10348$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10350$as_echo_n "checking for TAIL... " >&6; }
10351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10352$as_echo "disabled" >&6; }
10353      else
10354        # Check if the provided tool contains a complete path.
10355        tool_specified="$TAIL"
10356        tool_basename="${tool_specified##*/}"
10357        if test "x$tool_basename" = "x$tool_specified"; then
10358          # A command without a complete path is provided, search $PATH.
10359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10360$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10361          # Extract the first word of "$tool_basename", so it can be a program name with args.
10362set dummy $tool_basename; ac_word=$2
10363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10364$as_echo_n "checking for $ac_word... " >&6; }
10365if ${ac_cv_path_TAIL+:} false; then :
10366  $as_echo_n "(cached) " >&6
10367else
10368  case $TAIL in
10369  [\\/]* | ?:[\\/]*)
10370  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10371  ;;
10372  *)
10373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10374for as_dir in $PATH
10375do
10376  IFS=$as_save_IFS
10377  test -z "$as_dir" && as_dir=.
10378    for ac_exec_ext in '' $ac_executable_extensions; do
10379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10380    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10382    break 2
10383  fi
10384done
10385  done
10386IFS=$as_save_IFS
10387
10388  ;;
10389esac
10390fi
10391TAIL=$ac_cv_path_TAIL
10392if test -n "$TAIL"; then
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10394$as_echo "$TAIL" >&6; }
10395else
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398fi
10399
10400
10401          if test "x$TAIL" = x; then
10402            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10403          fi
10404        else
10405          # Otherwise we believe it is a complete path. Use it as it is.
10406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10407$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10408          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10409$as_echo_n "checking for TAIL... " >&6; }
10410          if test ! -x "$tool_specified"; then
10411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10412$as_echo "not found" >&6; }
10413            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10414          fi
10415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10416$as_echo "$tool_specified" >&6; }
10417        fi
10418      fi
10419    fi
10420
10421  fi
10422
10423
10424
10425  if test "x$TAIL" = x; then
10426    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10427  fi
10428
10429
10430
10431
10432
10433  # Publish this variable in the help.
10434
10435
10436  if [ -z "${TAR+x}" ]; then
10437    # The variable is not set by user, try to locate tool using the code snippet
10438    for ac_prog in tar
10439do
10440  # Extract the first word of "$ac_prog", so it can be a program name with args.
10441set dummy $ac_prog; ac_word=$2
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443$as_echo_n "checking for $ac_word... " >&6; }
10444if ${ac_cv_path_TAR+:} false; then :
10445  $as_echo_n "(cached) " >&6
10446else
10447  case $TAR in
10448  [\\/]* | ?:[\\/]*)
10449  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10450  ;;
10451  *)
10452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453for as_dir in $PATH
10454do
10455  IFS=$as_save_IFS
10456  test -z "$as_dir" && as_dir=.
10457    for ac_exec_ext in '' $ac_executable_extensions; do
10458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10459    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461    break 2
10462  fi
10463done
10464  done
10465IFS=$as_save_IFS
10466
10467  ;;
10468esac
10469fi
10470TAR=$ac_cv_path_TAR
10471if test -n "$TAR"; then
10472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10473$as_echo "$TAR" >&6; }
10474else
10475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476$as_echo "no" >&6; }
10477fi
10478
10479
10480  test -n "$TAR" && break
10481done
10482
10483  else
10484    # The variable is set, but is it from the command line or the environment?
10485
10486    # Try to remove the string !TAR! from our list.
10487    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10488    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10489      # If it failed, the variable was not from the command line. Ignore it,
10490      # but warn the user (except for BASH, which is always set by the calling BASH).
10491      if test "xTAR" != xBASH; then
10492        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10493$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10494      fi
10495      # Try to locate tool using the code snippet
10496      for ac_prog in tar
10497do
10498  # Extract the first word of "$ac_prog", so it can be a program name with args.
10499set dummy $ac_prog; ac_word=$2
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10501$as_echo_n "checking for $ac_word... " >&6; }
10502if ${ac_cv_path_TAR+:} false; then :
10503  $as_echo_n "(cached) " >&6
10504else
10505  case $TAR in
10506  [\\/]* | ?:[\\/]*)
10507  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10508  ;;
10509  *)
10510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10511for as_dir in $PATH
10512do
10513  IFS=$as_save_IFS
10514  test -z "$as_dir" && as_dir=.
10515    for ac_exec_ext in '' $ac_executable_extensions; do
10516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10517    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10519    break 2
10520  fi
10521done
10522  done
10523IFS=$as_save_IFS
10524
10525  ;;
10526esac
10527fi
10528TAR=$ac_cv_path_TAR
10529if test -n "$TAR"; then
10530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10531$as_echo "$TAR" >&6; }
10532else
10533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10534$as_echo "no" >&6; }
10535fi
10536
10537
10538  test -n "$TAR" && break
10539done
10540
10541    else
10542      # If it succeeded, then it was overridden by the user. We will use it
10543      # for the tool.
10544
10545      # First remove it from the list of overridden variables, so we can test
10546      # for unknown variables in the end.
10547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10548
10549      # Check if we try to supply an empty value
10550      if test "x$TAR" = x; then
10551        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10552$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10554$as_echo_n "checking for TAR... " >&6; }
10555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10556$as_echo "disabled" >&6; }
10557      else
10558        # Check if the provided tool contains a complete path.
10559        tool_specified="$TAR"
10560        tool_basename="${tool_specified##*/}"
10561        if test "x$tool_basename" = "x$tool_specified"; then
10562          # A command without a complete path is provided, search $PATH.
10563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10564$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10565          # Extract the first word of "$tool_basename", so it can be a program name with args.
10566set dummy $tool_basename; ac_word=$2
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10568$as_echo_n "checking for $ac_word... " >&6; }
10569if ${ac_cv_path_TAR+:} false; then :
10570  $as_echo_n "(cached) " >&6
10571else
10572  case $TAR in
10573  [\\/]* | ?:[\\/]*)
10574  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10575  ;;
10576  *)
10577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10578for as_dir in $PATH
10579do
10580  IFS=$as_save_IFS
10581  test -z "$as_dir" && as_dir=.
10582    for ac_exec_ext in '' $ac_executable_extensions; do
10583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10584    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10586    break 2
10587  fi
10588done
10589  done
10590IFS=$as_save_IFS
10591
10592  ;;
10593esac
10594fi
10595TAR=$ac_cv_path_TAR
10596if test -n "$TAR"; then
10597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10598$as_echo "$TAR" >&6; }
10599else
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10601$as_echo "no" >&6; }
10602fi
10603
10604
10605          if test "x$TAR" = x; then
10606            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10607          fi
10608        else
10609          # Otherwise we believe it is a complete path. Use it as it is.
10610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10611$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10612          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10613$as_echo_n "checking for TAR... " >&6; }
10614          if test ! -x "$tool_specified"; then
10615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10616$as_echo "not found" >&6; }
10617            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10618          fi
10619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10620$as_echo "$tool_specified" >&6; }
10621        fi
10622      fi
10623    fi
10624
10625  fi
10626
10627
10628
10629  if test "x$TAR" = x; then
10630    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10631  fi
10632
10633
10634
10635
10636
10637  # Publish this variable in the help.
10638
10639
10640  if [ -z "${TEE+x}" ]; then
10641    # The variable is not set by user, try to locate tool using the code snippet
10642    for ac_prog in tee
10643do
10644  # Extract the first word of "$ac_prog", so it can be a program name with args.
10645set dummy $ac_prog; ac_word=$2
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10647$as_echo_n "checking for $ac_word... " >&6; }
10648if ${ac_cv_path_TEE+:} false; then :
10649  $as_echo_n "(cached) " >&6
10650else
10651  case $TEE in
10652  [\\/]* | ?:[\\/]*)
10653  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10654  ;;
10655  *)
10656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10657for as_dir in $PATH
10658do
10659  IFS=$as_save_IFS
10660  test -z "$as_dir" && as_dir=.
10661    for ac_exec_ext in '' $ac_executable_extensions; do
10662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10663    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10665    break 2
10666  fi
10667done
10668  done
10669IFS=$as_save_IFS
10670
10671  ;;
10672esac
10673fi
10674TEE=$ac_cv_path_TEE
10675if test -n "$TEE"; then
10676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10677$as_echo "$TEE" >&6; }
10678else
10679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680$as_echo "no" >&6; }
10681fi
10682
10683
10684  test -n "$TEE" && break
10685done
10686
10687  else
10688    # The variable is set, but is it from the command line or the environment?
10689
10690    # Try to remove the string !TEE! from our list.
10691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10693      # If it failed, the variable was not from the command line. Ignore it,
10694      # but warn the user (except for BASH, which is always set by the calling BASH).
10695      if test "xTEE" != xBASH; then
10696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10697$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10698      fi
10699      # Try to locate tool using the code snippet
10700      for ac_prog in tee
10701do
10702  # Extract the first word of "$ac_prog", so it can be a program name with args.
10703set dummy $ac_prog; ac_word=$2
10704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10705$as_echo_n "checking for $ac_word... " >&6; }
10706if ${ac_cv_path_TEE+:} false; then :
10707  $as_echo_n "(cached) " >&6
10708else
10709  case $TEE in
10710  [\\/]* | ?:[\\/]*)
10711  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10712  ;;
10713  *)
10714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10715for as_dir in $PATH
10716do
10717  IFS=$as_save_IFS
10718  test -z "$as_dir" && as_dir=.
10719    for ac_exec_ext in '' $ac_executable_extensions; do
10720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10721    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10723    break 2
10724  fi
10725done
10726  done
10727IFS=$as_save_IFS
10728
10729  ;;
10730esac
10731fi
10732TEE=$ac_cv_path_TEE
10733if test -n "$TEE"; then
10734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10735$as_echo "$TEE" >&6; }
10736else
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
10739fi
10740
10741
10742  test -n "$TEE" && break
10743done
10744
10745    else
10746      # If it succeeded, then it was overridden by the user. We will use it
10747      # for the tool.
10748
10749      # First remove it from the list of overridden variables, so we can test
10750      # for unknown variables in the end.
10751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10752
10753      # Check if we try to supply an empty value
10754      if test "x$TEE" = x; then
10755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10756$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10758$as_echo_n "checking for TEE... " >&6; }
10759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10760$as_echo "disabled" >&6; }
10761      else
10762        # Check if the provided tool contains a complete path.
10763        tool_specified="$TEE"
10764        tool_basename="${tool_specified##*/}"
10765        if test "x$tool_basename" = "x$tool_specified"; then
10766          # A command without a complete path is provided, search $PATH.
10767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10768$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10769          # Extract the first word of "$tool_basename", so it can be a program name with args.
10770set dummy $tool_basename; ac_word=$2
10771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10772$as_echo_n "checking for $ac_word... " >&6; }
10773if ${ac_cv_path_TEE+:} false; then :
10774  $as_echo_n "(cached) " >&6
10775else
10776  case $TEE in
10777  [\\/]* | ?:[\\/]*)
10778  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10779  ;;
10780  *)
10781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10782for as_dir in $PATH
10783do
10784  IFS=$as_save_IFS
10785  test -z "$as_dir" && as_dir=.
10786    for ac_exec_ext in '' $ac_executable_extensions; do
10787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10788    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10790    break 2
10791  fi
10792done
10793  done
10794IFS=$as_save_IFS
10795
10796  ;;
10797esac
10798fi
10799TEE=$ac_cv_path_TEE
10800if test -n "$TEE"; then
10801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10802$as_echo "$TEE" >&6; }
10803else
10804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10805$as_echo "no" >&6; }
10806fi
10807
10808
10809          if test "x$TEE" = x; then
10810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10811          fi
10812        else
10813          # Otherwise we believe it is a complete path. Use it as it is.
10814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10815$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10817$as_echo_n "checking for TEE... " >&6; }
10818          if test ! -x "$tool_specified"; then
10819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10820$as_echo "not found" >&6; }
10821            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10822          fi
10823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10824$as_echo "$tool_specified" >&6; }
10825        fi
10826      fi
10827    fi
10828
10829  fi
10830
10831
10832
10833  if test "x$TEE" = x; then
10834    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10835  fi
10836
10837
10838
10839
10840
10841  # Publish this variable in the help.
10842
10843
10844  if [ -z "${TOUCH+x}" ]; then
10845    # The variable is not set by user, try to locate tool using the code snippet
10846    for ac_prog in touch
10847do
10848  # Extract the first word of "$ac_prog", so it can be a program name with args.
10849set dummy $ac_prog; ac_word=$2
10850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10851$as_echo_n "checking for $ac_word... " >&6; }
10852if ${ac_cv_path_TOUCH+:} false; then :
10853  $as_echo_n "(cached) " >&6
10854else
10855  case $TOUCH in
10856  [\\/]* | ?:[\\/]*)
10857  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10858  ;;
10859  *)
10860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10861for as_dir in $PATH
10862do
10863  IFS=$as_save_IFS
10864  test -z "$as_dir" && as_dir=.
10865    for ac_exec_ext in '' $ac_executable_extensions; do
10866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10867    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10869    break 2
10870  fi
10871done
10872  done
10873IFS=$as_save_IFS
10874
10875  ;;
10876esac
10877fi
10878TOUCH=$ac_cv_path_TOUCH
10879if test -n "$TOUCH"; then
10880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10881$as_echo "$TOUCH" >&6; }
10882else
10883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10884$as_echo "no" >&6; }
10885fi
10886
10887
10888  test -n "$TOUCH" && break
10889done
10890
10891  else
10892    # The variable is set, but is it from the command line or the environment?
10893
10894    # Try to remove the string !TOUCH! from our list.
10895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10897      # If it failed, the variable was not from the command line. Ignore it,
10898      # but warn the user (except for BASH, which is always set by the calling BASH).
10899      if test "xTOUCH" != xBASH; then
10900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10901$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10902      fi
10903      # Try to locate tool using the code snippet
10904      for ac_prog in touch
10905do
10906  # Extract the first word of "$ac_prog", so it can be a program name with args.
10907set dummy $ac_prog; ac_word=$2
10908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10909$as_echo_n "checking for $ac_word... " >&6; }
10910if ${ac_cv_path_TOUCH+:} false; then :
10911  $as_echo_n "(cached) " >&6
10912else
10913  case $TOUCH in
10914  [\\/]* | ?:[\\/]*)
10915  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10916  ;;
10917  *)
10918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10919for as_dir in $PATH
10920do
10921  IFS=$as_save_IFS
10922  test -z "$as_dir" && as_dir=.
10923    for ac_exec_ext in '' $ac_executable_extensions; do
10924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10925    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10927    break 2
10928  fi
10929done
10930  done
10931IFS=$as_save_IFS
10932
10933  ;;
10934esac
10935fi
10936TOUCH=$ac_cv_path_TOUCH
10937if test -n "$TOUCH"; then
10938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10939$as_echo "$TOUCH" >&6; }
10940else
10941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10942$as_echo "no" >&6; }
10943fi
10944
10945
10946  test -n "$TOUCH" && break
10947done
10948
10949    else
10950      # If it succeeded, then it was overridden by the user. We will use it
10951      # for the tool.
10952
10953      # First remove it from the list of overridden variables, so we can test
10954      # for unknown variables in the end.
10955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10956
10957      # Check if we try to supply an empty value
10958      if test "x$TOUCH" = x; then
10959        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10960$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10962$as_echo_n "checking for TOUCH... " >&6; }
10963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10964$as_echo "disabled" >&6; }
10965      else
10966        # Check if the provided tool contains a complete path.
10967        tool_specified="$TOUCH"
10968        tool_basename="${tool_specified##*/}"
10969        if test "x$tool_basename" = "x$tool_specified"; then
10970          # A command without a complete path is provided, search $PATH.
10971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10972$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10973          # Extract the first word of "$tool_basename", so it can be a program name with args.
10974set dummy $tool_basename; ac_word=$2
10975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10976$as_echo_n "checking for $ac_word... " >&6; }
10977if ${ac_cv_path_TOUCH+:} false; then :
10978  $as_echo_n "(cached) " >&6
10979else
10980  case $TOUCH in
10981  [\\/]* | ?:[\\/]*)
10982  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10983  ;;
10984  *)
10985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10986for as_dir in $PATH
10987do
10988  IFS=$as_save_IFS
10989  test -z "$as_dir" && as_dir=.
10990    for ac_exec_ext in '' $ac_executable_extensions; do
10991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10992    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10994    break 2
10995  fi
10996done
10997  done
10998IFS=$as_save_IFS
10999
11000  ;;
11001esac
11002fi
11003TOUCH=$ac_cv_path_TOUCH
11004if test -n "$TOUCH"; then
11005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11006$as_echo "$TOUCH" >&6; }
11007else
11008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11009$as_echo "no" >&6; }
11010fi
11011
11012
11013          if test "x$TOUCH" = x; then
11014            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11015          fi
11016        else
11017          # Otherwise we believe it is a complete path. Use it as it is.
11018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11019$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11020          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11021$as_echo_n "checking for TOUCH... " >&6; }
11022          if test ! -x "$tool_specified"; then
11023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11024$as_echo "not found" >&6; }
11025            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11026          fi
11027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11028$as_echo "$tool_specified" >&6; }
11029        fi
11030      fi
11031    fi
11032
11033  fi
11034
11035
11036
11037  if test "x$TOUCH" = x; then
11038    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11039  fi
11040
11041
11042
11043
11044
11045  # Publish this variable in the help.
11046
11047
11048  if [ -z "${TR+x}" ]; then
11049    # The variable is not set by user, try to locate tool using the code snippet
11050    for ac_prog in tr
11051do
11052  # Extract the first word of "$ac_prog", so it can be a program name with args.
11053set dummy $ac_prog; ac_word=$2
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11055$as_echo_n "checking for $ac_word... " >&6; }
11056if ${ac_cv_path_TR+:} false; then :
11057  $as_echo_n "(cached) " >&6
11058else
11059  case $TR in
11060  [\\/]* | ?:[\\/]*)
11061  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11062  ;;
11063  *)
11064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11065for as_dir in $PATH
11066do
11067  IFS=$as_save_IFS
11068  test -z "$as_dir" && as_dir=.
11069    for ac_exec_ext in '' $ac_executable_extensions; do
11070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11071    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11073    break 2
11074  fi
11075done
11076  done
11077IFS=$as_save_IFS
11078
11079  ;;
11080esac
11081fi
11082TR=$ac_cv_path_TR
11083if test -n "$TR"; then
11084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11085$as_echo "$TR" >&6; }
11086else
11087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088$as_echo "no" >&6; }
11089fi
11090
11091
11092  test -n "$TR" && break
11093done
11094
11095  else
11096    # The variable is set, but is it from the command line or the environment?
11097
11098    # Try to remove the string !TR! from our list.
11099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11101      # If it failed, the variable was not from the command line. Ignore it,
11102      # but warn the user (except for BASH, which is always set by the calling BASH).
11103      if test "xTR" != xBASH; then
11104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11105$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11106      fi
11107      # Try to locate tool using the code snippet
11108      for ac_prog in tr
11109do
11110  # Extract the first word of "$ac_prog", so it can be a program name with args.
11111set dummy $ac_prog; ac_word=$2
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11113$as_echo_n "checking for $ac_word... " >&6; }
11114if ${ac_cv_path_TR+:} false; then :
11115  $as_echo_n "(cached) " >&6
11116else
11117  case $TR in
11118  [\\/]* | ?:[\\/]*)
11119  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11120  ;;
11121  *)
11122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11123for as_dir in $PATH
11124do
11125  IFS=$as_save_IFS
11126  test -z "$as_dir" && as_dir=.
11127    for ac_exec_ext in '' $ac_executable_extensions; do
11128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11129    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11131    break 2
11132  fi
11133done
11134  done
11135IFS=$as_save_IFS
11136
11137  ;;
11138esac
11139fi
11140TR=$ac_cv_path_TR
11141if test -n "$TR"; then
11142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11143$as_echo "$TR" >&6; }
11144else
11145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11146$as_echo "no" >&6; }
11147fi
11148
11149
11150  test -n "$TR" && break
11151done
11152
11153    else
11154      # If it succeeded, then it was overridden by the user. We will use it
11155      # for the tool.
11156
11157      # First remove it from the list of overridden variables, so we can test
11158      # for unknown variables in the end.
11159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11160
11161      # Check if we try to supply an empty value
11162      if test "x$TR" = x; then
11163        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11164$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11166$as_echo_n "checking for TR... " >&6; }
11167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11168$as_echo "disabled" >&6; }
11169      else
11170        # Check if the provided tool contains a complete path.
11171        tool_specified="$TR"
11172        tool_basename="${tool_specified##*/}"
11173        if test "x$tool_basename" = "x$tool_specified"; then
11174          # A command without a complete path is provided, search $PATH.
11175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11176$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11177          # Extract the first word of "$tool_basename", so it can be a program name with args.
11178set dummy $tool_basename; ac_word=$2
11179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11180$as_echo_n "checking for $ac_word... " >&6; }
11181if ${ac_cv_path_TR+:} false; then :
11182  $as_echo_n "(cached) " >&6
11183else
11184  case $TR in
11185  [\\/]* | ?:[\\/]*)
11186  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11187  ;;
11188  *)
11189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11190for as_dir in $PATH
11191do
11192  IFS=$as_save_IFS
11193  test -z "$as_dir" && as_dir=.
11194    for ac_exec_ext in '' $ac_executable_extensions; do
11195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11196    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11198    break 2
11199  fi
11200done
11201  done
11202IFS=$as_save_IFS
11203
11204  ;;
11205esac
11206fi
11207TR=$ac_cv_path_TR
11208if test -n "$TR"; then
11209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11210$as_echo "$TR" >&6; }
11211else
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
11214fi
11215
11216
11217          if test "x$TR" = x; then
11218            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11219          fi
11220        else
11221          # Otherwise we believe it is a complete path. Use it as it is.
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11223$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11224          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11225$as_echo_n "checking for TR... " >&6; }
11226          if test ! -x "$tool_specified"; then
11227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11228$as_echo "not found" >&6; }
11229            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11230          fi
11231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11232$as_echo "$tool_specified" >&6; }
11233        fi
11234      fi
11235    fi
11236
11237  fi
11238
11239
11240
11241  if test "x$TR" = x; then
11242    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11243  fi
11244
11245
11246
11247
11248
11249  # Publish this variable in the help.
11250
11251
11252  if [ -z "${UNAME+x}" ]; then
11253    # The variable is not set by user, try to locate tool using the code snippet
11254    for ac_prog in uname
11255do
11256  # Extract the first word of "$ac_prog", so it can be a program name with args.
11257set dummy $ac_prog; ac_word=$2
11258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11259$as_echo_n "checking for $ac_word... " >&6; }
11260if ${ac_cv_path_UNAME+:} false; then :
11261  $as_echo_n "(cached) " >&6
11262else
11263  case $UNAME in
11264  [\\/]* | ?:[\\/]*)
11265  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11266  ;;
11267  *)
11268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11269for as_dir in $PATH
11270do
11271  IFS=$as_save_IFS
11272  test -z "$as_dir" && as_dir=.
11273    for ac_exec_ext in '' $ac_executable_extensions; do
11274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11275    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11277    break 2
11278  fi
11279done
11280  done
11281IFS=$as_save_IFS
11282
11283  ;;
11284esac
11285fi
11286UNAME=$ac_cv_path_UNAME
11287if test -n "$UNAME"; then
11288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11289$as_echo "$UNAME" >&6; }
11290else
11291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
11293fi
11294
11295
11296  test -n "$UNAME" && break
11297done
11298
11299  else
11300    # The variable is set, but is it from the command line or the environment?
11301
11302    # Try to remove the string !UNAME! from our list.
11303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11305      # If it failed, the variable was not from the command line. Ignore it,
11306      # but warn the user (except for BASH, which is always set by the calling BASH).
11307      if test "xUNAME" != xBASH; then
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11309$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11310      fi
11311      # Try to locate tool using the code snippet
11312      for ac_prog in uname
11313do
11314  # Extract the first word of "$ac_prog", so it can be a program name with args.
11315set dummy $ac_prog; ac_word=$2
11316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11317$as_echo_n "checking for $ac_word... " >&6; }
11318if ${ac_cv_path_UNAME+:} false; then :
11319  $as_echo_n "(cached) " >&6
11320else
11321  case $UNAME in
11322  [\\/]* | ?:[\\/]*)
11323  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11324  ;;
11325  *)
11326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11327for as_dir in $PATH
11328do
11329  IFS=$as_save_IFS
11330  test -z "$as_dir" && as_dir=.
11331    for ac_exec_ext in '' $ac_executable_extensions; do
11332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11333    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11335    break 2
11336  fi
11337done
11338  done
11339IFS=$as_save_IFS
11340
11341  ;;
11342esac
11343fi
11344UNAME=$ac_cv_path_UNAME
11345if test -n "$UNAME"; then
11346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11347$as_echo "$UNAME" >&6; }
11348else
11349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
11351fi
11352
11353
11354  test -n "$UNAME" && break
11355done
11356
11357    else
11358      # If it succeeded, then it was overridden by the user. We will use it
11359      # for the tool.
11360
11361      # First remove it from the list of overridden variables, so we can test
11362      # for unknown variables in the end.
11363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11364
11365      # Check if we try to supply an empty value
11366      if test "x$UNAME" = x; then
11367        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11368$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11370$as_echo_n "checking for UNAME... " >&6; }
11371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11372$as_echo "disabled" >&6; }
11373      else
11374        # Check if the provided tool contains a complete path.
11375        tool_specified="$UNAME"
11376        tool_basename="${tool_specified##*/}"
11377        if test "x$tool_basename" = "x$tool_specified"; then
11378          # A command without a complete path is provided, search $PATH.
11379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11380$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11381          # Extract the first word of "$tool_basename", so it can be a program name with args.
11382set dummy $tool_basename; ac_word=$2
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11384$as_echo_n "checking for $ac_word... " >&6; }
11385if ${ac_cv_path_UNAME+:} false; then :
11386  $as_echo_n "(cached) " >&6
11387else
11388  case $UNAME in
11389  [\\/]* | ?:[\\/]*)
11390  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11391  ;;
11392  *)
11393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11394for as_dir in $PATH
11395do
11396  IFS=$as_save_IFS
11397  test -z "$as_dir" && as_dir=.
11398    for ac_exec_ext in '' $ac_executable_extensions; do
11399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11400    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11402    break 2
11403  fi
11404done
11405  done
11406IFS=$as_save_IFS
11407
11408  ;;
11409esac
11410fi
11411UNAME=$ac_cv_path_UNAME
11412if test -n "$UNAME"; then
11413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11414$as_echo "$UNAME" >&6; }
11415else
11416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
11418fi
11419
11420
11421          if test "x$UNAME" = x; then
11422            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11423          fi
11424        else
11425          # Otherwise we believe it is a complete path. Use it as it is.
11426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11427$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11429$as_echo_n "checking for UNAME... " >&6; }
11430          if test ! -x "$tool_specified"; then
11431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11432$as_echo "not found" >&6; }
11433            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11434          fi
11435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11436$as_echo "$tool_specified" >&6; }
11437        fi
11438      fi
11439    fi
11440
11441  fi
11442
11443
11444
11445  if test "x$UNAME" = x; then
11446    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11447  fi
11448
11449
11450
11451
11452
11453  # Publish this variable in the help.
11454
11455
11456  if [ -z "${UNIQ+x}" ]; then
11457    # The variable is not set by user, try to locate tool using the code snippet
11458    for ac_prog in uniq
11459do
11460  # Extract the first word of "$ac_prog", so it can be a program name with args.
11461set dummy $ac_prog; ac_word=$2
11462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11463$as_echo_n "checking for $ac_word... " >&6; }
11464if ${ac_cv_path_UNIQ+:} false; then :
11465  $as_echo_n "(cached) " >&6
11466else
11467  case $UNIQ in
11468  [\\/]* | ?:[\\/]*)
11469  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11470  ;;
11471  *)
11472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11473for as_dir in $PATH
11474do
11475  IFS=$as_save_IFS
11476  test -z "$as_dir" && as_dir=.
11477    for ac_exec_ext in '' $ac_executable_extensions; do
11478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11479    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11481    break 2
11482  fi
11483done
11484  done
11485IFS=$as_save_IFS
11486
11487  ;;
11488esac
11489fi
11490UNIQ=$ac_cv_path_UNIQ
11491if test -n "$UNIQ"; then
11492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11493$as_echo "$UNIQ" >&6; }
11494else
11495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
11497fi
11498
11499
11500  test -n "$UNIQ" && break
11501done
11502
11503  else
11504    # The variable is set, but is it from the command line or the environment?
11505
11506    # Try to remove the string !UNIQ! from our list.
11507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11509      # If it failed, the variable was not from the command line. Ignore it,
11510      # but warn the user (except for BASH, which is always set by the calling BASH).
11511      if test "xUNIQ" != xBASH; then
11512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11513$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11514      fi
11515      # Try to locate tool using the code snippet
11516      for ac_prog in uniq
11517do
11518  # Extract the first word of "$ac_prog", so it can be a program name with args.
11519set dummy $ac_prog; ac_word=$2
11520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11521$as_echo_n "checking for $ac_word... " >&6; }
11522if ${ac_cv_path_UNIQ+:} false; then :
11523  $as_echo_n "(cached) " >&6
11524else
11525  case $UNIQ in
11526  [\\/]* | ?:[\\/]*)
11527  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11528  ;;
11529  *)
11530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11531for as_dir in $PATH
11532do
11533  IFS=$as_save_IFS
11534  test -z "$as_dir" && as_dir=.
11535    for ac_exec_ext in '' $ac_executable_extensions; do
11536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11537    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11539    break 2
11540  fi
11541done
11542  done
11543IFS=$as_save_IFS
11544
11545  ;;
11546esac
11547fi
11548UNIQ=$ac_cv_path_UNIQ
11549if test -n "$UNIQ"; then
11550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11551$as_echo "$UNIQ" >&6; }
11552else
11553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
11555fi
11556
11557
11558  test -n "$UNIQ" && break
11559done
11560
11561    else
11562      # If it succeeded, then it was overridden by the user. We will use it
11563      # for the tool.
11564
11565      # First remove it from the list of overridden variables, so we can test
11566      # for unknown variables in the end.
11567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11568
11569      # Check if we try to supply an empty value
11570      if test "x$UNIQ" = x; then
11571        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11572$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11574$as_echo_n "checking for UNIQ... " >&6; }
11575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11576$as_echo "disabled" >&6; }
11577      else
11578        # Check if the provided tool contains a complete path.
11579        tool_specified="$UNIQ"
11580        tool_basename="${tool_specified##*/}"
11581        if test "x$tool_basename" = "x$tool_specified"; then
11582          # A command without a complete path is provided, search $PATH.
11583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11584$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11585          # Extract the first word of "$tool_basename", so it can be a program name with args.
11586set dummy $tool_basename; ac_word=$2
11587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11588$as_echo_n "checking for $ac_word... " >&6; }
11589if ${ac_cv_path_UNIQ+:} false; then :
11590  $as_echo_n "(cached) " >&6
11591else
11592  case $UNIQ in
11593  [\\/]* | ?:[\\/]*)
11594  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11595  ;;
11596  *)
11597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598for as_dir in $PATH
11599do
11600  IFS=$as_save_IFS
11601  test -z "$as_dir" && as_dir=.
11602    for ac_exec_ext in '' $ac_executable_extensions; do
11603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11604    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11606    break 2
11607  fi
11608done
11609  done
11610IFS=$as_save_IFS
11611
11612  ;;
11613esac
11614fi
11615UNIQ=$ac_cv_path_UNIQ
11616if test -n "$UNIQ"; then
11617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11618$as_echo "$UNIQ" >&6; }
11619else
11620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
11622fi
11623
11624
11625          if test "x$UNIQ" = x; then
11626            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11627          fi
11628        else
11629          # Otherwise we believe it is a complete path. Use it as it is.
11630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11631$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11632          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11633$as_echo_n "checking for UNIQ... " >&6; }
11634          if test ! -x "$tool_specified"; then
11635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11636$as_echo "not found" >&6; }
11637            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11638          fi
11639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11640$as_echo "$tool_specified" >&6; }
11641        fi
11642      fi
11643    fi
11644
11645  fi
11646
11647
11648
11649  if test "x$UNIQ" = x; then
11650    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11651  fi
11652
11653
11654
11655
11656
11657  # Publish this variable in the help.
11658
11659
11660  if [ -z "${WC+x}" ]; then
11661    # The variable is not set by user, try to locate tool using the code snippet
11662    for ac_prog in wc
11663do
11664  # Extract the first word of "$ac_prog", so it can be a program name with args.
11665set dummy $ac_prog; ac_word=$2
11666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11667$as_echo_n "checking for $ac_word... " >&6; }
11668if ${ac_cv_path_WC+:} false; then :
11669  $as_echo_n "(cached) " >&6
11670else
11671  case $WC in
11672  [\\/]* | ?:[\\/]*)
11673  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11674  ;;
11675  *)
11676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11677for as_dir in $PATH
11678do
11679  IFS=$as_save_IFS
11680  test -z "$as_dir" && as_dir=.
11681    for ac_exec_ext in '' $ac_executable_extensions; do
11682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11683    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11685    break 2
11686  fi
11687done
11688  done
11689IFS=$as_save_IFS
11690
11691  ;;
11692esac
11693fi
11694WC=$ac_cv_path_WC
11695if test -n "$WC"; then
11696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11697$as_echo "$WC" >&6; }
11698else
11699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
11701fi
11702
11703
11704  test -n "$WC" && break
11705done
11706
11707  else
11708    # The variable is set, but is it from the command line or the environment?
11709
11710    # Try to remove the string !WC! from our list.
11711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11713      # If it failed, the variable was not from the command line. Ignore it,
11714      # but warn the user (except for BASH, which is always set by the calling BASH).
11715      if test "xWC" != xBASH; then
11716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11717$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11718      fi
11719      # Try to locate tool using the code snippet
11720      for ac_prog in wc
11721do
11722  # Extract the first word of "$ac_prog", so it can be a program name with args.
11723set dummy $ac_prog; ac_word=$2
11724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11725$as_echo_n "checking for $ac_word... " >&6; }
11726if ${ac_cv_path_WC+:} false; then :
11727  $as_echo_n "(cached) " >&6
11728else
11729  case $WC in
11730  [\\/]* | ?:[\\/]*)
11731  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11732  ;;
11733  *)
11734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11735for as_dir in $PATH
11736do
11737  IFS=$as_save_IFS
11738  test -z "$as_dir" && as_dir=.
11739    for ac_exec_ext in '' $ac_executable_extensions; do
11740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11741    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11743    break 2
11744  fi
11745done
11746  done
11747IFS=$as_save_IFS
11748
11749  ;;
11750esac
11751fi
11752WC=$ac_cv_path_WC
11753if test -n "$WC"; then
11754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11755$as_echo "$WC" >&6; }
11756else
11757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11758$as_echo "no" >&6; }
11759fi
11760
11761
11762  test -n "$WC" && break
11763done
11764
11765    else
11766      # If it succeeded, then it was overridden by the user. We will use it
11767      # for the tool.
11768
11769      # First remove it from the list of overridden variables, so we can test
11770      # for unknown variables in the end.
11771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11772
11773      # Check if we try to supply an empty value
11774      if test "x$WC" = x; then
11775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11776$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11778$as_echo_n "checking for WC... " >&6; }
11779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11780$as_echo "disabled" >&6; }
11781      else
11782        # Check if the provided tool contains a complete path.
11783        tool_specified="$WC"
11784        tool_basename="${tool_specified##*/}"
11785        if test "x$tool_basename" = "x$tool_specified"; then
11786          # A command without a complete path is provided, search $PATH.
11787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11788$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11789          # Extract the first word of "$tool_basename", so it can be a program name with args.
11790set dummy $tool_basename; ac_word=$2
11791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11792$as_echo_n "checking for $ac_word... " >&6; }
11793if ${ac_cv_path_WC+:} false; then :
11794  $as_echo_n "(cached) " >&6
11795else
11796  case $WC in
11797  [\\/]* | ?:[\\/]*)
11798  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11799  ;;
11800  *)
11801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11802for as_dir in $PATH
11803do
11804  IFS=$as_save_IFS
11805  test -z "$as_dir" && as_dir=.
11806    for ac_exec_ext in '' $ac_executable_extensions; do
11807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11808    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11810    break 2
11811  fi
11812done
11813  done
11814IFS=$as_save_IFS
11815
11816  ;;
11817esac
11818fi
11819WC=$ac_cv_path_WC
11820if test -n "$WC"; then
11821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11822$as_echo "$WC" >&6; }
11823else
11824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11825$as_echo "no" >&6; }
11826fi
11827
11828
11829          if test "x$WC" = x; then
11830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11831          fi
11832        else
11833          # Otherwise we believe it is a complete path. Use it as it is.
11834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11835$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11837$as_echo_n "checking for WC... " >&6; }
11838          if test ! -x "$tool_specified"; then
11839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11840$as_echo "not found" >&6; }
11841            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11842          fi
11843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11844$as_echo "$tool_specified" >&6; }
11845        fi
11846      fi
11847    fi
11848
11849  fi
11850
11851
11852
11853  if test "x$WC" = x; then
11854    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11855  fi
11856
11857
11858
11859
11860
11861  # Publish this variable in the help.
11862
11863
11864  if [ -z "${WHICH+x}" ]; then
11865    # The variable is not set by user, try to locate tool using the code snippet
11866    for ac_prog in which
11867do
11868  # Extract the first word of "$ac_prog", so it can be a program name with args.
11869set dummy $ac_prog; ac_word=$2
11870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11871$as_echo_n "checking for $ac_word... " >&6; }
11872if ${ac_cv_path_WHICH+:} false; then :
11873  $as_echo_n "(cached) " >&6
11874else
11875  case $WHICH in
11876  [\\/]* | ?:[\\/]*)
11877  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11878  ;;
11879  *)
11880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11881for as_dir in $PATH
11882do
11883  IFS=$as_save_IFS
11884  test -z "$as_dir" && as_dir=.
11885    for ac_exec_ext in '' $ac_executable_extensions; do
11886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11887    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11889    break 2
11890  fi
11891done
11892  done
11893IFS=$as_save_IFS
11894
11895  ;;
11896esac
11897fi
11898WHICH=$ac_cv_path_WHICH
11899if test -n "$WHICH"; then
11900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11901$as_echo "$WHICH" >&6; }
11902else
11903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11904$as_echo "no" >&6; }
11905fi
11906
11907
11908  test -n "$WHICH" && break
11909done
11910
11911  else
11912    # The variable is set, but is it from the command line or the environment?
11913
11914    # Try to remove the string !WHICH! from our list.
11915    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11916    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11917      # If it failed, the variable was not from the command line. Ignore it,
11918      # but warn the user (except for BASH, which is always set by the calling BASH).
11919      if test "xWHICH" != xBASH; then
11920        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11921$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11922      fi
11923      # Try to locate tool using the code snippet
11924      for ac_prog in which
11925do
11926  # Extract the first word of "$ac_prog", so it can be a program name with args.
11927set dummy $ac_prog; ac_word=$2
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11929$as_echo_n "checking for $ac_word... " >&6; }
11930if ${ac_cv_path_WHICH+:} false; then :
11931  $as_echo_n "(cached) " >&6
11932else
11933  case $WHICH in
11934  [\\/]* | ?:[\\/]*)
11935  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11936  ;;
11937  *)
11938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11939for as_dir in $PATH
11940do
11941  IFS=$as_save_IFS
11942  test -z "$as_dir" && as_dir=.
11943    for ac_exec_ext in '' $ac_executable_extensions; do
11944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11945    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11947    break 2
11948  fi
11949done
11950  done
11951IFS=$as_save_IFS
11952
11953  ;;
11954esac
11955fi
11956WHICH=$ac_cv_path_WHICH
11957if test -n "$WHICH"; then
11958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11959$as_echo "$WHICH" >&6; }
11960else
11961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
11963fi
11964
11965
11966  test -n "$WHICH" && break
11967done
11968
11969    else
11970      # If it succeeded, then it was overridden by the user. We will use it
11971      # for the tool.
11972
11973      # First remove it from the list of overridden variables, so we can test
11974      # for unknown variables in the end.
11975      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11976
11977      # Check if we try to supply an empty value
11978      if test "x$WHICH" = x; then
11979        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11980$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11982$as_echo_n "checking for WHICH... " >&6; }
11983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11984$as_echo "disabled" >&6; }
11985      else
11986        # Check if the provided tool contains a complete path.
11987        tool_specified="$WHICH"
11988        tool_basename="${tool_specified##*/}"
11989        if test "x$tool_basename" = "x$tool_specified"; then
11990          # A command without a complete path is provided, search $PATH.
11991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11992$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11993          # Extract the first word of "$tool_basename", so it can be a program name with args.
11994set dummy $tool_basename; ac_word=$2
11995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11996$as_echo_n "checking for $ac_word... " >&6; }
11997if ${ac_cv_path_WHICH+:} false; then :
11998  $as_echo_n "(cached) " >&6
11999else
12000  case $WHICH in
12001  [\\/]* | ?:[\\/]*)
12002  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12003  ;;
12004  *)
12005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12006for as_dir in $PATH
12007do
12008  IFS=$as_save_IFS
12009  test -z "$as_dir" && as_dir=.
12010    for ac_exec_ext in '' $ac_executable_extensions; do
12011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12012    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12014    break 2
12015  fi
12016done
12017  done
12018IFS=$as_save_IFS
12019
12020  ;;
12021esac
12022fi
12023WHICH=$ac_cv_path_WHICH
12024if test -n "$WHICH"; then
12025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12026$as_echo "$WHICH" >&6; }
12027else
12028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12029$as_echo "no" >&6; }
12030fi
12031
12032
12033          if test "x$WHICH" = x; then
12034            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12035          fi
12036        else
12037          # Otherwise we believe it is a complete path. Use it as it is.
12038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12039$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12040          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12041$as_echo_n "checking for WHICH... " >&6; }
12042          if test ! -x "$tool_specified"; then
12043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12044$as_echo "not found" >&6; }
12045            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12046          fi
12047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12048$as_echo "$tool_specified" >&6; }
12049        fi
12050      fi
12051    fi
12052
12053  fi
12054
12055
12056
12057  if test "x$WHICH" = x; then
12058    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12059  fi
12060
12061
12062
12063
12064
12065  # Publish this variable in the help.
12066
12067
12068  if [ -z "${XARGS+x}" ]; then
12069    # The variable is not set by user, try to locate tool using the code snippet
12070    for ac_prog in xargs
12071do
12072  # Extract the first word of "$ac_prog", so it can be a program name with args.
12073set dummy $ac_prog; ac_word=$2
12074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12075$as_echo_n "checking for $ac_word... " >&6; }
12076if ${ac_cv_path_XARGS+:} false; then :
12077  $as_echo_n "(cached) " >&6
12078else
12079  case $XARGS in
12080  [\\/]* | ?:[\\/]*)
12081  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12082  ;;
12083  *)
12084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12085for as_dir in $PATH
12086do
12087  IFS=$as_save_IFS
12088  test -z "$as_dir" && as_dir=.
12089    for ac_exec_ext in '' $ac_executable_extensions; do
12090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12091    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12093    break 2
12094  fi
12095done
12096  done
12097IFS=$as_save_IFS
12098
12099  ;;
12100esac
12101fi
12102XARGS=$ac_cv_path_XARGS
12103if test -n "$XARGS"; then
12104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12105$as_echo "$XARGS" >&6; }
12106else
12107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12108$as_echo "no" >&6; }
12109fi
12110
12111
12112  test -n "$XARGS" && break
12113done
12114
12115  else
12116    # The variable is set, but is it from the command line or the environment?
12117
12118    # Try to remove the string !XARGS! from our list.
12119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12121      # If it failed, the variable was not from the command line. Ignore it,
12122      # but warn the user (except for BASH, which is always set by the calling BASH).
12123      if test "xXARGS" != xBASH; then
12124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12125$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12126      fi
12127      # Try to locate tool using the code snippet
12128      for ac_prog in xargs
12129do
12130  # Extract the first word of "$ac_prog", so it can be a program name with args.
12131set dummy $ac_prog; ac_word=$2
12132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12133$as_echo_n "checking for $ac_word... " >&6; }
12134if ${ac_cv_path_XARGS+:} false; then :
12135  $as_echo_n "(cached) " >&6
12136else
12137  case $XARGS in
12138  [\\/]* | ?:[\\/]*)
12139  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12140  ;;
12141  *)
12142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12143for as_dir in $PATH
12144do
12145  IFS=$as_save_IFS
12146  test -z "$as_dir" && as_dir=.
12147    for ac_exec_ext in '' $ac_executable_extensions; do
12148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12149    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12151    break 2
12152  fi
12153done
12154  done
12155IFS=$as_save_IFS
12156
12157  ;;
12158esac
12159fi
12160XARGS=$ac_cv_path_XARGS
12161if test -n "$XARGS"; then
12162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12163$as_echo "$XARGS" >&6; }
12164else
12165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12166$as_echo "no" >&6; }
12167fi
12168
12169
12170  test -n "$XARGS" && break
12171done
12172
12173    else
12174      # If it succeeded, then it was overridden by the user. We will use it
12175      # for the tool.
12176
12177      # First remove it from the list of overridden variables, so we can test
12178      # for unknown variables in the end.
12179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12180
12181      # Check if we try to supply an empty value
12182      if test "x$XARGS" = x; then
12183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12184$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12186$as_echo_n "checking for XARGS... " >&6; }
12187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12188$as_echo "disabled" >&6; }
12189      else
12190        # Check if the provided tool contains a complete path.
12191        tool_specified="$XARGS"
12192        tool_basename="${tool_specified##*/}"
12193        if test "x$tool_basename" = "x$tool_specified"; then
12194          # A command without a complete path is provided, search $PATH.
12195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12196$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12197          # Extract the first word of "$tool_basename", so it can be a program name with args.
12198set dummy $tool_basename; ac_word=$2
12199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12200$as_echo_n "checking for $ac_word... " >&6; }
12201if ${ac_cv_path_XARGS+:} false; then :
12202  $as_echo_n "(cached) " >&6
12203else
12204  case $XARGS in
12205  [\\/]* | ?:[\\/]*)
12206  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12207  ;;
12208  *)
12209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12210for as_dir in $PATH
12211do
12212  IFS=$as_save_IFS
12213  test -z "$as_dir" && as_dir=.
12214    for ac_exec_ext in '' $ac_executable_extensions; do
12215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12216    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12218    break 2
12219  fi
12220done
12221  done
12222IFS=$as_save_IFS
12223
12224  ;;
12225esac
12226fi
12227XARGS=$ac_cv_path_XARGS
12228if test -n "$XARGS"; then
12229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12230$as_echo "$XARGS" >&6; }
12231else
12232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12233$as_echo "no" >&6; }
12234fi
12235
12236
12237          if test "x$XARGS" = x; then
12238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12239          fi
12240        else
12241          # Otherwise we believe it is a complete path. Use it as it is.
12242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12243$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12245$as_echo_n "checking for XARGS... " >&6; }
12246          if test ! -x "$tool_specified"; then
12247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12248$as_echo "not found" >&6; }
12249            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12250          fi
12251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12252$as_echo "$tool_specified" >&6; }
12253        fi
12254      fi
12255    fi
12256
12257  fi
12258
12259
12260
12261  if test "x$XARGS" = x; then
12262    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12263  fi
12264
12265
12266
12267  # Then required tools that require some special treatment.
12268
12269
12270  # Publish this variable in the help.
12271
12272
12273  if [ -z "${AWK+x}" ]; then
12274    # The variable is not set by user, try to locate tool using the code snippet
12275    for ac_prog in gawk mawk nawk awk
12276do
12277  # Extract the first word of "$ac_prog", so it can be a program name with args.
12278set dummy $ac_prog; ac_word=$2
12279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12280$as_echo_n "checking for $ac_word... " >&6; }
12281if ${ac_cv_prog_AWK+:} false; then :
12282  $as_echo_n "(cached) " >&6
12283else
12284  if test -n "$AWK"; then
12285  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12286else
12287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12288for as_dir in $PATH
12289do
12290  IFS=$as_save_IFS
12291  test -z "$as_dir" && as_dir=.
12292    for ac_exec_ext in '' $ac_executable_extensions; do
12293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12294    ac_cv_prog_AWK="$ac_prog"
12295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12296    break 2
12297  fi
12298done
12299  done
12300IFS=$as_save_IFS
12301
12302fi
12303fi
12304AWK=$ac_cv_prog_AWK
12305if test -n "$AWK"; then
12306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12307$as_echo "$AWK" >&6; }
12308else
12309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12310$as_echo "no" >&6; }
12311fi
12312
12313
12314  test -n "$AWK" && break
12315done
12316
12317  else
12318    # The variable is set, but is it from the command line or the environment?
12319
12320    # Try to remove the string !AWK! from our list.
12321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12323      # If it failed, the variable was not from the command line. Ignore it,
12324      # but warn the user (except for BASH, which is always set by the calling BASH).
12325      if test "xAWK" != xBASH; then
12326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12327$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12328      fi
12329      # Try to locate tool using the code snippet
12330      for ac_prog in gawk mawk nawk awk
12331do
12332  # Extract the first word of "$ac_prog", so it can be a program name with args.
12333set dummy $ac_prog; ac_word=$2
12334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12335$as_echo_n "checking for $ac_word... " >&6; }
12336if ${ac_cv_prog_AWK+:} false; then :
12337  $as_echo_n "(cached) " >&6
12338else
12339  if test -n "$AWK"; then
12340  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12341else
12342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12343for as_dir in $PATH
12344do
12345  IFS=$as_save_IFS
12346  test -z "$as_dir" && as_dir=.
12347    for ac_exec_ext in '' $ac_executable_extensions; do
12348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12349    ac_cv_prog_AWK="$ac_prog"
12350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12351    break 2
12352  fi
12353done
12354  done
12355IFS=$as_save_IFS
12356
12357fi
12358fi
12359AWK=$ac_cv_prog_AWK
12360if test -n "$AWK"; then
12361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12362$as_echo "$AWK" >&6; }
12363else
12364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12365$as_echo "no" >&6; }
12366fi
12367
12368
12369  test -n "$AWK" && break
12370done
12371
12372    else
12373      # If it succeeded, then it was overridden by the user. We will use it
12374      # for the tool.
12375
12376      # First remove it from the list of overridden variables, so we can test
12377      # for unknown variables in the end.
12378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12379
12380      # Check if we try to supply an empty value
12381      if test "x$AWK" = x; then
12382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12383$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12385$as_echo_n "checking for AWK... " >&6; }
12386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12387$as_echo "disabled" >&6; }
12388      else
12389        # Check if the provided tool contains a complete path.
12390        tool_specified="$AWK"
12391        tool_basename="${tool_specified##*/}"
12392        if test "x$tool_basename" = "x$tool_specified"; then
12393          # A command without a complete path is provided, search $PATH.
12394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12395$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12396          # Extract the first word of "$tool_basename", so it can be a program name with args.
12397set dummy $tool_basename; ac_word=$2
12398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12399$as_echo_n "checking for $ac_word... " >&6; }
12400if ${ac_cv_path_AWK+:} false; then :
12401  $as_echo_n "(cached) " >&6
12402else
12403  case $AWK in
12404  [\\/]* | ?:[\\/]*)
12405  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12406  ;;
12407  *)
12408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12409for as_dir in $PATH
12410do
12411  IFS=$as_save_IFS
12412  test -z "$as_dir" && as_dir=.
12413    for ac_exec_ext in '' $ac_executable_extensions; do
12414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12415    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12417    break 2
12418  fi
12419done
12420  done
12421IFS=$as_save_IFS
12422
12423  ;;
12424esac
12425fi
12426AWK=$ac_cv_path_AWK
12427if test -n "$AWK"; then
12428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12429$as_echo "$AWK" >&6; }
12430else
12431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12432$as_echo "no" >&6; }
12433fi
12434
12435
12436          if test "x$AWK" = x; then
12437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12438          fi
12439        else
12440          # Otherwise we believe it is a complete path. Use it as it is.
12441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12442$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12444$as_echo_n "checking for AWK... " >&6; }
12445          if test ! -x "$tool_specified"; then
12446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12447$as_echo "not found" >&6; }
12448            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12449          fi
12450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12451$as_echo "$tool_specified" >&6; }
12452        fi
12453      fi
12454    fi
12455
12456  fi
12457
12458
12459  if test "x$AWK" = x; then
12460    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12461  fi
12462
12463
12464
12465
12466  # Publish this variable in the help.
12467
12468
12469  if [ -z "${GREP+x}" ]; then
12470    # The variable is not set by user, try to locate tool using the code snippet
12471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12472$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12473if ${ac_cv_path_GREP+:} false; then :
12474  $as_echo_n "(cached) " >&6
12475else
12476  if test -z "$GREP"; then
12477  ac_path_GREP_found=false
12478  # Loop through the user's path and test for each of PROGNAME-LIST
12479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12480for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12481do
12482  IFS=$as_save_IFS
12483  test -z "$as_dir" && as_dir=.
12484    for ac_prog in grep ggrep; do
12485    for ac_exec_ext in '' $ac_executable_extensions; do
12486      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12487      as_fn_executable_p "$ac_path_GREP" || continue
12488# Check for GNU ac_path_GREP and select it if it is found.
12489  # Check for GNU $ac_path_GREP
12490case `"$ac_path_GREP" --version 2>&1` in
12491*GNU*)
12492  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12493*)
12494  ac_count=0
12495  $as_echo_n 0123456789 >"conftest.in"
12496  while :
12497  do
12498    cat "conftest.in" "conftest.in" >"conftest.tmp"
12499    mv "conftest.tmp" "conftest.in"
12500    cp "conftest.in" "conftest.nl"
12501    $as_echo 'GREP' >> "conftest.nl"
12502    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12503    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12504    as_fn_arith $ac_count + 1 && ac_count=$as_val
12505    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12506      # Best one so far, save it but keep looking for a better one
12507      ac_cv_path_GREP="$ac_path_GREP"
12508      ac_path_GREP_max=$ac_count
12509    fi
12510    # 10*(2^10) chars as input seems more than enough
12511    test $ac_count -gt 10 && break
12512  done
12513  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12514esac
12515
12516      $ac_path_GREP_found && break 3
12517    done
12518  done
12519  done
12520IFS=$as_save_IFS
12521  if test -z "$ac_cv_path_GREP"; then
12522    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12523  fi
12524else
12525  ac_cv_path_GREP=$GREP
12526fi
12527
12528fi
12529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12530$as_echo "$ac_cv_path_GREP" >&6; }
12531 GREP="$ac_cv_path_GREP"
12532
12533
12534  else
12535    # The variable is set, but is it from the command line or the environment?
12536
12537    # Try to remove the string !GREP! from our list.
12538    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12539    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12540      # If it failed, the variable was not from the command line. Ignore it,
12541      # but warn the user (except for BASH, which is always set by the calling BASH).
12542      if test "xGREP" != xBASH; then
12543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12544$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12545      fi
12546      # Try to locate tool using the code snippet
12547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12548$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12549if ${ac_cv_path_GREP+:} false; then :
12550  $as_echo_n "(cached) " >&6
12551else
12552  if test -z "$GREP"; then
12553  ac_path_GREP_found=false
12554  # Loop through the user's path and test for each of PROGNAME-LIST
12555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12556for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12557do
12558  IFS=$as_save_IFS
12559  test -z "$as_dir" && as_dir=.
12560    for ac_prog in grep ggrep; do
12561    for ac_exec_ext in '' $ac_executable_extensions; do
12562      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12563      as_fn_executable_p "$ac_path_GREP" || continue
12564# Check for GNU ac_path_GREP and select it if it is found.
12565  # Check for GNU $ac_path_GREP
12566case `"$ac_path_GREP" --version 2>&1` in
12567*GNU*)
12568  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12569*)
12570  ac_count=0
12571  $as_echo_n 0123456789 >"conftest.in"
12572  while :
12573  do
12574    cat "conftest.in" "conftest.in" >"conftest.tmp"
12575    mv "conftest.tmp" "conftest.in"
12576    cp "conftest.in" "conftest.nl"
12577    $as_echo 'GREP' >> "conftest.nl"
12578    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12579    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12580    as_fn_arith $ac_count + 1 && ac_count=$as_val
12581    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12582      # Best one so far, save it but keep looking for a better one
12583      ac_cv_path_GREP="$ac_path_GREP"
12584      ac_path_GREP_max=$ac_count
12585    fi
12586    # 10*(2^10) chars as input seems more than enough
12587    test $ac_count -gt 10 && break
12588  done
12589  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12590esac
12591
12592      $ac_path_GREP_found && break 3
12593    done
12594  done
12595  done
12596IFS=$as_save_IFS
12597  if test -z "$ac_cv_path_GREP"; then
12598    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12599  fi
12600else
12601  ac_cv_path_GREP=$GREP
12602fi
12603
12604fi
12605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12606$as_echo "$ac_cv_path_GREP" >&6; }
12607 GREP="$ac_cv_path_GREP"
12608
12609
12610    else
12611      # If it succeeded, then it was overridden by the user. We will use it
12612      # for the tool.
12613
12614      # First remove it from the list of overridden variables, so we can test
12615      # for unknown variables in the end.
12616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12617
12618      # Check if we try to supply an empty value
12619      if test "x$GREP" = x; then
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12621$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12623$as_echo_n "checking for GREP... " >&6; }
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12625$as_echo "disabled" >&6; }
12626      else
12627        # Check if the provided tool contains a complete path.
12628        tool_specified="$GREP"
12629        tool_basename="${tool_specified##*/}"
12630        if test "x$tool_basename" = "x$tool_specified"; then
12631          # A command without a complete path is provided, search $PATH.
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12633$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12634          # Extract the first word of "$tool_basename", so it can be a program name with args.
12635set dummy $tool_basename; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_GREP+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $GREP in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664GREP=$ac_cv_path_GREP
12665if test -n "$GREP"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12667$as_echo "$GREP" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674          if test "x$GREP" = x; then
12675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12676          fi
12677        else
12678          # Otherwise we believe it is a complete path. Use it as it is.
12679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12680$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12682$as_echo_n "checking for GREP... " >&6; }
12683          if test ! -x "$tool_specified"; then
12684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12685$as_echo "not found" >&6; }
12686            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12687          fi
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12689$as_echo "$tool_specified" >&6; }
12690        fi
12691      fi
12692    fi
12693
12694  fi
12695
12696
12697  if test "x$GREP" = x; then
12698    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12699  fi
12700
12701
12702
12703
12704  # Publish this variable in the help.
12705
12706
12707  if [ -z "${EGREP+x}" ]; then
12708    # The variable is not set by user, try to locate tool using the code snippet
12709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12710$as_echo_n "checking for egrep... " >&6; }
12711if ${ac_cv_path_EGREP+:} false; then :
12712  $as_echo_n "(cached) " >&6
12713else
12714  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12715   then ac_cv_path_EGREP="$GREP -E"
12716   else
12717     if test -z "$EGREP"; then
12718  ac_path_EGREP_found=false
12719  # Loop through the user's path and test for each of PROGNAME-LIST
12720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12721for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12722do
12723  IFS=$as_save_IFS
12724  test -z "$as_dir" && as_dir=.
12725    for ac_prog in egrep; do
12726    for ac_exec_ext in '' $ac_executable_extensions; do
12727      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12728      as_fn_executable_p "$ac_path_EGREP" || continue
12729# Check for GNU ac_path_EGREP and select it if it is found.
12730  # Check for GNU $ac_path_EGREP
12731case `"$ac_path_EGREP" --version 2>&1` in
12732*GNU*)
12733  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12734*)
12735  ac_count=0
12736  $as_echo_n 0123456789 >"conftest.in"
12737  while :
12738  do
12739    cat "conftest.in" "conftest.in" >"conftest.tmp"
12740    mv "conftest.tmp" "conftest.in"
12741    cp "conftest.in" "conftest.nl"
12742    $as_echo 'EGREP' >> "conftest.nl"
12743    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12744    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12745    as_fn_arith $ac_count + 1 && ac_count=$as_val
12746    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12747      # Best one so far, save it but keep looking for a better one
12748      ac_cv_path_EGREP="$ac_path_EGREP"
12749      ac_path_EGREP_max=$ac_count
12750    fi
12751    # 10*(2^10) chars as input seems more than enough
12752    test $ac_count -gt 10 && break
12753  done
12754  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12755esac
12756
12757      $ac_path_EGREP_found && break 3
12758    done
12759  done
12760  done
12761IFS=$as_save_IFS
12762  if test -z "$ac_cv_path_EGREP"; then
12763    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12764  fi
12765else
12766  ac_cv_path_EGREP=$EGREP
12767fi
12768
12769   fi
12770fi
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12772$as_echo "$ac_cv_path_EGREP" >&6; }
12773 EGREP="$ac_cv_path_EGREP"
12774
12775
12776  else
12777    # The variable is set, but is it from the command line or the environment?
12778
12779    # Try to remove the string !EGREP! from our list.
12780    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12781    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12782      # If it failed, the variable was not from the command line. Ignore it,
12783      # but warn the user (except for BASH, which is always set by the calling BASH).
12784      if test "xEGREP" != xBASH; then
12785        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12786$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12787      fi
12788      # Try to locate tool using the code snippet
12789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12790$as_echo_n "checking for egrep... " >&6; }
12791if ${ac_cv_path_EGREP+:} false; then :
12792  $as_echo_n "(cached) " >&6
12793else
12794  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12795   then ac_cv_path_EGREP="$GREP -E"
12796   else
12797     if test -z "$EGREP"; then
12798  ac_path_EGREP_found=false
12799  # Loop through the user's path and test for each of PROGNAME-LIST
12800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12801for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12802do
12803  IFS=$as_save_IFS
12804  test -z "$as_dir" && as_dir=.
12805    for ac_prog in egrep; do
12806    for ac_exec_ext in '' $ac_executable_extensions; do
12807      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12808      as_fn_executable_p "$ac_path_EGREP" || continue
12809# Check for GNU ac_path_EGREP and select it if it is found.
12810  # Check for GNU $ac_path_EGREP
12811case `"$ac_path_EGREP" --version 2>&1` in
12812*GNU*)
12813  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12814*)
12815  ac_count=0
12816  $as_echo_n 0123456789 >"conftest.in"
12817  while :
12818  do
12819    cat "conftest.in" "conftest.in" >"conftest.tmp"
12820    mv "conftest.tmp" "conftest.in"
12821    cp "conftest.in" "conftest.nl"
12822    $as_echo 'EGREP' >> "conftest.nl"
12823    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12824    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12825    as_fn_arith $ac_count + 1 && ac_count=$as_val
12826    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12827      # Best one so far, save it but keep looking for a better one
12828      ac_cv_path_EGREP="$ac_path_EGREP"
12829      ac_path_EGREP_max=$ac_count
12830    fi
12831    # 10*(2^10) chars as input seems more than enough
12832    test $ac_count -gt 10 && break
12833  done
12834  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12835esac
12836
12837      $ac_path_EGREP_found && break 3
12838    done
12839  done
12840  done
12841IFS=$as_save_IFS
12842  if test -z "$ac_cv_path_EGREP"; then
12843    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12844  fi
12845else
12846  ac_cv_path_EGREP=$EGREP
12847fi
12848
12849   fi
12850fi
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12852$as_echo "$ac_cv_path_EGREP" >&6; }
12853 EGREP="$ac_cv_path_EGREP"
12854
12855
12856    else
12857      # If it succeeded, then it was overridden by the user. We will use it
12858      # for the tool.
12859
12860      # First remove it from the list of overridden variables, so we can test
12861      # for unknown variables in the end.
12862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12863
12864      # Check if we try to supply an empty value
12865      if test "x$EGREP" = x; then
12866        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12867$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12868        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12869$as_echo_n "checking for EGREP... " >&6; }
12870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12871$as_echo "disabled" >&6; }
12872      else
12873        # Check if the provided tool contains a complete path.
12874        tool_specified="$EGREP"
12875        tool_basename="${tool_specified##*/}"
12876        if test "x$tool_basename" = "x$tool_specified"; then
12877          # A command without a complete path is provided, search $PATH.
12878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12879$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12880          # Extract the first word of "$tool_basename", so it can be a program name with args.
12881set dummy $tool_basename; ac_word=$2
12882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12883$as_echo_n "checking for $ac_word... " >&6; }
12884if ${ac_cv_path_EGREP+:} false; then :
12885  $as_echo_n "(cached) " >&6
12886else
12887  case $EGREP in
12888  [\\/]* | ?:[\\/]*)
12889  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12890  ;;
12891  *)
12892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12893for as_dir in $PATH
12894do
12895  IFS=$as_save_IFS
12896  test -z "$as_dir" && as_dir=.
12897    for ac_exec_ext in '' $ac_executable_extensions; do
12898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12899    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12901    break 2
12902  fi
12903done
12904  done
12905IFS=$as_save_IFS
12906
12907  ;;
12908esac
12909fi
12910EGREP=$ac_cv_path_EGREP
12911if test -n "$EGREP"; then
12912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12913$as_echo "$EGREP" >&6; }
12914else
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12916$as_echo "no" >&6; }
12917fi
12918
12919
12920          if test "x$EGREP" = x; then
12921            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12922          fi
12923        else
12924          # Otherwise we believe it is a complete path. Use it as it is.
12925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12926$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12927          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12928$as_echo_n "checking for EGREP... " >&6; }
12929          if test ! -x "$tool_specified"; then
12930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12931$as_echo "not found" >&6; }
12932            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12933          fi
12934          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12935$as_echo "$tool_specified" >&6; }
12936        fi
12937      fi
12938    fi
12939
12940  fi
12941
12942
12943  if test "x$EGREP" = x; then
12944    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12945  fi
12946
12947
12948
12949
12950  # Publish this variable in the help.
12951
12952
12953  if [ -z "${FGREP+x}" ]; then
12954    # The variable is not set by user, try to locate tool using the code snippet
12955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12956$as_echo_n "checking for fgrep... " >&6; }
12957if ${ac_cv_path_FGREP+:} false; then :
12958  $as_echo_n "(cached) " >&6
12959else
12960  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12961   then ac_cv_path_FGREP="$GREP -F"
12962   else
12963     if test -z "$FGREP"; then
12964  ac_path_FGREP_found=false
12965  # Loop through the user's path and test for each of PROGNAME-LIST
12966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12967for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12968do
12969  IFS=$as_save_IFS
12970  test -z "$as_dir" && as_dir=.
12971    for ac_prog in fgrep; do
12972    for ac_exec_ext in '' $ac_executable_extensions; do
12973      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12974      as_fn_executable_p "$ac_path_FGREP" || continue
12975# Check for GNU ac_path_FGREP and select it if it is found.
12976  # Check for GNU $ac_path_FGREP
12977case `"$ac_path_FGREP" --version 2>&1` in
12978*GNU*)
12979  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12980*)
12981  ac_count=0
12982  $as_echo_n 0123456789 >"conftest.in"
12983  while :
12984  do
12985    cat "conftest.in" "conftest.in" >"conftest.tmp"
12986    mv "conftest.tmp" "conftest.in"
12987    cp "conftest.in" "conftest.nl"
12988    $as_echo 'FGREP' >> "conftest.nl"
12989    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12990    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12991    as_fn_arith $ac_count + 1 && ac_count=$as_val
12992    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12993      # Best one so far, save it but keep looking for a better one
12994      ac_cv_path_FGREP="$ac_path_FGREP"
12995      ac_path_FGREP_max=$ac_count
12996    fi
12997    # 10*(2^10) chars as input seems more than enough
12998    test $ac_count -gt 10 && break
12999  done
13000  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13001esac
13002
13003      $ac_path_FGREP_found && break 3
13004    done
13005  done
13006  done
13007IFS=$as_save_IFS
13008  if test -z "$ac_cv_path_FGREP"; then
13009    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13010  fi
13011else
13012  ac_cv_path_FGREP=$FGREP
13013fi
13014
13015   fi
13016fi
13017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13018$as_echo "$ac_cv_path_FGREP" >&6; }
13019 FGREP="$ac_cv_path_FGREP"
13020
13021
13022  else
13023    # The variable is set, but is it from the command line or the environment?
13024
13025    # Try to remove the string !FGREP! from our list.
13026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13028      # If it failed, the variable was not from the command line. Ignore it,
13029      # but warn the user (except for BASH, which is always set by the calling BASH).
13030      if test "xFGREP" != xBASH; then
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13032$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13033      fi
13034      # Try to locate tool using the code snippet
13035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13036$as_echo_n "checking for fgrep... " >&6; }
13037if ${ac_cv_path_FGREP+:} false; then :
13038  $as_echo_n "(cached) " >&6
13039else
13040  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13041   then ac_cv_path_FGREP="$GREP -F"
13042   else
13043     if test -z "$FGREP"; then
13044  ac_path_FGREP_found=false
13045  # Loop through the user's path and test for each of PROGNAME-LIST
13046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13047for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13048do
13049  IFS=$as_save_IFS
13050  test -z "$as_dir" && as_dir=.
13051    for ac_prog in fgrep; do
13052    for ac_exec_ext in '' $ac_executable_extensions; do
13053      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13054      as_fn_executable_p "$ac_path_FGREP" || continue
13055# Check for GNU ac_path_FGREP and select it if it is found.
13056  # Check for GNU $ac_path_FGREP
13057case `"$ac_path_FGREP" --version 2>&1` in
13058*GNU*)
13059  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13060*)
13061  ac_count=0
13062  $as_echo_n 0123456789 >"conftest.in"
13063  while :
13064  do
13065    cat "conftest.in" "conftest.in" >"conftest.tmp"
13066    mv "conftest.tmp" "conftest.in"
13067    cp "conftest.in" "conftest.nl"
13068    $as_echo 'FGREP' >> "conftest.nl"
13069    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13070    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13071    as_fn_arith $ac_count + 1 && ac_count=$as_val
13072    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13073      # Best one so far, save it but keep looking for a better one
13074      ac_cv_path_FGREP="$ac_path_FGREP"
13075      ac_path_FGREP_max=$ac_count
13076    fi
13077    # 10*(2^10) chars as input seems more than enough
13078    test $ac_count -gt 10 && break
13079  done
13080  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13081esac
13082
13083      $ac_path_FGREP_found && break 3
13084    done
13085  done
13086  done
13087IFS=$as_save_IFS
13088  if test -z "$ac_cv_path_FGREP"; then
13089    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13090  fi
13091else
13092  ac_cv_path_FGREP=$FGREP
13093fi
13094
13095   fi
13096fi
13097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13098$as_echo "$ac_cv_path_FGREP" >&6; }
13099 FGREP="$ac_cv_path_FGREP"
13100
13101
13102    else
13103      # If it succeeded, then it was overridden by the user. We will use it
13104      # for the tool.
13105
13106      # First remove it from the list of overridden variables, so we can test
13107      # for unknown variables in the end.
13108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13109
13110      # Check if we try to supply an empty value
13111      if test "x$FGREP" = x; then
13112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13113$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13115$as_echo_n "checking for FGREP... " >&6; }
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13117$as_echo "disabled" >&6; }
13118      else
13119        # Check if the provided tool contains a complete path.
13120        tool_specified="$FGREP"
13121        tool_basename="${tool_specified##*/}"
13122        if test "x$tool_basename" = "x$tool_specified"; then
13123          # A command without a complete path is provided, search $PATH.
13124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13125$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13126          # Extract the first word of "$tool_basename", so it can be a program name with args.
13127set dummy $tool_basename; ac_word=$2
13128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13129$as_echo_n "checking for $ac_word... " >&6; }
13130if ${ac_cv_path_FGREP+:} false; then :
13131  $as_echo_n "(cached) " >&6
13132else
13133  case $FGREP in
13134  [\\/]* | ?:[\\/]*)
13135  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13136  ;;
13137  *)
13138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13139for as_dir in $PATH
13140do
13141  IFS=$as_save_IFS
13142  test -z "$as_dir" && as_dir=.
13143    for ac_exec_ext in '' $ac_executable_extensions; do
13144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13145    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13147    break 2
13148  fi
13149done
13150  done
13151IFS=$as_save_IFS
13152
13153  ;;
13154esac
13155fi
13156FGREP=$ac_cv_path_FGREP
13157if test -n "$FGREP"; then
13158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13159$as_echo "$FGREP" >&6; }
13160else
13161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13162$as_echo "no" >&6; }
13163fi
13164
13165
13166          if test "x$FGREP" = x; then
13167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13168          fi
13169        else
13170          # Otherwise we believe it is a complete path. Use it as it is.
13171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13172$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13174$as_echo_n "checking for FGREP... " >&6; }
13175          if test ! -x "$tool_specified"; then
13176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13177$as_echo "not found" >&6; }
13178            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13179          fi
13180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13181$as_echo "$tool_specified" >&6; }
13182        fi
13183      fi
13184    fi
13185
13186  fi
13187
13188
13189  if test "x$FGREP" = x; then
13190    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13191  fi
13192
13193
13194
13195
13196  # Publish this variable in the help.
13197
13198
13199  if [ -z "${SED+x}" ]; then
13200    # The variable is not set by user, try to locate tool using the code snippet
13201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13202$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13203if ${ac_cv_path_SED+:} false; then :
13204  $as_echo_n "(cached) " >&6
13205else
13206            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13207     for ac_i in 1 2 3 4 5 6 7; do
13208       ac_script="$ac_script$as_nl$ac_script"
13209     done
13210     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13211     { ac_script=; unset ac_script;}
13212     if test -z "$SED"; then
13213  ac_path_SED_found=false
13214  # Loop through the user's path and test for each of PROGNAME-LIST
13215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13216for as_dir in $PATH
13217do
13218  IFS=$as_save_IFS
13219  test -z "$as_dir" && as_dir=.
13220    for ac_prog in sed gsed; do
13221    for ac_exec_ext in '' $ac_executable_extensions; do
13222      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13223      as_fn_executable_p "$ac_path_SED" || continue
13224# Check for GNU ac_path_SED and select it if it is found.
13225  # Check for GNU $ac_path_SED
13226case `"$ac_path_SED" --version 2>&1` in
13227*GNU*)
13228  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13229*)
13230  ac_count=0
13231  $as_echo_n 0123456789 >"conftest.in"
13232  while :
13233  do
13234    cat "conftest.in" "conftest.in" >"conftest.tmp"
13235    mv "conftest.tmp" "conftest.in"
13236    cp "conftest.in" "conftest.nl"
13237    $as_echo '' >> "conftest.nl"
13238    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13239    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13240    as_fn_arith $ac_count + 1 && ac_count=$as_val
13241    if test $ac_count -gt ${ac_path_SED_max-0}; then
13242      # Best one so far, save it but keep looking for a better one
13243      ac_cv_path_SED="$ac_path_SED"
13244      ac_path_SED_max=$ac_count
13245    fi
13246    # 10*(2^10) chars as input seems more than enough
13247    test $ac_count -gt 10 && break
13248  done
13249  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13250esac
13251
13252      $ac_path_SED_found && break 3
13253    done
13254  done
13255  done
13256IFS=$as_save_IFS
13257  if test -z "$ac_cv_path_SED"; then
13258    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13259  fi
13260else
13261  ac_cv_path_SED=$SED
13262fi
13263
13264fi
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13266$as_echo "$ac_cv_path_SED" >&6; }
13267 SED="$ac_cv_path_SED"
13268  rm -f conftest.sed
13269
13270  else
13271    # The variable is set, but is it from the command line or the environment?
13272
13273    # Try to remove the string !SED! from our list.
13274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13276      # If it failed, the variable was not from the command line. Ignore it,
13277      # but warn the user (except for BASH, which is always set by the calling BASH).
13278      if test "xSED" != xBASH; then
13279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13280$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13281      fi
13282      # Try to locate tool using the code snippet
13283      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13284$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13285if ${ac_cv_path_SED+:} false; then :
13286  $as_echo_n "(cached) " >&6
13287else
13288            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13289     for ac_i in 1 2 3 4 5 6 7; do
13290       ac_script="$ac_script$as_nl$ac_script"
13291     done
13292     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13293     { ac_script=; unset ac_script;}
13294     if test -z "$SED"; then
13295  ac_path_SED_found=false
13296  # Loop through the user's path and test for each of PROGNAME-LIST
13297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13298for as_dir in $PATH
13299do
13300  IFS=$as_save_IFS
13301  test -z "$as_dir" && as_dir=.
13302    for ac_prog in sed gsed; do
13303    for ac_exec_ext in '' $ac_executable_extensions; do
13304      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13305      as_fn_executable_p "$ac_path_SED" || continue
13306# Check for GNU ac_path_SED and select it if it is found.
13307  # Check for GNU $ac_path_SED
13308case `"$ac_path_SED" --version 2>&1` in
13309*GNU*)
13310  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13311*)
13312  ac_count=0
13313  $as_echo_n 0123456789 >"conftest.in"
13314  while :
13315  do
13316    cat "conftest.in" "conftest.in" >"conftest.tmp"
13317    mv "conftest.tmp" "conftest.in"
13318    cp "conftest.in" "conftest.nl"
13319    $as_echo '' >> "conftest.nl"
13320    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13321    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13322    as_fn_arith $ac_count + 1 && ac_count=$as_val
13323    if test $ac_count -gt ${ac_path_SED_max-0}; then
13324      # Best one so far, save it but keep looking for a better one
13325      ac_cv_path_SED="$ac_path_SED"
13326      ac_path_SED_max=$ac_count
13327    fi
13328    # 10*(2^10) chars as input seems more than enough
13329    test $ac_count -gt 10 && break
13330  done
13331  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13332esac
13333
13334      $ac_path_SED_found && break 3
13335    done
13336  done
13337  done
13338IFS=$as_save_IFS
13339  if test -z "$ac_cv_path_SED"; then
13340    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13341  fi
13342else
13343  ac_cv_path_SED=$SED
13344fi
13345
13346fi
13347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13348$as_echo "$ac_cv_path_SED" >&6; }
13349 SED="$ac_cv_path_SED"
13350  rm -f conftest.sed
13351
13352    else
13353      # If it succeeded, then it was overridden by the user. We will use it
13354      # for the tool.
13355
13356      # First remove it from the list of overridden variables, so we can test
13357      # for unknown variables in the end.
13358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13359
13360      # Check if we try to supply an empty value
13361      if test "x$SED" = x; then
13362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13363$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13365$as_echo_n "checking for SED... " >&6; }
13366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13367$as_echo "disabled" >&6; }
13368      else
13369        # Check if the provided tool contains a complete path.
13370        tool_specified="$SED"
13371        tool_basename="${tool_specified##*/}"
13372        if test "x$tool_basename" = "x$tool_specified"; then
13373          # A command without a complete path is provided, search $PATH.
13374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13375$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13376          # Extract the first word of "$tool_basename", so it can be a program name with args.
13377set dummy $tool_basename; ac_word=$2
13378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13379$as_echo_n "checking for $ac_word... " >&6; }
13380if ${ac_cv_path_SED+:} false; then :
13381  $as_echo_n "(cached) " >&6
13382else
13383  case $SED in
13384  [\\/]* | ?:[\\/]*)
13385  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13386  ;;
13387  *)
13388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13389for as_dir in $PATH
13390do
13391  IFS=$as_save_IFS
13392  test -z "$as_dir" && as_dir=.
13393    for ac_exec_ext in '' $ac_executable_extensions; do
13394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13395    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13397    break 2
13398  fi
13399done
13400  done
13401IFS=$as_save_IFS
13402
13403  ;;
13404esac
13405fi
13406SED=$ac_cv_path_SED
13407if test -n "$SED"; then
13408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13409$as_echo "$SED" >&6; }
13410else
13411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13412$as_echo "no" >&6; }
13413fi
13414
13415
13416          if test "x$SED" = x; then
13417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13418          fi
13419        else
13420          # Otherwise we believe it is a complete path. Use it as it is.
13421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13422$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13424$as_echo_n "checking for SED... " >&6; }
13425          if test ! -x "$tool_specified"; then
13426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13427$as_echo "not found" >&6; }
13428            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13429          fi
13430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13431$as_echo "$tool_specified" >&6; }
13432        fi
13433      fi
13434    fi
13435
13436  fi
13437
13438
13439  if test "x$SED" = x; then
13440    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13441  fi
13442
13443
13444
13445  # Always force rm.
13446  RM="$RM -f"
13447
13448  # pwd behaves differently on various platforms and some don't support the -L flag.
13449  # Always use the bash builtin pwd to get uniform behavior.
13450  THEPWDCMD=pwd
13451
13452  # These are not required on all platforms
13453
13454
13455  # Publish this variable in the help.
13456
13457
13458  if [ -z "${CYGPATH+x}" ]; then
13459    # The variable is not set by user, try to locate tool using the code snippet
13460    for ac_prog in cygpath
13461do
13462  # Extract the first word of "$ac_prog", so it can be a program name with args.
13463set dummy $ac_prog; ac_word=$2
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13465$as_echo_n "checking for $ac_word... " >&6; }
13466if ${ac_cv_path_CYGPATH+:} false; then :
13467  $as_echo_n "(cached) " >&6
13468else
13469  case $CYGPATH in
13470  [\\/]* | ?:[\\/]*)
13471  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13472  ;;
13473  *)
13474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13475for as_dir in $PATH
13476do
13477  IFS=$as_save_IFS
13478  test -z "$as_dir" && as_dir=.
13479    for ac_exec_ext in '' $ac_executable_extensions; do
13480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13481    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13483    break 2
13484  fi
13485done
13486  done
13487IFS=$as_save_IFS
13488
13489  ;;
13490esac
13491fi
13492CYGPATH=$ac_cv_path_CYGPATH
13493if test -n "$CYGPATH"; then
13494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13495$as_echo "$CYGPATH" >&6; }
13496else
13497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13498$as_echo "no" >&6; }
13499fi
13500
13501
13502  test -n "$CYGPATH" && break
13503done
13504
13505  else
13506    # The variable is set, but is it from the command line or the environment?
13507
13508    # Try to remove the string !CYGPATH! from our list.
13509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13511      # If it failed, the variable was not from the command line. Ignore it,
13512      # but warn the user (except for BASH, which is always set by the calling BASH).
13513      if test "xCYGPATH" != xBASH; then
13514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13515$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13516      fi
13517      # Try to locate tool using the code snippet
13518      for ac_prog in cygpath
13519do
13520  # Extract the first word of "$ac_prog", so it can be a program name with args.
13521set dummy $ac_prog; ac_word=$2
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13523$as_echo_n "checking for $ac_word... " >&6; }
13524if ${ac_cv_path_CYGPATH+:} false; then :
13525  $as_echo_n "(cached) " >&6
13526else
13527  case $CYGPATH in
13528  [\\/]* | ?:[\\/]*)
13529  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13530  ;;
13531  *)
13532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13533for as_dir in $PATH
13534do
13535  IFS=$as_save_IFS
13536  test -z "$as_dir" && as_dir=.
13537    for ac_exec_ext in '' $ac_executable_extensions; do
13538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13539    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13541    break 2
13542  fi
13543done
13544  done
13545IFS=$as_save_IFS
13546
13547  ;;
13548esac
13549fi
13550CYGPATH=$ac_cv_path_CYGPATH
13551if test -n "$CYGPATH"; then
13552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13553$as_echo "$CYGPATH" >&6; }
13554else
13555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13556$as_echo "no" >&6; }
13557fi
13558
13559
13560  test -n "$CYGPATH" && break
13561done
13562
13563    else
13564      # If it succeeded, then it was overridden by the user. We will use it
13565      # for the tool.
13566
13567      # First remove it from the list of overridden variables, so we can test
13568      # for unknown variables in the end.
13569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13570
13571      # Check if we try to supply an empty value
13572      if test "x$CYGPATH" = x; then
13573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13574$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13576$as_echo_n "checking for CYGPATH... " >&6; }
13577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13578$as_echo "disabled" >&6; }
13579      else
13580        # Check if the provided tool contains a complete path.
13581        tool_specified="$CYGPATH"
13582        tool_basename="${tool_specified##*/}"
13583        if test "x$tool_basename" = "x$tool_specified"; then
13584          # A command without a complete path is provided, search $PATH.
13585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13586$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13587          # Extract the first word of "$tool_basename", so it can be a program name with args.
13588set dummy $tool_basename; ac_word=$2
13589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13590$as_echo_n "checking for $ac_word... " >&6; }
13591if ${ac_cv_path_CYGPATH+:} false; then :
13592  $as_echo_n "(cached) " >&6
13593else
13594  case $CYGPATH in
13595  [\\/]* | ?:[\\/]*)
13596  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13597  ;;
13598  *)
13599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13600for as_dir in $PATH
13601do
13602  IFS=$as_save_IFS
13603  test -z "$as_dir" && as_dir=.
13604    for ac_exec_ext in '' $ac_executable_extensions; do
13605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13606    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13608    break 2
13609  fi
13610done
13611  done
13612IFS=$as_save_IFS
13613
13614  ;;
13615esac
13616fi
13617CYGPATH=$ac_cv_path_CYGPATH
13618if test -n "$CYGPATH"; then
13619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13620$as_echo "$CYGPATH" >&6; }
13621else
13622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13623$as_echo "no" >&6; }
13624fi
13625
13626
13627          if test "x$CYGPATH" = x; then
13628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13629          fi
13630        else
13631          # Otherwise we believe it is a complete path. Use it as it is.
13632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13633$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13635$as_echo_n "checking for CYGPATH... " >&6; }
13636          if test ! -x "$tool_specified"; then
13637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13638$as_echo "not found" >&6; }
13639            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13640          fi
13641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13642$as_echo "$tool_specified" >&6; }
13643        fi
13644      fi
13645    fi
13646
13647  fi
13648
13649
13650
13651
13652  # Publish this variable in the help.
13653
13654
13655  if [ -z "${READLINK+x}" ]; then
13656    # The variable is not set by user, try to locate tool using the code snippet
13657    for ac_prog in greadlink readlink
13658do
13659  # Extract the first word of "$ac_prog", so it can be a program name with args.
13660set dummy $ac_prog; ac_word=$2
13661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13662$as_echo_n "checking for $ac_word... " >&6; }
13663if ${ac_cv_path_READLINK+:} false; then :
13664  $as_echo_n "(cached) " >&6
13665else
13666  case $READLINK in
13667  [\\/]* | ?:[\\/]*)
13668  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13669  ;;
13670  *)
13671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13672for as_dir in $PATH
13673do
13674  IFS=$as_save_IFS
13675  test -z "$as_dir" && as_dir=.
13676    for ac_exec_ext in '' $ac_executable_extensions; do
13677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13678    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13680    break 2
13681  fi
13682done
13683  done
13684IFS=$as_save_IFS
13685
13686  ;;
13687esac
13688fi
13689READLINK=$ac_cv_path_READLINK
13690if test -n "$READLINK"; then
13691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13692$as_echo "$READLINK" >&6; }
13693else
13694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13695$as_echo "no" >&6; }
13696fi
13697
13698
13699  test -n "$READLINK" && break
13700done
13701
13702  else
13703    # The variable is set, but is it from the command line or the environment?
13704
13705    # Try to remove the string !READLINK! from our list.
13706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13708      # If it failed, the variable was not from the command line. Ignore it,
13709      # but warn the user (except for BASH, which is always set by the calling BASH).
13710      if test "xREADLINK" != xBASH; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13712$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13713      fi
13714      # Try to locate tool using the code snippet
13715      for ac_prog in greadlink readlink
13716do
13717  # Extract the first word of "$ac_prog", so it can be a program name with args.
13718set dummy $ac_prog; ac_word=$2
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13720$as_echo_n "checking for $ac_word... " >&6; }
13721if ${ac_cv_path_READLINK+:} false; then :
13722  $as_echo_n "(cached) " >&6
13723else
13724  case $READLINK in
13725  [\\/]* | ?:[\\/]*)
13726  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13727  ;;
13728  *)
13729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13730for as_dir in $PATH
13731do
13732  IFS=$as_save_IFS
13733  test -z "$as_dir" && as_dir=.
13734    for ac_exec_ext in '' $ac_executable_extensions; do
13735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13736    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13738    break 2
13739  fi
13740done
13741  done
13742IFS=$as_save_IFS
13743
13744  ;;
13745esac
13746fi
13747READLINK=$ac_cv_path_READLINK
13748if test -n "$READLINK"; then
13749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13750$as_echo "$READLINK" >&6; }
13751else
13752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13753$as_echo "no" >&6; }
13754fi
13755
13756
13757  test -n "$READLINK" && break
13758done
13759
13760    else
13761      # If it succeeded, then it was overridden by the user. We will use it
13762      # for the tool.
13763
13764      # First remove it from the list of overridden variables, so we can test
13765      # for unknown variables in the end.
13766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13767
13768      # Check if we try to supply an empty value
13769      if test "x$READLINK" = x; then
13770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13771$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13773$as_echo_n "checking for READLINK... " >&6; }
13774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13775$as_echo "disabled" >&6; }
13776      else
13777        # Check if the provided tool contains a complete path.
13778        tool_specified="$READLINK"
13779        tool_basename="${tool_specified##*/}"
13780        if test "x$tool_basename" = "x$tool_specified"; then
13781          # A command without a complete path is provided, search $PATH.
13782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13783$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13784          # Extract the first word of "$tool_basename", so it can be a program name with args.
13785set dummy $tool_basename; ac_word=$2
13786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13787$as_echo_n "checking for $ac_word... " >&6; }
13788if ${ac_cv_path_READLINK+:} false; then :
13789  $as_echo_n "(cached) " >&6
13790else
13791  case $READLINK in
13792  [\\/]* | ?:[\\/]*)
13793  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13794  ;;
13795  *)
13796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13797for as_dir in $PATH
13798do
13799  IFS=$as_save_IFS
13800  test -z "$as_dir" && as_dir=.
13801    for ac_exec_ext in '' $ac_executable_extensions; do
13802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13803    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13805    break 2
13806  fi
13807done
13808  done
13809IFS=$as_save_IFS
13810
13811  ;;
13812esac
13813fi
13814READLINK=$ac_cv_path_READLINK
13815if test -n "$READLINK"; then
13816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13817$as_echo "$READLINK" >&6; }
13818else
13819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13820$as_echo "no" >&6; }
13821fi
13822
13823
13824          if test "x$READLINK" = x; then
13825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13826          fi
13827        else
13828          # Otherwise we believe it is a complete path. Use it as it is.
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13830$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13832$as_echo_n "checking for READLINK... " >&6; }
13833          if test ! -x "$tool_specified"; then
13834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13835$as_echo "not found" >&6; }
13836            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13837          fi
13838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13839$as_echo "$tool_specified" >&6; }
13840        fi
13841      fi
13842    fi
13843
13844  fi
13845
13846
13847
13848
13849  # Publish this variable in the help.
13850
13851
13852  if [ -z "${DF+x}" ]; then
13853    # The variable is not set by user, try to locate tool using the code snippet
13854    for ac_prog in df
13855do
13856  # Extract the first word of "$ac_prog", so it can be a program name with args.
13857set dummy $ac_prog; ac_word=$2
13858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13859$as_echo_n "checking for $ac_word... " >&6; }
13860if ${ac_cv_path_DF+:} false; then :
13861  $as_echo_n "(cached) " >&6
13862else
13863  case $DF in
13864  [\\/]* | ?:[\\/]*)
13865  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13866  ;;
13867  *)
13868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13869for as_dir in $PATH
13870do
13871  IFS=$as_save_IFS
13872  test -z "$as_dir" && as_dir=.
13873    for ac_exec_ext in '' $ac_executable_extensions; do
13874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13875    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13877    break 2
13878  fi
13879done
13880  done
13881IFS=$as_save_IFS
13882
13883  ;;
13884esac
13885fi
13886DF=$ac_cv_path_DF
13887if test -n "$DF"; then
13888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13889$as_echo "$DF" >&6; }
13890else
13891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13892$as_echo "no" >&6; }
13893fi
13894
13895
13896  test -n "$DF" && break
13897done
13898
13899  else
13900    # The variable is set, but is it from the command line or the environment?
13901
13902    # Try to remove the string !DF! from our list.
13903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13905      # If it failed, the variable was not from the command line. Ignore it,
13906      # but warn the user (except for BASH, which is always set by the calling BASH).
13907      if test "xDF" != xBASH; then
13908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13909$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13910      fi
13911      # Try to locate tool using the code snippet
13912      for ac_prog in df
13913do
13914  # Extract the first word of "$ac_prog", so it can be a program name with args.
13915set dummy $ac_prog; ac_word=$2
13916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13917$as_echo_n "checking for $ac_word... " >&6; }
13918if ${ac_cv_path_DF+:} false; then :
13919  $as_echo_n "(cached) " >&6
13920else
13921  case $DF in
13922  [\\/]* | ?:[\\/]*)
13923  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13924  ;;
13925  *)
13926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13927for as_dir in $PATH
13928do
13929  IFS=$as_save_IFS
13930  test -z "$as_dir" && as_dir=.
13931    for ac_exec_ext in '' $ac_executable_extensions; do
13932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13933    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13935    break 2
13936  fi
13937done
13938  done
13939IFS=$as_save_IFS
13940
13941  ;;
13942esac
13943fi
13944DF=$ac_cv_path_DF
13945if test -n "$DF"; then
13946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13947$as_echo "$DF" >&6; }
13948else
13949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13950$as_echo "no" >&6; }
13951fi
13952
13953
13954  test -n "$DF" && break
13955done
13956
13957    else
13958      # If it succeeded, then it was overridden by the user. We will use it
13959      # for the tool.
13960
13961      # First remove it from the list of overridden variables, so we can test
13962      # for unknown variables in the end.
13963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13964
13965      # Check if we try to supply an empty value
13966      if test "x$DF" = x; then
13967        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13968$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13970$as_echo_n "checking for DF... " >&6; }
13971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13972$as_echo "disabled" >&6; }
13973      else
13974        # Check if the provided tool contains a complete path.
13975        tool_specified="$DF"
13976        tool_basename="${tool_specified##*/}"
13977        if test "x$tool_basename" = "x$tool_specified"; then
13978          # A command without a complete path is provided, search $PATH.
13979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13980$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13981          # Extract the first word of "$tool_basename", so it can be a program name with args.
13982set dummy $tool_basename; ac_word=$2
13983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13984$as_echo_n "checking for $ac_word... " >&6; }
13985if ${ac_cv_path_DF+:} false; then :
13986  $as_echo_n "(cached) " >&6
13987else
13988  case $DF in
13989  [\\/]* | ?:[\\/]*)
13990  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13991  ;;
13992  *)
13993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13994for as_dir in $PATH
13995do
13996  IFS=$as_save_IFS
13997  test -z "$as_dir" && as_dir=.
13998    for ac_exec_ext in '' $ac_executable_extensions; do
13999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14000    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14002    break 2
14003  fi
14004done
14005  done
14006IFS=$as_save_IFS
14007
14008  ;;
14009esac
14010fi
14011DF=$ac_cv_path_DF
14012if test -n "$DF"; then
14013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14014$as_echo "$DF" >&6; }
14015else
14016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14017$as_echo "no" >&6; }
14018fi
14019
14020
14021          if test "x$DF" = x; then
14022            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14023          fi
14024        else
14025          # Otherwise we believe it is a complete path. Use it as it is.
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14027$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14028          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14029$as_echo_n "checking for DF... " >&6; }
14030          if test ! -x "$tool_specified"; then
14031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14032$as_echo "not found" >&6; }
14033            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14034          fi
14035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14036$as_echo "$tool_specified" >&6; }
14037        fi
14038      fi
14039    fi
14040
14041  fi
14042
14043
14044
14045
14046  # Publish this variable in the help.
14047
14048
14049  if [ -z "${CPIO+x}" ]; then
14050    # The variable is not set by user, try to locate tool using the code snippet
14051    for ac_prog in cpio bsdcpio
14052do
14053  # Extract the first word of "$ac_prog", so it can be a program name with args.
14054set dummy $ac_prog; ac_word=$2
14055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14056$as_echo_n "checking for $ac_word... " >&6; }
14057if ${ac_cv_path_CPIO+:} false; then :
14058  $as_echo_n "(cached) " >&6
14059else
14060  case $CPIO in
14061  [\\/]* | ?:[\\/]*)
14062  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14063  ;;
14064  *)
14065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14066for as_dir in $PATH
14067do
14068  IFS=$as_save_IFS
14069  test -z "$as_dir" && as_dir=.
14070    for ac_exec_ext in '' $ac_executable_extensions; do
14071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14072    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14074    break 2
14075  fi
14076done
14077  done
14078IFS=$as_save_IFS
14079
14080  ;;
14081esac
14082fi
14083CPIO=$ac_cv_path_CPIO
14084if test -n "$CPIO"; then
14085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14086$as_echo "$CPIO" >&6; }
14087else
14088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14089$as_echo "no" >&6; }
14090fi
14091
14092
14093  test -n "$CPIO" && break
14094done
14095
14096  else
14097    # The variable is set, but is it from the command line or the environment?
14098
14099    # Try to remove the string !CPIO! from our list.
14100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14102      # If it failed, the variable was not from the command line. Ignore it,
14103      # but warn the user (except for BASH, which is always set by the calling BASH).
14104      if test "xCPIO" != xBASH; then
14105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14106$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14107      fi
14108      # Try to locate tool using the code snippet
14109      for ac_prog in cpio bsdcpio
14110do
14111  # Extract the first word of "$ac_prog", so it can be a program name with args.
14112set dummy $ac_prog; ac_word=$2
14113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14114$as_echo_n "checking for $ac_word... " >&6; }
14115if ${ac_cv_path_CPIO+:} false; then :
14116  $as_echo_n "(cached) " >&6
14117else
14118  case $CPIO in
14119  [\\/]* | ?:[\\/]*)
14120  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14121  ;;
14122  *)
14123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14124for as_dir in $PATH
14125do
14126  IFS=$as_save_IFS
14127  test -z "$as_dir" && as_dir=.
14128    for ac_exec_ext in '' $ac_executable_extensions; do
14129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14130    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14132    break 2
14133  fi
14134done
14135  done
14136IFS=$as_save_IFS
14137
14138  ;;
14139esac
14140fi
14141CPIO=$ac_cv_path_CPIO
14142if test -n "$CPIO"; then
14143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14144$as_echo "$CPIO" >&6; }
14145else
14146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14147$as_echo "no" >&6; }
14148fi
14149
14150
14151  test -n "$CPIO" && break
14152done
14153
14154    else
14155      # If it succeeded, then it was overridden by the user. We will use it
14156      # for the tool.
14157
14158      # First remove it from the list of overridden variables, so we can test
14159      # for unknown variables in the end.
14160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14161
14162      # Check if we try to supply an empty value
14163      if test "x$CPIO" = x; then
14164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14165$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14167$as_echo_n "checking for CPIO... " >&6; }
14168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14169$as_echo "disabled" >&6; }
14170      else
14171        # Check if the provided tool contains a complete path.
14172        tool_specified="$CPIO"
14173        tool_basename="${tool_specified##*/}"
14174        if test "x$tool_basename" = "x$tool_specified"; then
14175          # A command without a complete path is provided, search $PATH.
14176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14177$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14178          # Extract the first word of "$tool_basename", so it can be a program name with args.
14179set dummy $tool_basename; ac_word=$2
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14181$as_echo_n "checking for $ac_word... " >&6; }
14182if ${ac_cv_path_CPIO+:} false; then :
14183  $as_echo_n "(cached) " >&6
14184else
14185  case $CPIO in
14186  [\\/]* | ?:[\\/]*)
14187  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14188  ;;
14189  *)
14190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14191for as_dir in $PATH
14192do
14193  IFS=$as_save_IFS
14194  test -z "$as_dir" && as_dir=.
14195    for ac_exec_ext in '' $ac_executable_extensions; do
14196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14197    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14199    break 2
14200  fi
14201done
14202  done
14203IFS=$as_save_IFS
14204
14205  ;;
14206esac
14207fi
14208CPIO=$ac_cv_path_CPIO
14209if test -n "$CPIO"; then
14210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14211$as_echo "$CPIO" >&6; }
14212else
14213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14214$as_echo "no" >&6; }
14215fi
14216
14217
14218          if test "x$CPIO" = x; then
14219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14220          fi
14221        else
14222          # Otherwise we believe it is a complete path. Use it as it is.
14223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14224$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14226$as_echo_n "checking for CPIO... " >&6; }
14227          if test ! -x "$tool_specified"; then
14228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14229$as_echo "not found" >&6; }
14230            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14231          fi
14232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14233$as_echo "$tool_specified" >&6; }
14234        fi
14235      fi
14236    fi
14237
14238  fi
14239
14240
14241
14242
14243  # Publish this variable in the help.
14244
14245
14246  if [ -z "${NICE+x}" ]; then
14247    # The variable is not set by user, try to locate tool using the code snippet
14248    for ac_prog in nice
14249do
14250  # Extract the first word of "$ac_prog", so it can be a program name with args.
14251set dummy $ac_prog; ac_word=$2
14252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14253$as_echo_n "checking for $ac_word... " >&6; }
14254if ${ac_cv_path_NICE+:} false; then :
14255  $as_echo_n "(cached) " >&6
14256else
14257  case $NICE in
14258  [\\/]* | ?:[\\/]*)
14259  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14260  ;;
14261  *)
14262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14263for as_dir in $PATH
14264do
14265  IFS=$as_save_IFS
14266  test -z "$as_dir" && as_dir=.
14267    for ac_exec_ext in '' $ac_executable_extensions; do
14268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14269    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14271    break 2
14272  fi
14273done
14274  done
14275IFS=$as_save_IFS
14276
14277  ;;
14278esac
14279fi
14280NICE=$ac_cv_path_NICE
14281if test -n "$NICE"; then
14282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14283$as_echo "$NICE" >&6; }
14284else
14285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14286$as_echo "no" >&6; }
14287fi
14288
14289
14290  test -n "$NICE" && break
14291done
14292
14293  else
14294    # The variable is set, but is it from the command line or the environment?
14295
14296    # Try to remove the string !NICE! from our list.
14297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14299      # If it failed, the variable was not from the command line. Ignore it,
14300      # but warn the user (except for BASH, which is always set by the calling BASH).
14301      if test "xNICE" != xBASH; then
14302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14303$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14304      fi
14305      # Try to locate tool using the code snippet
14306      for ac_prog in nice
14307do
14308  # Extract the first word of "$ac_prog", so it can be a program name with args.
14309set dummy $ac_prog; ac_word=$2
14310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14311$as_echo_n "checking for $ac_word... " >&6; }
14312if ${ac_cv_path_NICE+:} false; then :
14313  $as_echo_n "(cached) " >&6
14314else
14315  case $NICE in
14316  [\\/]* | ?:[\\/]*)
14317  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14318  ;;
14319  *)
14320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14321for as_dir in $PATH
14322do
14323  IFS=$as_save_IFS
14324  test -z "$as_dir" && as_dir=.
14325    for ac_exec_ext in '' $ac_executable_extensions; do
14326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14327    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14329    break 2
14330  fi
14331done
14332  done
14333IFS=$as_save_IFS
14334
14335  ;;
14336esac
14337fi
14338NICE=$ac_cv_path_NICE
14339if test -n "$NICE"; then
14340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14341$as_echo "$NICE" >&6; }
14342else
14343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14344$as_echo "no" >&6; }
14345fi
14346
14347
14348  test -n "$NICE" && break
14349done
14350
14351    else
14352      # If it succeeded, then it was overridden by the user. We will use it
14353      # for the tool.
14354
14355      # First remove it from the list of overridden variables, so we can test
14356      # for unknown variables in the end.
14357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14358
14359      # Check if we try to supply an empty value
14360      if test "x$NICE" = x; then
14361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14362$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14364$as_echo_n "checking for NICE... " >&6; }
14365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14366$as_echo "disabled" >&6; }
14367      else
14368        # Check if the provided tool contains a complete path.
14369        tool_specified="$NICE"
14370        tool_basename="${tool_specified##*/}"
14371        if test "x$tool_basename" = "x$tool_specified"; then
14372          # A command without a complete path is provided, search $PATH.
14373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14374$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14375          # Extract the first word of "$tool_basename", so it can be a program name with args.
14376set dummy $tool_basename; ac_word=$2
14377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14378$as_echo_n "checking for $ac_word... " >&6; }
14379if ${ac_cv_path_NICE+:} false; then :
14380  $as_echo_n "(cached) " >&6
14381else
14382  case $NICE in
14383  [\\/]* | ?:[\\/]*)
14384  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14385  ;;
14386  *)
14387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14388for as_dir in $PATH
14389do
14390  IFS=$as_save_IFS
14391  test -z "$as_dir" && as_dir=.
14392    for ac_exec_ext in '' $ac_executable_extensions; do
14393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14394    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14396    break 2
14397  fi
14398done
14399  done
14400IFS=$as_save_IFS
14401
14402  ;;
14403esac
14404fi
14405NICE=$ac_cv_path_NICE
14406if test -n "$NICE"; then
14407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14408$as_echo "$NICE" >&6; }
14409else
14410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14411$as_echo "no" >&6; }
14412fi
14413
14414
14415          if test "x$NICE" = x; then
14416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14417          fi
14418        else
14419          # Otherwise we believe it is a complete path. Use it as it is.
14420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14421$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14423$as_echo_n "checking for NICE... " >&6; }
14424          if test ! -x "$tool_specified"; then
14425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14426$as_echo "not found" >&6; }
14427            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14428          fi
14429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14430$as_echo "$tool_specified" >&6; }
14431        fi
14432      fi
14433    fi
14434
14435  fi
14436
14437
14438
14439
14440# Now we can determine OpenJDK build and target platforms. This is required to
14441# have early on.
14442# Make sure we can run config.sub.
14443$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14444  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14445
14446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14447$as_echo_n "checking build system type... " >&6; }
14448if ${ac_cv_build+:} false; then :
14449  $as_echo_n "(cached) " >&6
14450else
14451  ac_build_alias=$build_alias
14452test "x$ac_build_alias" = x &&
14453  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14454test "x$ac_build_alias" = x &&
14455  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14456ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14457  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14458
14459fi
14460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14461$as_echo "$ac_cv_build" >&6; }
14462case $ac_cv_build in
14463*-*-*) ;;
14464*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14465esac
14466build=$ac_cv_build
14467ac_save_IFS=$IFS; IFS='-'
14468set x $ac_cv_build
14469shift
14470build_cpu=$1
14471build_vendor=$2
14472shift; shift
14473# Remember, the first character of IFS is used to create $*,
14474# except with old shells:
14475build_os=$*
14476IFS=$ac_save_IFS
14477case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14478
14479
14480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14481$as_echo_n "checking host system type... " >&6; }
14482if ${ac_cv_host+:} false; then :
14483  $as_echo_n "(cached) " >&6
14484else
14485  if test "x$host_alias" = x; then
14486  ac_cv_host=$ac_cv_build
14487else
14488  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14489    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14490fi
14491
14492fi
14493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14494$as_echo "$ac_cv_host" >&6; }
14495case $ac_cv_host in
14496*-*-*) ;;
14497*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14498esac
14499host=$ac_cv_host
14500ac_save_IFS=$IFS; IFS='-'
14501set x $ac_cv_host
14502shift
14503host_cpu=$1
14504host_vendor=$2
14505shift; shift
14506# Remember, the first character of IFS is used to create $*,
14507# except with old shells:
14508host_os=$*
14509IFS=$ac_save_IFS
14510case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14511
14512
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14514$as_echo_n "checking target system type... " >&6; }
14515if ${ac_cv_target+:} false; then :
14516  $as_echo_n "(cached) " >&6
14517else
14518  if test "x$target_alias" = x; then
14519  ac_cv_target=$ac_cv_host
14520else
14521  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14522    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14523fi
14524
14525fi
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14527$as_echo "$ac_cv_target" >&6; }
14528case $ac_cv_target in
14529*-*-*) ;;
14530*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14531esac
14532target=$ac_cv_target
14533ac_save_IFS=$IFS; IFS='-'
14534set x $ac_cv_target
14535shift
14536target_cpu=$1
14537target_vendor=$2
14538shift; shift
14539# Remember, the first character of IFS is used to create $*,
14540# except with old shells:
14541target_os=$*
14542IFS=$ac_save_IFS
14543case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14544
14545
14546# The aliases save the names the user supplied, while $host etc.
14547# will get canonicalized.
14548test -n "$target_alias" &&
14549  test "$program_prefix$program_suffix$program_transform_name" = \
14550    NONENONEs,x,x, &&
14551  program_prefix=${target_alias}-
14552
14553  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14554  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14555  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14556  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14557  # to use the configure naming style.
14558
14559
14560
14561
14562
14563  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14564  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14565  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14566  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14567  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14568  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14569
14570
14571
14572  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14573
14574  case "$build_os" in
14575    *linux*)
14576      VAR_OS=linux
14577      VAR_OS_TYPE=unix
14578      ;;
14579    *solaris*)
14580      VAR_OS=solaris
14581      VAR_OS_TYPE=unix
14582      ;;
14583    *darwin*)
14584      VAR_OS=macosx
14585      VAR_OS_TYPE=unix
14586      ;;
14587    *bsd*)
14588      VAR_OS=bsd
14589      VAR_OS_TYPE=unix
14590      ;;
14591    *cygwin*)
14592      VAR_OS=windows
14593      VAR_OS_ENV=windows.cygwin
14594      ;;
14595    *mingw*)
14596      VAR_OS=windows
14597      VAR_OS_ENV=windows.msys
14598      ;;
14599    *aix*)
14600      VAR_OS=aix
14601      VAR_OS_TYPE=unix
14602      ;;
14603    *)
14604      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14605      ;;
14606  esac
14607
14608
14609  # First argument is the cpu name from the trip/quad
14610  case "$build_cpu" in
14611    x86_64)
14612      VAR_CPU=x86_64
14613      VAR_CPU_ARCH=x86
14614      VAR_CPU_BITS=64
14615      VAR_CPU_ENDIAN=little
14616      ;;
14617    i?86)
14618      VAR_CPU=x86
14619      VAR_CPU_ARCH=x86
14620      VAR_CPU_BITS=32
14621      VAR_CPU_ENDIAN=little
14622      ;;
14623    arm*)
14624      VAR_CPU=arm
14625      VAR_CPU_ARCH=arm
14626      VAR_CPU_BITS=32
14627      VAR_CPU_ENDIAN=little
14628      ;;
14629    aarch64)
14630      VAR_CPU=aarch64
14631      VAR_CPU_ARCH=aarch64
14632      VAR_CPU_BITS=64
14633      VAR_CPU_ENDIAN=little
14634      ;;
14635    powerpc)
14636      VAR_CPU=ppc
14637      VAR_CPU_ARCH=ppc
14638      VAR_CPU_BITS=32
14639      VAR_CPU_ENDIAN=big
14640      ;;
14641    powerpc64)
14642      VAR_CPU=ppc64
14643      VAR_CPU_ARCH=ppc
14644      VAR_CPU_BITS=64
14645      VAR_CPU_ENDIAN=big
14646      ;;
14647    powerpc64le)
14648      VAR_CPU=ppc64
14649      VAR_CPU_ARCH=ppc
14650      VAR_CPU_BITS=64
14651      VAR_CPU_ENDIAN=little
14652      ;;
14653    s390)
14654      VAR_CPU=s390
14655      VAR_CPU_ARCH=s390
14656      VAR_CPU_BITS=32
14657      VAR_CPU_ENDIAN=big
14658      ;;
14659    s390x)
14660      VAR_CPU=s390x
14661      VAR_CPU_ARCH=s390
14662      VAR_CPU_BITS=64
14663      VAR_CPU_ENDIAN=big
14664      ;;
14665    sparc)
14666      VAR_CPU=sparc
14667      VAR_CPU_ARCH=sparc
14668      VAR_CPU_BITS=32
14669      VAR_CPU_ENDIAN=big
14670      ;;
14671    sparcv9|sparc64)
14672      VAR_CPU=sparcv9
14673      VAR_CPU_ARCH=sparc
14674      VAR_CPU_BITS=64
14675      VAR_CPU_ENDIAN=big
14676      ;;
14677    *)
14678      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14679      ;;
14680  esac
14681
14682  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14683  OPENJDK_BUILD_OS="$VAR_OS"
14684  if test "x$VAR_OS_TYPE" != x; then
14685    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14686  else
14687    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14688  fi
14689  if test "x$VAR_OS_ENV" != x; then
14690    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14691  else
14692    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14693  fi
14694  OPENJDK_BUILD_CPU="$VAR_CPU"
14695  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14696  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14697  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14698
14699
14700
14701
14702
14703
14704
14705
14706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14707$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14709$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14710
14711  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14712
14713  case "$host_os" in
14714    *linux*)
14715      VAR_OS=linux
14716      VAR_OS_TYPE=unix
14717      ;;
14718    *solaris*)
14719      VAR_OS=solaris
14720      VAR_OS_TYPE=unix
14721      ;;
14722    *darwin*)
14723      VAR_OS=macosx
14724      VAR_OS_TYPE=unix
14725      ;;
14726    *bsd*)
14727      VAR_OS=bsd
14728      VAR_OS_TYPE=unix
14729      ;;
14730    *cygwin*)
14731      VAR_OS=windows
14732      VAR_OS_ENV=windows.cygwin
14733      ;;
14734    *mingw*)
14735      VAR_OS=windows
14736      VAR_OS_ENV=windows.msys
14737      ;;
14738    *aix*)
14739      VAR_OS=aix
14740      VAR_OS_TYPE=unix
14741      ;;
14742    *)
14743      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14744      ;;
14745  esac
14746
14747
14748  # First argument is the cpu name from the trip/quad
14749  case "$host_cpu" in
14750    x86_64)
14751      VAR_CPU=x86_64
14752      VAR_CPU_ARCH=x86
14753      VAR_CPU_BITS=64
14754      VAR_CPU_ENDIAN=little
14755      ;;
14756    i?86)
14757      VAR_CPU=x86
14758      VAR_CPU_ARCH=x86
14759      VAR_CPU_BITS=32
14760      VAR_CPU_ENDIAN=little
14761      ;;
14762    arm*)
14763      VAR_CPU=arm
14764      VAR_CPU_ARCH=arm
14765      VAR_CPU_BITS=32
14766      VAR_CPU_ENDIAN=little
14767      ;;
14768    aarch64)
14769      VAR_CPU=aarch64
14770      VAR_CPU_ARCH=aarch64
14771      VAR_CPU_BITS=64
14772      VAR_CPU_ENDIAN=little
14773      ;;
14774    powerpc)
14775      VAR_CPU=ppc
14776      VAR_CPU_ARCH=ppc
14777      VAR_CPU_BITS=32
14778      VAR_CPU_ENDIAN=big
14779      ;;
14780    powerpc64)
14781      VAR_CPU=ppc64
14782      VAR_CPU_ARCH=ppc
14783      VAR_CPU_BITS=64
14784      VAR_CPU_ENDIAN=big
14785      ;;
14786    powerpc64le)
14787      VAR_CPU=ppc64
14788      VAR_CPU_ARCH=ppc
14789      VAR_CPU_BITS=64
14790      VAR_CPU_ENDIAN=little
14791      ;;
14792    s390)
14793      VAR_CPU=s390
14794      VAR_CPU_ARCH=s390
14795      VAR_CPU_BITS=32
14796      VAR_CPU_ENDIAN=big
14797      ;;
14798    s390x)
14799      VAR_CPU=s390x
14800      VAR_CPU_ARCH=s390
14801      VAR_CPU_BITS=64
14802      VAR_CPU_ENDIAN=big
14803      ;;
14804    sparc)
14805      VAR_CPU=sparc
14806      VAR_CPU_ARCH=sparc
14807      VAR_CPU_BITS=32
14808      VAR_CPU_ENDIAN=big
14809      ;;
14810    sparcv9|sparc64)
14811      VAR_CPU=sparcv9
14812      VAR_CPU_ARCH=sparc
14813      VAR_CPU_BITS=64
14814      VAR_CPU_ENDIAN=big
14815      ;;
14816    *)
14817      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14818      ;;
14819  esac
14820
14821  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14822  OPENJDK_TARGET_OS="$VAR_OS"
14823  if test "x$VAR_OS_TYPE" != x; then
14824    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14825  else
14826    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14827  fi
14828  if test "x$VAR_OS_ENV" != x; then
14829    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14830  else
14831    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14832  fi
14833  OPENJDK_TARGET_CPU="$VAR_CPU"
14834  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14835  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14836  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14837
14838
14839
14840
14841
14842
14843
14844
14845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14846$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14848$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14849
14850
14851
14852# Check whether --with-target-bits was given.
14853if test "${with_target_bits+set}" = set; then :
14854  withval=$with_target_bits;
14855fi
14856
14857
14858  # We have three types of compiles:
14859  # native  == normal compilation, target system == build system
14860  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14861  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14862  #
14863  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14864    # We're doing a proper cross-compilation
14865    COMPILE_TYPE="cross"
14866  else
14867    COMPILE_TYPE="native"
14868  fi
14869
14870  if test "x$with_target_bits" != x; then
14871    if test "x$COMPILE_TYPE" = "xcross"; then
14872      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14873    fi
14874
14875    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14876      # A reduced build is requested
14877      COMPILE_TYPE="reduced"
14878      OPENJDK_TARGET_CPU_BITS=32
14879      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14880        OPENJDK_TARGET_CPU=x86
14881      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14882        OPENJDK_TARGET_CPU=sparc
14883      else
14884        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14885      fi
14886    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14887      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
14888    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14889      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14890$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14891    else
14892      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14893    fi
14894  fi
14895
14896
14897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14898$as_echo_n "checking compilation type... " >&6; }
14899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14900$as_echo "$COMPILE_TYPE" >&6; }
14901
14902
14903  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14904    REQUIRED_OS_NAME=SunOS
14905    REQUIRED_OS_VERSION=5.10
14906  fi
14907  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14908    REQUIRED_OS_NAME=Linux
14909    REQUIRED_OS_VERSION=2.6
14910  fi
14911  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14912    REQUIRED_OS_NAME=Windows
14913    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14914      REQUIRED_OS_VERSION=5.2
14915    else
14916      REQUIRED_OS_VERSION=5.1
14917    fi
14918  fi
14919  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14920    REQUIRED_OS_NAME=Darwin
14921    REQUIRED_OS_VERSION=11.2
14922  fi
14923
14924
14925
14926
14927
14928  # Also store the legacy naming of the cpu.
14929  # Ie i586 and amd64 instead of x86 and x86_64
14930  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14931  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14932    OPENJDK_TARGET_CPU_LEGACY="i586"
14933  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14934    # On all platforms except MacOSX replace x86_64 with amd64.
14935    OPENJDK_TARGET_CPU_LEGACY="amd64"
14936  fi
14937
14938
14939  # And the second legacy naming of the cpu.
14940  # Ie i386 and amd64 instead of x86 and x86_64.
14941  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14942  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14943    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14944  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14945    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14946  fi
14947
14948
14949  # This is the name of the cpu (but using i386 and amd64 instead of
14950  # x86 and x86_64, respectively), preceeded by a /, to be used when
14951  # locating libraries. On macosx, it's empty, though.
14952  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14953  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14954    OPENJDK_TARGET_CPU_LIBDIR=""
14955  fi
14956
14957
14958  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14959  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14960  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14961  OPENJDK_TARGET_CPU_ISADIR=""
14962  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14963    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14964      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14965    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14966      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14967    fi
14968  fi
14969
14970
14971  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14972  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14973  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14974    # On linux only, we replace x86 with i386.
14975    OPENJDK_TARGET_CPU_OSARCH="i386"
14976  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14977    # On all platforms except macosx, we replace x86_64 with amd64.
14978    OPENJDK_TARGET_CPU_OSARCH="amd64"
14979  fi
14980
14981
14982  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14983  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14984    OPENJDK_TARGET_CPU_JLI="i386"
14985  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14986    # On all platforms except macosx, we replace x86_64 with amd64.
14987    OPENJDK_TARGET_CPU_JLI="amd64"
14988  fi
14989  # Now setup the -D flags for building libjli.
14990  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14991  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14992    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14993      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14994    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14995      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14996    fi
14997  fi
14998
14999
15000  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15001      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15002  else
15003      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15004  fi
15005
15006
15007  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15008    A_LP64="LP64:="
15009    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15010    # unpack200.exe
15011    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15012      ADD_LP64="-D_LP64=1"
15013    fi
15014  fi
15015  LP64=$A_LP64
15016
15017
15018  if test "x$COMPILE_TYPE" = "xcross"; then
15019    # FIXME: ... or should this include reduced builds..?
15020    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15021  else
15022    DEFINE_CROSS_COMPILE_ARCH=""
15023  fi
15024
15025
15026  # ZERO_ARCHDEF is used to enable architecture-specific code
15027  case "${OPENJDK_TARGET_CPU}" in
15028    ppc)     ZERO_ARCHDEF=PPC32 ;;
15029    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15030    s390*)   ZERO_ARCHDEF=S390  ;;
15031    sparc*)  ZERO_ARCHDEF=SPARC ;;
15032    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15033    x86)     ZERO_ARCHDEF=IA32  ;;
15034    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15035  esac
15036
15037
15038
15039
15040# Continue setting up basic stuff. Most remaining code require fundamental tools.
15041
15042  # Save the current directory this script was started from
15043  CURDIR="$PWD"
15044
15045  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15046  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15047  # was not available at that time.
15048  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15049  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15050    ORIGINAL_PATH="$REWRITTEN_PATH"
15051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15052$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15053  fi
15054
15055  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15056    PATH_SEP=";"
15057
15058  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15059  if test $SRC_ROOT_LENGTH -gt 100; then
15060    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15061  fi
15062
15063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15065$as_echo_n "checking cygwin release... " >&6; }
15066    CYGWIN_VERSION=`$UNAME -r`
15067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15068$as_echo "$CYGWIN_VERSION" >&6; }
15069    WINDOWS_ENV_VENDOR='cygwin'
15070    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15071
15072    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15073    if test "x$CYGWIN_VERSION_OLD" != x; then
15074      { $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
15075$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;}
15076      as_fn_error $? "Cannot continue" "$LINENO" 5
15077    fi
15078    if test "x$CYGPATH" = x; then
15079      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15080    fi
15081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15082$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15083    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15084    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15085    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15086    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15088$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15089    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15090    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15091    if test "x$test_cygdrive_prefix" = x; then
15092      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15093    fi
15094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15096$as_echo_n "checking msys release... " >&6; }
15097    MSYS_VERSION=`$UNAME -r`
15098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15099$as_echo "$MSYS_VERSION" >&6; }
15100
15101    WINDOWS_ENV_VENDOR='msys'
15102    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15103
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15105$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15106    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15107    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15108
15109  windows_path="$MSYS_ROOT_PATH"
15110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15111    unix_path=`$CYGPATH -u "$windows_path"`
15112    MSYS_ROOT_PATH="$unix_path"
15113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15115    MSYS_ROOT_PATH="$unix_path"
15116  fi
15117
15118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15119$as_echo "$MSYS_ROOT_PATH" >&6; }
15120    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15121  else
15122    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15123  fi
15124
15125  # Test if windows or unix (cygwin/msys) find is first in path.
15126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15127$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15128  FIND_BINARY_OUTPUT=`find --version 2>&1`
15129  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15131$as_echo "unix style" >&6; }
15132  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15134$as_echo "Windows" >&6; }
15135    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15136$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15137    { $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
15138$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15139    as_fn_error $? "Cannot continue" "$LINENO" 5
15140  else
15141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15142$as_echo "unknown" >&6; }
15143    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15144$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15145  fi
15146
15147  else
15148    PATH_SEP=":"
15149  fi
15150
15151
15152  # We get the top-level directory from the supporting wrappers.
15153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15154$as_echo_n "checking for top-level directory... " >&6; }
15155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15156$as_echo "$TOPDIR" >&6; }
15157
15158
15159  # Save the original version of TOPDIR for string comparisons
15160  ORIGINAL_TOPDIR="$TOPDIR"
15161
15162
15163  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15164
15165  # Only process if variable expands to non-empty
15166
15167  if test "x$CURDIR" != x; then
15168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15169
15170  # Input might be given as Windows format, start by converting to
15171  # unix format.
15172  path="$CURDIR"
15173  new_path=`$CYGPATH -u "$path"`
15174
15175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15178  # "foo.exe" is OK but "foo" is an error.
15179  #
15180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15181  # It is also a way to make sure we got the proper file name for the real test later on.
15182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15183  if test "x$test_shortpath" = x; then
15184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15185$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15186    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15187  fi
15188
15189  # Call helper function which possibly converts this using DOS-style short mode.
15190  # If so, the updated path is stored in $new_path.
15191
15192  input_path="$new_path"
15193  # Check if we need to convert this using DOS-style short mode. If the path
15194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15195  # take no chances and rewrite it.
15196  # Note: m4 eats our [], so we need to use [ and ] instead.
15197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15198  if test "x$has_forbidden_chars" != x; then
15199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15203      # Going to short mode and back again did indeed matter. Since short mode is
15204      # case insensitive, let's make it lowercase to improve readability.
15205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15206      # Now convert it back to Unix-style (cygpath)
15207      input_path=`$CYGPATH -u "$shortmode_path"`
15208      new_path="$input_path"
15209    fi
15210  fi
15211
15212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15213  if test "x$test_cygdrive_prefix" = x; then
15214    # As a simple fix, exclude /usr/bin since it's not a real path.
15215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15217      # a path prefixed by /cygdrive for fixpath to work.
15218      new_path="$CYGWIN_ROOT_PATH$input_path"
15219    fi
15220  fi
15221
15222
15223  if test "x$path" != "x$new_path"; then
15224    CURDIR="$new_path"
15225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15226$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15227  fi
15228
15229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15230
15231  path="$CURDIR"
15232  has_colon=`$ECHO $path | $GREP ^.:`
15233  new_path="$path"
15234  if test "x$has_colon" = x; then
15235    # Not in mixed or Windows style, start by that.
15236    new_path=`cmd //c echo $path`
15237  fi
15238
15239
15240  input_path="$new_path"
15241  # Check if we need to convert this using DOS-style short mode. If the path
15242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15243  # take no chances and rewrite it.
15244  # Note: m4 eats our [], so we need to use [ and ] instead.
15245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15246  if test "x$has_forbidden_chars" != x; then
15247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249  fi
15250
15251
15252  windows_path="$new_path"
15253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15254    unix_path=`$CYGPATH -u "$windows_path"`
15255    new_path="$unix_path"
15256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15258    new_path="$unix_path"
15259  fi
15260
15261  if test "x$path" != "x$new_path"; then
15262    CURDIR="$new_path"
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15264$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15265  fi
15266
15267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15269
15270    else
15271      # We're on a unix platform. Hooray! :)
15272      path="$CURDIR"
15273      has_space=`$ECHO "$path" | $GREP " "`
15274      if test "x$has_space" != x; then
15275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15276$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15278      fi
15279
15280      # Use eval to expand a potential ~
15281      eval path="$path"
15282      if test ! -f "$path" && test ! -d "$path"; then
15283        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15284      fi
15285
15286      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15287    fi
15288  fi
15289
15290
15291  # Only process if variable expands to non-empty
15292
15293  if test "x$TOPDIR" != x; then
15294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15295
15296  # Input might be given as Windows format, start by converting to
15297  # unix format.
15298  path="$TOPDIR"
15299  new_path=`$CYGPATH -u "$path"`
15300
15301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15304  # "foo.exe" is OK but "foo" is an error.
15305  #
15306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15307  # It is also a way to make sure we got the proper file name for the real test later on.
15308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15309  if test "x$test_shortpath" = x; then
15310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15311$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15312    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15313  fi
15314
15315  # Call helper function which possibly converts this using DOS-style short mode.
15316  # If so, the updated path is stored in $new_path.
15317
15318  input_path="$new_path"
15319  # Check if we need to convert this using DOS-style short mode. If the path
15320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15321  # take no chances and rewrite it.
15322  # Note: m4 eats our [], so we need to use [ and ] instead.
15323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15324  if test "x$has_forbidden_chars" != x; then
15325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15329      # Going to short mode and back again did indeed matter. Since short mode is
15330      # case insensitive, let's make it lowercase to improve readability.
15331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15332      # Now convert it back to Unix-style (cygpath)
15333      input_path=`$CYGPATH -u "$shortmode_path"`
15334      new_path="$input_path"
15335    fi
15336  fi
15337
15338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15339  if test "x$test_cygdrive_prefix" = x; then
15340    # As a simple fix, exclude /usr/bin since it's not a real path.
15341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15343      # a path prefixed by /cygdrive for fixpath to work.
15344      new_path="$CYGWIN_ROOT_PATH$input_path"
15345    fi
15346  fi
15347
15348
15349  if test "x$path" != "x$new_path"; then
15350    TOPDIR="$new_path"
15351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15352$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15353  fi
15354
15355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15356
15357  path="$TOPDIR"
15358  has_colon=`$ECHO $path | $GREP ^.:`
15359  new_path="$path"
15360  if test "x$has_colon" = x; then
15361    # Not in mixed or Windows style, start by that.
15362    new_path=`cmd //c echo $path`
15363  fi
15364
15365
15366  input_path="$new_path"
15367  # Check if we need to convert this using DOS-style short mode. If the path
15368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15369  # take no chances and rewrite it.
15370  # Note: m4 eats our [], so we need to use [ and ] instead.
15371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15372  if test "x$has_forbidden_chars" != x; then
15373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15375  fi
15376
15377
15378  windows_path="$new_path"
15379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15380    unix_path=`$CYGPATH -u "$windows_path"`
15381    new_path="$unix_path"
15382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15384    new_path="$unix_path"
15385  fi
15386
15387  if test "x$path" != "x$new_path"; then
15388    TOPDIR="$new_path"
15389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15390$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15391  fi
15392
15393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15395
15396    else
15397      # We're on a unix platform. Hooray! :)
15398      path="$TOPDIR"
15399      has_space=`$ECHO "$path" | $GREP " "`
15400      if test "x$has_space" != x; then
15401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15402$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15404      fi
15405
15406      # Use eval to expand a potential ~
15407      eval path="$path"
15408      if test ! -f "$path" && test ! -d "$path"; then
15409        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15410      fi
15411
15412      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15413    fi
15414  fi
15415
15416  # SRC_ROOT is a traditional alias for TOPDIR.
15417  SRC_ROOT=$TOPDIR
15418
15419  # Calculate a canonical version of TOPDIR for string comparisons
15420  CANONICAL_TOPDIR=$TOPDIR
15421
15422  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15423    # Follow a chain of symbolic links. Use readlink
15424    # where it exists, else fall back to horribly
15425    # complicated shell code.
15426    if test "x$READLINK_TESTED" != yes; then
15427      # On MacOSX there is a readlink tool with a different
15428      # purpose than the GNU readlink tool. Check the found readlink.
15429      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15430      if test "x$ISGNU" = x; then
15431        # A readlink that we do not know how to use.
15432        # Are there other non-GNU readlinks out there?
15433        READLINK_TESTED=yes
15434        READLINK=
15435      fi
15436    fi
15437
15438    if test "x$READLINK" != x; then
15439      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15440    else
15441      # Save the current directory for restoring afterwards
15442      STARTDIR=$PWD
15443      COUNTER=0
15444      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15445      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15446      cd $sym_link_dir
15447      # Use -P flag to resolve symlinks in directories.
15448      cd `$THEPWDCMD -P`
15449      sym_link_dir=`$THEPWDCMD -P`
15450      # Resolve file symlinks
15451      while test $COUNTER -lt 20; do
15452        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15453        if test "x$ISLINK" == x; then
15454          # This is not a symbolic link! We are done!
15455          break
15456        fi
15457        # Again resolve directory symlinks since the target of the just found
15458        # link could be in a different directory
15459        cd `$DIRNAME $ISLINK`
15460        sym_link_dir=`$THEPWDCMD -P`
15461        sym_link_file=`$BASENAME $ISLINK`
15462        let COUNTER=COUNTER+1
15463      done
15464      cd $STARTDIR
15465      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15466    fi
15467  fi
15468
15469
15470
15471  # Locate the directory of this script.
15472  AUTOCONF_DIR=$TOPDIR/common/autoconf
15473
15474
15475# Check if it's a pure open build or if custom sources are to be used.
15476
15477  # Check whether --enable-openjdk-only was given.
15478if test "${enable_openjdk_only+set}" = set; then :
15479  enableval=$enable_openjdk_only;
15480else
15481  enable_openjdk_only="no"
15482fi
15483
15484
15485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15486$as_echo_n "checking for presence of closed sources... " >&6; }
15487  if test -d "$SRC_ROOT/jdk/src/closed"; then
15488    CLOSED_SOURCE_PRESENT=yes
15489  else
15490    CLOSED_SOURCE_PRESENT=no
15491  fi
15492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15493$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15494
15495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15496$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15497  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15499$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15500
15501  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15502    OPENJDK=true
15503    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15504      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15505$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15506    fi
15507  else
15508    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15509      OPENJDK=true
15510    else
15511      OPENJDK=false
15512    fi
15513  fi
15514
15515  if test "x$OPENJDK" = "xtrue"; then
15516    SET_OPENJDK="OPENJDK=true"
15517  fi
15518
15519
15520
15521  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15522  # the IncludeCustomExtension macro.
15523
15524
15525# Check whether --with-custom-make-dir was given.
15526if test "${with_custom_make_dir+set}" = set; then :
15527  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
15528$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15529fi
15530
15531
15532
15533
15534# These are needed to be able to create a configuration name (and thus the output directory)
15535
15536  ###############################################################################
15537  #
15538  # Check which variant of the JDK that we want to build.
15539  # Currently we have:
15540  #    normal:   standard edition
15541  # but the custom make system may add other variants
15542  #
15543  # Effectively the JDK variant gives a name to a specific set of
15544  # modules to compile into the JDK. In the future, these modules
15545  # might even be Jigsaw modules.
15546  #
15547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15548$as_echo_n "checking which variant of the JDK to build... " >&6; }
15549
15550# Check whether --with-jdk-variant was given.
15551if test "${with_jdk_variant+set}" = set; then :
15552  withval=$with_jdk_variant;
15553fi
15554
15555
15556  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15557    JDK_VARIANT="normal"
15558  else
15559    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15560  fi
15561
15562
15563
15564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15565$as_echo "$JDK_VARIANT" >&6; }
15566
15567
15568###############################################################################
15569#
15570# Check which interpreter of the JVM we want to build.
15571# Currently we have:
15572#    template: Template interpreter (the default)
15573#    cpp     : C++ interpreter
15574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15575$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15576
15577# Check whether --with-jvm-interpreter was given.
15578if test "${with_jvm_interpreter+set}" = set; then :
15579  withval=$with_jvm_interpreter;
15580fi
15581
15582
15583if test "x$with_jvm_interpreter" = x; then
15584     with_jvm_interpreter="template"
15585fi
15586
15587JVM_INTERPRETER="$with_jvm_interpreter"
15588
15589if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15590   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15591fi
15592
15593
15594
15595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15596$as_echo "$with_jvm_interpreter" >&6; }
15597
15598
15599
15600  ###############################################################################
15601  #
15602  # Check which variants of the JVM that we want to build.
15603  # Currently we have:
15604  #    server: normal interpreter and a tiered C1/C2 compiler
15605  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15606  #    minimal1: reduced form of client with optional VM services and features stripped out
15607  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15608  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15609  #    zero: no machine code interpreter, no compiler
15610  #    zeroshark: zero interpreter and shark/llvm compiler backend
15611#    core: interpreter only, no compiler (only works on some platforms)
15612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15613$as_echo_n "checking which variants of the JVM to build... " >&6; }
15614
15615# Check whether --with-jvm-variants was given.
15616if test "${with_jvm_variants+set}" = set; then :
15617  withval=$with_jvm_variants;
15618fi
15619
15620
15621  if test "x$with_jvm_variants" = x; then
15622    with_jvm_variants="server"
15623  fi
15624
15625  JVM_VARIANTS=",$with_jvm_variants,"
15626  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,//'`
15627
15628  if test "x$TEST_VARIANTS" != "x,"; then
15629     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15630  fi
15631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15632$as_echo "$with_jvm_variants" >&6; }
15633
15634  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15635  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15636  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15637  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15638  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15639  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15640  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15641
15642  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15643    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15644      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15645    fi
15646  fi
15647  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15648    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15649      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15650    fi
15651  fi
15652  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15653    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15654      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15655    fi
15656  fi
15657
15658  # Replace the commas with AND for use in the build directory name.
15659  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15660  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/'`
15661  if test "x$COUNT_VARIANTS" != "x,1"; then
15662    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15663  else
15664    BUILDING_MULTIPLE_JVM_VARIANTS=no
15665  fi
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676  INCLUDE_SA=true
15677  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15678    INCLUDE_SA=false
15679  fi
15680  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15681    INCLUDE_SA=false
15682  fi
15683  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15684    INCLUDE_SA=false
15685  fi
15686  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15687    INCLUDE_SA=false
15688  fi
15689
15690
15691  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15692    MACOSX_UNIVERSAL="true"
15693  fi
15694
15695
15696
15697
15698  ###############################################################################
15699  #
15700  # Set the debug level
15701  #    release: no debug information, all optimizations, no asserts.
15702  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15703  #    fastdebug: debug information (-g), all optimizations, all asserts
15704  #    slowdebug: debug information (-g), no optimizations, all asserts
15705  #
15706  DEBUG_LEVEL="release"
15707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15708$as_echo_n "checking which debug level to use... " >&6; }
15709  # Check whether --enable-debug was given.
15710if test "${enable_debug+set}" = set; then :
15711  enableval=$enable_debug;
15712        ENABLE_DEBUG="${enableval}"
15713        DEBUG_LEVEL="fastdebug"
15714
15715else
15716  ENABLE_DEBUG="no"
15717fi
15718
15719
15720
15721# Check whether --with-debug-level was given.
15722if test "${with_debug_level+set}" = set; then :
15723  withval=$with_debug_level;
15724        DEBUG_LEVEL="${withval}"
15725        if test "x$ENABLE_DEBUG" = xyes; then
15726          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15727        fi
15728
15729fi
15730
15731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15732$as_echo "$DEBUG_LEVEL" >&6; }
15733
15734  if test "x$DEBUG_LEVEL" != xrelease && \
15735      test "x$DEBUG_LEVEL" != xoptimized && \
15736      test "x$DEBUG_LEVEL" != xfastdebug && \
15737      test "x$DEBUG_LEVEL" != xslowdebug; then
15738    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15739  fi
15740
15741
15742  ###############################################################################
15743  #
15744  # Setup legacy vars/targets and new vars to deal with different debug levels.
15745  #
15746
15747  case $DEBUG_LEVEL in
15748    release )
15749      VARIANT="OPT"
15750      FASTDEBUG="false"
15751      DEBUG_CLASSFILES="false"
15752      BUILD_VARIANT_RELEASE=""
15753      HOTSPOT_DEBUG_LEVEL="product"
15754      HOTSPOT_EXPORT="product"
15755      ;;
15756    fastdebug )
15757      VARIANT="DBG"
15758      FASTDEBUG="true"
15759      DEBUG_CLASSFILES="true"
15760      BUILD_VARIANT_RELEASE="-fastdebug"
15761      HOTSPOT_DEBUG_LEVEL="fastdebug"
15762      HOTSPOT_EXPORT="fastdebug"
15763      ;;
15764    slowdebug )
15765      VARIANT="DBG"
15766      FASTDEBUG="false"
15767      DEBUG_CLASSFILES="true"
15768      BUILD_VARIANT_RELEASE="-debug"
15769      HOTSPOT_DEBUG_LEVEL="debug"
15770      HOTSPOT_EXPORT="debug"
15771      ;;
15772    optimized )
15773      VARIANT="OPT"
15774      FASTDEBUG="false"
15775      DEBUG_CLASSFILES="false"
15776      BUILD_VARIANT_RELEASE="-optimized"
15777      HOTSPOT_DEBUG_LEVEL="optimized"
15778      HOTSPOT_EXPORT="optimized"
15779      ;;
15780  esac
15781
15782  # The debug level 'optimized' is a little special because it is currently only
15783  # applicable to the HotSpot build where it means to build a completely
15784  # optimized version of the VM without any debugging code (like for the
15785  # 'release' debug level which is called 'product' in the HotSpot build) but
15786  # with the exception that it can contain additional code which is otherwise
15787  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15788  # test new and/or experimental features which are not intended for customer
15789  # shipment. Because these new features need to be tested and benchmarked in
15790  # real world scenarios, we want to build the containing JDK at the 'release'
15791  # debug level.
15792  if test "x$DEBUG_LEVEL" = xoptimized; then
15793    DEBUG_LEVEL="release"
15794  fi
15795
15796  #####
15797  # Generate the legacy makefile targets for hotspot.
15798  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15799  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15800  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15801  # But until then ...
15802  HOTSPOT_TARGET=""
15803
15804  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15805    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15806  fi
15807
15808  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15809    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15810  fi
15811
15812  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15813    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15814  fi
15815
15816  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15817    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15818  fi
15819
15820  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15821    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15822  fi
15823
15824  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15825    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15826  fi
15827
15828  if test "x$JVM_VARIANT_CORE" = xtrue; then
15829    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15830  fi
15831
15832  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15833
15834  # On Macosx universal binaries are produced, but they only contain
15835  # 64 bit intel. This invalidates control of which jvms are built
15836  # from configure, but only server is valid anyway. Fix this
15837  # when hotspot makefiles are rewritten.
15838  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15839    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15840  fi
15841
15842  #####
15843
15844
15845
15846
15847
15848
15849
15850
15851# With basic setup done, call the custom early hook.
15852
15853
15854# Check if we have devkits, extra paths or sysroot set.
15855
15856
15857# Check whether --with-devkit was given.
15858if test "${with_devkit+set}" = set; then :
15859  withval=$with_devkit;
15860
15861  # Only process if variable expands to non-empty
15862
15863  if test "x$with_devkit" != x; then
15864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15865
15866  # Input might be given as Windows format, start by converting to
15867  # unix format.
15868  path="$with_devkit"
15869  new_path=`$CYGPATH -u "$path"`
15870
15871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15874  # "foo.exe" is OK but "foo" is an error.
15875  #
15876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15877  # It is also a way to make sure we got the proper file name for the real test later on.
15878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15879  if test "x$test_shortpath" = x; then
15880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15881$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15882    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15883  fi
15884
15885  # Call helper function which possibly converts this using DOS-style short mode.
15886  # If so, the updated path is stored in $new_path.
15887
15888  input_path="$new_path"
15889  # Check if we need to convert this using DOS-style short mode. If the path
15890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15891  # take no chances and rewrite it.
15892  # Note: m4 eats our [], so we need to use [ and ] instead.
15893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15894  if test "x$has_forbidden_chars" != x; then
15895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15899      # Going to short mode and back again did indeed matter. Since short mode is
15900      # case insensitive, let's make it lowercase to improve readability.
15901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15902      # Now convert it back to Unix-style (cygpath)
15903      input_path=`$CYGPATH -u "$shortmode_path"`
15904      new_path="$input_path"
15905    fi
15906  fi
15907
15908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15909  if test "x$test_cygdrive_prefix" = x; then
15910    # As a simple fix, exclude /usr/bin since it's not a real path.
15911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15913      # a path prefixed by /cygdrive for fixpath to work.
15914      new_path="$CYGWIN_ROOT_PATH$input_path"
15915    fi
15916  fi
15917
15918
15919  if test "x$path" != "x$new_path"; then
15920    with_devkit="$new_path"
15921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15922$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15923  fi
15924
15925    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15926
15927  path="$with_devkit"
15928  has_colon=`$ECHO $path | $GREP ^.:`
15929  new_path="$path"
15930  if test "x$has_colon" = x; then
15931    # Not in mixed or Windows style, start by that.
15932    new_path=`cmd //c echo $path`
15933  fi
15934
15935
15936  input_path="$new_path"
15937  # Check if we need to convert this using DOS-style short mode. If the path
15938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15939  # take no chances and rewrite it.
15940  # Note: m4 eats our [], so we need to use [ and ] instead.
15941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15942  if test "x$has_forbidden_chars" != x; then
15943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15945  fi
15946
15947
15948  windows_path="$new_path"
15949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15950    unix_path=`$CYGPATH -u "$windows_path"`
15951    new_path="$unix_path"
15952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15954    new_path="$unix_path"
15955  fi
15956
15957  if test "x$path" != "x$new_path"; then
15958    with_devkit="$new_path"
15959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15960$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15961  fi
15962
15963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15965
15966    else
15967      # We're on a unix platform. Hooray! :)
15968      path="$with_devkit"
15969      has_space=`$ECHO "$path" | $GREP " "`
15970      if test "x$has_space" != x; then
15971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15972$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15973        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15974      fi
15975
15976      # Use eval to expand a potential ~
15977      eval path="$path"
15978      if test ! -f "$path" && test ! -d "$path"; then
15979        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15980      fi
15981
15982      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15983    fi
15984  fi
15985
15986        DEVKIT_ROOT="$with_devkit"
15987        # Check for a meta data info file in the root of the devkit
15988        if test -f "$DEVKIT_ROOT/devkit.info"; then
15989          . $DEVKIT_ROOT/devkit.info
15990          # This potentially sets the following:
15991          # A descriptive name of the devkit
15992
15993  if test "x$DEVKIT_NAME" = x; then
15994    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15995  fi
15996
15997          # Corresponds to --with-extra-path
15998
15999  if test "x$DEVKIT_EXTRA_PATH" = x; then
16000    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16001  fi
16002
16003          # Corresponds to --with-toolchain-path
16004
16005  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16006    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16007  fi
16008
16009          # Corresponds to --with-sysroot
16010
16011  if test "x$DEVKIT_SYSROOT" = x; then
16012    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16013  fi
16014
16015
16016          # Identifies the Visual Studio version in the devkit
16017
16018  if test "x$DEVKIT_VS_VERSION" = x; then
16019    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16020  fi
16021
16022          # The Visual Studio include environment variable
16023
16024  if test "x$DEVKIT_VS_INCLUDE" = x; then
16025    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16026  fi
16027
16028          # The Visual Studio lib environment variable
16029
16030  if test "x$DEVKIT_VS_LIB" = x; then
16031    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16032  fi
16033
16034          # Corresponds to --with-msvcr-dll
16035
16036  if test "x$DEVKIT_MSVCR_DLL" = x; then
16037    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16038  fi
16039
16040          # Corresponds to --with-msvcp-dll
16041
16042  if test "x$DEVKIT_MSVCP_DLL" = x; then
16043    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16044  fi
16045
16046        fi
16047
16048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16049$as_echo_n "checking for devkit... " >&6; }
16050        if test "x$DEVKIT_NAME" != x; then
16051          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16052$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16053        else
16054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16055$as_echo "$DEVKIT_ROOT" >&6; }
16056        fi
16057
16058
16059  if test "x$DEVKIT_EXTRA_PATH" != x; then
16060    if test "x$EXTRA_PATH" = x; then
16061      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16062    else
16063      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16064    fi
16065  fi
16066
16067
16068        # Fallback default of just /bin if DEVKIT_PATH is not defined
16069        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16070          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16071        fi
16072
16073  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16074    if test "x$TOOLCHAIN_PATH" = x; then
16075      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16076    else
16077      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16078    fi
16079  fi
16080
16081
16082        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16083        # places for backwards compatiblity.
16084        if test "x$DEVKIT_SYSROOT" != x; then
16085          SYSROOT="$DEVKIT_SYSROOT"
16086        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16087          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16088        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16089          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16090        fi
16091
16092
16093fi
16094
16095
16096  # You can force the sysroot if the sysroot encoded into the compiler tools
16097  # is not correct.
16098
16099# Check whether --with-sys-root was given.
16100if test "${with_sys_root+set}" = set; then :
16101  withval=$with_sys_root; SYSROOT=$with_sys_root
16102
16103fi
16104
16105
16106
16107# Check whether --with-sysroot was given.
16108if test "${with_sysroot+set}" = set; then :
16109  withval=$with_sysroot; SYSROOT=$with_sysroot
16110
16111fi
16112
16113
16114
16115# Check whether --with-tools-dir was given.
16116if test "${with_tools_dir+set}" = set; then :
16117  withval=$with_tools_dir;
16118  if test "x$with_tools_dir" != x; then
16119    if test "x$TOOLCHAIN_PATH" = x; then
16120      TOOLCHAIN_PATH="$with_tools_dir"
16121    else
16122      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16123    fi
16124  fi
16125
16126
16127fi
16128
16129
16130
16131# Check whether --with-toolchain-path was given.
16132if test "${with_toolchain_path+set}" = set; then :
16133  withval=$with_toolchain_path;
16134  if test "x$with_toolchain_path" != x; then
16135    if test "x$TOOLCHAIN_PATH" = x; then
16136      TOOLCHAIN_PATH="$with_toolchain_path"
16137    else
16138      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16139    fi
16140  fi
16141
16142
16143fi
16144
16145
16146
16147# Check whether --with-extra-path was given.
16148if test "${with_extra_path+set}" = set; then :
16149  withval=$with_extra_path;
16150  if test "x$with_extra_path" != x; then
16151    if test "x$EXTRA_PATH" = x; then
16152      EXTRA_PATH="$with_extra_path"
16153    else
16154      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16155    fi
16156  fi
16157
16158
16159fi
16160
16161
16162  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16163    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16164    # If not, detect if Xcode is installed by running xcodebuild -version
16165    # if no Xcode installed, xcodebuild exits with 1
16166    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16167    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16168      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16169      # fall back on the stub binary in /usr/bin/xcodebuild
16170      # Extract the first word of "xcodebuild", so it can be a program name with args.
16171set dummy xcodebuild; ac_word=$2
16172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16173$as_echo_n "checking for $ac_word... " >&6; }
16174if ${ac_cv_path_XCODEBUILD+:} false; then :
16175  $as_echo_n "(cached) " >&6
16176else
16177  case $XCODEBUILD in
16178  [\\/]* | ?:[\\/]*)
16179  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16180  ;;
16181  *)
16182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16183for as_dir in $TOOLCHAIN_PATH
16184do
16185  IFS=$as_save_IFS
16186  test -z "$as_dir" && as_dir=.
16187    for ac_exec_ext in '' $ac_executable_extensions; do
16188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16189    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16191    break 2
16192  fi
16193done
16194  done
16195IFS=$as_save_IFS
16196
16197  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16198  ;;
16199esac
16200fi
16201XCODEBUILD=$ac_cv_path_XCODEBUILD
16202if test -n "$XCODEBUILD"; then
16203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16204$as_echo "$XCODEBUILD" >&6; }
16205else
16206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16207$as_echo "no" >&6; }
16208fi
16209
16210
16211    else
16212      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16213      # when only the command line tools are installed there are no SDKs, so headers
16214      # are copied into the system frameworks
16215      XCODEBUILD=
16216
16217    fi
16218
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16220$as_echo_n "checking for sdk name... " >&6; }
16221
16222# Check whether --with-sdk-name was given.
16223if test "${with_sdk_name+set}" = set; then :
16224  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16225
16226fi
16227
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16229$as_echo "$SDKNAME" >&6; }
16230
16231    # if toolchain path is specified then don't rely on system headers, they may not compile
16232    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16233    test -z "$TOOLCHAIN_PATH" && \
16234      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16235
16236    if test -z "$SYSROOT"; then
16237      if test -n "$XCODEBUILD"; then
16238        # if we don't have system headers, use default SDK name (last resort)
16239        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16240          SDKNAME=${SDKNAME:-macosx}
16241        fi
16242
16243        if test -n "$SDKNAME"; then
16244          # Call xcodebuild to determine SYSROOT
16245          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16246        fi
16247      else
16248        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16249          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
16250        fi
16251      fi
16252    else
16253      # warn user if --with-sdk-name was also set
16254      if test -n "$with_sdk_name"; then
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16256$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16257      fi
16258    fi
16259
16260    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16261      # If no system framework headers, then SYSROOT must be set, or we won't build
16262      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
16263    fi
16264
16265    # Perform a basic sanity test
16266    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16267      if test -z "$SYSROOT"; then
16268        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
16269      else
16270        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16271      fi
16272    fi
16273
16274    # set SDKROOT too, Xcode tools will pick it up
16275    SDKROOT=$SYSROOT
16276
16277  fi
16278
16279  # Prepend the extra path to the global path
16280
16281  if test "x$EXTRA_PATH" != x; then
16282    if test "x$PATH" = x; then
16283      PATH="$EXTRA_PATH"
16284    else
16285      PATH="$EXTRA_PATH:$PATH"
16286    fi
16287  fi
16288
16289
16290  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16291    # Add extra search paths on solaris for utilities like ar and as etc...
16292    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16293  fi
16294
16295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16296$as_echo_n "checking for sysroot... " >&6; }
16297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16298$as_echo "$SYSROOT" >&6; }
16299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16300$as_echo_n "checking for toolchain path... " >&6; }
16301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16302$as_echo "$TOOLCHAIN_PATH" >&6; }
16303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16304$as_echo_n "checking for extra path... " >&6; }
16305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16306$as_echo "$EXTRA_PATH" >&6; }
16307
16308
16309# To properly create a configuration name, we need to have the OpenJDK target
16310# and options (variants and debug level) parsed.
16311
16312
16313
16314# Check whether --with-conf-name was given.
16315if test "${with_conf_name+set}" = set; then :
16316  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16317fi
16318
16319
16320  # Test from where we are running configure, in or outside of src root.
16321  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16322$as_echo_n "checking where to store configuration... " >&6; }
16323  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16324      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16325      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16326    # We are running configure from the src root.
16327    # Create a default ./build/target-variant-debuglevel output root.
16328    if test "x${CONF_NAME}" = x; then
16329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16330$as_echo "in default location" >&6; }
16331      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16332    else
16333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16334$as_echo "in build directory with custom name" >&6; }
16335    fi
16336    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16337    $MKDIR -p "$OUTPUT_ROOT"
16338    if test ! -d "$OUTPUT_ROOT"; then
16339      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16340    fi
16341  else
16342    # We are running configure from outside of the src dir.
16343    # Then use the current directory as output dir!
16344    # If configuration is situated in normal build directory, just use the build
16345    # directory name as configuration name, otherwise use the complete path.
16346    if test "x${CONF_NAME}" = x; then
16347      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16348    fi
16349    OUTPUT_ROOT="$CURDIR"
16350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16351$as_echo "in current directory" >&6; }
16352
16353    # WARNING: This might be a bad thing to do. You need to be sure you want to
16354    # have a configuration in this directory. Do some sanity checks!
16355
16356    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16357      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16358      # other files
16359      files_present=`$LS $OUTPUT_ROOT`
16360      # Configure has already touched config.log and confdefs.h in the current dir when this check
16361      # is performed.
16362      filtered_files=`$ECHO "$files_present" \
16363          | $SED -e 's/config.log//g' \
16364              -e 's/configure.log//g' \
16365              -e 's/confdefs.h//g' \
16366              -e 's/ //g' \
16367          | $TR -d '\n'`
16368      if test "x$filtered_files" != x; then
16369        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16370$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16371        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16372$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16374$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16375        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16376$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16377        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16378$as_echo "$as_me: seriously mess up just about everything." >&6;}
16379        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16380$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16381        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16382$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16383        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16384      fi
16385    fi
16386  fi
16387  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16388$as_echo_n "checking what configuration name to use... " >&6; }
16389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16390$as_echo "$CONF_NAME" >&6; }
16391
16392
16393  # Only process if variable expands to non-empty
16394
16395  if test "x$OUTPUT_ROOT" != x; then
16396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16397
16398  # Input might be given as Windows format, start by converting to
16399  # unix format.
16400  path="$OUTPUT_ROOT"
16401  new_path=`$CYGPATH -u "$path"`
16402
16403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16406  # "foo.exe" is OK but "foo" is an error.
16407  #
16408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16409  # It is also a way to make sure we got the proper file name for the real test later on.
16410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16411  if test "x$test_shortpath" = x; then
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16413$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16414    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16415  fi
16416
16417  # Call helper function which possibly converts this using DOS-style short mode.
16418  # If so, the updated path is stored in $new_path.
16419
16420  input_path="$new_path"
16421  # Check if we need to convert this using DOS-style short mode. If the path
16422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16423  # take no chances and rewrite it.
16424  # Note: m4 eats our [], so we need to use [ and ] instead.
16425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16426  if test "x$has_forbidden_chars" != x; then
16427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16431      # Going to short mode and back again did indeed matter. Since short mode is
16432      # case insensitive, let's make it lowercase to improve readability.
16433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16434      # Now convert it back to Unix-style (cygpath)
16435      input_path=`$CYGPATH -u "$shortmode_path"`
16436      new_path="$input_path"
16437    fi
16438  fi
16439
16440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16441  if test "x$test_cygdrive_prefix" = x; then
16442    # As a simple fix, exclude /usr/bin since it's not a real path.
16443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16445      # a path prefixed by /cygdrive for fixpath to work.
16446      new_path="$CYGWIN_ROOT_PATH$input_path"
16447    fi
16448  fi
16449
16450
16451  if test "x$path" != "x$new_path"; then
16452    OUTPUT_ROOT="$new_path"
16453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16454$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16455  fi
16456
16457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16458
16459  path="$OUTPUT_ROOT"
16460  has_colon=`$ECHO $path | $GREP ^.:`
16461  new_path="$path"
16462  if test "x$has_colon" = x; then
16463    # Not in mixed or Windows style, start by that.
16464    new_path=`cmd //c echo $path`
16465  fi
16466
16467
16468  input_path="$new_path"
16469  # Check if we need to convert this using DOS-style short mode. If the path
16470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16471  # take no chances and rewrite it.
16472  # Note: m4 eats our [], so we need to use [ and ] instead.
16473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16474  if test "x$has_forbidden_chars" != x; then
16475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16477  fi
16478
16479
16480  windows_path="$new_path"
16481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16482    unix_path=`$CYGPATH -u "$windows_path"`
16483    new_path="$unix_path"
16484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16486    new_path="$unix_path"
16487  fi
16488
16489  if test "x$path" != "x$new_path"; then
16490    OUTPUT_ROOT="$new_path"
16491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16492$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16493  fi
16494
16495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16497
16498    else
16499      # We're on a unix platform. Hooray! :)
16500      path="$OUTPUT_ROOT"
16501      has_space=`$ECHO "$path" | $GREP " "`
16502      if test "x$has_space" != x; then
16503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16504$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16506      fi
16507
16508      # Use eval to expand a potential ~
16509      eval path="$path"
16510      if test ! -f "$path" && test ! -d "$path"; then
16511        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16512      fi
16513
16514      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16515    fi
16516  fi
16517
16518
16519  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16520  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16521
16522  SPEC=$OUTPUT_ROOT/spec.gmk
16523
16524  CONF_NAME=$CONF_NAME
16525
16526  OUTPUT_ROOT=$OUTPUT_ROOT
16527
16528
16529
16530  # The spec.gmk file contains all variables for the make system.
16531  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16532
16533  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16534  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16535
16536  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16537  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16538
16539  # The compare.sh is used to compare the build output to other builds.
16540  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16541
16542  # The generated Makefile knows where the spec.gmk is and where the source is.
16543  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16544  # which will look for generated configurations
16545  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16546
16547
16548
16549# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16550
16551  for ac_prog in apt-get yum port pkgutil pkgadd
16552do
16553  # Extract the first word of "$ac_prog", so it can be a program name with args.
16554set dummy $ac_prog; ac_word=$2
16555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16556$as_echo_n "checking for $ac_word... " >&6; }
16557if ${ac_cv_prog_PKGHANDLER+:} false; then :
16558  $as_echo_n "(cached) " >&6
16559else
16560  if test -n "$PKGHANDLER"; then
16561  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16562else
16563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16564for as_dir in $PATH
16565do
16566  IFS=$as_save_IFS
16567  test -z "$as_dir" && as_dir=.
16568    for ac_exec_ext in '' $ac_executable_extensions; do
16569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16570    ac_cv_prog_PKGHANDLER="$ac_prog"
16571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16572    break 2
16573  fi
16574done
16575  done
16576IFS=$as_save_IFS
16577
16578fi
16579fi
16580PKGHANDLER=$ac_cv_prog_PKGHANDLER
16581if test -n "$PKGHANDLER"; then
16582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16583$as_echo "$PKGHANDLER" >&6; }
16584else
16585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16586$as_echo "no" >&6; }
16587fi
16588
16589
16590  test -n "$PKGHANDLER" && break
16591done
16592
16593
16594
16595# Setup tools that requires more complex handling, or that is not needed by the configure script.
16596
16597
16598
16599  # Publish this variable in the help.
16600
16601
16602  if [ -z "${MAKE+x}" ]; then
16603    # The variable is not set by user, try to locate tool using the code snippet
16604
16605    # Try our hardest to locate a correct version of GNU make
16606    for ac_prog in gmake
16607do
16608  # Extract the first word of "$ac_prog", so it can be a program name with args.
16609set dummy $ac_prog; ac_word=$2
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16611$as_echo_n "checking for $ac_word... " >&6; }
16612if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16613  $as_echo_n "(cached) " >&6
16614else
16615  case $CHECK_GMAKE in
16616  [\\/]* | ?:[\\/]*)
16617  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16618  ;;
16619  *)
16620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16621for as_dir in $PATH
16622do
16623  IFS=$as_save_IFS
16624  test -z "$as_dir" && as_dir=.
16625    for ac_exec_ext in '' $ac_executable_extensions; do
16626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16627    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16629    break 2
16630  fi
16631done
16632  done
16633IFS=$as_save_IFS
16634
16635  ;;
16636esac
16637fi
16638CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16639if test -n "$CHECK_GMAKE"; then
16640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16641$as_echo "$CHECK_GMAKE" >&6; }
16642else
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16644$as_echo "no" >&6; }
16645fi
16646
16647
16648  test -n "$CHECK_GMAKE" && break
16649done
16650
16651
16652  MAKE_CANDIDATE=""$CHECK_GMAKE""
16653  DESCRIPTION="gmake in PATH"
16654
16655  # On Cygwin, we require a newer version of make than on other platforms
16656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16657    MAKE_VERSION_EXPR="-e 4\."
16658    MAKE_REQUIRED_VERSION="4.0"
16659   else
16660    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16661    MAKE_REQUIRED_VERSION="3.81"
16662  fi
16663
16664  if test "x$MAKE_CANDIDATE" != x; then
16665    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16666$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16667    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16668    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16669    if test "x$IS_GNU_MAKE" = x; then
16670      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16671$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16672    else
16673      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16674      if test "x$IS_MODERN_MAKE" = x; then
16675        { $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
16676$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;}
16677      else
16678        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16679          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16680            MAKE_EXPECTED_ENV='cygwin'
16681          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16682            MAKE_EXPECTED_ENV='msys'
16683          else
16684            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16685          fi
16686          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16687          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16688        else
16689          # Not relevant for non-Windows
16690          IS_MAKE_CORRECT_ENV=true
16691        fi
16692        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16693          { $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
16694$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;}
16695        else
16696          FOUND_MAKE=$MAKE_CANDIDATE
16697
16698  # Only process if variable expands to non-empty
16699
16700  if test "x$FOUND_MAKE" != x; then
16701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16702
16703  # First separate the path from the arguments. This will split at the first
16704  # space.
16705  complete="$FOUND_MAKE"
16706  path="${complete%% *}"
16707  tmp="$complete EOL"
16708  arguments="${tmp#* }"
16709
16710  # Input might be given as Windows format, start by converting to
16711  # unix format.
16712  new_path=`$CYGPATH -u "$path"`
16713
16714  # Now try to locate executable using which
16715  new_path=`$WHICH "$new_path" 2> /dev/null`
16716  # bat and cmd files are not always considered executable in cygwin causing which
16717  # to not find them
16718  if test "x$new_path" = x \
16719      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16720      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16721    new_path=`$CYGPATH -u "$path"`
16722  fi
16723  if test "x$new_path" = x; then
16724    # Oops. Which didn't find the executable.
16725    # The splitting of arguments from the executable at a space might have been incorrect,
16726    # since paths with space are more likely in Windows. Give it another try with the whole
16727    # argument.
16728    path="$complete"
16729    arguments="EOL"
16730    new_path=`$CYGPATH -u "$path"`
16731    new_path=`$WHICH "$new_path" 2> /dev/null`
16732    # bat and cmd files are not always considered executable in cygwin causing which
16733    # to not find them
16734    if test "x$new_path" = x \
16735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16737      new_path=`$CYGPATH -u "$path"`
16738    fi
16739    if test "x$new_path" = x; then
16740      # It's still not found. Now this is an unrecoverable error.
16741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16742$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16743      has_space=`$ECHO "$complete" | $GREP " "`
16744      if test "x$has_space" != x; then
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16747      fi
16748      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16749    fi
16750  fi
16751
16752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16755  # "foo.exe" is OK but "foo" is an error.
16756  #
16757  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16758  # It is also a way to make sure we got the proper file name for the real test later on.
16759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16760  if test "x$test_shortpath" = x; then
16761    # Short path failed, file does not exist as specified.
16762    # Try adding .exe or .cmd
16763    if test -f "${new_path}.exe"; then
16764      input_to_shortpath="${new_path}.exe"
16765    elif test -f "${new_path}.cmd"; then
16766      input_to_shortpath="${new_path}.cmd"
16767    else
16768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16769$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16770      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16771$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16772      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16773    fi
16774  else
16775    input_to_shortpath="$new_path"
16776  fi
16777
16778  # Call helper function which possibly converts this using DOS-style short mode.
16779  # If so, the updated path is stored in $new_path.
16780  new_path="$input_to_shortpath"
16781
16782  input_path="$input_to_shortpath"
16783  # Check if we need to convert this using DOS-style short mode. If the path
16784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16785  # take no chances and rewrite it.
16786  # Note: m4 eats our [], so we need to use [ and ] instead.
16787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16788  if test "x$has_forbidden_chars" != x; then
16789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16793      # Going to short mode and back again did indeed matter. Since short mode is
16794      # case insensitive, let's make it lowercase to improve readability.
16795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16796      # Now convert it back to Unix-style (cygpath)
16797      input_path=`$CYGPATH -u "$shortmode_path"`
16798      new_path="$input_path"
16799    fi
16800  fi
16801
16802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16803  if test "x$test_cygdrive_prefix" = x; then
16804    # As a simple fix, exclude /usr/bin since it's not a real path.
16805    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16807      # a path prefixed by /cygdrive for fixpath to work.
16808      new_path="$CYGWIN_ROOT_PATH$input_path"
16809    fi
16810  fi
16811
16812  # remove trailing .exe if any
16813  new_path="${new_path/%.exe/}"
16814
16815    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16816
16817  # First separate the path from the arguments. This will split at the first
16818  # space.
16819  complete="$FOUND_MAKE"
16820  path="${complete%% *}"
16821  tmp="$complete EOL"
16822  arguments="${tmp#* }"
16823
16824  # Input might be given as Windows format, start by converting to
16825  # unix format.
16826  new_path="$path"
16827
16828  windows_path="$new_path"
16829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830    unix_path=`$CYGPATH -u "$windows_path"`
16831    new_path="$unix_path"
16832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16834    new_path="$unix_path"
16835  fi
16836
16837
16838  # Now try to locate executable using which
16839  new_path=`$WHICH "$new_path" 2> /dev/null`
16840
16841  if test "x$new_path" = x; then
16842    # Oops. Which didn't find the executable.
16843    # The splitting of arguments from the executable at a space might have been incorrect,
16844    # since paths with space are more likely in Windows. Give it another try with the whole
16845    # argument.
16846    path="$complete"
16847    arguments="EOL"
16848    new_path="$path"
16849
16850  windows_path="$new_path"
16851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16852    unix_path=`$CYGPATH -u "$windows_path"`
16853    new_path="$unix_path"
16854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16856    new_path="$unix_path"
16857  fi
16858
16859
16860    new_path=`$WHICH "$new_path" 2> /dev/null`
16861    # bat and cmd files are not always considered executable in MSYS causing which
16862    # to not find them
16863    if test "x$new_path" = x \
16864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16866      new_path="$path"
16867
16868  windows_path="$new_path"
16869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16870    unix_path=`$CYGPATH -u "$windows_path"`
16871    new_path="$unix_path"
16872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16874    new_path="$unix_path"
16875  fi
16876
16877    fi
16878
16879    if test "x$new_path" = x; then
16880      # It's still not found. Now this is an unrecoverable error.
16881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16882$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16883      has_space=`$ECHO "$complete" | $GREP " "`
16884      if test "x$has_space" != x; then
16885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16887      fi
16888      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16889    fi
16890  fi
16891
16892  # Now new_path has a complete unix path to the binary
16893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16894    # Keep paths in /bin as-is, but remove trailing .exe if any
16895    new_path="${new_path/%.exe/}"
16896    # Do not save /bin paths to all_fixpath_prefixes!
16897  else
16898    # Not in mixed or Windows style, start by that.
16899    new_path=`cmd //c echo $new_path`
16900
16901  input_path="$new_path"
16902  # Check if we need to convert this using DOS-style short mode. If the path
16903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16904  # take no chances and rewrite it.
16905  # Note: m4 eats our [], so we need to use [ and ] instead.
16906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16907  if test "x$has_forbidden_chars" != x; then
16908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16910  fi
16911
16912    # Output is in $new_path
16913
16914  windows_path="$new_path"
16915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16916    unix_path=`$CYGPATH -u "$windows_path"`
16917    new_path="$unix_path"
16918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16920    new_path="$unix_path"
16921  fi
16922
16923    # remove trailing .exe if any
16924    new_path="${new_path/%.exe/}"
16925
16926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16928  fi
16929
16930    else
16931      # We're on a unix platform. Hooray! :)
16932      # First separate the path from the arguments. This will split at the first
16933      # space.
16934      complete="$FOUND_MAKE"
16935      path="${complete%% *}"
16936      tmp="$complete EOL"
16937      arguments="${tmp#* }"
16938
16939      # Cannot rely on the command "which" here since it doesn't always work.
16940      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16941      if test -z "$is_absolute_path"; then
16942        # Path to executable is not absolute. Find it.
16943        IFS_save="$IFS"
16944        IFS=:
16945        for p in $PATH; do
16946          if test -f "$p/$path" && test -x "$p/$path"; then
16947            new_path="$p/$path"
16948            break
16949          fi
16950        done
16951        IFS="$IFS_save"
16952      else
16953        # This is an absolute path, we can use it without further modifications.
16954        new_path="$path"
16955      fi
16956
16957      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
16963$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
16970    if test "x$arguments" != xEOL; then
16971      new_complete="$new_path ${arguments% *}"
16972    else
16973      new_complete="$new_path"
16974    fi
16975
16976    if test "x$complete" != "x$new_complete"; then
16977      FOUND_MAKE="$new_complete"
16978      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16979$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16980    fi
16981  fi
16982
16983        fi
16984      fi
16985    fi
16986  fi
16987
16988
16989    if test "x$FOUND_MAKE" = x; then
16990      for ac_prog in make
16991do
16992  # Extract the first word of "$ac_prog", so it can be a program name with args.
16993set dummy $ac_prog; ac_word=$2
16994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16995$as_echo_n "checking for $ac_word... " >&6; }
16996if ${ac_cv_path_CHECK_MAKE+:} false; then :
16997  $as_echo_n "(cached) " >&6
16998else
16999  case $CHECK_MAKE in
17000  [\\/]* | ?:[\\/]*)
17001  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17002  ;;
17003  *)
17004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17005for as_dir in $PATH
17006do
17007  IFS=$as_save_IFS
17008  test -z "$as_dir" && as_dir=.
17009    for ac_exec_ext in '' $ac_executable_extensions; do
17010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17011    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17013    break 2
17014  fi
17015done
17016  done
17017IFS=$as_save_IFS
17018
17019  ;;
17020esac
17021fi
17022CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17023if test -n "$CHECK_MAKE"; then
17024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17025$as_echo "$CHECK_MAKE" >&6; }
17026else
17027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17028$as_echo "no" >&6; }
17029fi
17030
17031
17032  test -n "$CHECK_MAKE" && break
17033done
17034
17035
17036  MAKE_CANDIDATE=""$CHECK_MAKE""
17037  DESCRIPTION="make in PATH"
17038
17039  # On Cygwin, we require a newer version of make than on other platforms
17040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17041    MAKE_VERSION_EXPR="-e 4\."
17042    MAKE_REQUIRED_VERSION="4.0"
17043   else
17044    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17045    MAKE_REQUIRED_VERSION="3.81"
17046  fi
17047
17048  if test "x$MAKE_CANDIDATE" != x; then
17049    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17050$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17051    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17052    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17053    if test "x$IS_GNU_MAKE" = x; then
17054      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17055$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17056    else
17057      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17058      if test "x$IS_MODERN_MAKE" = x; then
17059        { $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
17060$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;}
17061      else
17062        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17063          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064            MAKE_EXPECTED_ENV='cygwin'
17065          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17066            MAKE_EXPECTED_ENV='msys'
17067          else
17068            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17069          fi
17070          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17071          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17072        else
17073          # Not relevant for non-Windows
17074          IS_MAKE_CORRECT_ENV=true
17075        fi
17076        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17077          { $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
17078$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;}
17079        else
17080          FOUND_MAKE=$MAKE_CANDIDATE
17081
17082  # Only process if variable expands to non-empty
17083
17084  if test "x$FOUND_MAKE" != x; then
17085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17086
17087  # First separate the path from the arguments. This will split at the first
17088  # space.
17089  complete="$FOUND_MAKE"
17090  path="${complete%% *}"
17091  tmp="$complete EOL"
17092  arguments="${tmp#* }"
17093
17094  # Input might be given as Windows format, start by converting to
17095  # unix format.
17096  new_path=`$CYGPATH -u "$path"`
17097
17098  # Now try to locate executable using which
17099  new_path=`$WHICH "$new_path" 2> /dev/null`
17100  # bat and cmd files are not always considered executable in cygwin causing which
17101  # to not find them
17102  if test "x$new_path" = x \
17103      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17104      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17105    new_path=`$CYGPATH -u "$path"`
17106  fi
17107  if test "x$new_path" = x; then
17108    # Oops. Which didn't find the executable.
17109    # The splitting of arguments from the executable at a space might have been incorrect,
17110    # since paths with space are more likely in Windows. Give it another try with the whole
17111    # argument.
17112    path="$complete"
17113    arguments="EOL"
17114    new_path=`$CYGPATH -u "$path"`
17115    new_path=`$WHICH "$new_path" 2> /dev/null`
17116    # bat and cmd files are not always considered executable in cygwin causing which
17117    # to not find them
17118    if test "x$new_path" = x \
17119        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17120        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17121      new_path=`$CYGPATH -u "$path"`
17122    fi
17123    if test "x$new_path" = x; then
17124      # It's still not found. Now this is an unrecoverable error.
17125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17126$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17127      has_space=`$ECHO "$complete" | $GREP " "`
17128      if test "x$has_space" != x; then
17129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17131      fi
17132      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17133    fi
17134  fi
17135
17136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17139  # "foo.exe" is OK but "foo" is an error.
17140  #
17141  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17142  # It is also a way to make sure we got the proper file name for the real test later on.
17143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17144  if test "x$test_shortpath" = x; then
17145    # Short path failed, file does not exist as specified.
17146    # Try adding .exe or .cmd
17147    if test -f "${new_path}.exe"; then
17148      input_to_shortpath="${new_path}.exe"
17149    elif test -f "${new_path}.cmd"; then
17150      input_to_shortpath="${new_path}.cmd"
17151    else
17152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17153$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17154      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17155$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17156      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17157    fi
17158  else
17159    input_to_shortpath="$new_path"
17160  fi
17161
17162  # Call helper function which possibly converts this using DOS-style short mode.
17163  # If so, the updated path is stored in $new_path.
17164  new_path="$input_to_shortpath"
17165
17166  input_path="$input_to_shortpath"
17167  # Check if we need to convert this using DOS-style short mode. If the path
17168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17169  # take no chances and rewrite it.
17170  # Note: m4 eats our [], so we need to use [ and ] instead.
17171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17172  if test "x$has_forbidden_chars" != x; then
17173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17177      # Going to short mode and back again did indeed matter. Since short mode is
17178      # case insensitive, let's make it lowercase to improve readability.
17179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17180      # Now convert it back to Unix-style (cygpath)
17181      input_path=`$CYGPATH -u "$shortmode_path"`
17182      new_path="$input_path"
17183    fi
17184  fi
17185
17186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17187  if test "x$test_cygdrive_prefix" = x; then
17188    # As a simple fix, exclude /usr/bin since it's not a real path.
17189    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17191      # a path prefixed by /cygdrive for fixpath to work.
17192      new_path="$CYGWIN_ROOT_PATH$input_path"
17193    fi
17194  fi
17195
17196  # remove trailing .exe if any
17197  new_path="${new_path/%.exe/}"
17198
17199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17200
17201  # First separate the path from the arguments. This will split at the first
17202  # space.
17203  complete="$FOUND_MAKE"
17204  path="${complete%% *}"
17205  tmp="$complete EOL"
17206  arguments="${tmp#* }"
17207
17208  # Input might be given as Windows format, start by converting to
17209  # unix format.
17210  new_path="$path"
17211
17212  windows_path="$new_path"
17213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17214    unix_path=`$CYGPATH -u "$windows_path"`
17215    new_path="$unix_path"
17216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17218    new_path="$unix_path"
17219  fi
17220
17221
17222  # Now try to locate executable using which
17223  new_path=`$WHICH "$new_path" 2> /dev/null`
17224
17225  if test "x$new_path" = x; then
17226    # Oops. Which didn't find the executable.
17227    # The splitting of arguments from the executable at a space might have been incorrect,
17228    # since paths with space are more likely in Windows. Give it another try with the whole
17229    # argument.
17230    path="$complete"
17231    arguments="EOL"
17232    new_path="$path"
17233
17234  windows_path="$new_path"
17235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17236    unix_path=`$CYGPATH -u "$windows_path"`
17237    new_path="$unix_path"
17238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17240    new_path="$unix_path"
17241  fi
17242
17243
17244    new_path=`$WHICH "$new_path" 2> /dev/null`
17245    # bat and cmd files are not always considered executable in MSYS causing which
17246    # to not find them
17247    if test "x$new_path" = x \
17248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17250      new_path="$path"
17251
17252  windows_path="$new_path"
17253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17254    unix_path=`$CYGPATH -u "$windows_path"`
17255    new_path="$unix_path"
17256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17258    new_path="$unix_path"
17259  fi
17260
17261    fi
17262
17263    if test "x$new_path" = x; then
17264      # It's still not found. Now this is an unrecoverable error.
17265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17267      has_space=`$ECHO "$complete" | $GREP " "`
17268      if test "x$has_space" != x; then
17269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17271      fi
17272      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17273    fi
17274  fi
17275
17276  # Now new_path has a complete unix path to the binary
17277  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17278    # Keep paths in /bin as-is, but remove trailing .exe if any
17279    new_path="${new_path/%.exe/}"
17280    # Do not save /bin paths to all_fixpath_prefixes!
17281  else
17282    # Not in mixed or Windows style, start by that.
17283    new_path=`cmd //c echo $new_path`
17284
17285  input_path="$new_path"
17286  # Check if we need to convert this using DOS-style short mode. If the path
17287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17288  # take no chances and rewrite it.
17289  # Note: m4 eats our [], so we need to use [ and ] instead.
17290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17291  if test "x$has_forbidden_chars" != x; then
17292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17294  fi
17295
17296    # Output is in $new_path
17297
17298  windows_path="$new_path"
17299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17300    unix_path=`$CYGPATH -u "$windows_path"`
17301    new_path="$unix_path"
17302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17304    new_path="$unix_path"
17305  fi
17306
17307    # remove trailing .exe if any
17308    new_path="${new_path/%.exe/}"
17309
17310    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17311    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17312  fi
17313
17314    else
17315      # We're on a unix platform. Hooray! :)
17316      # First separate the path from the arguments. This will split at the first
17317      # space.
17318      complete="$FOUND_MAKE"
17319      path="${complete%% *}"
17320      tmp="$complete EOL"
17321      arguments="${tmp#* }"
17322
17323      # Cannot rely on the command "which" here since it doesn't always work.
17324      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17325      if test -z "$is_absolute_path"; then
17326        # Path to executable is not absolute. Find it.
17327        IFS_save="$IFS"
17328        IFS=:
17329        for p in $PATH; do
17330          if test -f "$p/$path" && test -x "$p/$path"; then
17331            new_path="$p/$path"
17332            break
17333          fi
17334        done
17335        IFS="$IFS_save"
17336      else
17337        # This is an absolute path, we can use it without further modifications.
17338        new_path="$path"
17339      fi
17340
17341      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
17347$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
17354    if test "x$arguments" != xEOL; then
17355      new_complete="$new_path ${arguments% *}"
17356    else
17357      new_complete="$new_path"
17358    fi
17359
17360    if test "x$complete" != "x$new_complete"; then
17361      FOUND_MAKE="$new_complete"
17362      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17363$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17364    fi
17365  fi
17366
17367        fi
17368      fi
17369    fi
17370  fi
17371
17372    fi
17373
17374    if test "x$FOUND_MAKE" = x; then
17375      if test "x$TOOLCHAIN_PATH" != x; then
17376        # We have a toolchain path, check that as well before giving up.
17377        OLD_PATH=$PATH
17378        PATH=$TOOLCHAIN_PATH:$PATH
17379        for ac_prog in gmake
17380do
17381  # Extract the first word of "$ac_prog", so it can be a program name with args.
17382set dummy $ac_prog; ac_word=$2
17383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17384$as_echo_n "checking for $ac_word... " >&6; }
17385if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17386  $as_echo_n "(cached) " >&6
17387else
17388  case $CHECK_TOOLSDIR_GMAKE in
17389  [\\/]* | ?:[\\/]*)
17390  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17391  ;;
17392  *)
17393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17394for as_dir in $PATH
17395do
17396  IFS=$as_save_IFS
17397  test -z "$as_dir" && as_dir=.
17398    for ac_exec_ext in '' $ac_executable_extensions; do
17399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17400    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17402    break 2
17403  fi
17404done
17405  done
17406IFS=$as_save_IFS
17407
17408  ;;
17409esac
17410fi
17411CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17412if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17414$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17415else
17416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17417$as_echo "no" >&6; }
17418fi
17419
17420
17421  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17422done
17423
17424
17425  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17426  DESCRIPTION="gmake in tools-dir"
17427
17428  # On Cygwin, we require a newer version of make than on other platforms
17429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17430    MAKE_VERSION_EXPR="-e 4\."
17431    MAKE_REQUIRED_VERSION="4.0"
17432   else
17433    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17434    MAKE_REQUIRED_VERSION="3.81"
17435  fi
17436
17437  if test "x$MAKE_CANDIDATE" != x; then
17438    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17439$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17440    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17441    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17442    if test "x$IS_GNU_MAKE" = x; then
17443      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17444$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17445    else
17446      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17447      if test "x$IS_MODERN_MAKE" = x; then
17448        { $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
17449$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;}
17450      else
17451        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17452          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17453            MAKE_EXPECTED_ENV='cygwin'
17454          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17455            MAKE_EXPECTED_ENV='msys'
17456          else
17457            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17458          fi
17459          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17460          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17461        else
17462          # Not relevant for non-Windows
17463          IS_MAKE_CORRECT_ENV=true
17464        fi
17465        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17466          { $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
17467$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;}
17468        else
17469          FOUND_MAKE=$MAKE_CANDIDATE
17470
17471  # Only process if variable expands to non-empty
17472
17473  if test "x$FOUND_MAKE" != x; then
17474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17475
17476  # First separate the path from the arguments. This will split at the first
17477  # space.
17478  complete="$FOUND_MAKE"
17479  path="${complete%% *}"
17480  tmp="$complete EOL"
17481  arguments="${tmp#* }"
17482
17483  # Input might be given as Windows format, start by converting to
17484  # unix format.
17485  new_path=`$CYGPATH -u "$path"`
17486
17487  # Now try to locate executable using which
17488  new_path=`$WHICH "$new_path" 2> /dev/null`
17489  # bat and cmd files are not always considered executable in cygwin causing which
17490  # to not find them
17491  if test "x$new_path" = x \
17492      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17493      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17494    new_path=`$CYGPATH -u "$path"`
17495  fi
17496  if test "x$new_path" = x; then
17497    # Oops. Which didn't find the executable.
17498    # The splitting of arguments from the executable at a space might have been incorrect,
17499    # since paths with space are more likely in Windows. Give it another try with the whole
17500    # argument.
17501    path="$complete"
17502    arguments="EOL"
17503    new_path=`$CYGPATH -u "$path"`
17504    new_path=`$WHICH "$new_path" 2> /dev/null`
17505    # bat and cmd files are not always considered executable in cygwin causing which
17506    # to not find them
17507    if test "x$new_path" = x \
17508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17510      new_path=`$CYGPATH -u "$path"`
17511    fi
17512    if test "x$new_path" = x; then
17513      # It's still not found. Now this is an unrecoverable error.
17514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17515$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17516      has_space=`$ECHO "$complete" | $GREP " "`
17517      if test "x$has_space" != x; then
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17520      fi
17521      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17522    fi
17523  fi
17524
17525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17528  # "foo.exe" is OK but "foo" is an error.
17529  #
17530  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17531  # It is also a way to make sure we got the proper file name for the real test later on.
17532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17533  if test "x$test_shortpath" = x; then
17534    # Short path failed, file does not exist as specified.
17535    # Try adding .exe or .cmd
17536    if test -f "${new_path}.exe"; then
17537      input_to_shortpath="${new_path}.exe"
17538    elif test -f "${new_path}.cmd"; then
17539      input_to_shortpath="${new_path}.cmd"
17540    else
17541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17542$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17545      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17546    fi
17547  else
17548    input_to_shortpath="$new_path"
17549  fi
17550
17551  # Call helper function which possibly converts this using DOS-style short mode.
17552  # If so, the updated path is stored in $new_path.
17553  new_path="$input_to_shortpath"
17554
17555  input_path="$input_to_shortpath"
17556  # Check if we need to convert this using DOS-style short mode. If the path
17557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17558  # take no chances and rewrite it.
17559  # Note: m4 eats our [], so we need to use [ and ] instead.
17560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17561  if test "x$has_forbidden_chars" != x; then
17562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17566      # Going to short mode and back again did indeed matter. Since short mode is
17567      # case insensitive, let's make it lowercase to improve readability.
17568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17569      # Now convert it back to Unix-style (cygpath)
17570      input_path=`$CYGPATH -u "$shortmode_path"`
17571      new_path="$input_path"
17572    fi
17573  fi
17574
17575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17576  if test "x$test_cygdrive_prefix" = x; then
17577    # As a simple fix, exclude /usr/bin since it's not a real path.
17578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17580      # a path prefixed by /cygdrive for fixpath to work.
17581      new_path="$CYGWIN_ROOT_PATH$input_path"
17582    fi
17583  fi
17584
17585  # remove trailing .exe if any
17586  new_path="${new_path/%.exe/}"
17587
17588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17589
17590  # First separate the path from the arguments. This will split at the first
17591  # space.
17592  complete="$FOUND_MAKE"
17593  path="${complete%% *}"
17594  tmp="$complete EOL"
17595  arguments="${tmp#* }"
17596
17597  # Input might be given as Windows format, start by converting to
17598  # unix format.
17599  new_path="$path"
17600
17601  windows_path="$new_path"
17602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17603    unix_path=`$CYGPATH -u "$windows_path"`
17604    new_path="$unix_path"
17605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17607    new_path="$unix_path"
17608  fi
17609
17610
17611  # Now try to locate executable using which
17612  new_path=`$WHICH "$new_path" 2> /dev/null`
17613
17614  if test "x$new_path" = x; then
17615    # Oops. Which didn't find the executable.
17616    # The splitting of arguments from the executable at a space might have been incorrect,
17617    # since paths with space are more likely in Windows. Give it another try with the whole
17618    # argument.
17619    path="$complete"
17620    arguments="EOL"
17621    new_path="$path"
17622
17623  windows_path="$new_path"
17624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625    unix_path=`$CYGPATH -u "$windows_path"`
17626    new_path="$unix_path"
17627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17629    new_path="$unix_path"
17630  fi
17631
17632
17633    new_path=`$WHICH "$new_path" 2> /dev/null`
17634    # bat and cmd files are not always considered executable in MSYS causing which
17635    # to not find them
17636    if test "x$new_path" = x \
17637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17639      new_path="$path"
17640
17641  windows_path="$new_path"
17642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17643    unix_path=`$CYGPATH -u "$windows_path"`
17644    new_path="$unix_path"
17645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17647    new_path="$unix_path"
17648  fi
17649
17650    fi
17651
17652    if test "x$new_path" = x; then
17653      # It's still not found. Now this is an unrecoverable error.
17654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17655$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17656      has_space=`$ECHO "$complete" | $GREP " "`
17657      if test "x$has_space" != x; then
17658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17660      fi
17661      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17662    fi
17663  fi
17664
17665  # Now new_path has a complete unix path to the binary
17666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17667    # Keep paths in /bin as-is, but remove trailing .exe if any
17668    new_path="${new_path/%.exe/}"
17669    # Do not save /bin paths to all_fixpath_prefixes!
17670  else
17671    # Not in mixed or Windows style, start by that.
17672    new_path=`cmd //c echo $new_path`
17673
17674  input_path="$new_path"
17675  # Check if we need to convert this using DOS-style short mode. If the path
17676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17677  # take no chances and rewrite it.
17678  # Note: m4 eats our [], so we need to use [ and ] instead.
17679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17680  if test "x$has_forbidden_chars" != x; then
17681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17683  fi
17684
17685    # Output is in $new_path
17686
17687  windows_path="$new_path"
17688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17689    unix_path=`$CYGPATH -u "$windows_path"`
17690    new_path="$unix_path"
17691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17693    new_path="$unix_path"
17694  fi
17695
17696    # remove trailing .exe if any
17697    new_path="${new_path/%.exe/}"
17698
17699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17701  fi
17702
17703    else
17704      # We're on a unix platform. Hooray! :)
17705      # First separate the path from the arguments. This will split at the first
17706      # space.
17707      complete="$FOUND_MAKE"
17708      path="${complete%% *}"
17709      tmp="$complete EOL"
17710      arguments="${tmp#* }"
17711
17712      # Cannot rely on the command "which" here since it doesn't always work.
17713      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17714      if test -z "$is_absolute_path"; then
17715        # Path to executable is not absolute. Find it.
17716        IFS_save="$IFS"
17717        IFS=:
17718        for p in $PATH; do
17719          if test -f "$p/$path" && test -x "$p/$path"; then
17720            new_path="$p/$path"
17721            break
17722          fi
17723        done
17724        IFS="$IFS_save"
17725      else
17726        # This is an absolute path, we can use it without further modifications.
17727        new_path="$path"
17728      fi
17729
17730      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
17736$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
17743    if test "x$arguments" != xEOL; then
17744      new_complete="$new_path ${arguments% *}"
17745    else
17746      new_complete="$new_path"
17747    fi
17748
17749    if test "x$complete" != "x$new_complete"; then
17750      FOUND_MAKE="$new_complete"
17751      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17752$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17753    fi
17754  fi
17755
17756        fi
17757      fi
17758    fi
17759  fi
17760
17761        if test "x$FOUND_MAKE" = x; then
17762          for ac_prog in make
17763do
17764  # Extract the first word of "$ac_prog", so it can be a program name with args.
17765set dummy $ac_prog; ac_word=$2
17766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17767$as_echo_n "checking for $ac_word... " >&6; }
17768if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17769  $as_echo_n "(cached) " >&6
17770else
17771  case $CHECK_TOOLSDIR_MAKE in
17772  [\\/]* | ?:[\\/]*)
17773  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17774  ;;
17775  *)
17776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17777for as_dir in $PATH
17778do
17779  IFS=$as_save_IFS
17780  test -z "$as_dir" && as_dir=.
17781    for ac_exec_ext in '' $ac_executable_extensions; do
17782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17783    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17785    break 2
17786  fi
17787done
17788  done
17789IFS=$as_save_IFS
17790
17791  ;;
17792esac
17793fi
17794CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17795if test -n "$CHECK_TOOLSDIR_MAKE"; then
17796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17797$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17798else
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17800$as_echo "no" >&6; }
17801fi
17802
17803
17804  test -n "$CHECK_TOOLSDIR_MAKE" && break
17805done
17806
17807
17808  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17809  DESCRIPTION="make in tools-dir"
17810
17811  # On Cygwin, we require a newer version of make than on other platforms
17812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17813    MAKE_VERSION_EXPR="-e 4\."
17814    MAKE_REQUIRED_VERSION="4.0"
17815   else
17816    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17817    MAKE_REQUIRED_VERSION="3.81"
17818  fi
17819
17820  if test "x$MAKE_CANDIDATE" != x; then
17821    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17822$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17823    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17824    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17825    if test "x$IS_GNU_MAKE" = x; then
17826      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17827$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17828    else
17829      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17830      if test "x$IS_MODERN_MAKE" = x; then
17831        { $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
17832$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;}
17833      else
17834        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17835          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17836            MAKE_EXPECTED_ENV='cygwin'
17837          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17838            MAKE_EXPECTED_ENV='msys'
17839          else
17840            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17841          fi
17842          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17843          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17844        else
17845          # Not relevant for non-Windows
17846          IS_MAKE_CORRECT_ENV=true
17847        fi
17848        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17849          { $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
17850$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;}
17851        else
17852          FOUND_MAKE=$MAKE_CANDIDATE
17853
17854  # Only process if variable expands to non-empty
17855
17856  if test "x$FOUND_MAKE" != x; then
17857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17858
17859  # First separate the path from the arguments. This will split at the first
17860  # space.
17861  complete="$FOUND_MAKE"
17862  path="${complete%% *}"
17863  tmp="$complete EOL"
17864  arguments="${tmp#* }"
17865
17866  # Input might be given as Windows format, start by converting to
17867  # unix format.
17868  new_path=`$CYGPATH -u "$path"`
17869
17870  # Now try to locate executable using which
17871  new_path=`$WHICH "$new_path" 2> /dev/null`
17872  # bat and cmd files are not always considered executable in cygwin causing which
17873  # to not find them
17874  if test "x$new_path" = x \
17875      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17876      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17877    new_path=`$CYGPATH -u "$path"`
17878  fi
17879  if test "x$new_path" = x; then
17880    # Oops. Which didn't find the executable.
17881    # The splitting of arguments from the executable at a space might have been incorrect,
17882    # since paths with space are more likely in Windows. Give it another try with the whole
17883    # argument.
17884    path="$complete"
17885    arguments="EOL"
17886    new_path=`$CYGPATH -u "$path"`
17887    new_path=`$WHICH "$new_path" 2> /dev/null`
17888    # bat and cmd files are not always considered executable in cygwin causing which
17889    # to not find them
17890    if test "x$new_path" = x \
17891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17893      new_path=`$CYGPATH -u "$path"`
17894    fi
17895    if test "x$new_path" = x; then
17896      # It's still not found. Now this is an unrecoverable error.
17897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17899      has_space=`$ECHO "$complete" | $GREP " "`
17900      if test "x$has_space" != x; then
17901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17903      fi
17904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17905    fi
17906  fi
17907
17908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17911  # "foo.exe" is OK but "foo" is an error.
17912  #
17913  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17914  # It is also a way to make sure we got the proper file name for the real test later on.
17915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17916  if test "x$test_shortpath" = x; then
17917    # Short path failed, file does not exist as specified.
17918    # Try adding .exe or .cmd
17919    if test -f "${new_path}.exe"; then
17920      input_to_shortpath="${new_path}.exe"
17921    elif test -f "${new_path}.cmd"; then
17922      input_to_shortpath="${new_path}.cmd"
17923    else
17924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17925$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17926      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17927$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17929    fi
17930  else
17931    input_to_shortpath="$new_path"
17932  fi
17933
17934  # Call helper function which possibly converts this using DOS-style short mode.
17935  # If so, the updated path is stored in $new_path.
17936  new_path="$input_to_shortpath"
17937
17938  input_path="$input_to_shortpath"
17939  # Check if we need to convert this using DOS-style short mode. If the path
17940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17941  # take no chances and rewrite it.
17942  # Note: m4 eats our [], so we need to use [ and ] instead.
17943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17944  if test "x$has_forbidden_chars" != x; then
17945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17949      # Going to short mode and back again did indeed matter. Since short mode is
17950      # case insensitive, let's make it lowercase to improve readability.
17951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17952      # Now convert it back to Unix-style (cygpath)
17953      input_path=`$CYGPATH -u "$shortmode_path"`
17954      new_path="$input_path"
17955    fi
17956  fi
17957
17958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17959  if test "x$test_cygdrive_prefix" = x; then
17960    # As a simple fix, exclude /usr/bin since it's not a real path.
17961    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17963      # a path prefixed by /cygdrive for fixpath to work.
17964      new_path="$CYGWIN_ROOT_PATH$input_path"
17965    fi
17966  fi
17967
17968  # remove trailing .exe if any
17969  new_path="${new_path/%.exe/}"
17970
17971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17972
17973  # First separate the path from the arguments. This will split at the first
17974  # space.
17975  complete="$FOUND_MAKE"
17976  path="${complete%% *}"
17977  tmp="$complete EOL"
17978  arguments="${tmp#* }"
17979
17980  # Input might be given as Windows format, start by converting to
17981  # unix format.
17982  new_path="$path"
17983
17984  windows_path="$new_path"
17985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17986    unix_path=`$CYGPATH -u "$windows_path"`
17987    new_path="$unix_path"
17988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17990    new_path="$unix_path"
17991  fi
17992
17993
17994  # Now try to locate executable using which
17995  new_path=`$WHICH "$new_path" 2> /dev/null`
17996
17997  if test "x$new_path" = x; then
17998    # Oops. Which didn't find the executable.
17999    # The splitting of arguments from the executable at a space might have been incorrect,
18000    # since paths with space are more likely in Windows. Give it another try with the whole
18001    # argument.
18002    path="$complete"
18003    arguments="EOL"
18004    new_path="$path"
18005
18006  windows_path="$new_path"
18007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18008    unix_path=`$CYGPATH -u "$windows_path"`
18009    new_path="$unix_path"
18010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18012    new_path="$unix_path"
18013  fi
18014
18015
18016    new_path=`$WHICH "$new_path" 2> /dev/null`
18017    # bat and cmd files are not always considered executable in MSYS causing which
18018    # to not find them
18019    if test "x$new_path" = x \
18020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18022      new_path="$path"
18023
18024  windows_path="$new_path"
18025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18026    unix_path=`$CYGPATH -u "$windows_path"`
18027    new_path="$unix_path"
18028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18030    new_path="$unix_path"
18031  fi
18032
18033    fi
18034
18035    if test "x$new_path" = x; then
18036      # It's still not found. Now this is an unrecoverable error.
18037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18039      has_space=`$ECHO "$complete" | $GREP " "`
18040      if test "x$has_space" != x; then
18041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18043      fi
18044      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18045    fi
18046  fi
18047
18048  # Now new_path has a complete unix path to the binary
18049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18050    # Keep paths in /bin as-is, but remove trailing .exe if any
18051    new_path="${new_path/%.exe/}"
18052    # Do not save /bin paths to all_fixpath_prefixes!
18053  else
18054    # Not in mixed or Windows style, start by that.
18055    new_path=`cmd //c echo $new_path`
18056
18057  input_path="$new_path"
18058  # Check if we need to convert this using DOS-style short mode. If the path
18059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18060  # take no chances and rewrite it.
18061  # Note: m4 eats our [], so we need to use [ and ] instead.
18062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18063  if test "x$has_forbidden_chars" != x; then
18064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18066  fi
18067
18068    # Output is in $new_path
18069
18070  windows_path="$new_path"
18071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18072    unix_path=`$CYGPATH -u "$windows_path"`
18073    new_path="$unix_path"
18074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18076    new_path="$unix_path"
18077  fi
18078
18079    # remove trailing .exe if any
18080    new_path="${new_path/%.exe/}"
18081
18082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18084  fi
18085
18086    else
18087      # We're on a unix platform. Hooray! :)
18088      # First separate the path from the arguments. This will split at the first
18089      # space.
18090      complete="$FOUND_MAKE"
18091      path="${complete%% *}"
18092      tmp="$complete EOL"
18093      arguments="${tmp#* }"
18094
18095      # Cannot rely on the command "which" here since it doesn't always work.
18096      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18097      if test -z "$is_absolute_path"; then
18098        # Path to executable is not absolute. Find it.
18099        IFS_save="$IFS"
18100        IFS=:
18101        for p in $PATH; do
18102          if test -f "$p/$path" && test -x "$p/$path"; then
18103            new_path="$p/$path"
18104            break
18105          fi
18106        done
18107        IFS="$IFS_save"
18108      else
18109        # This is an absolute path, we can use it without further modifications.
18110        new_path="$path"
18111      fi
18112
18113      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
18119$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
18126    if test "x$arguments" != xEOL; then
18127      new_complete="$new_path ${arguments% *}"
18128    else
18129      new_complete="$new_path"
18130    fi
18131
18132    if test "x$complete" != "x$new_complete"; then
18133      FOUND_MAKE="$new_complete"
18134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18135$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18136    fi
18137  fi
18138
18139        fi
18140      fi
18141    fi
18142  fi
18143
18144        fi
18145        PATH=$OLD_PATH
18146      fi
18147    fi
18148
18149    if test "x$FOUND_MAKE" = x; then
18150      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
18151    fi
18152
18153  else
18154    # The variable is set, but is it from the command line or the environment?
18155
18156    # Try to remove the string !MAKE! from our list.
18157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18159      # If it failed, the variable was not from the command line. Ignore it,
18160      # but warn the user (except for BASH, which is always set by the calling BASH).
18161      if test "xMAKE" != xBASH; then
18162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18163$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18164      fi
18165      # Try to locate tool using the code snippet
18166
18167    # Try our hardest to locate a correct version of GNU make
18168    for ac_prog in gmake
18169do
18170  # Extract the first word of "$ac_prog", so it can be a program name with args.
18171set dummy $ac_prog; ac_word=$2
18172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18173$as_echo_n "checking for $ac_word... " >&6; }
18174if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18175  $as_echo_n "(cached) " >&6
18176else
18177  case $CHECK_GMAKE in
18178  [\\/]* | ?:[\\/]*)
18179  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18180  ;;
18181  *)
18182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18183for as_dir in $PATH
18184do
18185  IFS=$as_save_IFS
18186  test -z "$as_dir" && as_dir=.
18187    for ac_exec_ext in '' $ac_executable_extensions; do
18188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18189    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18191    break 2
18192  fi
18193done
18194  done
18195IFS=$as_save_IFS
18196
18197  ;;
18198esac
18199fi
18200CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18201if test -n "$CHECK_GMAKE"; then
18202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18203$as_echo "$CHECK_GMAKE" >&6; }
18204else
18205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18206$as_echo "no" >&6; }
18207fi
18208
18209
18210  test -n "$CHECK_GMAKE" && break
18211done
18212
18213
18214  MAKE_CANDIDATE=""$CHECK_GMAKE""
18215  DESCRIPTION="gmake in PATH"
18216
18217  # On Cygwin, we require a newer version of make than on other platforms
18218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18219    MAKE_VERSION_EXPR="-e 4\."
18220    MAKE_REQUIRED_VERSION="4.0"
18221   else
18222    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18223    MAKE_REQUIRED_VERSION="3.81"
18224  fi
18225
18226  if test "x$MAKE_CANDIDATE" != x; then
18227    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18228$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18229    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18230    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18231    if test "x$IS_GNU_MAKE" = x; then
18232      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18233$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18234    else
18235      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18236      if test "x$IS_MODERN_MAKE" = x; then
18237        { $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
18238$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;}
18239      else
18240        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18241          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242            MAKE_EXPECTED_ENV='cygwin'
18243          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18244            MAKE_EXPECTED_ENV='msys'
18245          else
18246            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18247          fi
18248          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18249          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18250        else
18251          # Not relevant for non-Windows
18252          IS_MAKE_CORRECT_ENV=true
18253        fi
18254        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18255          { $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
18256$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;}
18257        else
18258          FOUND_MAKE=$MAKE_CANDIDATE
18259
18260  # Only process if variable expands to non-empty
18261
18262  if test "x$FOUND_MAKE" != x; then
18263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18264
18265  # First separate the path from the arguments. This will split at the first
18266  # space.
18267  complete="$FOUND_MAKE"
18268  path="${complete%% *}"
18269  tmp="$complete EOL"
18270  arguments="${tmp#* }"
18271
18272  # Input might be given as Windows format, start by converting to
18273  # unix format.
18274  new_path=`$CYGPATH -u "$path"`
18275
18276  # Now try to locate executable using which
18277  new_path=`$WHICH "$new_path" 2> /dev/null`
18278  # bat and cmd files are not always considered executable in cygwin causing which
18279  # to not find them
18280  if test "x$new_path" = x \
18281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18283    new_path=`$CYGPATH -u "$path"`
18284  fi
18285  if test "x$new_path" = x; then
18286    # Oops. Which didn't find the executable.
18287    # The splitting of arguments from the executable at a space might have been incorrect,
18288    # since paths with space are more likely in Windows. Give it another try with the whole
18289    # argument.
18290    path="$complete"
18291    arguments="EOL"
18292    new_path=`$CYGPATH -u "$path"`
18293    new_path=`$WHICH "$new_path" 2> /dev/null`
18294    # bat and cmd files are not always considered executable in cygwin causing which
18295    # to not find them
18296    if test "x$new_path" = x \
18297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18299      new_path=`$CYGPATH -u "$path"`
18300    fi
18301    if test "x$new_path" = x; then
18302      # It's still not found. Now this is an unrecoverable error.
18303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18304$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18305      has_space=`$ECHO "$complete" | $GREP " "`
18306      if test "x$has_space" != x; then
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18309      fi
18310      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18311    fi
18312  fi
18313
18314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18317  # "foo.exe" is OK but "foo" is an error.
18318  #
18319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18320  # It is also a way to make sure we got the proper file name for the real test later on.
18321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18322  if test "x$test_shortpath" = x; then
18323    # Short path failed, file does not exist as specified.
18324    # Try adding .exe or .cmd
18325    if test -f "${new_path}.exe"; then
18326      input_to_shortpath="${new_path}.exe"
18327    elif test -f "${new_path}.cmd"; then
18328      input_to_shortpath="${new_path}.cmd"
18329    else
18330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18331$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18334      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18335    fi
18336  else
18337    input_to_shortpath="$new_path"
18338  fi
18339
18340  # Call helper function which possibly converts this using DOS-style short mode.
18341  # If so, the updated path is stored in $new_path.
18342  new_path="$input_to_shortpath"
18343
18344  input_path="$input_to_shortpath"
18345  # Check if we need to convert this using DOS-style short mode. If the path
18346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18347  # take no chances and rewrite it.
18348  # Note: m4 eats our [], so we need to use [ and ] instead.
18349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18350  if test "x$has_forbidden_chars" != x; then
18351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18355      # Going to short mode and back again did indeed matter. Since short mode is
18356      # case insensitive, let's make it lowercase to improve readability.
18357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18358      # Now convert it back to Unix-style (cygpath)
18359      input_path=`$CYGPATH -u "$shortmode_path"`
18360      new_path="$input_path"
18361    fi
18362  fi
18363
18364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18365  if test "x$test_cygdrive_prefix" = x; then
18366    # As a simple fix, exclude /usr/bin since it's not a real path.
18367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18369      # a path prefixed by /cygdrive for fixpath to work.
18370      new_path="$CYGWIN_ROOT_PATH$input_path"
18371    fi
18372  fi
18373
18374  # remove trailing .exe if any
18375  new_path="${new_path/%.exe/}"
18376
18377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18378
18379  # First separate the path from the arguments. This will split at the first
18380  # space.
18381  complete="$FOUND_MAKE"
18382  path="${complete%% *}"
18383  tmp="$complete EOL"
18384  arguments="${tmp#* }"
18385
18386  # Input might be given as Windows format, start by converting to
18387  # unix format.
18388  new_path="$path"
18389
18390  windows_path="$new_path"
18391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18392    unix_path=`$CYGPATH -u "$windows_path"`
18393    new_path="$unix_path"
18394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18396    new_path="$unix_path"
18397  fi
18398
18399
18400  # Now try to locate executable using which
18401  new_path=`$WHICH "$new_path" 2> /dev/null`
18402
18403  if test "x$new_path" = x; then
18404    # Oops. Which didn't find the executable.
18405    # The splitting of arguments from the executable at a space might have been incorrect,
18406    # since paths with space are more likely in Windows. Give it another try with the whole
18407    # argument.
18408    path="$complete"
18409    arguments="EOL"
18410    new_path="$path"
18411
18412  windows_path="$new_path"
18413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18414    unix_path=`$CYGPATH -u "$windows_path"`
18415    new_path="$unix_path"
18416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18418    new_path="$unix_path"
18419  fi
18420
18421
18422    new_path=`$WHICH "$new_path" 2> /dev/null`
18423    # bat and cmd files are not always considered executable in MSYS causing which
18424    # to not find them
18425    if test "x$new_path" = x \
18426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18428      new_path="$path"
18429
18430  windows_path="$new_path"
18431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18432    unix_path=`$CYGPATH -u "$windows_path"`
18433    new_path="$unix_path"
18434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18436    new_path="$unix_path"
18437  fi
18438
18439    fi
18440
18441    if test "x$new_path" = x; then
18442      # It's still not found. Now this is an unrecoverable error.
18443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18444$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18445      has_space=`$ECHO "$complete" | $GREP " "`
18446      if test "x$has_space" != x; then
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18449      fi
18450      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18451    fi
18452  fi
18453
18454  # Now new_path has a complete unix path to the binary
18455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18456    # Keep paths in /bin as-is, but remove trailing .exe if any
18457    new_path="${new_path/%.exe/}"
18458    # Do not save /bin paths to all_fixpath_prefixes!
18459  else
18460    # Not in mixed or Windows style, start by that.
18461    new_path=`cmd //c echo $new_path`
18462
18463  input_path="$new_path"
18464  # Check if we need to convert this using DOS-style short mode. If the path
18465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18466  # take no chances and rewrite it.
18467  # Note: m4 eats our [], so we need to use [ and ] instead.
18468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18469  if test "x$has_forbidden_chars" != x; then
18470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18472  fi
18473
18474    # Output is in $new_path
18475
18476  windows_path="$new_path"
18477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18478    unix_path=`$CYGPATH -u "$windows_path"`
18479    new_path="$unix_path"
18480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18482    new_path="$unix_path"
18483  fi
18484
18485    # remove trailing .exe if any
18486    new_path="${new_path/%.exe/}"
18487
18488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18490  fi
18491
18492    else
18493      # We're on a unix platform. Hooray! :)
18494      # First separate the path from the arguments. This will split at the first
18495      # space.
18496      complete="$FOUND_MAKE"
18497      path="${complete%% *}"
18498      tmp="$complete EOL"
18499      arguments="${tmp#* }"
18500
18501      # Cannot rely on the command "which" here since it doesn't always work.
18502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18503      if test -z "$is_absolute_path"; then
18504        # Path to executable is not absolute. Find it.
18505        IFS_save="$IFS"
18506        IFS=:
18507        for p in $PATH; do
18508          if test -f "$p/$path" && test -x "$p/$path"; then
18509            new_path="$p/$path"
18510            break
18511          fi
18512        done
18513        IFS="$IFS_save"
18514      else
18515        # This is an absolute path, we can use it without further modifications.
18516        new_path="$path"
18517      fi
18518
18519      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
18525$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
18532    if test "x$arguments" != xEOL; then
18533      new_complete="$new_path ${arguments% *}"
18534    else
18535      new_complete="$new_path"
18536    fi
18537
18538    if test "x$complete" != "x$new_complete"; then
18539      FOUND_MAKE="$new_complete"
18540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18541$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18542    fi
18543  fi
18544
18545        fi
18546      fi
18547    fi
18548  fi
18549
18550
18551    if test "x$FOUND_MAKE" = x; then
18552      for ac_prog in make
18553do
18554  # Extract the first word of "$ac_prog", so it can be a program name with args.
18555set dummy $ac_prog; ac_word=$2
18556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18557$as_echo_n "checking for $ac_word... " >&6; }
18558if ${ac_cv_path_CHECK_MAKE+:} false; then :
18559  $as_echo_n "(cached) " >&6
18560else
18561  case $CHECK_MAKE in
18562  [\\/]* | ?:[\\/]*)
18563  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18564  ;;
18565  *)
18566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18567for as_dir in $PATH
18568do
18569  IFS=$as_save_IFS
18570  test -z "$as_dir" && as_dir=.
18571    for ac_exec_ext in '' $ac_executable_extensions; do
18572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18573    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18575    break 2
18576  fi
18577done
18578  done
18579IFS=$as_save_IFS
18580
18581  ;;
18582esac
18583fi
18584CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18585if test -n "$CHECK_MAKE"; then
18586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18587$as_echo "$CHECK_MAKE" >&6; }
18588else
18589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18590$as_echo "no" >&6; }
18591fi
18592
18593
18594  test -n "$CHECK_MAKE" && break
18595done
18596
18597
18598  MAKE_CANDIDATE=""$CHECK_MAKE""
18599  DESCRIPTION="make in PATH"
18600
18601  # On Cygwin, we require a newer version of make than on other platforms
18602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18603    MAKE_VERSION_EXPR="-e 4\."
18604    MAKE_REQUIRED_VERSION="4.0"
18605   else
18606    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18607    MAKE_REQUIRED_VERSION="3.81"
18608  fi
18609
18610  if test "x$MAKE_CANDIDATE" != x; then
18611    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18612$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18613    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18614    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18615    if test "x$IS_GNU_MAKE" = x; then
18616      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18617$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18618    else
18619      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18620      if test "x$IS_MODERN_MAKE" = x; then
18621        { $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
18622$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;}
18623      else
18624        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18625          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626            MAKE_EXPECTED_ENV='cygwin'
18627          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18628            MAKE_EXPECTED_ENV='msys'
18629          else
18630            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18631          fi
18632          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18633          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18634        else
18635          # Not relevant for non-Windows
18636          IS_MAKE_CORRECT_ENV=true
18637        fi
18638        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18639          { $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
18640$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;}
18641        else
18642          FOUND_MAKE=$MAKE_CANDIDATE
18643
18644  # Only process if variable expands to non-empty
18645
18646  if test "x$FOUND_MAKE" != x; then
18647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18648
18649  # First separate the path from the arguments. This will split at the first
18650  # space.
18651  complete="$FOUND_MAKE"
18652  path="${complete%% *}"
18653  tmp="$complete EOL"
18654  arguments="${tmp#* }"
18655
18656  # Input might be given as Windows format, start by converting to
18657  # unix format.
18658  new_path=`$CYGPATH -u "$path"`
18659
18660  # Now try to locate executable using which
18661  new_path=`$WHICH "$new_path" 2> /dev/null`
18662  # bat and cmd files are not always considered executable in cygwin causing which
18663  # to not find them
18664  if test "x$new_path" = x \
18665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18667    new_path=`$CYGPATH -u "$path"`
18668  fi
18669  if test "x$new_path" = x; then
18670    # Oops. Which didn't find the executable.
18671    # The splitting of arguments from the executable at a space might have been incorrect,
18672    # since paths with space are more likely in Windows. Give it another try with the whole
18673    # argument.
18674    path="$complete"
18675    arguments="EOL"
18676    new_path=`$CYGPATH -u "$path"`
18677    new_path=`$WHICH "$new_path" 2> /dev/null`
18678    # bat and cmd files are not always considered executable in cygwin causing which
18679    # to not find them
18680    if test "x$new_path" = x \
18681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18683      new_path=`$CYGPATH -u "$path"`
18684    fi
18685    if test "x$new_path" = x; then
18686      # It's still not found. Now this is an unrecoverable error.
18687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18688$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18689      has_space=`$ECHO "$complete" | $GREP " "`
18690      if test "x$has_space" != x; then
18691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18693      fi
18694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18695    fi
18696  fi
18697
18698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18701  # "foo.exe" is OK but "foo" is an error.
18702  #
18703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18704  # It is also a way to make sure we got the proper file name for the real test later on.
18705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18706  if test "x$test_shortpath" = x; then
18707    # Short path failed, file does not exist as specified.
18708    # Try adding .exe or .cmd
18709    if test -f "${new_path}.exe"; then
18710      input_to_shortpath="${new_path}.exe"
18711    elif test -f "${new_path}.cmd"; then
18712      input_to_shortpath="${new_path}.cmd"
18713    else
18714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18718      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18719    fi
18720  else
18721    input_to_shortpath="$new_path"
18722  fi
18723
18724  # Call helper function which possibly converts this using DOS-style short mode.
18725  # If so, the updated path is stored in $new_path.
18726  new_path="$input_to_shortpath"
18727
18728  input_path="$input_to_shortpath"
18729  # Check if we need to convert this using DOS-style short mode. If the path
18730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18731  # take no chances and rewrite it.
18732  # Note: m4 eats our [], so we need to use [ and ] instead.
18733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18734  if test "x$has_forbidden_chars" != x; then
18735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18739      # Going to short mode and back again did indeed matter. Since short mode is
18740      # case insensitive, let's make it lowercase to improve readability.
18741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18742      # Now convert it back to Unix-style (cygpath)
18743      input_path=`$CYGPATH -u "$shortmode_path"`
18744      new_path="$input_path"
18745    fi
18746  fi
18747
18748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18749  if test "x$test_cygdrive_prefix" = x; then
18750    # As a simple fix, exclude /usr/bin since it's not a real path.
18751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18753      # a path prefixed by /cygdrive for fixpath to work.
18754      new_path="$CYGWIN_ROOT_PATH$input_path"
18755    fi
18756  fi
18757
18758  # remove trailing .exe if any
18759  new_path="${new_path/%.exe/}"
18760
18761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18762
18763  # First separate the path from the arguments. This will split at the first
18764  # space.
18765  complete="$FOUND_MAKE"
18766  path="${complete%% *}"
18767  tmp="$complete EOL"
18768  arguments="${tmp#* }"
18769
18770  # Input might be given as Windows format, start by converting to
18771  # unix format.
18772  new_path="$path"
18773
18774  windows_path="$new_path"
18775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18776    unix_path=`$CYGPATH -u "$windows_path"`
18777    new_path="$unix_path"
18778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18780    new_path="$unix_path"
18781  fi
18782
18783
18784  # Now try to locate executable using which
18785  new_path=`$WHICH "$new_path" 2> /dev/null`
18786
18787  if test "x$new_path" = x; then
18788    # Oops. Which didn't find the executable.
18789    # The splitting of arguments from the executable at a space might have been incorrect,
18790    # since paths with space are more likely in Windows. Give it another try with the whole
18791    # argument.
18792    path="$complete"
18793    arguments="EOL"
18794    new_path="$path"
18795
18796  windows_path="$new_path"
18797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18798    unix_path=`$CYGPATH -u "$windows_path"`
18799    new_path="$unix_path"
18800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18802    new_path="$unix_path"
18803  fi
18804
18805
18806    new_path=`$WHICH "$new_path" 2> /dev/null`
18807    # bat and cmd files are not always considered executable in MSYS causing which
18808    # to not find them
18809    if test "x$new_path" = x \
18810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18812      new_path="$path"
18813
18814  windows_path="$new_path"
18815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18816    unix_path=`$CYGPATH -u "$windows_path"`
18817    new_path="$unix_path"
18818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18820    new_path="$unix_path"
18821  fi
18822
18823    fi
18824
18825    if test "x$new_path" = x; then
18826      # It's still not found. Now this is an unrecoverable error.
18827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18829      has_space=`$ECHO "$complete" | $GREP " "`
18830      if test "x$has_space" != x; then
18831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18833      fi
18834      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18835    fi
18836  fi
18837
18838  # Now new_path has a complete unix path to the binary
18839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18840    # Keep paths in /bin as-is, but remove trailing .exe if any
18841    new_path="${new_path/%.exe/}"
18842    # Do not save /bin paths to all_fixpath_prefixes!
18843  else
18844    # Not in mixed or Windows style, start by that.
18845    new_path=`cmd //c echo $new_path`
18846
18847  input_path="$new_path"
18848  # Check if we need to convert this using DOS-style short mode. If the path
18849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18850  # take no chances and rewrite it.
18851  # Note: m4 eats our [], so we need to use [ and ] instead.
18852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18853  if test "x$has_forbidden_chars" != x; then
18854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18856  fi
18857
18858    # Output is in $new_path
18859
18860  windows_path="$new_path"
18861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18862    unix_path=`$CYGPATH -u "$windows_path"`
18863    new_path="$unix_path"
18864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18866    new_path="$unix_path"
18867  fi
18868
18869    # remove trailing .exe if any
18870    new_path="${new_path/%.exe/}"
18871
18872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18874  fi
18875
18876    else
18877      # We're on a unix platform. Hooray! :)
18878      # First separate the path from the arguments. This will split at the first
18879      # space.
18880      complete="$FOUND_MAKE"
18881      path="${complete%% *}"
18882      tmp="$complete EOL"
18883      arguments="${tmp#* }"
18884
18885      # Cannot rely on the command "which" here since it doesn't always work.
18886      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18887      if test -z "$is_absolute_path"; then
18888        # Path to executable is not absolute. Find it.
18889        IFS_save="$IFS"
18890        IFS=:
18891        for p in $PATH; do
18892          if test -f "$p/$path" && test -x "$p/$path"; then
18893            new_path="$p/$path"
18894            break
18895          fi
18896        done
18897        IFS="$IFS_save"
18898      else
18899        # This is an absolute path, we can use it without further modifications.
18900        new_path="$path"
18901      fi
18902
18903      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
18909$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
18916    if test "x$arguments" != xEOL; then
18917      new_complete="$new_path ${arguments% *}"
18918    else
18919      new_complete="$new_path"
18920    fi
18921
18922    if test "x$complete" != "x$new_complete"; then
18923      FOUND_MAKE="$new_complete"
18924      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18925$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18926    fi
18927  fi
18928
18929        fi
18930      fi
18931    fi
18932  fi
18933
18934    fi
18935
18936    if test "x$FOUND_MAKE" = x; then
18937      if test "x$TOOLCHAIN_PATH" != x; then
18938        # We have a toolchain path, check that as well before giving up.
18939        OLD_PATH=$PATH
18940        PATH=$TOOLCHAIN_PATH:$PATH
18941        for ac_prog in gmake
18942do
18943  # Extract the first word of "$ac_prog", so it can be a program name with args.
18944set dummy $ac_prog; ac_word=$2
18945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18946$as_echo_n "checking for $ac_word... " >&6; }
18947if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18948  $as_echo_n "(cached) " >&6
18949else
18950  case $CHECK_TOOLSDIR_GMAKE in
18951  [\\/]* | ?:[\\/]*)
18952  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18953  ;;
18954  *)
18955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18956for as_dir in $PATH
18957do
18958  IFS=$as_save_IFS
18959  test -z "$as_dir" && as_dir=.
18960    for ac_exec_ext in '' $ac_executable_extensions; do
18961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18962    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18964    break 2
18965  fi
18966done
18967  done
18968IFS=$as_save_IFS
18969
18970  ;;
18971esac
18972fi
18973CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18974if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18976$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18977else
18978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18979$as_echo "no" >&6; }
18980fi
18981
18982
18983  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18984done
18985
18986
18987  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18988  DESCRIPTION="gmake in tools-dir"
18989
18990  # On Cygwin, we require a newer version of make than on other platforms
18991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18992    MAKE_VERSION_EXPR="-e 4\."
18993    MAKE_REQUIRED_VERSION="4.0"
18994   else
18995    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18996    MAKE_REQUIRED_VERSION="3.81"
18997  fi
18998
18999  if test "x$MAKE_CANDIDATE" != x; then
19000    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19001$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19002    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19003    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19004    if test "x$IS_GNU_MAKE" = x; then
19005      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19006$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19007    else
19008      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19009      if test "x$IS_MODERN_MAKE" = x; then
19010        { $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
19011$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;}
19012      else
19013        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19014          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19015            MAKE_EXPECTED_ENV='cygwin'
19016          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19017            MAKE_EXPECTED_ENV='msys'
19018          else
19019            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19020          fi
19021          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19022          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19023        else
19024          # Not relevant for non-Windows
19025          IS_MAKE_CORRECT_ENV=true
19026        fi
19027        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19028          { $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
19029$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;}
19030        else
19031          FOUND_MAKE=$MAKE_CANDIDATE
19032
19033  # Only process if variable expands to non-empty
19034
19035  if test "x$FOUND_MAKE" != x; then
19036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19037
19038  # First separate the path from the arguments. This will split at the first
19039  # space.
19040  complete="$FOUND_MAKE"
19041  path="${complete%% *}"
19042  tmp="$complete EOL"
19043  arguments="${tmp#* }"
19044
19045  # Input might be given as Windows format, start by converting to
19046  # unix format.
19047  new_path=`$CYGPATH -u "$path"`
19048
19049  # Now try to locate executable using which
19050  new_path=`$WHICH "$new_path" 2> /dev/null`
19051  # bat and cmd files are not always considered executable in cygwin causing which
19052  # to not find them
19053  if test "x$new_path" = x \
19054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19056    new_path=`$CYGPATH -u "$path"`
19057  fi
19058  if test "x$new_path" = x; then
19059    # Oops. Which didn't find the executable.
19060    # The splitting of arguments from the executable at a space might have been incorrect,
19061    # since paths with space are more likely in Windows. Give it another try with the whole
19062    # argument.
19063    path="$complete"
19064    arguments="EOL"
19065    new_path=`$CYGPATH -u "$path"`
19066    new_path=`$WHICH "$new_path" 2> /dev/null`
19067    # bat and cmd files are not always considered executable in cygwin causing which
19068    # to not find them
19069    if test "x$new_path" = x \
19070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19072      new_path=`$CYGPATH -u "$path"`
19073    fi
19074    if test "x$new_path" = x; then
19075      # It's still not found. Now this is an unrecoverable error.
19076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19078      has_space=`$ECHO "$complete" | $GREP " "`
19079      if test "x$has_space" != x; then
19080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19082      fi
19083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19084    fi
19085  fi
19086
19087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19090  # "foo.exe" is OK but "foo" is an error.
19091  #
19092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19093  # It is also a way to make sure we got the proper file name for the real test later on.
19094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19095  if test "x$test_shortpath" = x; then
19096    # Short path failed, file does not exist as specified.
19097    # Try adding .exe or .cmd
19098    if test -f "${new_path}.exe"; then
19099      input_to_shortpath="${new_path}.exe"
19100    elif test -f "${new_path}.cmd"; then
19101      input_to_shortpath="${new_path}.cmd"
19102    else
19103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19108    fi
19109  else
19110    input_to_shortpath="$new_path"
19111  fi
19112
19113  # Call helper function which possibly converts this using DOS-style short mode.
19114  # If so, the updated path is stored in $new_path.
19115  new_path="$input_to_shortpath"
19116
19117  input_path="$input_to_shortpath"
19118  # Check if we need to convert this using DOS-style short mode. If the path
19119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19120  # take no chances and rewrite it.
19121  # Note: m4 eats our [], so we need to use [ and ] instead.
19122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19123  if test "x$has_forbidden_chars" != x; then
19124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19128      # Going to short mode and back again did indeed matter. Since short mode is
19129      # case insensitive, let's make it lowercase to improve readability.
19130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19131      # Now convert it back to Unix-style (cygpath)
19132      input_path=`$CYGPATH -u "$shortmode_path"`
19133      new_path="$input_path"
19134    fi
19135  fi
19136
19137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19138  if test "x$test_cygdrive_prefix" = x; then
19139    # As a simple fix, exclude /usr/bin since it's not a real path.
19140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19142      # a path prefixed by /cygdrive for fixpath to work.
19143      new_path="$CYGWIN_ROOT_PATH$input_path"
19144    fi
19145  fi
19146
19147  # remove trailing .exe if any
19148  new_path="${new_path/%.exe/}"
19149
19150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19151
19152  # First separate the path from the arguments. This will split at the first
19153  # space.
19154  complete="$FOUND_MAKE"
19155  path="${complete%% *}"
19156  tmp="$complete EOL"
19157  arguments="${tmp#* }"
19158
19159  # Input might be given as Windows format, start by converting to
19160  # unix format.
19161  new_path="$path"
19162
19163  windows_path="$new_path"
19164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19165    unix_path=`$CYGPATH -u "$windows_path"`
19166    new_path="$unix_path"
19167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19169    new_path="$unix_path"
19170  fi
19171
19172
19173  # Now try to locate executable using which
19174  new_path=`$WHICH "$new_path" 2> /dev/null`
19175
19176  if test "x$new_path" = x; then
19177    # Oops. Which didn't find the executable.
19178    # The splitting of arguments from the executable at a space might have been incorrect,
19179    # since paths with space are more likely in Windows. Give it another try with the whole
19180    # argument.
19181    path="$complete"
19182    arguments="EOL"
19183    new_path="$path"
19184
19185  windows_path="$new_path"
19186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19187    unix_path=`$CYGPATH -u "$windows_path"`
19188    new_path="$unix_path"
19189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19191    new_path="$unix_path"
19192  fi
19193
19194
19195    new_path=`$WHICH "$new_path" 2> /dev/null`
19196    # bat and cmd files are not always considered executable in MSYS causing which
19197    # to not find them
19198    if test "x$new_path" = x \
19199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19201      new_path="$path"
19202
19203  windows_path="$new_path"
19204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19205    unix_path=`$CYGPATH -u "$windows_path"`
19206    new_path="$unix_path"
19207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19209    new_path="$unix_path"
19210  fi
19211
19212    fi
19213
19214    if test "x$new_path" = x; then
19215      # It's still not found. Now this is an unrecoverable error.
19216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19218      has_space=`$ECHO "$complete" | $GREP " "`
19219      if test "x$has_space" != x; then
19220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19222      fi
19223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19224    fi
19225  fi
19226
19227  # Now new_path has a complete unix path to the binary
19228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19229    # Keep paths in /bin as-is, but remove trailing .exe if any
19230    new_path="${new_path/%.exe/}"
19231    # Do not save /bin paths to all_fixpath_prefixes!
19232  else
19233    # Not in mixed or Windows style, start by that.
19234    new_path=`cmd //c echo $new_path`
19235
19236  input_path="$new_path"
19237  # Check if we need to convert this using DOS-style short mode. If the path
19238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19239  # take no chances and rewrite it.
19240  # Note: m4 eats our [], so we need to use [ and ] instead.
19241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19242  if test "x$has_forbidden_chars" != x; then
19243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19245  fi
19246
19247    # Output is in $new_path
19248
19249  windows_path="$new_path"
19250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19251    unix_path=`$CYGPATH -u "$windows_path"`
19252    new_path="$unix_path"
19253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19255    new_path="$unix_path"
19256  fi
19257
19258    # remove trailing .exe if any
19259    new_path="${new_path/%.exe/}"
19260
19261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19263  fi
19264
19265    else
19266      # We're on a unix platform. Hooray! :)
19267      # First separate the path from the arguments. This will split at the first
19268      # space.
19269      complete="$FOUND_MAKE"
19270      path="${complete%% *}"
19271      tmp="$complete EOL"
19272      arguments="${tmp#* }"
19273
19274      # Cannot rely on the command "which" here since it doesn't always work.
19275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19276      if test -z "$is_absolute_path"; then
19277        # Path to executable is not absolute. Find it.
19278        IFS_save="$IFS"
19279        IFS=:
19280        for p in $PATH; do
19281          if test -f "$p/$path" && test -x "$p/$path"; then
19282            new_path="$p/$path"
19283            break
19284          fi
19285        done
19286        IFS="$IFS_save"
19287      else
19288        # This is an absolute path, we can use it without further modifications.
19289        new_path="$path"
19290      fi
19291
19292      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
19298$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
19305    if test "x$arguments" != xEOL; then
19306      new_complete="$new_path ${arguments% *}"
19307    else
19308      new_complete="$new_path"
19309    fi
19310
19311    if test "x$complete" != "x$new_complete"; then
19312      FOUND_MAKE="$new_complete"
19313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19314$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19315    fi
19316  fi
19317
19318        fi
19319      fi
19320    fi
19321  fi
19322
19323        if test "x$FOUND_MAKE" = x; then
19324          for ac_prog in make
19325do
19326  # Extract the first word of "$ac_prog", so it can be a program name with args.
19327set dummy $ac_prog; ac_word=$2
19328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19329$as_echo_n "checking for $ac_word... " >&6; }
19330if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19331  $as_echo_n "(cached) " >&6
19332else
19333  case $CHECK_TOOLSDIR_MAKE in
19334  [\\/]* | ?:[\\/]*)
19335  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19336  ;;
19337  *)
19338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19339for as_dir in $PATH
19340do
19341  IFS=$as_save_IFS
19342  test -z "$as_dir" && as_dir=.
19343    for ac_exec_ext in '' $ac_executable_extensions; do
19344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19345    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19347    break 2
19348  fi
19349done
19350  done
19351IFS=$as_save_IFS
19352
19353  ;;
19354esac
19355fi
19356CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19357if test -n "$CHECK_TOOLSDIR_MAKE"; then
19358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19359$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19360else
19361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19362$as_echo "no" >&6; }
19363fi
19364
19365
19366  test -n "$CHECK_TOOLSDIR_MAKE" && break
19367done
19368
19369
19370  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19371  DESCRIPTION="make in tools-dir"
19372
19373  # On Cygwin, we require a newer version of make than on other platforms
19374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19375    MAKE_VERSION_EXPR="-e 4\."
19376    MAKE_REQUIRED_VERSION="4.0"
19377   else
19378    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19379    MAKE_REQUIRED_VERSION="3.81"
19380  fi
19381
19382  if test "x$MAKE_CANDIDATE" != x; then
19383    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19384$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19385    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19386    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19387    if test "x$IS_GNU_MAKE" = x; then
19388      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19389$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19390    else
19391      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19392      if test "x$IS_MODERN_MAKE" = x; then
19393        { $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
19394$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;}
19395      else
19396        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19397          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19398            MAKE_EXPECTED_ENV='cygwin'
19399          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19400            MAKE_EXPECTED_ENV='msys'
19401          else
19402            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19403          fi
19404          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19405          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19406        else
19407          # Not relevant for non-Windows
19408          IS_MAKE_CORRECT_ENV=true
19409        fi
19410        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19411          { $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
19412$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;}
19413        else
19414          FOUND_MAKE=$MAKE_CANDIDATE
19415
19416  # Only process if variable expands to non-empty
19417
19418  if test "x$FOUND_MAKE" != x; then
19419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19420
19421  # First separate the path from the arguments. This will split at the first
19422  # space.
19423  complete="$FOUND_MAKE"
19424  path="${complete%% *}"
19425  tmp="$complete EOL"
19426  arguments="${tmp#* }"
19427
19428  # Input might be given as Windows format, start by converting to
19429  # unix format.
19430  new_path=`$CYGPATH -u "$path"`
19431
19432  # Now try to locate executable using which
19433  new_path=`$WHICH "$new_path" 2> /dev/null`
19434  # bat and cmd files are not always considered executable in cygwin causing which
19435  # to not find them
19436  if test "x$new_path" = x \
19437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19439    new_path=`$CYGPATH -u "$path"`
19440  fi
19441  if test "x$new_path" = x; then
19442    # Oops. Which didn't find the executable.
19443    # The splitting of arguments from the executable at a space might have been incorrect,
19444    # since paths with space are more likely in Windows. Give it another try with the whole
19445    # argument.
19446    path="$complete"
19447    arguments="EOL"
19448    new_path=`$CYGPATH -u "$path"`
19449    new_path=`$WHICH "$new_path" 2> /dev/null`
19450    # bat and cmd files are not always considered executable in cygwin causing which
19451    # to not find them
19452    if test "x$new_path" = x \
19453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19455      new_path=`$CYGPATH -u "$path"`
19456    fi
19457    if test "x$new_path" = x; then
19458      # It's still not found. Now this is an unrecoverable error.
19459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19461      has_space=`$ECHO "$complete" | $GREP " "`
19462      if test "x$has_space" != x; then
19463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19465      fi
19466      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19467    fi
19468  fi
19469
19470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19473  # "foo.exe" is OK but "foo" is an error.
19474  #
19475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19476  # It is also a way to make sure we got the proper file name for the real test later on.
19477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19478  if test "x$test_shortpath" = x; then
19479    # Short path failed, file does not exist as specified.
19480    # Try adding .exe or .cmd
19481    if test -f "${new_path}.exe"; then
19482      input_to_shortpath="${new_path}.exe"
19483    elif test -f "${new_path}.cmd"; then
19484      input_to_shortpath="${new_path}.cmd"
19485    else
19486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19490      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19491    fi
19492  else
19493    input_to_shortpath="$new_path"
19494  fi
19495
19496  # Call helper function which possibly converts this using DOS-style short mode.
19497  # If so, the updated path is stored in $new_path.
19498  new_path="$input_to_shortpath"
19499
19500  input_path="$input_to_shortpath"
19501  # Check if we need to convert this using DOS-style short mode. If the path
19502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19503  # take no chances and rewrite it.
19504  # Note: m4 eats our [], so we need to use [ and ] instead.
19505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19506  if test "x$has_forbidden_chars" != x; then
19507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19511      # Going to short mode and back again did indeed matter. Since short mode is
19512      # case insensitive, let's make it lowercase to improve readability.
19513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19514      # Now convert it back to Unix-style (cygpath)
19515      input_path=`$CYGPATH -u "$shortmode_path"`
19516      new_path="$input_path"
19517    fi
19518  fi
19519
19520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19521  if test "x$test_cygdrive_prefix" = x; then
19522    # As a simple fix, exclude /usr/bin since it's not a real path.
19523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19525      # a path prefixed by /cygdrive for fixpath to work.
19526      new_path="$CYGWIN_ROOT_PATH$input_path"
19527    fi
19528  fi
19529
19530  # remove trailing .exe if any
19531  new_path="${new_path/%.exe/}"
19532
19533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19534
19535  # First separate the path from the arguments. This will split at the first
19536  # space.
19537  complete="$FOUND_MAKE"
19538  path="${complete%% *}"
19539  tmp="$complete EOL"
19540  arguments="${tmp#* }"
19541
19542  # Input might be given as Windows format, start by converting to
19543  # unix format.
19544  new_path="$path"
19545
19546  windows_path="$new_path"
19547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19548    unix_path=`$CYGPATH -u "$windows_path"`
19549    new_path="$unix_path"
19550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19552    new_path="$unix_path"
19553  fi
19554
19555
19556  # Now try to locate executable using which
19557  new_path=`$WHICH "$new_path" 2> /dev/null`
19558
19559  if test "x$new_path" = x; then
19560    # Oops. Which didn't find the executable.
19561    # The splitting of arguments from the executable at a space might have been incorrect,
19562    # since paths with space are more likely in Windows. Give it another try with the whole
19563    # argument.
19564    path="$complete"
19565    arguments="EOL"
19566    new_path="$path"
19567
19568  windows_path="$new_path"
19569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19570    unix_path=`$CYGPATH -u "$windows_path"`
19571    new_path="$unix_path"
19572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19574    new_path="$unix_path"
19575  fi
19576
19577
19578    new_path=`$WHICH "$new_path" 2> /dev/null`
19579    # bat and cmd files are not always considered executable in MSYS causing which
19580    # to not find them
19581    if test "x$new_path" = x \
19582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19584      new_path="$path"
19585
19586  windows_path="$new_path"
19587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19588    unix_path=`$CYGPATH -u "$windows_path"`
19589    new_path="$unix_path"
19590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19592    new_path="$unix_path"
19593  fi
19594
19595    fi
19596
19597    if test "x$new_path" = x; then
19598      # It's still not found. Now this is an unrecoverable error.
19599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19600$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19601      has_space=`$ECHO "$complete" | $GREP " "`
19602      if test "x$has_space" != x; then
19603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19605      fi
19606      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19607    fi
19608  fi
19609
19610  # Now new_path has a complete unix path to the binary
19611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19612    # Keep paths in /bin as-is, but remove trailing .exe if any
19613    new_path="${new_path/%.exe/}"
19614    # Do not save /bin paths to all_fixpath_prefixes!
19615  else
19616    # Not in mixed or Windows style, start by that.
19617    new_path=`cmd //c echo $new_path`
19618
19619  input_path="$new_path"
19620  # Check if we need to convert this using DOS-style short mode. If the path
19621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19622  # take no chances and rewrite it.
19623  # Note: m4 eats our [], so we need to use [ and ] instead.
19624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19625  if test "x$has_forbidden_chars" != x; then
19626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19628  fi
19629
19630    # Output is in $new_path
19631
19632  windows_path="$new_path"
19633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19634    unix_path=`$CYGPATH -u "$windows_path"`
19635    new_path="$unix_path"
19636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19638    new_path="$unix_path"
19639  fi
19640
19641    # remove trailing .exe if any
19642    new_path="${new_path/%.exe/}"
19643
19644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19646  fi
19647
19648    else
19649      # We're on a unix platform. Hooray! :)
19650      # First separate the path from the arguments. This will split at the first
19651      # space.
19652      complete="$FOUND_MAKE"
19653      path="${complete%% *}"
19654      tmp="$complete EOL"
19655      arguments="${tmp#* }"
19656
19657      # Cannot rely on the command "which" here since it doesn't always work.
19658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19659      if test -z "$is_absolute_path"; then
19660        # Path to executable is not absolute. Find it.
19661        IFS_save="$IFS"
19662        IFS=:
19663        for p in $PATH; do
19664          if test -f "$p/$path" && test -x "$p/$path"; then
19665            new_path="$p/$path"
19666            break
19667          fi
19668        done
19669        IFS="$IFS_save"
19670      else
19671        # This is an absolute path, we can use it without further modifications.
19672        new_path="$path"
19673      fi
19674
19675      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
19681$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
19688    if test "x$arguments" != xEOL; then
19689      new_complete="$new_path ${arguments% *}"
19690    else
19691      new_complete="$new_path"
19692    fi
19693
19694    if test "x$complete" != "x$new_complete"; then
19695      FOUND_MAKE="$new_complete"
19696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19697$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19698    fi
19699  fi
19700
19701        fi
19702      fi
19703    fi
19704  fi
19705
19706        fi
19707        PATH=$OLD_PATH
19708      fi
19709    fi
19710
19711    if test "x$FOUND_MAKE" = x; then
19712      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
19713    fi
19714
19715    else
19716      # If it succeeded, then it was overridden by the user. We will use it
19717      # for the tool.
19718
19719      # First remove it from the list of overridden variables, so we can test
19720      # for unknown variables in the end.
19721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19722
19723      # Check if we try to supply an empty value
19724      if test "x$MAKE" = x; then
19725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19726$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19728$as_echo_n "checking for MAKE... " >&6; }
19729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19730$as_echo "disabled" >&6; }
19731      else
19732        # Check if the provided tool contains a complete path.
19733        tool_specified="$MAKE"
19734        tool_basename="${tool_specified##*/}"
19735        if test "x$tool_basename" = "x$tool_specified"; then
19736          # A command without a complete path is provided, search $PATH.
19737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19738$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19739          # Extract the first word of "$tool_basename", so it can be a program name with args.
19740set dummy $tool_basename; ac_word=$2
19741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19742$as_echo_n "checking for $ac_word... " >&6; }
19743if ${ac_cv_path_MAKE+:} false; then :
19744  $as_echo_n "(cached) " >&6
19745else
19746  case $MAKE in
19747  [\\/]* | ?:[\\/]*)
19748  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19749  ;;
19750  *)
19751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19752for as_dir in $PATH
19753do
19754  IFS=$as_save_IFS
19755  test -z "$as_dir" && as_dir=.
19756    for ac_exec_ext in '' $ac_executable_extensions; do
19757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19758    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19760    break 2
19761  fi
19762done
19763  done
19764IFS=$as_save_IFS
19765
19766  ;;
19767esac
19768fi
19769MAKE=$ac_cv_path_MAKE
19770if test -n "$MAKE"; then
19771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19772$as_echo "$MAKE" >&6; }
19773else
19774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19775$as_echo "no" >&6; }
19776fi
19777
19778
19779          if test "x$MAKE" = x; then
19780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19781          fi
19782        else
19783          # Otherwise we believe it is a complete path. Use it as it is.
19784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19785$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19787$as_echo_n "checking for MAKE... " >&6; }
19788          if test ! -x "$tool_specified"; then
19789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19790$as_echo "not found" >&6; }
19791            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19792          fi
19793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19794$as_echo "$tool_specified" >&6; }
19795        fi
19796      fi
19797    fi
19798
19799    # If MAKE was set by user, verify the version
19800
19801  MAKE_CANDIDATE=""$MAKE""
19802  DESCRIPTION="user supplied MAKE=$MAKE"
19803
19804  # On Cygwin, we require a newer version of make than on other platforms
19805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19806    MAKE_VERSION_EXPR="-e 4\."
19807    MAKE_REQUIRED_VERSION="4.0"
19808   else
19809    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19810    MAKE_REQUIRED_VERSION="3.81"
19811  fi
19812
19813  if test "x$MAKE_CANDIDATE" != x; then
19814    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19815$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19816    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19817    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19818    if test "x$IS_GNU_MAKE" = x; then
19819      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19820$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19821    else
19822      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19823      if test "x$IS_MODERN_MAKE" = x; then
19824        { $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
19825$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;}
19826      else
19827        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19828          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19829            MAKE_EXPECTED_ENV='cygwin'
19830          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19831            MAKE_EXPECTED_ENV='msys'
19832          else
19833            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19834          fi
19835          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19836          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19837        else
19838          # Not relevant for non-Windows
19839          IS_MAKE_CORRECT_ENV=true
19840        fi
19841        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19842          { $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
19843$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;}
19844        else
19845          FOUND_MAKE=$MAKE_CANDIDATE
19846
19847  # Only process if variable expands to non-empty
19848
19849  if test "x$FOUND_MAKE" != x; then
19850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19851
19852  # First separate the path from the arguments. This will split at the first
19853  # space.
19854  complete="$FOUND_MAKE"
19855  path="${complete%% *}"
19856  tmp="$complete EOL"
19857  arguments="${tmp#* }"
19858
19859  # Input might be given as Windows format, start by converting to
19860  # unix format.
19861  new_path=`$CYGPATH -u "$path"`
19862
19863  # Now try to locate executable using which
19864  new_path=`$WHICH "$new_path" 2> /dev/null`
19865  # bat and cmd files are not always considered executable in cygwin causing which
19866  # to not find them
19867  if test "x$new_path" = x \
19868      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19869      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19870    new_path=`$CYGPATH -u "$path"`
19871  fi
19872  if test "x$new_path" = x; then
19873    # Oops. Which didn't find the executable.
19874    # The splitting of arguments from the executable at a space might have been incorrect,
19875    # since paths with space are more likely in Windows. Give it another try with the whole
19876    # argument.
19877    path="$complete"
19878    arguments="EOL"
19879    new_path=`$CYGPATH -u "$path"`
19880    new_path=`$WHICH "$new_path" 2> /dev/null`
19881    # bat and cmd files are not always considered executable in cygwin causing which
19882    # to not find them
19883    if test "x$new_path" = x \
19884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19886      new_path=`$CYGPATH -u "$path"`
19887    fi
19888    if test "x$new_path" = x; then
19889      # It's still not found. Now this is an unrecoverable error.
19890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19892      has_space=`$ECHO "$complete" | $GREP " "`
19893      if test "x$has_space" != x; then
19894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19896      fi
19897      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19898    fi
19899  fi
19900
19901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19904  # "foo.exe" is OK but "foo" is an error.
19905  #
19906  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19907  # It is also a way to make sure we got the proper file name for the real test later on.
19908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19909  if test "x$test_shortpath" = x; then
19910    # Short path failed, file does not exist as specified.
19911    # Try adding .exe or .cmd
19912    if test -f "${new_path}.exe"; then
19913      input_to_shortpath="${new_path}.exe"
19914    elif test -f "${new_path}.cmd"; then
19915      input_to_shortpath="${new_path}.cmd"
19916    else
19917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19918$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19919      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19920$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19921      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19922    fi
19923  else
19924    input_to_shortpath="$new_path"
19925  fi
19926
19927  # Call helper function which possibly converts this using DOS-style short mode.
19928  # If so, the updated path is stored in $new_path.
19929  new_path="$input_to_shortpath"
19930
19931  input_path="$input_to_shortpath"
19932  # Check if we need to convert this using DOS-style short mode. If the path
19933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19934  # take no chances and rewrite it.
19935  # Note: m4 eats our [], so we need to use [ and ] instead.
19936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19937  if test "x$has_forbidden_chars" != x; then
19938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19942      # Going to short mode and back again did indeed matter. Since short mode is
19943      # case insensitive, let's make it lowercase to improve readability.
19944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19945      # Now convert it back to Unix-style (cygpath)
19946      input_path=`$CYGPATH -u "$shortmode_path"`
19947      new_path="$input_path"
19948    fi
19949  fi
19950
19951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19952  if test "x$test_cygdrive_prefix" = x; then
19953    # As a simple fix, exclude /usr/bin since it's not a real path.
19954    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19956      # a path prefixed by /cygdrive for fixpath to work.
19957      new_path="$CYGWIN_ROOT_PATH$input_path"
19958    fi
19959  fi
19960
19961  # remove trailing .exe if any
19962  new_path="${new_path/%.exe/}"
19963
19964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19965
19966  # First separate the path from the arguments. This will split at the first
19967  # space.
19968  complete="$FOUND_MAKE"
19969  path="${complete%% *}"
19970  tmp="$complete EOL"
19971  arguments="${tmp#* }"
19972
19973  # Input might be given as Windows format, start by converting to
19974  # unix format.
19975  new_path="$path"
19976
19977  windows_path="$new_path"
19978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19979    unix_path=`$CYGPATH -u "$windows_path"`
19980    new_path="$unix_path"
19981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19983    new_path="$unix_path"
19984  fi
19985
19986
19987  # Now try to locate executable using which
19988  new_path=`$WHICH "$new_path" 2> /dev/null`
19989
19990  if test "x$new_path" = x; then
19991    # Oops. Which didn't find the executable.
19992    # The splitting of arguments from the executable at a space might have been incorrect,
19993    # since paths with space are more likely in Windows. Give it another try with the whole
19994    # argument.
19995    path="$complete"
19996    arguments="EOL"
19997    new_path="$path"
19998
19999  windows_path="$new_path"
20000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20001    unix_path=`$CYGPATH -u "$windows_path"`
20002    new_path="$unix_path"
20003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20005    new_path="$unix_path"
20006  fi
20007
20008
20009    new_path=`$WHICH "$new_path" 2> /dev/null`
20010    # bat and cmd files are not always considered executable in MSYS causing which
20011    # to not find them
20012    if test "x$new_path" = x \
20013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20015      new_path="$path"
20016
20017  windows_path="$new_path"
20018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20019    unix_path=`$CYGPATH -u "$windows_path"`
20020    new_path="$unix_path"
20021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20023    new_path="$unix_path"
20024  fi
20025
20026    fi
20027
20028    if test "x$new_path" = x; then
20029      # It's still not found. Now this is an unrecoverable error.
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20032      has_space=`$ECHO "$complete" | $GREP " "`
20033      if test "x$has_space" != x; then
20034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20036      fi
20037      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20038    fi
20039  fi
20040
20041  # Now new_path has a complete unix path to the binary
20042  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20043    # Keep paths in /bin as-is, but remove trailing .exe if any
20044    new_path="${new_path/%.exe/}"
20045    # Do not save /bin paths to all_fixpath_prefixes!
20046  else
20047    # Not in mixed or Windows style, start by that.
20048    new_path=`cmd //c echo $new_path`
20049
20050  input_path="$new_path"
20051  # Check if we need to convert this using DOS-style short mode. If the path
20052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20053  # take no chances and rewrite it.
20054  # Note: m4 eats our [], so we need to use [ and ] instead.
20055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20056  if test "x$has_forbidden_chars" != x; then
20057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20059  fi
20060
20061    # Output is in $new_path
20062
20063  windows_path="$new_path"
20064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20065    unix_path=`$CYGPATH -u "$windows_path"`
20066    new_path="$unix_path"
20067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20069    new_path="$unix_path"
20070  fi
20071
20072    # remove trailing .exe if any
20073    new_path="${new_path/%.exe/}"
20074
20075    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20076    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20077  fi
20078
20079    else
20080      # We're on a unix platform. Hooray! :)
20081      # First separate the path from the arguments. This will split at the first
20082      # space.
20083      complete="$FOUND_MAKE"
20084      path="${complete%% *}"
20085      tmp="$complete EOL"
20086      arguments="${tmp#* }"
20087
20088      # Cannot rely on the command "which" here since it doesn't always work.
20089      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20090      if test -z "$is_absolute_path"; then
20091        # Path to executable is not absolute. Find it.
20092        IFS_save="$IFS"
20093        IFS=:
20094        for p in $PATH; do
20095          if test -f "$p/$path" && test -x "$p/$path"; then
20096            new_path="$p/$path"
20097            break
20098          fi
20099        done
20100        IFS="$IFS_save"
20101      else
20102        # This is an absolute path, we can use it without further modifications.
20103        new_path="$path"
20104      fi
20105
20106      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
20112$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
20119    if test "x$arguments" != xEOL; then
20120      new_complete="$new_path ${arguments% *}"
20121    else
20122      new_complete="$new_path"
20123    fi
20124
20125    if test "x$complete" != "x$new_complete"; then
20126      FOUND_MAKE="$new_complete"
20127      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20128$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20129    fi
20130  fi
20131
20132        fi
20133      fi
20134    fi
20135  fi
20136
20137    if test "x$FOUND_MAKE" = x; then
20138      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20139    fi
20140
20141  fi
20142
20143
20144  MAKE=$FOUND_MAKE
20145
20146  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20147$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20148
20149
20150  # Check if make supports the output sync option and if so, setup using it.
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20152$as_echo_n "checking if make --output-sync is supported... " >&6; }
20153  if $MAKE --version -O > /dev/null 2>&1; then
20154    OUTPUT_SYNC_SUPPORTED=true
20155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20156$as_echo "yes" >&6; }
20157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20158$as_echo_n "checking for output-sync value... " >&6; }
20159
20160# Check whether --with-output-sync was given.
20161if test "${with_output_sync+set}" = set; then :
20162  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20163fi
20164
20165    if test "x$OUTPUT_SYNC" = "x"; then
20166      OUTPUT_SYNC=none
20167    fi
20168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20169$as_echo "$OUTPUT_SYNC" >&6; }
20170    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20171      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20172    fi
20173  else
20174    OUTPUT_SYNC_SUPPORTED=false
20175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20176$as_echo "no" >&6; }
20177  fi
20178
20179
20180
20181
20182
20183
20184  # Test if find supports -delete
20185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20186$as_echo_n "checking if find supports -delete... " >&6; }
20187  FIND_DELETE="-delete"
20188
20189  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20190
20191  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20192
20193  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20194  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20195    # No, it does not.
20196    rm $DELETEDIR/TestIfFindSupportsDelete
20197    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20198      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20199      FIND_DELETE="-print | xargs rm"
20200    else
20201      FIND_DELETE="-exec rm \{\} \+"
20202    fi
20203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20204$as_echo "no" >&6; }
20205  else
20206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20207$as_echo "yes" >&6; }
20208  fi
20209  rmdir $DELETEDIR
20210
20211
20212
20213  # These tools might not be installed by default,
20214  # need hint on how to install them.
20215
20216
20217
20218  # Publish this variable in the help.
20219
20220
20221  if [ -z "${UNZIP+x}" ]; then
20222    # The variable is not set by user, try to locate tool using the code snippet
20223    for ac_prog in unzip
20224do
20225  # Extract the first word of "$ac_prog", so it can be a program name with args.
20226set dummy $ac_prog; ac_word=$2
20227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20228$as_echo_n "checking for $ac_word... " >&6; }
20229if ${ac_cv_path_UNZIP+:} false; then :
20230  $as_echo_n "(cached) " >&6
20231else
20232  case $UNZIP in
20233  [\\/]* | ?:[\\/]*)
20234  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20235  ;;
20236  *)
20237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20238for as_dir in $PATH
20239do
20240  IFS=$as_save_IFS
20241  test -z "$as_dir" && as_dir=.
20242    for ac_exec_ext in '' $ac_executable_extensions; do
20243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20244    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20246    break 2
20247  fi
20248done
20249  done
20250IFS=$as_save_IFS
20251
20252  ;;
20253esac
20254fi
20255UNZIP=$ac_cv_path_UNZIP
20256if test -n "$UNZIP"; then
20257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20258$as_echo "$UNZIP" >&6; }
20259else
20260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20261$as_echo "no" >&6; }
20262fi
20263
20264
20265  test -n "$UNZIP" && break
20266done
20267
20268  else
20269    # The variable is set, but is it from the command line or the environment?
20270
20271    # Try to remove the string !UNZIP! from our list.
20272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20274      # If it failed, the variable was not from the command line. Ignore it,
20275      # but warn the user (except for BASH, which is always set by the calling BASH).
20276      if test "xUNZIP" != xBASH; then
20277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20278$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20279      fi
20280      # Try to locate tool using the code snippet
20281      for ac_prog in unzip
20282do
20283  # Extract the first word of "$ac_prog", so it can be a program name with args.
20284set dummy $ac_prog; ac_word=$2
20285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20286$as_echo_n "checking for $ac_word... " >&6; }
20287if ${ac_cv_path_UNZIP+:} false; then :
20288  $as_echo_n "(cached) " >&6
20289else
20290  case $UNZIP in
20291  [\\/]* | ?:[\\/]*)
20292  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20293  ;;
20294  *)
20295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20296for as_dir in $PATH
20297do
20298  IFS=$as_save_IFS
20299  test -z "$as_dir" && as_dir=.
20300    for ac_exec_ext in '' $ac_executable_extensions; do
20301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20302    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20304    break 2
20305  fi
20306done
20307  done
20308IFS=$as_save_IFS
20309
20310  ;;
20311esac
20312fi
20313UNZIP=$ac_cv_path_UNZIP
20314if test -n "$UNZIP"; then
20315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20316$as_echo "$UNZIP" >&6; }
20317else
20318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20319$as_echo "no" >&6; }
20320fi
20321
20322
20323  test -n "$UNZIP" && break
20324done
20325
20326    else
20327      # If it succeeded, then it was overridden by the user. We will use it
20328      # for the tool.
20329
20330      # First remove it from the list of overridden variables, so we can test
20331      # for unknown variables in the end.
20332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20333
20334      # Check if we try to supply an empty value
20335      if test "x$UNZIP" = x; then
20336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20337$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20339$as_echo_n "checking for UNZIP... " >&6; }
20340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20341$as_echo "disabled" >&6; }
20342      else
20343        # Check if the provided tool contains a complete path.
20344        tool_specified="$UNZIP"
20345        tool_basename="${tool_specified##*/}"
20346        if test "x$tool_basename" = "x$tool_specified"; then
20347          # A command without a complete path is provided, search $PATH.
20348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20349$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20350          # Extract the first word of "$tool_basename", so it can be a program name with args.
20351set dummy $tool_basename; ac_word=$2
20352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20353$as_echo_n "checking for $ac_word... " >&6; }
20354if ${ac_cv_path_UNZIP+:} false; then :
20355  $as_echo_n "(cached) " >&6
20356else
20357  case $UNZIP in
20358  [\\/]* | ?:[\\/]*)
20359  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20360  ;;
20361  *)
20362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20363for as_dir in $PATH
20364do
20365  IFS=$as_save_IFS
20366  test -z "$as_dir" && as_dir=.
20367    for ac_exec_ext in '' $ac_executable_extensions; do
20368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20369    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20371    break 2
20372  fi
20373done
20374  done
20375IFS=$as_save_IFS
20376
20377  ;;
20378esac
20379fi
20380UNZIP=$ac_cv_path_UNZIP
20381if test -n "$UNZIP"; then
20382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20383$as_echo "$UNZIP" >&6; }
20384else
20385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20386$as_echo "no" >&6; }
20387fi
20388
20389
20390          if test "x$UNZIP" = x; then
20391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20392          fi
20393        else
20394          # Otherwise we believe it is a complete path. Use it as it is.
20395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20396$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20398$as_echo_n "checking for UNZIP... " >&6; }
20399          if test ! -x "$tool_specified"; then
20400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20401$as_echo "not found" >&6; }
20402            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20403          fi
20404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20405$as_echo "$tool_specified" >&6; }
20406        fi
20407      fi
20408    fi
20409
20410  fi
20411
20412
20413
20414  if test "x$UNZIP" = x; then
20415    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20416  fi
20417
20418
20419
20420
20421
20422  # Publish this variable in the help.
20423
20424
20425  if [ -z "${ZIP+x}" ]; then
20426    # The variable is not set by user, try to locate tool using the code snippet
20427    for ac_prog in zip
20428do
20429  # Extract the first word of "$ac_prog", so it can be a program name with args.
20430set dummy $ac_prog; ac_word=$2
20431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20432$as_echo_n "checking for $ac_word... " >&6; }
20433if ${ac_cv_path_ZIP+:} false; then :
20434  $as_echo_n "(cached) " >&6
20435else
20436  case $ZIP in
20437  [\\/]* | ?:[\\/]*)
20438  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20439  ;;
20440  *)
20441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20442for as_dir in $PATH
20443do
20444  IFS=$as_save_IFS
20445  test -z "$as_dir" && as_dir=.
20446    for ac_exec_ext in '' $ac_executable_extensions; do
20447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20448    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20450    break 2
20451  fi
20452done
20453  done
20454IFS=$as_save_IFS
20455
20456  ;;
20457esac
20458fi
20459ZIP=$ac_cv_path_ZIP
20460if test -n "$ZIP"; then
20461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20462$as_echo "$ZIP" >&6; }
20463else
20464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20465$as_echo "no" >&6; }
20466fi
20467
20468
20469  test -n "$ZIP" && break
20470done
20471
20472  else
20473    # The variable is set, but is it from the command line or the environment?
20474
20475    # Try to remove the string !ZIP! from our list.
20476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20478      # If it failed, the variable was not from the command line. Ignore it,
20479      # but warn the user (except for BASH, which is always set by the calling BASH).
20480      if test "xZIP" != xBASH; then
20481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20482$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20483      fi
20484      # Try to locate tool using the code snippet
20485      for ac_prog in zip
20486do
20487  # Extract the first word of "$ac_prog", so it can be a program name with args.
20488set dummy $ac_prog; ac_word=$2
20489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20490$as_echo_n "checking for $ac_word... " >&6; }
20491if ${ac_cv_path_ZIP+:} false; then :
20492  $as_echo_n "(cached) " >&6
20493else
20494  case $ZIP in
20495  [\\/]* | ?:[\\/]*)
20496  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20497  ;;
20498  *)
20499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20500for as_dir in $PATH
20501do
20502  IFS=$as_save_IFS
20503  test -z "$as_dir" && as_dir=.
20504    for ac_exec_ext in '' $ac_executable_extensions; do
20505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20506    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20508    break 2
20509  fi
20510done
20511  done
20512IFS=$as_save_IFS
20513
20514  ;;
20515esac
20516fi
20517ZIP=$ac_cv_path_ZIP
20518if test -n "$ZIP"; then
20519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20520$as_echo "$ZIP" >&6; }
20521else
20522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20523$as_echo "no" >&6; }
20524fi
20525
20526
20527  test -n "$ZIP" && break
20528done
20529
20530    else
20531      # If it succeeded, then it was overridden by the user. We will use it
20532      # for the tool.
20533
20534      # First remove it from the list of overridden variables, so we can test
20535      # for unknown variables in the end.
20536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20537
20538      # Check if we try to supply an empty value
20539      if test "x$ZIP" = x; then
20540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20541$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20543$as_echo_n "checking for ZIP... " >&6; }
20544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20545$as_echo "disabled" >&6; }
20546      else
20547        # Check if the provided tool contains a complete path.
20548        tool_specified="$ZIP"
20549        tool_basename="${tool_specified##*/}"
20550        if test "x$tool_basename" = "x$tool_specified"; then
20551          # A command without a complete path is provided, search $PATH.
20552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20553$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20554          # Extract the first word of "$tool_basename", so it can be a program name with args.
20555set dummy $tool_basename; ac_word=$2
20556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20557$as_echo_n "checking for $ac_word... " >&6; }
20558if ${ac_cv_path_ZIP+:} false; then :
20559  $as_echo_n "(cached) " >&6
20560else
20561  case $ZIP in
20562  [\\/]* | ?:[\\/]*)
20563  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20564  ;;
20565  *)
20566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20567for as_dir in $PATH
20568do
20569  IFS=$as_save_IFS
20570  test -z "$as_dir" && as_dir=.
20571    for ac_exec_ext in '' $ac_executable_extensions; do
20572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20573    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20575    break 2
20576  fi
20577done
20578  done
20579IFS=$as_save_IFS
20580
20581  ;;
20582esac
20583fi
20584ZIP=$ac_cv_path_ZIP
20585if test -n "$ZIP"; then
20586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20587$as_echo "$ZIP" >&6; }
20588else
20589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20590$as_echo "no" >&6; }
20591fi
20592
20593
20594          if test "x$ZIP" = x; then
20595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20596          fi
20597        else
20598          # Otherwise we believe it is a complete path. Use it as it is.
20599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20600$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20602$as_echo_n "checking for ZIP... " >&6; }
20603          if test ! -x "$tool_specified"; then
20604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20605$as_echo "not found" >&6; }
20606            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20607          fi
20608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20609$as_echo "$tool_specified" >&6; }
20610        fi
20611      fi
20612    fi
20613
20614  fi
20615
20616
20617
20618  if test "x$ZIP" = x; then
20619    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20620  fi
20621
20622
20623
20624  # Non-required basic tools
20625
20626
20627
20628  # Publish this variable in the help.
20629
20630
20631  if [ -z "${LDD+x}" ]; then
20632    # The variable is not set by user, try to locate tool using the code snippet
20633    for ac_prog in ldd
20634do
20635  # Extract the first word of "$ac_prog", so it can be a program name with args.
20636set dummy $ac_prog; ac_word=$2
20637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20638$as_echo_n "checking for $ac_word... " >&6; }
20639if ${ac_cv_path_LDD+:} false; then :
20640  $as_echo_n "(cached) " >&6
20641else
20642  case $LDD in
20643  [\\/]* | ?:[\\/]*)
20644  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20645  ;;
20646  *)
20647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20648for as_dir in $PATH
20649do
20650  IFS=$as_save_IFS
20651  test -z "$as_dir" && as_dir=.
20652    for ac_exec_ext in '' $ac_executable_extensions; do
20653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20654    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20656    break 2
20657  fi
20658done
20659  done
20660IFS=$as_save_IFS
20661
20662  ;;
20663esac
20664fi
20665LDD=$ac_cv_path_LDD
20666if test -n "$LDD"; then
20667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20668$as_echo "$LDD" >&6; }
20669else
20670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20671$as_echo "no" >&6; }
20672fi
20673
20674
20675  test -n "$LDD" && break
20676done
20677
20678  else
20679    # The variable is set, but is it from the command line or the environment?
20680
20681    # Try to remove the string !LDD! from our list.
20682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20684      # If it failed, the variable was not from the command line. Ignore it,
20685      # but warn the user (except for BASH, which is always set by the calling BASH).
20686      if test "xLDD" != xBASH; then
20687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20688$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20689      fi
20690      # Try to locate tool using the code snippet
20691      for ac_prog in ldd
20692do
20693  # Extract the first word of "$ac_prog", so it can be a program name with args.
20694set dummy $ac_prog; ac_word=$2
20695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20696$as_echo_n "checking for $ac_word... " >&6; }
20697if ${ac_cv_path_LDD+:} false; then :
20698  $as_echo_n "(cached) " >&6
20699else
20700  case $LDD in
20701  [\\/]* | ?:[\\/]*)
20702  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20703  ;;
20704  *)
20705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20706for as_dir in $PATH
20707do
20708  IFS=$as_save_IFS
20709  test -z "$as_dir" && as_dir=.
20710    for ac_exec_ext in '' $ac_executable_extensions; do
20711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20712    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20714    break 2
20715  fi
20716done
20717  done
20718IFS=$as_save_IFS
20719
20720  ;;
20721esac
20722fi
20723LDD=$ac_cv_path_LDD
20724if test -n "$LDD"; then
20725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20726$as_echo "$LDD" >&6; }
20727else
20728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20729$as_echo "no" >&6; }
20730fi
20731
20732
20733  test -n "$LDD" && break
20734done
20735
20736    else
20737      # If it succeeded, then it was overridden by the user. We will use it
20738      # for the tool.
20739
20740      # First remove it from the list of overridden variables, so we can test
20741      # for unknown variables in the end.
20742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20743
20744      # Check if we try to supply an empty value
20745      if test "x$LDD" = x; then
20746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20747$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20749$as_echo_n "checking for LDD... " >&6; }
20750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20751$as_echo "disabled" >&6; }
20752      else
20753        # Check if the provided tool contains a complete path.
20754        tool_specified="$LDD"
20755        tool_basename="${tool_specified##*/}"
20756        if test "x$tool_basename" = "x$tool_specified"; then
20757          # A command without a complete path is provided, search $PATH.
20758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20759$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20760          # Extract the first word of "$tool_basename", so it can be a program name with args.
20761set dummy $tool_basename; ac_word=$2
20762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20763$as_echo_n "checking for $ac_word... " >&6; }
20764if ${ac_cv_path_LDD+:} false; then :
20765  $as_echo_n "(cached) " >&6
20766else
20767  case $LDD in
20768  [\\/]* | ?:[\\/]*)
20769  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20770  ;;
20771  *)
20772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20773for as_dir in $PATH
20774do
20775  IFS=$as_save_IFS
20776  test -z "$as_dir" && as_dir=.
20777    for ac_exec_ext in '' $ac_executable_extensions; do
20778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20779    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20781    break 2
20782  fi
20783done
20784  done
20785IFS=$as_save_IFS
20786
20787  ;;
20788esac
20789fi
20790LDD=$ac_cv_path_LDD
20791if test -n "$LDD"; then
20792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20793$as_echo "$LDD" >&6; }
20794else
20795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20796$as_echo "no" >&6; }
20797fi
20798
20799
20800          if test "x$LDD" = x; then
20801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20802          fi
20803        else
20804          # Otherwise we believe it is a complete path. Use it as it is.
20805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20806$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20808$as_echo_n "checking for LDD... " >&6; }
20809          if test ! -x "$tool_specified"; then
20810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20811$as_echo "not found" >&6; }
20812            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20813          fi
20814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20815$as_echo "$tool_specified" >&6; }
20816        fi
20817      fi
20818    fi
20819
20820  fi
20821
20822
20823  if test "x$LDD" = "x"; then
20824    # List shared lib dependencies is used for
20825    # debug output and checking for forbidden dependencies.
20826    # We can build without it.
20827    LDD="true"
20828  fi
20829
20830
20831  # Publish this variable in the help.
20832
20833
20834  if [ -z "${OTOOL+x}" ]; then
20835    # The variable is not set by user, try to locate tool using the code snippet
20836    for ac_prog in otool
20837do
20838  # Extract the first word of "$ac_prog", so it can be a program name with args.
20839set dummy $ac_prog; ac_word=$2
20840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20841$as_echo_n "checking for $ac_word... " >&6; }
20842if ${ac_cv_path_OTOOL+:} false; then :
20843  $as_echo_n "(cached) " >&6
20844else
20845  case $OTOOL in
20846  [\\/]* | ?:[\\/]*)
20847  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20848  ;;
20849  *)
20850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20851for as_dir in $PATH
20852do
20853  IFS=$as_save_IFS
20854  test -z "$as_dir" && as_dir=.
20855    for ac_exec_ext in '' $ac_executable_extensions; do
20856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20857    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20859    break 2
20860  fi
20861done
20862  done
20863IFS=$as_save_IFS
20864
20865  ;;
20866esac
20867fi
20868OTOOL=$ac_cv_path_OTOOL
20869if test -n "$OTOOL"; then
20870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20871$as_echo "$OTOOL" >&6; }
20872else
20873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20874$as_echo "no" >&6; }
20875fi
20876
20877
20878  test -n "$OTOOL" && break
20879done
20880
20881  else
20882    # The variable is set, but is it from the command line or the environment?
20883
20884    # Try to remove the string !OTOOL! from our list.
20885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20887      # If it failed, the variable was not from the command line. Ignore it,
20888      # but warn the user (except for BASH, which is always set by the calling BASH).
20889      if test "xOTOOL" != xBASH; then
20890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20891$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20892      fi
20893      # Try to locate tool using the code snippet
20894      for ac_prog in otool
20895do
20896  # Extract the first word of "$ac_prog", so it can be a program name with args.
20897set dummy $ac_prog; ac_word=$2
20898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20899$as_echo_n "checking for $ac_word... " >&6; }
20900if ${ac_cv_path_OTOOL+:} false; then :
20901  $as_echo_n "(cached) " >&6
20902else
20903  case $OTOOL in
20904  [\\/]* | ?:[\\/]*)
20905  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20906  ;;
20907  *)
20908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20909for as_dir in $PATH
20910do
20911  IFS=$as_save_IFS
20912  test -z "$as_dir" && as_dir=.
20913    for ac_exec_ext in '' $ac_executable_extensions; do
20914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20915    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20917    break 2
20918  fi
20919done
20920  done
20921IFS=$as_save_IFS
20922
20923  ;;
20924esac
20925fi
20926OTOOL=$ac_cv_path_OTOOL
20927if test -n "$OTOOL"; then
20928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20929$as_echo "$OTOOL" >&6; }
20930else
20931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20932$as_echo "no" >&6; }
20933fi
20934
20935
20936  test -n "$OTOOL" && break
20937done
20938
20939    else
20940      # If it succeeded, then it was overridden by the user. We will use it
20941      # for the tool.
20942
20943      # First remove it from the list of overridden variables, so we can test
20944      # for unknown variables in the end.
20945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20946
20947      # Check if we try to supply an empty value
20948      if test "x$OTOOL" = x; then
20949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20950$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20952$as_echo_n "checking for OTOOL... " >&6; }
20953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20954$as_echo "disabled" >&6; }
20955      else
20956        # Check if the provided tool contains a complete path.
20957        tool_specified="$OTOOL"
20958        tool_basename="${tool_specified##*/}"
20959        if test "x$tool_basename" = "x$tool_specified"; then
20960          # A command without a complete path is provided, search $PATH.
20961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20962$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20963          # Extract the first word of "$tool_basename", so it can be a program name with args.
20964set dummy $tool_basename; ac_word=$2
20965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20966$as_echo_n "checking for $ac_word... " >&6; }
20967if ${ac_cv_path_OTOOL+:} false; then :
20968  $as_echo_n "(cached) " >&6
20969else
20970  case $OTOOL in
20971  [\\/]* | ?:[\\/]*)
20972  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20973  ;;
20974  *)
20975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20976for as_dir in $PATH
20977do
20978  IFS=$as_save_IFS
20979  test -z "$as_dir" && as_dir=.
20980    for ac_exec_ext in '' $ac_executable_extensions; do
20981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20982    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20984    break 2
20985  fi
20986done
20987  done
20988IFS=$as_save_IFS
20989
20990  ;;
20991esac
20992fi
20993OTOOL=$ac_cv_path_OTOOL
20994if test -n "$OTOOL"; then
20995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20996$as_echo "$OTOOL" >&6; }
20997else
20998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20999$as_echo "no" >&6; }
21000fi
21001
21002
21003          if test "x$OTOOL" = x; then
21004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21005          fi
21006        else
21007          # Otherwise we believe it is a complete path. Use it as it is.
21008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21009$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21011$as_echo_n "checking for OTOOL... " >&6; }
21012          if test ! -x "$tool_specified"; then
21013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21014$as_echo "not found" >&6; }
21015            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21016          fi
21017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21018$as_echo "$tool_specified" >&6; }
21019        fi
21020      fi
21021    fi
21022
21023  fi
21024
21025
21026  if test "x$OTOOL" = "x"; then
21027    OTOOL="true"
21028  fi
21029
21030
21031  # Publish this variable in the help.
21032
21033
21034  if [ -z "${READELF+x}" ]; then
21035    # The variable is not set by user, try to locate tool using the code snippet
21036    for ac_prog in greadelf readelf
21037do
21038  # Extract the first word of "$ac_prog", so it can be a program name with args.
21039set dummy $ac_prog; ac_word=$2
21040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21041$as_echo_n "checking for $ac_word... " >&6; }
21042if ${ac_cv_path_READELF+:} false; then :
21043  $as_echo_n "(cached) " >&6
21044else
21045  case $READELF in
21046  [\\/]* | ?:[\\/]*)
21047  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21048  ;;
21049  *)
21050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21051for as_dir in $PATH
21052do
21053  IFS=$as_save_IFS
21054  test -z "$as_dir" && as_dir=.
21055    for ac_exec_ext in '' $ac_executable_extensions; do
21056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21057    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21059    break 2
21060  fi
21061done
21062  done
21063IFS=$as_save_IFS
21064
21065  ;;
21066esac
21067fi
21068READELF=$ac_cv_path_READELF
21069if test -n "$READELF"; then
21070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21071$as_echo "$READELF" >&6; }
21072else
21073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21074$as_echo "no" >&6; }
21075fi
21076
21077
21078  test -n "$READELF" && break
21079done
21080
21081  else
21082    # The variable is set, but is it from the command line or the environment?
21083
21084    # Try to remove the string !READELF! from our list.
21085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21087      # If it failed, the variable was not from the command line. Ignore it,
21088      # but warn the user (except for BASH, which is always set by the calling BASH).
21089      if test "xREADELF" != xBASH; then
21090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21091$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21092      fi
21093      # Try to locate tool using the code snippet
21094      for ac_prog in greadelf readelf
21095do
21096  # Extract the first word of "$ac_prog", so it can be a program name with args.
21097set dummy $ac_prog; ac_word=$2
21098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21099$as_echo_n "checking for $ac_word... " >&6; }
21100if ${ac_cv_path_READELF+:} false; then :
21101  $as_echo_n "(cached) " >&6
21102else
21103  case $READELF in
21104  [\\/]* | ?:[\\/]*)
21105  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21106  ;;
21107  *)
21108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21109for as_dir in $PATH
21110do
21111  IFS=$as_save_IFS
21112  test -z "$as_dir" && as_dir=.
21113    for ac_exec_ext in '' $ac_executable_extensions; do
21114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21115    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21117    break 2
21118  fi
21119done
21120  done
21121IFS=$as_save_IFS
21122
21123  ;;
21124esac
21125fi
21126READELF=$ac_cv_path_READELF
21127if test -n "$READELF"; then
21128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21129$as_echo "$READELF" >&6; }
21130else
21131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21132$as_echo "no" >&6; }
21133fi
21134
21135
21136  test -n "$READELF" && break
21137done
21138
21139    else
21140      # If it succeeded, then it was overridden by the user. We will use it
21141      # for the tool.
21142
21143      # First remove it from the list of overridden variables, so we can test
21144      # for unknown variables in the end.
21145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21146
21147      # Check if we try to supply an empty value
21148      if test "x$READELF" = x; then
21149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21150$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21152$as_echo_n "checking for READELF... " >&6; }
21153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21154$as_echo "disabled" >&6; }
21155      else
21156        # Check if the provided tool contains a complete path.
21157        tool_specified="$READELF"
21158        tool_basename="${tool_specified##*/}"
21159        if test "x$tool_basename" = "x$tool_specified"; then
21160          # A command without a complete path is provided, search $PATH.
21161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21162$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21163          # Extract the first word of "$tool_basename", so it can be a program name with args.
21164set dummy $tool_basename; ac_word=$2
21165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21166$as_echo_n "checking for $ac_word... " >&6; }
21167if ${ac_cv_path_READELF+:} false; then :
21168  $as_echo_n "(cached) " >&6
21169else
21170  case $READELF in
21171  [\\/]* | ?:[\\/]*)
21172  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21173  ;;
21174  *)
21175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21176for as_dir in $PATH
21177do
21178  IFS=$as_save_IFS
21179  test -z "$as_dir" && as_dir=.
21180    for ac_exec_ext in '' $ac_executable_extensions; do
21181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21182    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21184    break 2
21185  fi
21186done
21187  done
21188IFS=$as_save_IFS
21189
21190  ;;
21191esac
21192fi
21193READELF=$ac_cv_path_READELF
21194if test -n "$READELF"; then
21195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21196$as_echo "$READELF" >&6; }
21197else
21198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21199$as_echo "no" >&6; }
21200fi
21201
21202
21203          if test "x$READELF" = x; then
21204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21205          fi
21206        else
21207          # Otherwise we believe it is a complete path. Use it as it is.
21208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21209$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21211$as_echo_n "checking for READELF... " >&6; }
21212          if test ! -x "$tool_specified"; then
21213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21214$as_echo "not found" >&6; }
21215            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21216          fi
21217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21218$as_echo "$tool_specified" >&6; }
21219        fi
21220      fi
21221    fi
21222
21223  fi
21224
21225
21226
21227
21228  # Publish this variable in the help.
21229
21230
21231  if [ -z "${HG+x}" ]; then
21232    # The variable is not set by user, try to locate tool using the code snippet
21233    for ac_prog in hg
21234do
21235  # Extract the first word of "$ac_prog", so it can be a program name with args.
21236set dummy $ac_prog; ac_word=$2
21237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21238$as_echo_n "checking for $ac_word... " >&6; }
21239if ${ac_cv_path_HG+:} false; then :
21240  $as_echo_n "(cached) " >&6
21241else
21242  case $HG in
21243  [\\/]* | ?:[\\/]*)
21244  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21245  ;;
21246  *)
21247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21248for as_dir in $PATH
21249do
21250  IFS=$as_save_IFS
21251  test -z "$as_dir" && as_dir=.
21252    for ac_exec_ext in '' $ac_executable_extensions; do
21253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21254    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21256    break 2
21257  fi
21258done
21259  done
21260IFS=$as_save_IFS
21261
21262  ;;
21263esac
21264fi
21265HG=$ac_cv_path_HG
21266if test -n "$HG"; then
21267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21268$as_echo "$HG" >&6; }
21269else
21270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21271$as_echo "no" >&6; }
21272fi
21273
21274
21275  test -n "$HG" && break
21276done
21277
21278  else
21279    # The variable is set, but is it from the command line or the environment?
21280
21281    # Try to remove the string !HG! from our list.
21282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21284      # If it failed, the variable was not from the command line. Ignore it,
21285      # but warn the user (except for BASH, which is always set by the calling BASH).
21286      if test "xHG" != xBASH; then
21287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21288$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21289      fi
21290      # Try to locate tool using the code snippet
21291      for ac_prog in hg
21292do
21293  # Extract the first word of "$ac_prog", so it can be a program name with args.
21294set dummy $ac_prog; ac_word=$2
21295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21296$as_echo_n "checking for $ac_word... " >&6; }
21297if ${ac_cv_path_HG+:} false; then :
21298  $as_echo_n "(cached) " >&6
21299else
21300  case $HG in
21301  [\\/]* | ?:[\\/]*)
21302  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21303  ;;
21304  *)
21305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21306for as_dir in $PATH
21307do
21308  IFS=$as_save_IFS
21309  test -z "$as_dir" && as_dir=.
21310    for ac_exec_ext in '' $ac_executable_extensions; do
21311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21312    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21314    break 2
21315  fi
21316done
21317  done
21318IFS=$as_save_IFS
21319
21320  ;;
21321esac
21322fi
21323HG=$ac_cv_path_HG
21324if test -n "$HG"; then
21325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21326$as_echo "$HG" >&6; }
21327else
21328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21329$as_echo "no" >&6; }
21330fi
21331
21332
21333  test -n "$HG" && break
21334done
21335
21336    else
21337      # If it succeeded, then it was overridden by the user. We will use it
21338      # for the tool.
21339
21340      # First remove it from the list of overridden variables, so we can test
21341      # for unknown variables in the end.
21342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21343
21344      # Check if we try to supply an empty value
21345      if test "x$HG" = x; then
21346        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21347$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21349$as_echo_n "checking for HG... " >&6; }
21350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21351$as_echo "disabled" >&6; }
21352      else
21353        # Check if the provided tool contains a complete path.
21354        tool_specified="$HG"
21355        tool_basename="${tool_specified##*/}"
21356        if test "x$tool_basename" = "x$tool_specified"; then
21357          # A command without a complete path is provided, search $PATH.
21358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21359$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21360          # Extract the first word of "$tool_basename", so it can be a program name with args.
21361set dummy $tool_basename; ac_word=$2
21362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21363$as_echo_n "checking for $ac_word... " >&6; }
21364if ${ac_cv_path_HG+:} false; then :
21365  $as_echo_n "(cached) " >&6
21366else
21367  case $HG in
21368  [\\/]* | ?:[\\/]*)
21369  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21370  ;;
21371  *)
21372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21373for as_dir in $PATH
21374do
21375  IFS=$as_save_IFS
21376  test -z "$as_dir" && as_dir=.
21377    for ac_exec_ext in '' $ac_executable_extensions; do
21378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21379    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21381    break 2
21382  fi
21383done
21384  done
21385IFS=$as_save_IFS
21386
21387  ;;
21388esac
21389fi
21390HG=$ac_cv_path_HG
21391if test -n "$HG"; then
21392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21393$as_echo "$HG" >&6; }
21394else
21395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21396$as_echo "no" >&6; }
21397fi
21398
21399
21400          if test "x$HG" = x; then
21401            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21402          fi
21403        else
21404          # Otherwise we believe it is a complete path. Use it as it is.
21405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21406$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21407          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21408$as_echo_n "checking for HG... " >&6; }
21409          if test ! -x "$tool_specified"; then
21410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21411$as_echo "not found" >&6; }
21412            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21413          fi
21414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21415$as_echo "$tool_specified" >&6; }
21416        fi
21417      fi
21418    fi
21419
21420  fi
21421
21422
21423
21424
21425  # Publish this variable in the help.
21426
21427
21428  if [ -z "${STAT+x}" ]; then
21429    # The variable is not set by user, try to locate tool using the code snippet
21430    for ac_prog in stat
21431do
21432  # Extract the first word of "$ac_prog", so it can be a program name with args.
21433set dummy $ac_prog; ac_word=$2
21434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21435$as_echo_n "checking for $ac_word... " >&6; }
21436if ${ac_cv_path_STAT+:} false; then :
21437  $as_echo_n "(cached) " >&6
21438else
21439  case $STAT in
21440  [\\/]* | ?:[\\/]*)
21441  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21442  ;;
21443  *)
21444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21445for as_dir in $PATH
21446do
21447  IFS=$as_save_IFS
21448  test -z "$as_dir" && as_dir=.
21449    for ac_exec_ext in '' $ac_executable_extensions; do
21450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21451    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21453    break 2
21454  fi
21455done
21456  done
21457IFS=$as_save_IFS
21458
21459  ;;
21460esac
21461fi
21462STAT=$ac_cv_path_STAT
21463if test -n "$STAT"; then
21464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21465$as_echo "$STAT" >&6; }
21466else
21467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21468$as_echo "no" >&6; }
21469fi
21470
21471
21472  test -n "$STAT" && break
21473done
21474
21475  else
21476    # The variable is set, but is it from the command line or the environment?
21477
21478    # Try to remove the string !STAT! from our list.
21479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21481      # If it failed, the variable was not from the command line. Ignore it,
21482      # but warn the user (except for BASH, which is always set by the calling BASH).
21483      if test "xSTAT" != xBASH; then
21484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21485$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21486      fi
21487      # Try to locate tool using the code snippet
21488      for ac_prog in stat
21489do
21490  # Extract the first word of "$ac_prog", so it can be a program name with args.
21491set dummy $ac_prog; ac_word=$2
21492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21493$as_echo_n "checking for $ac_word... " >&6; }
21494if ${ac_cv_path_STAT+:} false; then :
21495  $as_echo_n "(cached) " >&6
21496else
21497  case $STAT in
21498  [\\/]* | ?:[\\/]*)
21499  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21500  ;;
21501  *)
21502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21503for as_dir in $PATH
21504do
21505  IFS=$as_save_IFS
21506  test -z "$as_dir" && as_dir=.
21507    for ac_exec_ext in '' $ac_executable_extensions; do
21508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21509    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21511    break 2
21512  fi
21513done
21514  done
21515IFS=$as_save_IFS
21516
21517  ;;
21518esac
21519fi
21520STAT=$ac_cv_path_STAT
21521if test -n "$STAT"; then
21522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21523$as_echo "$STAT" >&6; }
21524else
21525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21526$as_echo "no" >&6; }
21527fi
21528
21529
21530  test -n "$STAT" && break
21531done
21532
21533    else
21534      # If it succeeded, then it was overridden by the user. We will use it
21535      # for the tool.
21536
21537      # First remove it from the list of overridden variables, so we can test
21538      # for unknown variables in the end.
21539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21540
21541      # Check if we try to supply an empty value
21542      if test "x$STAT" = x; then
21543        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21544$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21546$as_echo_n "checking for STAT... " >&6; }
21547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21548$as_echo "disabled" >&6; }
21549      else
21550        # Check if the provided tool contains a complete path.
21551        tool_specified="$STAT"
21552        tool_basename="${tool_specified##*/}"
21553        if test "x$tool_basename" = "x$tool_specified"; then
21554          # A command without a complete path is provided, search $PATH.
21555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21556$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21557          # Extract the first word of "$tool_basename", so it can be a program name with args.
21558set dummy $tool_basename; ac_word=$2
21559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21560$as_echo_n "checking for $ac_word... " >&6; }
21561if ${ac_cv_path_STAT+:} false; then :
21562  $as_echo_n "(cached) " >&6
21563else
21564  case $STAT in
21565  [\\/]* | ?:[\\/]*)
21566  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21567  ;;
21568  *)
21569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21570for as_dir in $PATH
21571do
21572  IFS=$as_save_IFS
21573  test -z "$as_dir" && as_dir=.
21574    for ac_exec_ext in '' $ac_executable_extensions; do
21575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21576    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21578    break 2
21579  fi
21580done
21581  done
21582IFS=$as_save_IFS
21583
21584  ;;
21585esac
21586fi
21587STAT=$ac_cv_path_STAT
21588if test -n "$STAT"; then
21589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21590$as_echo "$STAT" >&6; }
21591else
21592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21593$as_echo "no" >&6; }
21594fi
21595
21596
21597          if test "x$STAT" = x; then
21598            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21599          fi
21600        else
21601          # Otherwise we believe it is a complete path. Use it as it is.
21602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21603$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21604          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21605$as_echo_n "checking for STAT... " >&6; }
21606          if test ! -x "$tool_specified"; then
21607            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21608$as_echo "not found" >&6; }
21609            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21610          fi
21611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21612$as_echo "$tool_specified" >&6; }
21613        fi
21614      fi
21615    fi
21616
21617  fi
21618
21619
21620
21621
21622  # Publish this variable in the help.
21623
21624
21625  if [ -z "${TIME+x}" ]; then
21626    # The variable is not set by user, try to locate tool using the code snippet
21627    for ac_prog in time
21628do
21629  # Extract the first word of "$ac_prog", so it can be a program name with args.
21630set dummy $ac_prog; ac_word=$2
21631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21632$as_echo_n "checking for $ac_word... " >&6; }
21633if ${ac_cv_path_TIME+:} false; then :
21634  $as_echo_n "(cached) " >&6
21635else
21636  case $TIME in
21637  [\\/]* | ?:[\\/]*)
21638  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21639  ;;
21640  *)
21641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21642for as_dir in $PATH
21643do
21644  IFS=$as_save_IFS
21645  test -z "$as_dir" && as_dir=.
21646    for ac_exec_ext in '' $ac_executable_extensions; do
21647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21648    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21650    break 2
21651  fi
21652done
21653  done
21654IFS=$as_save_IFS
21655
21656  ;;
21657esac
21658fi
21659TIME=$ac_cv_path_TIME
21660if test -n "$TIME"; then
21661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21662$as_echo "$TIME" >&6; }
21663else
21664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21665$as_echo "no" >&6; }
21666fi
21667
21668
21669  test -n "$TIME" && break
21670done
21671
21672  else
21673    # The variable is set, but is it from the command line or the environment?
21674
21675    # Try to remove the string !TIME! from our list.
21676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21678      # If it failed, the variable was not from the command line. Ignore it,
21679      # but warn the user (except for BASH, which is always set by the calling BASH).
21680      if test "xTIME" != xBASH; then
21681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21682$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21683      fi
21684      # Try to locate tool using the code snippet
21685      for ac_prog in time
21686do
21687  # Extract the first word of "$ac_prog", so it can be a program name with args.
21688set dummy $ac_prog; ac_word=$2
21689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21690$as_echo_n "checking for $ac_word... " >&6; }
21691if ${ac_cv_path_TIME+:} false; then :
21692  $as_echo_n "(cached) " >&6
21693else
21694  case $TIME in
21695  [\\/]* | ?:[\\/]*)
21696  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21697  ;;
21698  *)
21699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21700for as_dir in $PATH
21701do
21702  IFS=$as_save_IFS
21703  test -z "$as_dir" && as_dir=.
21704    for ac_exec_ext in '' $ac_executable_extensions; do
21705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21706    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21708    break 2
21709  fi
21710done
21711  done
21712IFS=$as_save_IFS
21713
21714  ;;
21715esac
21716fi
21717TIME=$ac_cv_path_TIME
21718if test -n "$TIME"; then
21719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21720$as_echo "$TIME" >&6; }
21721else
21722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21723$as_echo "no" >&6; }
21724fi
21725
21726
21727  test -n "$TIME" && break
21728done
21729
21730    else
21731      # If it succeeded, then it was overridden by the user. We will use it
21732      # for the tool.
21733
21734      # First remove it from the list of overridden variables, so we can test
21735      # for unknown variables in the end.
21736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21737
21738      # Check if we try to supply an empty value
21739      if test "x$TIME" = x; then
21740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21741$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21743$as_echo_n "checking for TIME... " >&6; }
21744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21745$as_echo "disabled" >&6; }
21746      else
21747        # Check if the provided tool contains a complete path.
21748        tool_specified="$TIME"
21749        tool_basename="${tool_specified##*/}"
21750        if test "x$tool_basename" = "x$tool_specified"; then
21751          # A command without a complete path is provided, search $PATH.
21752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21753$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21754          # Extract the first word of "$tool_basename", so it can be a program name with args.
21755set dummy $tool_basename; ac_word=$2
21756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21757$as_echo_n "checking for $ac_word... " >&6; }
21758if ${ac_cv_path_TIME+:} false; then :
21759  $as_echo_n "(cached) " >&6
21760else
21761  case $TIME in
21762  [\\/]* | ?:[\\/]*)
21763  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21764  ;;
21765  *)
21766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21767for as_dir in $PATH
21768do
21769  IFS=$as_save_IFS
21770  test -z "$as_dir" && as_dir=.
21771    for ac_exec_ext in '' $ac_executable_extensions; do
21772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21773    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21775    break 2
21776  fi
21777done
21778  done
21779IFS=$as_save_IFS
21780
21781  ;;
21782esac
21783fi
21784TIME=$ac_cv_path_TIME
21785if test -n "$TIME"; then
21786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21787$as_echo "$TIME" >&6; }
21788else
21789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21790$as_echo "no" >&6; }
21791fi
21792
21793
21794          if test "x$TIME" = x; then
21795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21796          fi
21797        else
21798          # Otherwise we believe it is a complete path. Use it as it is.
21799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21800$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21802$as_echo_n "checking for TIME... " >&6; }
21803          if test ! -x "$tool_specified"; then
21804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21805$as_echo "not found" >&6; }
21806            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21807          fi
21808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21809$as_echo "$tool_specified" >&6; }
21810        fi
21811      fi
21812    fi
21813
21814  fi
21815
21816
21817
21818
21819  # Publish this variable in the help.
21820
21821
21822  if [ -z "${PATCH+x}" ]; then
21823    # The variable is not set by user, try to locate tool using the code snippet
21824    for ac_prog in gpatch patch
21825do
21826  # Extract the first word of "$ac_prog", so it can be a program name with args.
21827set dummy $ac_prog; ac_word=$2
21828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21829$as_echo_n "checking for $ac_word... " >&6; }
21830if ${ac_cv_path_PATCH+:} false; then :
21831  $as_echo_n "(cached) " >&6
21832else
21833  case $PATCH in
21834  [\\/]* | ?:[\\/]*)
21835  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21836  ;;
21837  *)
21838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21839for as_dir in $PATH
21840do
21841  IFS=$as_save_IFS
21842  test -z "$as_dir" && as_dir=.
21843    for ac_exec_ext in '' $ac_executable_extensions; do
21844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21845    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21847    break 2
21848  fi
21849done
21850  done
21851IFS=$as_save_IFS
21852
21853  ;;
21854esac
21855fi
21856PATCH=$ac_cv_path_PATCH
21857if test -n "$PATCH"; then
21858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21859$as_echo "$PATCH" >&6; }
21860else
21861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21862$as_echo "no" >&6; }
21863fi
21864
21865
21866  test -n "$PATCH" && break
21867done
21868
21869  else
21870    # The variable is set, but is it from the command line or the environment?
21871
21872    # Try to remove the string !PATCH! from our list.
21873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21875      # If it failed, the variable was not from the command line. Ignore it,
21876      # but warn the user (except for BASH, which is always set by the calling BASH).
21877      if test "xPATCH" != xBASH; then
21878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21879$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21880      fi
21881      # Try to locate tool using the code snippet
21882      for ac_prog in gpatch patch
21883do
21884  # Extract the first word of "$ac_prog", so it can be a program name with args.
21885set dummy $ac_prog; ac_word=$2
21886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21887$as_echo_n "checking for $ac_word... " >&6; }
21888if ${ac_cv_path_PATCH+:} false; then :
21889  $as_echo_n "(cached) " >&6
21890else
21891  case $PATCH in
21892  [\\/]* | ?:[\\/]*)
21893  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21894  ;;
21895  *)
21896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21897for as_dir in $PATH
21898do
21899  IFS=$as_save_IFS
21900  test -z "$as_dir" && as_dir=.
21901    for ac_exec_ext in '' $ac_executable_extensions; do
21902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21903    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21905    break 2
21906  fi
21907done
21908  done
21909IFS=$as_save_IFS
21910
21911  ;;
21912esac
21913fi
21914PATCH=$ac_cv_path_PATCH
21915if test -n "$PATCH"; then
21916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21917$as_echo "$PATCH" >&6; }
21918else
21919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21920$as_echo "no" >&6; }
21921fi
21922
21923
21924  test -n "$PATCH" && break
21925done
21926
21927    else
21928      # If it succeeded, then it was overridden by the user. We will use it
21929      # for the tool.
21930
21931      # First remove it from the list of overridden variables, so we can test
21932      # for unknown variables in the end.
21933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21934
21935      # Check if we try to supply an empty value
21936      if test "x$PATCH" = x; then
21937        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21938$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21940$as_echo_n "checking for PATCH... " >&6; }
21941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21942$as_echo "disabled" >&6; }
21943      else
21944        # Check if the provided tool contains a complete path.
21945        tool_specified="$PATCH"
21946        tool_basename="${tool_specified##*/}"
21947        if test "x$tool_basename" = "x$tool_specified"; then
21948          # A command without a complete path is provided, search $PATH.
21949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21950$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21951          # Extract the first word of "$tool_basename", so it can be a program name with args.
21952set dummy $tool_basename; ac_word=$2
21953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21954$as_echo_n "checking for $ac_word... " >&6; }
21955if ${ac_cv_path_PATCH+:} false; then :
21956  $as_echo_n "(cached) " >&6
21957else
21958  case $PATCH in
21959  [\\/]* | ?:[\\/]*)
21960  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21961  ;;
21962  *)
21963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21964for as_dir in $PATH
21965do
21966  IFS=$as_save_IFS
21967  test -z "$as_dir" && as_dir=.
21968    for ac_exec_ext in '' $ac_executable_extensions; do
21969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21970    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21972    break 2
21973  fi
21974done
21975  done
21976IFS=$as_save_IFS
21977
21978  ;;
21979esac
21980fi
21981PATCH=$ac_cv_path_PATCH
21982if test -n "$PATCH"; then
21983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21984$as_echo "$PATCH" >&6; }
21985else
21986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21987$as_echo "no" >&6; }
21988fi
21989
21990
21991          if test "x$PATCH" = x; then
21992            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21993          fi
21994        else
21995          # Otherwise we believe it is a complete path. Use it as it is.
21996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21997$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21998          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21999$as_echo_n "checking for PATCH... " >&6; }
22000          if test ! -x "$tool_specified"; then
22001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22002$as_echo "not found" >&6; }
22003            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22004          fi
22005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22006$as_echo "$tool_specified" >&6; }
22007        fi
22008      fi
22009    fi
22010
22011  fi
22012
22013
22014  # Check if it's GNU time
22015  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22016  if test "x$IS_GNU_TIME" != x; then
22017    IS_GNU_TIME=yes
22018  else
22019    IS_GNU_TIME=no
22020  fi
22021
22022
22023  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22024
22025
22026
22027  # Publish this variable in the help.
22028
22029
22030  if [ -z "${DSYMUTIL+x}" ]; then
22031    # The variable is not set by user, try to locate tool using the code snippet
22032    for ac_prog in dsymutil
22033do
22034  # Extract the first word of "$ac_prog", so it can be a program name with args.
22035set dummy $ac_prog; ac_word=$2
22036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22037$as_echo_n "checking for $ac_word... " >&6; }
22038if ${ac_cv_path_DSYMUTIL+:} false; then :
22039  $as_echo_n "(cached) " >&6
22040else
22041  case $DSYMUTIL in
22042  [\\/]* | ?:[\\/]*)
22043  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22044  ;;
22045  *)
22046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22047for as_dir in $PATH
22048do
22049  IFS=$as_save_IFS
22050  test -z "$as_dir" && as_dir=.
22051    for ac_exec_ext in '' $ac_executable_extensions; do
22052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22053    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22055    break 2
22056  fi
22057done
22058  done
22059IFS=$as_save_IFS
22060
22061  ;;
22062esac
22063fi
22064DSYMUTIL=$ac_cv_path_DSYMUTIL
22065if test -n "$DSYMUTIL"; then
22066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22067$as_echo "$DSYMUTIL" >&6; }
22068else
22069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22070$as_echo "no" >&6; }
22071fi
22072
22073
22074  test -n "$DSYMUTIL" && break
22075done
22076
22077  else
22078    # The variable is set, but is it from the command line or the environment?
22079
22080    # Try to remove the string !DSYMUTIL! from our list.
22081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22083      # If it failed, the variable was not from the command line. Ignore it,
22084      # but warn the user (except for BASH, which is always set by the calling BASH).
22085      if test "xDSYMUTIL" != xBASH; then
22086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22087$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22088      fi
22089      # Try to locate tool using the code snippet
22090      for ac_prog in dsymutil
22091do
22092  # Extract the first word of "$ac_prog", so it can be a program name with args.
22093set dummy $ac_prog; ac_word=$2
22094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22095$as_echo_n "checking for $ac_word... " >&6; }
22096if ${ac_cv_path_DSYMUTIL+:} false; then :
22097  $as_echo_n "(cached) " >&6
22098else
22099  case $DSYMUTIL in
22100  [\\/]* | ?:[\\/]*)
22101  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22102  ;;
22103  *)
22104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22105for as_dir in $PATH
22106do
22107  IFS=$as_save_IFS
22108  test -z "$as_dir" && as_dir=.
22109    for ac_exec_ext in '' $ac_executable_extensions; do
22110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22111    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22113    break 2
22114  fi
22115done
22116  done
22117IFS=$as_save_IFS
22118
22119  ;;
22120esac
22121fi
22122DSYMUTIL=$ac_cv_path_DSYMUTIL
22123if test -n "$DSYMUTIL"; then
22124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22125$as_echo "$DSYMUTIL" >&6; }
22126else
22127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22128$as_echo "no" >&6; }
22129fi
22130
22131
22132  test -n "$DSYMUTIL" && break
22133done
22134
22135    else
22136      # If it succeeded, then it was overridden by the user. We will use it
22137      # for the tool.
22138
22139      # First remove it from the list of overridden variables, so we can test
22140      # for unknown variables in the end.
22141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22142
22143      # Check if we try to supply an empty value
22144      if test "x$DSYMUTIL" = x; then
22145        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22146$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22148$as_echo_n "checking for DSYMUTIL... " >&6; }
22149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22150$as_echo "disabled" >&6; }
22151      else
22152        # Check if the provided tool contains a complete path.
22153        tool_specified="$DSYMUTIL"
22154        tool_basename="${tool_specified##*/}"
22155        if test "x$tool_basename" = "x$tool_specified"; then
22156          # A command without a complete path is provided, search $PATH.
22157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22158$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22159          # Extract the first word of "$tool_basename", so it can be a program name with args.
22160set dummy $tool_basename; ac_word=$2
22161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22162$as_echo_n "checking for $ac_word... " >&6; }
22163if ${ac_cv_path_DSYMUTIL+:} false; then :
22164  $as_echo_n "(cached) " >&6
22165else
22166  case $DSYMUTIL in
22167  [\\/]* | ?:[\\/]*)
22168  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22169  ;;
22170  *)
22171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22172for as_dir in $PATH
22173do
22174  IFS=$as_save_IFS
22175  test -z "$as_dir" && as_dir=.
22176    for ac_exec_ext in '' $ac_executable_extensions; do
22177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22178    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22180    break 2
22181  fi
22182done
22183  done
22184IFS=$as_save_IFS
22185
22186  ;;
22187esac
22188fi
22189DSYMUTIL=$ac_cv_path_DSYMUTIL
22190if test -n "$DSYMUTIL"; then
22191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22192$as_echo "$DSYMUTIL" >&6; }
22193else
22194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22195$as_echo "no" >&6; }
22196fi
22197
22198
22199          if test "x$DSYMUTIL" = x; then
22200            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22201          fi
22202        else
22203          # Otherwise we believe it is a complete path. Use it as it is.
22204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22205$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22206          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22207$as_echo_n "checking for DSYMUTIL... " >&6; }
22208          if test ! -x "$tool_specified"; then
22209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22210$as_echo "not found" >&6; }
22211            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22212          fi
22213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22214$as_echo "$tool_specified" >&6; }
22215        fi
22216      fi
22217    fi
22218
22219  fi
22220
22221
22222
22223  if test "x$DSYMUTIL" = x; then
22224    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22225  fi
22226
22227
22228
22229
22230
22231  # Publish this variable in the help.
22232
22233
22234  if [ -z "${XATTR+x}" ]; then
22235    # The variable is not set by user, try to locate tool using the code snippet
22236    for ac_prog in xattr
22237do
22238  # Extract the first word of "$ac_prog", so it can be a program name with args.
22239set dummy $ac_prog; ac_word=$2
22240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22241$as_echo_n "checking for $ac_word... " >&6; }
22242if ${ac_cv_path_XATTR+:} false; then :
22243  $as_echo_n "(cached) " >&6
22244else
22245  case $XATTR in
22246  [\\/]* | ?:[\\/]*)
22247  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22248  ;;
22249  *)
22250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22251for as_dir in $PATH
22252do
22253  IFS=$as_save_IFS
22254  test -z "$as_dir" && as_dir=.
22255    for ac_exec_ext in '' $ac_executable_extensions; do
22256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22257    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22259    break 2
22260  fi
22261done
22262  done
22263IFS=$as_save_IFS
22264
22265  ;;
22266esac
22267fi
22268XATTR=$ac_cv_path_XATTR
22269if test -n "$XATTR"; then
22270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22271$as_echo "$XATTR" >&6; }
22272else
22273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22274$as_echo "no" >&6; }
22275fi
22276
22277
22278  test -n "$XATTR" && break
22279done
22280
22281  else
22282    # The variable is set, but is it from the command line or the environment?
22283
22284    # Try to remove the string !XATTR! from our list.
22285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22287      # If it failed, the variable was not from the command line. Ignore it,
22288      # but warn the user (except for BASH, which is always set by the calling BASH).
22289      if test "xXATTR" != xBASH; then
22290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22291$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22292      fi
22293      # Try to locate tool using the code snippet
22294      for ac_prog in xattr
22295do
22296  # Extract the first word of "$ac_prog", so it can be a program name with args.
22297set dummy $ac_prog; ac_word=$2
22298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22299$as_echo_n "checking for $ac_word... " >&6; }
22300if ${ac_cv_path_XATTR+:} false; then :
22301  $as_echo_n "(cached) " >&6
22302else
22303  case $XATTR in
22304  [\\/]* | ?:[\\/]*)
22305  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22306  ;;
22307  *)
22308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22309for as_dir in $PATH
22310do
22311  IFS=$as_save_IFS
22312  test -z "$as_dir" && as_dir=.
22313    for ac_exec_ext in '' $ac_executable_extensions; do
22314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22315    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22317    break 2
22318  fi
22319done
22320  done
22321IFS=$as_save_IFS
22322
22323  ;;
22324esac
22325fi
22326XATTR=$ac_cv_path_XATTR
22327if test -n "$XATTR"; then
22328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22329$as_echo "$XATTR" >&6; }
22330else
22331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22332$as_echo "no" >&6; }
22333fi
22334
22335
22336  test -n "$XATTR" && break
22337done
22338
22339    else
22340      # If it succeeded, then it was overridden by the user. We will use it
22341      # for the tool.
22342
22343      # First remove it from the list of overridden variables, so we can test
22344      # for unknown variables in the end.
22345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22346
22347      # Check if we try to supply an empty value
22348      if test "x$XATTR" = x; then
22349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22350$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22352$as_echo_n "checking for XATTR... " >&6; }
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22354$as_echo "disabled" >&6; }
22355      else
22356        # Check if the provided tool contains a complete path.
22357        tool_specified="$XATTR"
22358        tool_basename="${tool_specified##*/}"
22359        if test "x$tool_basename" = "x$tool_specified"; then
22360          # A command without a complete path is provided, search $PATH.
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22362$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22363          # Extract the first word of "$tool_basename", so it can be a program name with args.
22364set dummy $tool_basename; ac_word=$2
22365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22366$as_echo_n "checking for $ac_word... " >&6; }
22367if ${ac_cv_path_XATTR+:} false; then :
22368  $as_echo_n "(cached) " >&6
22369else
22370  case $XATTR in
22371  [\\/]* | ?:[\\/]*)
22372  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22373  ;;
22374  *)
22375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22376for as_dir in $PATH
22377do
22378  IFS=$as_save_IFS
22379  test -z "$as_dir" && as_dir=.
22380    for ac_exec_ext in '' $ac_executable_extensions; do
22381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22382    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22384    break 2
22385  fi
22386done
22387  done
22388IFS=$as_save_IFS
22389
22390  ;;
22391esac
22392fi
22393XATTR=$ac_cv_path_XATTR
22394if test -n "$XATTR"; then
22395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22396$as_echo "$XATTR" >&6; }
22397else
22398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22399$as_echo "no" >&6; }
22400fi
22401
22402
22403          if test "x$XATTR" = x; then
22404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22405          fi
22406        else
22407          # Otherwise we believe it is a complete path. Use it as it is.
22408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22409$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22411$as_echo_n "checking for XATTR... " >&6; }
22412          if test ! -x "$tool_specified"; then
22413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22414$as_echo "not found" >&6; }
22415            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22416          fi
22417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22418$as_echo "$tool_specified" >&6; }
22419        fi
22420      fi
22421    fi
22422
22423  fi
22424
22425
22426
22427  if test "x$XATTR" = x; then
22428    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22429  fi
22430
22431
22432
22433
22434  # Publish this variable in the help.
22435
22436
22437  if [ -z "${CODESIGN+x}" ]; then
22438    # The variable is not set by user, try to locate tool using the code snippet
22439    for ac_prog in codesign
22440do
22441  # Extract the first word of "$ac_prog", so it can be a program name with args.
22442set dummy $ac_prog; ac_word=$2
22443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22444$as_echo_n "checking for $ac_word... " >&6; }
22445if ${ac_cv_path_CODESIGN+:} false; then :
22446  $as_echo_n "(cached) " >&6
22447else
22448  case $CODESIGN in
22449  [\\/]* | ?:[\\/]*)
22450  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22451  ;;
22452  *)
22453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22454for as_dir in $PATH
22455do
22456  IFS=$as_save_IFS
22457  test -z "$as_dir" && as_dir=.
22458    for ac_exec_ext in '' $ac_executable_extensions; do
22459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22460    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22462    break 2
22463  fi
22464done
22465  done
22466IFS=$as_save_IFS
22467
22468  ;;
22469esac
22470fi
22471CODESIGN=$ac_cv_path_CODESIGN
22472if test -n "$CODESIGN"; then
22473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22474$as_echo "$CODESIGN" >&6; }
22475else
22476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22477$as_echo "no" >&6; }
22478fi
22479
22480
22481  test -n "$CODESIGN" && break
22482done
22483
22484  else
22485    # The variable is set, but is it from the command line or the environment?
22486
22487    # Try to remove the string !CODESIGN! from our list.
22488    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22489    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22490      # If it failed, the variable was not from the command line. Ignore it,
22491      # but warn the user (except for BASH, which is always set by the calling BASH).
22492      if test "xCODESIGN" != xBASH; then
22493        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22494$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22495      fi
22496      # Try to locate tool using the code snippet
22497      for ac_prog in codesign
22498do
22499  # Extract the first word of "$ac_prog", so it can be a program name with args.
22500set dummy $ac_prog; ac_word=$2
22501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22502$as_echo_n "checking for $ac_word... " >&6; }
22503if ${ac_cv_path_CODESIGN+:} false; then :
22504  $as_echo_n "(cached) " >&6
22505else
22506  case $CODESIGN in
22507  [\\/]* | ?:[\\/]*)
22508  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22509  ;;
22510  *)
22511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22512for as_dir in $PATH
22513do
22514  IFS=$as_save_IFS
22515  test -z "$as_dir" && as_dir=.
22516    for ac_exec_ext in '' $ac_executable_extensions; do
22517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22518    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22520    break 2
22521  fi
22522done
22523  done
22524IFS=$as_save_IFS
22525
22526  ;;
22527esac
22528fi
22529CODESIGN=$ac_cv_path_CODESIGN
22530if test -n "$CODESIGN"; then
22531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22532$as_echo "$CODESIGN" >&6; }
22533else
22534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22535$as_echo "no" >&6; }
22536fi
22537
22538
22539  test -n "$CODESIGN" && break
22540done
22541
22542    else
22543      # If it succeeded, then it was overridden by the user. We will use it
22544      # for the tool.
22545
22546      # First remove it from the list of overridden variables, so we can test
22547      # for unknown variables in the end.
22548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22549
22550      # Check if we try to supply an empty value
22551      if test "x$CODESIGN" = x; then
22552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22553$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22555$as_echo_n "checking for CODESIGN... " >&6; }
22556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22557$as_echo "disabled" >&6; }
22558      else
22559        # Check if the provided tool contains a complete path.
22560        tool_specified="$CODESIGN"
22561        tool_basename="${tool_specified##*/}"
22562        if test "x$tool_basename" = "x$tool_specified"; then
22563          # A command without a complete path is provided, search $PATH.
22564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22565$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22566          # Extract the first word of "$tool_basename", so it can be a program name with args.
22567set dummy $tool_basename; ac_word=$2
22568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22569$as_echo_n "checking for $ac_word... " >&6; }
22570if ${ac_cv_path_CODESIGN+:} false; then :
22571  $as_echo_n "(cached) " >&6
22572else
22573  case $CODESIGN in
22574  [\\/]* | ?:[\\/]*)
22575  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22576  ;;
22577  *)
22578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22579for as_dir in $PATH
22580do
22581  IFS=$as_save_IFS
22582  test -z "$as_dir" && as_dir=.
22583    for ac_exec_ext in '' $ac_executable_extensions; do
22584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22585    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22587    break 2
22588  fi
22589done
22590  done
22591IFS=$as_save_IFS
22592
22593  ;;
22594esac
22595fi
22596CODESIGN=$ac_cv_path_CODESIGN
22597if test -n "$CODESIGN"; then
22598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22599$as_echo "$CODESIGN" >&6; }
22600else
22601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22602$as_echo "no" >&6; }
22603fi
22604
22605
22606          if test "x$CODESIGN" = x; then
22607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22608          fi
22609        else
22610          # Otherwise we believe it is a complete path. Use it as it is.
22611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22612$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22614$as_echo_n "checking for CODESIGN... " >&6; }
22615          if test ! -x "$tool_specified"; then
22616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22617$as_echo "not found" >&6; }
22618            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22619          fi
22620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22621$as_echo "$tool_specified" >&6; }
22622        fi
22623      fi
22624    fi
22625
22626  fi
22627
22628
22629    if test "x$CODESIGN" != "x"; then
22630      # Verify that the openjdk_codesign certificate is present
22631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22632$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22633      rm -f codesign-testfile
22634      touch codesign-testfile
22635      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22636      rm -f codesign-testfile
22637      if test "x$CODESIGN" = x; then
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22639$as_echo "no" >&6; }
22640      else
22641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22642$as_echo "yes" >&6; }
22643      fi
22644    fi
22645
22646
22647
22648  # Publish this variable in the help.
22649
22650
22651  if [ -z "${SETFILE+x}" ]; then
22652    # The variable is not set by user, try to locate tool using the code snippet
22653    for ac_prog in SetFile
22654do
22655  # Extract the first word of "$ac_prog", so it can be a program name with args.
22656set dummy $ac_prog; ac_word=$2
22657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22658$as_echo_n "checking for $ac_word... " >&6; }
22659if ${ac_cv_path_SETFILE+:} false; then :
22660  $as_echo_n "(cached) " >&6
22661else
22662  case $SETFILE in
22663  [\\/]* | ?:[\\/]*)
22664  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22665  ;;
22666  *)
22667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22668for as_dir in $PATH
22669do
22670  IFS=$as_save_IFS
22671  test -z "$as_dir" && as_dir=.
22672    for ac_exec_ext in '' $ac_executable_extensions; do
22673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22674    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22676    break 2
22677  fi
22678done
22679  done
22680IFS=$as_save_IFS
22681
22682  ;;
22683esac
22684fi
22685SETFILE=$ac_cv_path_SETFILE
22686if test -n "$SETFILE"; then
22687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22688$as_echo "$SETFILE" >&6; }
22689else
22690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22691$as_echo "no" >&6; }
22692fi
22693
22694
22695  test -n "$SETFILE" && break
22696done
22697
22698  else
22699    # The variable is set, but is it from the command line or the environment?
22700
22701    # Try to remove the string !SETFILE! from our list.
22702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22704      # If it failed, the variable was not from the command line. Ignore it,
22705      # but warn the user (except for BASH, which is always set by the calling BASH).
22706      if test "xSETFILE" != xBASH; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22708$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22709      fi
22710      # Try to locate tool using the code snippet
22711      for ac_prog in SetFile
22712do
22713  # Extract the first word of "$ac_prog", so it can be a program name with args.
22714set dummy $ac_prog; ac_word=$2
22715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22716$as_echo_n "checking for $ac_word... " >&6; }
22717if ${ac_cv_path_SETFILE+:} false; then :
22718  $as_echo_n "(cached) " >&6
22719else
22720  case $SETFILE in
22721  [\\/]* | ?:[\\/]*)
22722  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22723  ;;
22724  *)
22725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22726for as_dir in $PATH
22727do
22728  IFS=$as_save_IFS
22729  test -z "$as_dir" && as_dir=.
22730    for ac_exec_ext in '' $ac_executable_extensions; do
22731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22732    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22734    break 2
22735  fi
22736done
22737  done
22738IFS=$as_save_IFS
22739
22740  ;;
22741esac
22742fi
22743SETFILE=$ac_cv_path_SETFILE
22744if test -n "$SETFILE"; then
22745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22746$as_echo "$SETFILE" >&6; }
22747else
22748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22749$as_echo "no" >&6; }
22750fi
22751
22752
22753  test -n "$SETFILE" && break
22754done
22755
22756    else
22757      # If it succeeded, then it was overridden by the user. We will use it
22758      # for the tool.
22759
22760      # First remove it from the list of overridden variables, so we can test
22761      # for unknown variables in the end.
22762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22763
22764      # Check if we try to supply an empty value
22765      if test "x$SETFILE" = x; then
22766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22767$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22769$as_echo_n "checking for SETFILE... " >&6; }
22770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22771$as_echo "disabled" >&6; }
22772      else
22773        # Check if the provided tool contains a complete path.
22774        tool_specified="$SETFILE"
22775        tool_basename="${tool_specified##*/}"
22776        if test "x$tool_basename" = "x$tool_specified"; then
22777          # A command without a complete path is provided, search $PATH.
22778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22779$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22780          # Extract the first word of "$tool_basename", so it can be a program name with args.
22781set dummy $tool_basename; ac_word=$2
22782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22783$as_echo_n "checking for $ac_word... " >&6; }
22784if ${ac_cv_path_SETFILE+:} false; then :
22785  $as_echo_n "(cached) " >&6
22786else
22787  case $SETFILE in
22788  [\\/]* | ?:[\\/]*)
22789  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22790  ;;
22791  *)
22792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22793for as_dir in $PATH
22794do
22795  IFS=$as_save_IFS
22796  test -z "$as_dir" && as_dir=.
22797    for ac_exec_ext in '' $ac_executable_extensions; do
22798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22799    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22801    break 2
22802  fi
22803done
22804  done
22805IFS=$as_save_IFS
22806
22807  ;;
22808esac
22809fi
22810SETFILE=$ac_cv_path_SETFILE
22811if test -n "$SETFILE"; then
22812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22813$as_echo "$SETFILE" >&6; }
22814else
22815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22816$as_echo "no" >&6; }
22817fi
22818
22819
22820          if test "x$SETFILE" = x; then
22821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22822          fi
22823        else
22824          # Otherwise we believe it is a complete path. Use it as it is.
22825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22826$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22828$as_echo_n "checking for SETFILE... " >&6; }
22829          if test ! -x "$tool_specified"; then
22830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22831$as_echo "not found" >&6; }
22832            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22833          fi
22834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22835$as_echo "$tool_specified" >&6; }
22836        fi
22837      fi
22838    fi
22839
22840  fi
22841
22842
22843
22844  if test "x$SETFILE" = x; then
22845    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22846  fi
22847
22848
22849  fi
22850
22851
22852  # Test if bash supports pipefail.
22853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22854$as_echo_n "checking if bash supports pipefail... " >&6; }
22855  if ${BASH} -c 'set -o pipefail'; then
22856    BASH_ARGS="$BASH_ARGS -o pipefail"
22857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22858$as_echo "yes" >&6; }
22859  else
22860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22861$as_echo "no" >&6; }
22862  fi
22863
22864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22865$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22866  if ${BASH} -e -c 'true'; then
22867    BASH_ARGS="$BASH_ARGS -e"
22868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22869$as_echo "yes" >&6; }
22870  else
22871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22872$as_echo "no" >&6; }
22873  fi
22874
22875
22876
22877
22878# Check if pkg-config is available.
22879
22880
22881if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22882	if test -n "$ac_tool_prefix"; then
22883  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22884set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22886$as_echo_n "checking for $ac_word... " >&6; }
22887if ${ac_cv_path_PKG_CONFIG+:} false; then :
22888  $as_echo_n "(cached) " >&6
22889else
22890  case $PKG_CONFIG in
22891  [\\/]* | ?:[\\/]*)
22892  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22893  ;;
22894  *)
22895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22896for as_dir in $PATH
22897do
22898  IFS=$as_save_IFS
22899  test -z "$as_dir" && as_dir=.
22900    for ac_exec_ext in '' $ac_executable_extensions; do
22901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22902    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22904    break 2
22905  fi
22906done
22907  done
22908IFS=$as_save_IFS
22909
22910  ;;
22911esac
22912fi
22913PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22914if test -n "$PKG_CONFIG"; then
22915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22916$as_echo "$PKG_CONFIG" >&6; }
22917else
22918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22919$as_echo "no" >&6; }
22920fi
22921
22922
22923fi
22924if test -z "$ac_cv_path_PKG_CONFIG"; then
22925  ac_pt_PKG_CONFIG=$PKG_CONFIG
22926  # Extract the first word of "pkg-config", so it can be a program name with args.
22927set dummy pkg-config; ac_word=$2
22928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22929$as_echo_n "checking for $ac_word... " >&6; }
22930if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22931  $as_echo_n "(cached) " >&6
22932else
22933  case $ac_pt_PKG_CONFIG in
22934  [\\/]* | ?:[\\/]*)
22935  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22936  ;;
22937  *)
22938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22939for as_dir in $PATH
22940do
22941  IFS=$as_save_IFS
22942  test -z "$as_dir" && as_dir=.
22943    for ac_exec_ext in '' $ac_executable_extensions; do
22944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22945    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22947    break 2
22948  fi
22949done
22950  done
22951IFS=$as_save_IFS
22952
22953  ;;
22954esac
22955fi
22956ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22957if test -n "$ac_pt_PKG_CONFIG"; then
22958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22959$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22960else
22961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22962$as_echo "no" >&6; }
22963fi
22964
22965  if test "x$ac_pt_PKG_CONFIG" = x; then
22966    PKG_CONFIG=""
22967  else
22968    case $cross_compiling:$ac_tool_warned in
22969yes:)
22970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22972ac_tool_warned=yes ;;
22973esac
22974    PKG_CONFIG=$ac_pt_PKG_CONFIG
22975  fi
22976else
22977  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22978fi
22979
22980fi
22981if test -n "$PKG_CONFIG"; then
22982	_pkg_min_version=0.9.0
22983	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22984$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22985	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22986		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22987$as_echo "yes" >&6; }
22988	else
22989		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22990$as_echo "no" >&6; }
22991		PKG_CONFIG=""
22992	fi
22993
22994fi
22995
22996# After basic tools have been setup, we can check build os specific details.
22997
22998  ###############################################################################
22999
23000  # Note that this is the build platform OS version!
23001
23002  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23003  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23004  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23005  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23006
23007
23008
23009
23010
23011###############################################################################
23012#
23013# Determine OpenJDK variants, options and version numbers.
23014#
23015###############################################################################
23016
23017# We need build & target for this.
23018
23019
23020  ###############################################################################
23021  #
23022  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23023  # We always build headless support.
23024  #
23025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23026$as_echo_n "checking headful support... " >&6; }
23027  # Check whether --enable-headful was given.
23028if test "${enable_headful+set}" = set; then :
23029  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23030else
23031  SUPPORT_HEADFUL=yes
23032fi
23033
23034
23035  SUPPORT_HEADLESS=yes
23036  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23037
23038  if test "x$SUPPORT_HEADFUL" = xyes; then
23039    # We are building both headful and headless.
23040    headful_msg="include support for both headful and headless"
23041  fi
23042
23043  if test "x$SUPPORT_HEADFUL" = xno; then
23044    # Thus we are building headless only.
23045    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23046    headful_msg="headless only"
23047  fi
23048
23049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23050$as_echo "$headful_msg" >&6; }
23051
23052
23053
23054
23055
23056  # Control wether Hotspot runs Queens test after build.
23057  # Check whether --enable-hotspot-test-in-build was given.
23058if test "${enable_hotspot_test_in_build+set}" = set; then :
23059  enableval=$enable_hotspot_test_in_build;
23060else
23061  enable_hotspot_test_in_build=no
23062fi
23063
23064  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23065    TEST_IN_BUILD=true
23066  else
23067    TEST_IN_BUILD=false
23068  fi
23069
23070
23071  ###############################################################################
23072  #
23073  # Choose cacerts source file
23074  #
23075
23076# Check whether --with-cacerts-file was given.
23077if test "${with_cacerts_file+set}" = set; then :
23078  withval=$with_cacerts_file;
23079fi
23080
23081  if test "x$with_cacerts_file" != x; then
23082    CACERTS_FILE=$with_cacerts_file
23083  fi
23084
23085
23086  ###############################################################################
23087  #
23088  # Enable or disable unlimited crypto
23089  #
23090  # Check whether --enable-unlimited-crypto was given.
23091if test "${enable_unlimited_crypto+set}" = set; then :
23092  enableval=$enable_unlimited_crypto;
23093else
23094  enable_unlimited_crypto=no
23095fi
23096
23097  if test "x$enable_unlimited_crypto" = "xyes"; then
23098    UNLIMITED_CRYPTO=true
23099  else
23100    UNLIMITED_CRYPTO=false
23101  fi
23102
23103
23104  ###############################################################################
23105  #
23106  # Compress jars
23107  #
23108  COMPRESS_JARS=false
23109
23110
23111
23112  # Setup default copyright year. Mostly overridden when building close to a new year.
23113
23114# Check whether --with-copyright-year was given.
23115if test "${with_copyright_year+set}" = set; then :
23116  withval=$with_copyright_year;
23117fi
23118
23119  if test "x$with_copyright_year" = xyes; then
23120    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23121  elif test "x$with_copyright_year" != x; then
23122    COPYRIGHT_YEAR="$with_copyright_year"
23123  else
23124    COPYRIGHT_YEAR=`date +'%Y'`
23125  fi
23126
23127
23128
23129  # Warn user that old version arguments are deprecated.
23130
23131
23132# Check whether --with-milestone was given.
23133if test "${with_milestone+set}" = set; then :
23134  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23135$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23136fi
23137
23138
23139
23140
23141# Check whether --with-update-version was given.
23142if test "${with_update_version+set}" = set; then :
23143  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23144$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23145fi
23146
23147
23148
23149
23150# Check whether --with-user-release-suffix was given.
23151if test "${with_user_release_suffix+set}" = set; then :
23152  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
23153$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23154fi
23155
23156
23157
23158
23159# Check whether --with-build-number was given.
23160if test "${with_build_number+set}" = set; then :
23161  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23162$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23163fi
23164
23165
23166
23167  # Source the version numbers file
23168  . $AUTOCONF_DIR/version-numbers
23169
23170  # Some non-version number information is set in that file
23171
23172
23173
23174
23175
23176
23177
23178
23179  # Override version from arguments
23180
23181  # If --with-version-string is set, process it first. It is possible to
23182  # override parts with more specific flags, since these are processed later.
23183
23184# Check whether --with-version-string was given.
23185if test "${with_version_string+set}" = set; then :
23186  withval=$with_version_string;
23187fi
23188
23189  if test "x$with_version_string" = xyes; then
23190    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23191  elif test "x$with_version_string" != x; then
23192    # Additional [] needed to keep m4 from mangling shell constructs.
23193    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23194      VERSION_MAJOR=${BASH_REMATCH[1]}
23195      VERSION_MINOR=${BASH_REMATCH[3]}
23196      VERSION_SECURITY=${BASH_REMATCH[5]}
23197      VERSION_PATCH=${BASH_REMATCH[7]}
23198      VERSION_PRE=${BASH_REMATCH[9]}
23199      version_plus_separator=${BASH_REMATCH[11]}
23200      VERSION_BUILD=${BASH_REMATCH[12]}
23201      VERSION_OPT=${BASH_REMATCH[14]}
23202      # Unspecified numerical fields are interpreted as 0.
23203      if test "x$VERSION_MINOR" = x; then
23204        VERSION_MINOR=0
23205      fi
23206      if test "x$VERSION_SECURITY" = x; then
23207        VERSION_SECURITY=0
23208      fi
23209      if test "x$VERSION_PATCH" = x; then
23210        VERSION_PATCH=0
23211      fi
23212      if test "x$version_plus_separator" != x \
23213          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23214        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23215      fi
23216      # Stop the version part process from setting default values.
23217      # We still allow them to explicitely override though.
23218      NO_DEFAULT_VERSION_PARTS=true
23219    else
23220      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23221    fi
23222  fi
23223
23224
23225# Check whether --with-version-pre was given.
23226if test "${with_version_pre+set}" = set; then :
23227  withval=$with_version_pre; with_version_pre_present=true
23228else
23229  with_version_pre_present=false
23230fi
23231
23232
23233  if test "x$with_version_pre_present" = xtrue; then
23234    if test "x$with_version_pre" = xyes; then
23235      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23236    elif test "x$with_version_pre" = xno; then
23237      # Interpret --without-* as empty string instead of the literal "no"
23238      VERSION_PRE=
23239    else
23240      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23241       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23242      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23244$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23245      fi
23246    fi
23247  else
23248    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23249      # Default is to use "internal" as pre
23250      VERSION_PRE="internal"
23251    fi
23252  fi
23253
23254
23255# Check whether --with-version-opt was given.
23256if test "${with_version_opt+set}" = set; then :
23257  withval=$with_version_opt; with_version_opt_present=true
23258else
23259  with_version_opt_present=false
23260fi
23261
23262
23263  if test "x$with_version_opt_present" = xtrue; then
23264    if test "x$with_version_opt" = xyes; then
23265      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23266    elif test "x$with_version_opt" = xno; then
23267      # Interpret --without-* as empty string instead of the literal "no"
23268      VERSION_OPT=
23269    else
23270      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23271       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23272      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23274$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23275      fi
23276    fi
23277  else
23278    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23279      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23280      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23281      # Outer [ ] to quote m4.
23282       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23283       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23284      VERSION_OPT="$timestamp.$username.$basedirname"
23285    fi
23286  fi
23287
23288
23289# Check whether --with-version-build was given.
23290if test "${with_version_build+set}" = set; then :
23291  withval=$with_version_build; with_version_build_present=true
23292else
23293  with_version_build_present=false
23294fi
23295
23296
23297  if test "x$with_version_build_present" = xtrue; then
23298    if test "x$with_version_build" = xyes; then
23299      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23300    elif test "x$with_version_build" = xno; then
23301      # Interpret --without-* as empty string instead of the literal "no"
23302      VERSION_BUILD=
23303    elif test "x$with_version_build" = x; then
23304      VERSION_BUILD=
23305    else
23306
23307  # Additional [] needed to keep m4 from mangling shell constructs.
23308  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23309    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23310  fi
23311  # Extract the version number without leading zeros.
23312  cleaned_value=${BASH_REMATCH[1]}
23313  if test "x$cleaned_value" = x; then
23314    # Special case for zero
23315    cleaned_value=${BASH_REMATCH[2]}
23316  fi
23317
23318  if test $cleaned_value -gt 255; then
23319    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23320  fi
23321  if test "x$cleaned_value" != "x$with_version_build"; then
23322    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23323$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23324  fi
23325  VERSION_BUILD=$cleaned_value
23326
23327    fi
23328  else
23329    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23330      # Default is to not have a build number.
23331      VERSION_BUILD=""
23332      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23333      VERSION_BUILD=0
23334    fi
23335  fi
23336
23337
23338# Check whether --with-version-major was given.
23339if test "${with_version_major+set}" = set; then :
23340  withval=$with_version_major; with_version_major_present=true
23341else
23342  with_version_major_present=false
23343fi
23344
23345
23346  if test "x$with_version_major_present" = xtrue; then
23347    if test "x$with_version_major" = xyes; then
23348      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23349    else
23350
23351  # Additional [] needed to keep m4 from mangling shell constructs.
23352  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23353    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23354  fi
23355  # Extract the version number without leading zeros.
23356  cleaned_value=${BASH_REMATCH[1]}
23357  if test "x$cleaned_value" = x; then
23358    # Special case for zero
23359    cleaned_value=${BASH_REMATCH[2]}
23360  fi
23361
23362  if test $cleaned_value -gt 255; then
23363    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23364  fi
23365  if test "x$cleaned_value" != "x$with_version_major"; then
23366    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23367$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23368  fi
23369  VERSION_MAJOR=$cleaned_value
23370
23371    fi
23372  else
23373    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23374      # Default is to get value from version-numbers
23375      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23376    fi
23377  fi
23378
23379
23380# Check whether --with-version-minor was given.
23381if test "${with_version_minor+set}" = set; then :
23382  withval=$with_version_minor; with_version_minor_present=true
23383else
23384  with_version_minor_present=false
23385fi
23386
23387
23388  if test "x$with_version_minor_present" = xtrue; then
23389    if test "x$with_version_minor" = xyes; then
23390      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23391    elif test "x$with_version_minor" = xno; then
23392      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23393      VERSION_MINOR=0
23394    elif test "x$with_version_minor" = x; then
23395      VERSION_MINOR=0
23396    else
23397
23398  # Additional [] needed to keep m4 from mangling shell constructs.
23399  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23400    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23401  fi
23402  # Extract the version number without leading zeros.
23403  cleaned_value=${BASH_REMATCH[1]}
23404  if test "x$cleaned_value" = x; then
23405    # Special case for zero
23406    cleaned_value=${BASH_REMATCH[2]}
23407  fi
23408
23409  if test $cleaned_value -gt 255; then
23410    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23411  fi
23412  if test "x$cleaned_value" != "x$with_version_minor"; then
23413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23414$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23415  fi
23416  VERSION_MINOR=$cleaned_value
23417
23418    fi
23419  else
23420    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23421      # Default is 0, if unspecified
23422      VERSION_MINOR=0
23423    fi
23424  fi
23425
23426
23427# Check whether --with-version-security was given.
23428if test "${with_version_security+set}" = set; then :
23429  withval=$with_version_security; with_version_security_present=true
23430else
23431  with_version_security_present=false
23432fi
23433
23434
23435  if test "x$with_version_security_present" = xtrue; then
23436    if test "x$with_version_security" = xyes; then
23437      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23438    elif test "x$with_version_security" = xno; then
23439      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23440      VERSION_SECURITY=0
23441    elif test "x$with_version_security" = x; then
23442      VERSION_SECURITY=0
23443    else
23444
23445  # Additional [] needed to keep m4 from mangling shell constructs.
23446  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23447    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23448  fi
23449  # Extract the version number without leading zeros.
23450  cleaned_value=${BASH_REMATCH[1]}
23451  if test "x$cleaned_value" = x; then
23452    # Special case for zero
23453    cleaned_value=${BASH_REMATCH[2]}
23454  fi
23455
23456  if test $cleaned_value -gt 255; then
23457    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23458  fi
23459  if test "x$cleaned_value" != "x$with_version_security"; then
23460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23461$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23462  fi
23463  VERSION_SECURITY=$cleaned_value
23464
23465    fi
23466  else
23467    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23468      # Default is 0, if unspecified
23469      VERSION_SECURITY=0
23470    fi
23471  fi
23472
23473
23474# Check whether --with-version-patch was given.
23475if test "${with_version_patch+set}" = set; then :
23476  withval=$with_version_patch; with_version_patch_present=true
23477else
23478  with_version_patch_present=false
23479fi
23480
23481
23482  if test "x$with_version_patch_present" = xtrue; then
23483    if test "x$with_version_patch" = xyes; then
23484      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23485    elif test "x$with_version_patch" = xno; then
23486      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23487      VERSION_PATCH=0
23488    elif test "x$with_version_patch" = x; then
23489      VERSION_PATCH=0
23490    else
23491
23492  # Additional [] needed to keep m4 from mangling shell constructs.
23493  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23494    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23495  fi
23496  # Extract the version number without leading zeros.
23497  cleaned_value=${BASH_REMATCH[1]}
23498  if test "x$cleaned_value" = x; then
23499    # Special case for zero
23500    cleaned_value=${BASH_REMATCH[2]}
23501  fi
23502
23503  if test $cleaned_value -gt 255; then
23504    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23505  fi
23506  if test "x$cleaned_value" != "x$with_version_patch"; then
23507    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23508$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23509  fi
23510  VERSION_PATCH=$cleaned_value
23511
23512    fi
23513  else
23514    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23515      # Default is 0, if unspecified
23516      VERSION_PATCH=0
23517    fi
23518  fi
23519
23520  # Calculate derived version properties
23521
23522  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23523  if test "x$VERSION_PRE" = x; then
23524    VERSION_IS_GA=true
23525  else
23526    VERSION_IS_GA=false
23527  fi
23528
23529  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23530  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23531
23532  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23533  # Strip trailing zeroes from stripped_version_number
23534  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23535  VERSION_NUMBER=$stripped_version_number
23536
23537  # The complete version string, with additional build information
23538  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23539    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23540  else
23541    # If either build or opt is set, we need a + separator
23542    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23543  fi
23544
23545  # The short version string, just VERSION_NUMBER and PRE, if present.
23546  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23547
23548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23549$as_echo_n "checking for version string... " >&6; }
23550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23551$as_echo "$VERSION_STRING" >&6; }
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567###############################################################################
23568#
23569# Setup BootJDK, used to bootstrap the build.
23570#
23571###############################################################################
23572
23573
23574  BOOT_JDK_FOUND=no
23575
23576# Check whether --with-boot-jdk was given.
23577if test "${with_boot_jdk+set}" = set; then :
23578  withval=$with_boot_jdk;
23579fi
23580
23581
23582  # We look for the Boot JDK through various means, going from more certain to
23583  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23584  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23585  # must check if this is indeed valid; otherwise we'll continue looking.
23586
23587  # Test: Is bootjdk explicitely set by command line arguments?
23588
23589  if test "x$BOOT_JDK_FOUND" = xno; then
23590    # Now execute the test
23591
23592  if test "x$with_boot_jdk" != x; then
23593    BOOT_JDK=$with_boot_jdk
23594    BOOT_JDK_FOUND=maybe
23595    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23596$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23597  fi
23598
23599
23600    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23601    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23602      # Do we have a bin/java?
23603      if test ! -x "$BOOT_JDK/bin/java"; then
23604        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23606        BOOT_JDK_FOUND=no
23607      else
23608        # Do we have a bin/javac?
23609        if test ! -x "$BOOT_JDK/bin/javac"; then
23610          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23612          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23613$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23614          BOOT_JDK_FOUND=no
23615        else
23616          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23617          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23618
23619          # Extra M4 quote needed to protect [] in grep expression.
23620          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23621          if test "x$FOUND_CORRECT_VERSION" = x; then
23622            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23624            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23625$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23626            BOOT_JDK_FOUND=no
23627          else
23628            # We're done! :-)
23629            BOOT_JDK_FOUND=yes
23630
23631  # Only process if variable expands to non-empty
23632
23633  if test "x$BOOT_JDK" != x; then
23634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23635
23636  # Input might be given as Windows format, start by converting to
23637  # unix format.
23638  path="$BOOT_JDK"
23639  new_path=`$CYGPATH -u "$path"`
23640
23641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23644  # "foo.exe" is OK but "foo" is an error.
23645  #
23646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23647  # It is also a way to make sure we got the proper file name for the real test later on.
23648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23649  if test "x$test_shortpath" = x; then
23650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23652    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23653  fi
23654
23655  # Call helper function which possibly converts this using DOS-style short mode.
23656  # If so, the updated path is stored in $new_path.
23657
23658  input_path="$new_path"
23659  # Check if we need to convert this using DOS-style short mode. If the path
23660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23661  # take no chances and rewrite it.
23662  # Note: m4 eats our [], so we need to use [ and ] instead.
23663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23664  if test "x$has_forbidden_chars" != x; then
23665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23669      # Going to short mode and back again did indeed matter. Since short mode is
23670      # case insensitive, let's make it lowercase to improve readability.
23671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23672      # Now convert it back to Unix-style (cygpath)
23673      input_path=`$CYGPATH -u "$shortmode_path"`
23674      new_path="$input_path"
23675    fi
23676  fi
23677
23678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23679  if test "x$test_cygdrive_prefix" = x; then
23680    # As a simple fix, exclude /usr/bin since it's not a real path.
23681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23683      # a path prefixed by /cygdrive for fixpath to work.
23684      new_path="$CYGWIN_ROOT_PATH$input_path"
23685    fi
23686  fi
23687
23688
23689  if test "x$path" != "x$new_path"; then
23690    BOOT_JDK="$new_path"
23691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23693  fi
23694
23695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23696
23697  path="$BOOT_JDK"
23698  has_colon=`$ECHO $path | $GREP ^.:`
23699  new_path="$path"
23700  if test "x$has_colon" = x; then
23701    # Not in mixed or Windows style, start by that.
23702    new_path=`cmd //c echo $path`
23703  fi
23704
23705
23706  input_path="$new_path"
23707  # Check if we need to convert this using DOS-style short mode. If the path
23708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23709  # take no chances and rewrite it.
23710  # Note: m4 eats our [], so we need to use [ and ] instead.
23711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23712  if test "x$has_forbidden_chars" != x; then
23713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23715  fi
23716
23717
23718  windows_path="$new_path"
23719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23720    unix_path=`$CYGPATH -u "$windows_path"`
23721    new_path="$unix_path"
23722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23724    new_path="$unix_path"
23725  fi
23726
23727  if test "x$path" != "x$new_path"; then
23728    BOOT_JDK="$new_path"
23729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23731  fi
23732
23733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23735
23736    else
23737      # We're on a unix platform. Hooray! :)
23738      path="$BOOT_JDK"
23739      has_space=`$ECHO "$path" | $GREP " "`
23740      if test "x$has_space" != x; then
23741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23742$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23743        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23744      fi
23745
23746      # Use eval to expand a potential ~
23747      eval path="$path"
23748      if test ! -f "$path" && test ! -d "$path"; then
23749        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23750      fi
23751
23752      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23753    fi
23754  fi
23755
23756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23757$as_echo_n "checking for Boot JDK... " >&6; }
23758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23759$as_echo "$BOOT_JDK" >&6; }
23760            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23761$as_echo_n "checking Boot JDK version... " >&6; }
23762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23764$as_echo "$BOOT_JDK_VERSION" >&6; }
23765          fi # end check jdk version
23766        fi # end check javac
23767      fi # end check java
23768    fi # end check boot jdk found
23769  fi
23770
23771  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23772    # Having specified an argument which is incorrect will produce an instant failure;
23773    # we should not go on looking
23774    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23775  fi
23776
23777  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23778
23779  if test "x$BOOT_JDK_FOUND" = xno; then
23780    # Now execute the test
23781
23782  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23783    # First check at user selected default
23784
23785  if test "x$BOOT_JDK_FOUND" = xno; then
23786    # Now execute the test
23787
23788  if test -x /usr/libexec/java_home; then
23789    BOOT_JDK=`/usr/libexec/java_home `
23790    BOOT_JDK_FOUND=maybe
23791    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23792$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23793  fi
23794
23795
23796    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23797    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23798      # Do we have a bin/java?
23799      if test ! -x "$BOOT_JDK/bin/java"; then
23800        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23802        BOOT_JDK_FOUND=no
23803      else
23804        # Do we have a bin/javac?
23805        if test ! -x "$BOOT_JDK/bin/javac"; then
23806          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23808          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23809$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23810          BOOT_JDK_FOUND=no
23811        else
23812          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23813          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23814
23815          # Extra M4 quote needed to protect [] in grep expression.
23816          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23817          if test "x$FOUND_CORRECT_VERSION" = x; then
23818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23820            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23821$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23822            BOOT_JDK_FOUND=no
23823          else
23824            # We're done! :-)
23825            BOOT_JDK_FOUND=yes
23826
23827  # Only process if variable expands to non-empty
23828
23829  if test "x$BOOT_JDK" != x; then
23830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23831
23832  # Input might be given as Windows format, start by converting to
23833  # unix format.
23834  path="$BOOT_JDK"
23835  new_path=`$CYGPATH -u "$path"`
23836
23837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23840  # "foo.exe" is OK but "foo" is an error.
23841  #
23842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23843  # It is also a way to make sure we got the proper file name for the real test later on.
23844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23845  if test "x$test_shortpath" = x; then
23846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23848    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23849  fi
23850
23851  # Call helper function which possibly converts this using DOS-style short mode.
23852  # If so, the updated path is stored in $new_path.
23853
23854  input_path="$new_path"
23855  # Check if we need to convert this using DOS-style short mode. If the path
23856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23857  # take no chances and rewrite it.
23858  # Note: m4 eats our [], so we need to use [ and ] instead.
23859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23860  if test "x$has_forbidden_chars" != x; then
23861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23865      # Going to short mode and back again did indeed matter. Since short mode is
23866      # case insensitive, let's make it lowercase to improve readability.
23867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23868      # Now convert it back to Unix-style (cygpath)
23869      input_path=`$CYGPATH -u "$shortmode_path"`
23870      new_path="$input_path"
23871    fi
23872  fi
23873
23874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23875  if test "x$test_cygdrive_prefix" = x; then
23876    # As a simple fix, exclude /usr/bin since it's not a real path.
23877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23879      # a path prefixed by /cygdrive for fixpath to work.
23880      new_path="$CYGWIN_ROOT_PATH$input_path"
23881    fi
23882  fi
23883
23884
23885  if test "x$path" != "x$new_path"; then
23886    BOOT_JDK="$new_path"
23887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23889  fi
23890
23891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23892
23893  path="$BOOT_JDK"
23894  has_colon=`$ECHO $path | $GREP ^.:`
23895  new_path="$path"
23896  if test "x$has_colon" = x; then
23897    # Not in mixed or Windows style, start by that.
23898    new_path=`cmd //c echo $path`
23899  fi
23900
23901
23902  input_path="$new_path"
23903  # Check if we need to convert this using DOS-style short mode. If the path
23904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23905  # take no chances and rewrite it.
23906  # Note: m4 eats our [], so we need to use [ and ] instead.
23907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23908  if test "x$has_forbidden_chars" != x; then
23909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23911  fi
23912
23913
23914  windows_path="$new_path"
23915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23916    unix_path=`$CYGPATH -u "$windows_path"`
23917    new_path="$unix_path"
23918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23920    new_path="$unix_path"
23921  fi
23922
23923  if test "x$path" != "x$new_path"; then
23924    BOOT_JDK="$new_path"
23925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23927  fi
23928
23929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23931
23932    else
23933      # We're on a unix platform. Hooray! :)
23934      path="$BOOT_JDK"
23935      has_space=`$ECHO "$path" | $GREP " "`
23936      if test "x$has_space" != x; then
23937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23940      fi
23941
23942      # Use eval to expand a potential ~
23943      eval path="$path"
23944      if test ! -f "$path" && test ! -d "$path"; then
23945        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23946      fi
23947
23948      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23949    fi
23950  fi
23951
23952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23953$as_echo_n "checking for Boot JDK... " >&6; }
23954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23955$as_echo "$BOOT_JDK" >&6; }
23956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23957$as_echo_n "checking Boot JDK version... " >&6; }
23958            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23960$as_echo "$BOOT_JDK_VERSION" >&6; }
23961          fi # end check jdk version
23962        fi # end check javac
23963      fi # end check java
23964    fi # end check boot jdk found
23965  fi
23966
23967    # If that did not work out (e.g. too old), try explicit versions instead
23968
23969  if test "x$BOOT_JDK_FOUND" = xno; then
23970    # Now execute the test
23971
23972  if test -x /usr/libexec/java_home; then
23973    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23974    BOOT_JDK_FOUND=maybe
23975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23976$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23977  fi
23978
23979
23980    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23981    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23982      # Do we have a bin/java?
23983      if test ! -x "$BOOT_JDK/bin/java"; then
23984        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23986        BOOT_JDK_FOUND=no
23987      else
23988        # Do we have a bin/javac?
23989        if test ! -x "$BOOT_JDK/bin/javac"; then
23990          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23992          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23993$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23994          BOOT_JDK_FOUND=no
23995        else
23996          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23997          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23998
23999          # Extra M4 quote needed to protect [] in grep expression.
24000          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24001          if test "x$FOUND_CORRECT_VERSION" = x; then
24002            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24004            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24005$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24006            BOOT_JDK_FOUND=no
24007          else
24008            # We're done! :-)
24009            BOOT_JDK_FOUND=yes
24010
24011  # Only process if variable expands to non-empty
24012
24013  if test "x$BOOT_JDK" != x; then
24014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24015
24016  # Input might be given as Windows format, start by converting to
24017  # unix format.
24018  path="$BOOT_JDK"
24019  new_path=`$CYGPATH -u "$path"`
24020
24021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24024  # "foo.exe" is OK but "foo" is an error.
24025  #
24026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24027  # It is also a way to make sure we got the proper file name for the real test later on.
24028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24029  if test "x$test_shortpath" = x; then
24030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24032    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24033  fi
24034
24035  # Call helper function which possibly converts this using DOS-style short mode.
24036  # If so, the updated path is stored in $new_path.
24037
24038  input_path="$new_path"
24039  # Check if we need to convert this using DOS-style short mode. If the path
24040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24041  # take no chances and rewrite it.
24042  # Note: m4 eats our [], so we need to use [ and ] instead.
24043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24044  if test "x$has_forbidden_chars" != x; then
24045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24049      # Going to short mode and back again did indeed matter. Since short mode is
24050      # case insensitive, let's make it lowercase to improve readability.
24051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24052      # Now convert it back to Unix-style (cygpath)
24053      input_path=`$CYGPATH -u "$shortmode_path"`
24054      new_path="$input_path"
24055    fi
24056  fi
24057
24058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24059  if test "x$test_cygdrive_prefix" = x; then
24060    # As a simple fix, exclude /usr/bin since it's not a real path.
24061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24063      # a path prefixed by /cygdrive for fixpath to work.
24064      new_path="$CYGWIN_ROOT_PATH$input_path"
24065    fi
24066  fi
24067
24068
24069  if test "x$path" != "x$new_path"; then
24070    BOOT_JDK="$new_path"
24071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24073  fi
24074
24075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24076
24077  path="$BOOT_JDK"
24078  has_colon=`$ECHO $path | $GREP ^.:`
24079  new_path="$path"
24080  if test "x$has_colon" = x; then
24081    # Not in mixed or Windows style, start by that.
24082    new_path=`cmd //c echo $path`
24083  fi
24084
24085
24086  input_path="$new_path"
24087  # Check if we need to convert this using DOS-style short mode. If the path
24088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24089  # take no chances and rewrite it.
24090  # Note: m4 eats our [], so we need to use [ and ] instead.
24091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24092  if test "x$has_forbidden_chars" != x; then
24093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24095  fi
24096
24097
24098  windows_path="$new_path"
24099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24100    unix_path=`$CYGPATH -u "$windows_path"`
24101    new_path="$unix_path"
24102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24104    new_path="$unix_path"
24105  fi
24106
24107  if test "x$path" != "x$new_path"; then
24108    BOOT_JDK="$new_path"
24109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24111  fi
24112
24113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24115
24116    else
24117      # We're on a unix platform. Hooray! :)
24118      path="$BOOT_JDK"
24119      has_space=`$ECHO "$path" | $GREP " "`
24120      if test "x$has_space" != x; then
24121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24122$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24124      fi
24125
24126      # Use eval to expand a potential ~
24127      eval path="$path"
24128      if test ! -f "$path" && test ! -d "$path"; then
24129        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24130      fi
24131
24132      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24133    fi
24134  fi
24135
24136            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24137$as_echo_n "checking for Boot JDK... " >&6; }
24138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24139$as_echo "$BOOT_JDK" >&6; }
24140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24141$as_echo_n "checking Boot JDK version... " >&6; }
24142            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24144$as_echo "$BOOT_JDK_VERSION" >&6; }
24145          fi # end check jdk version
24146        fi # end check javac
24147      fi # end check java
24148    fi # end check boot jdk found
24149  fi
24150
24151
24152  if test "x$BOOT_JDK_FOUND" = xno; then
24153    # Now execute the test
24154
24155  if test -x /usr/libexec/java_home; then
24156    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24157    BOOT_JDK_FOUND=maybe
24158    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24159$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24160  fi
24161
24162
24163    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24164    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24165      # Do we have a bin/java?
24166      if test ! -x "$BOOT_JDK/bin/java"; then
24167        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24169        BOOT_JDK_FOUND=no
24170      else
24171        # Do we have a bin/javac?
24172        if test ! -x "$BOOT_JDK/bin/javac"; then
24173          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24175          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24176$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24177          BOOT_JDK_FOUND=no
24178        else
24179          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24180          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24181
24182          # Extra M4 quote needed to protect [] in grep expression.
24183          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24184          if test "x$FOUND_CORRECT_VERSION" = x; then
24185            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24187            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24188$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24189            BOOT_JDK_FOUND=no
24190          else
24191            # We're done! :-)
24192            BOOT_JDK_FOUND=yes
24193
24194  # Only process if variable expands to non-empty
24195
24196  if test "x$BOOT_JDK" != x; then
24197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24198
24199  # Input might be given as Windows format, start by converting to
24200  # unix format.
24201  path="$BOOT_JDK"
24202  new_path=`$CYGPATH -u "$path"`
24203
24204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24207  # "foo.exe" is OK but "foo" is an error.
24208  #
24209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24210  # It is also a way to make sure we got the proper file name for the real test later on.
24211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24212  if test "x$test_shortpath" = x; then
24213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24215    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24216  fi
24217
24218  # Call helper function which possibly converts this using DOS-style short mode.
24219  # If so, the updated path is stored in $new_path.
24220
24221  input_path="$new_path"
24222  # Check if we need to convert this using DOS-style short mode. If the path
24223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24224  # take no chances and rewrite it.
24225  # Note: m4 eats our [], so we need to use [ and ] instead.
24226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24227  if test "x$has_forbidden_chars" != x; then
24228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24232      # Going to short mode and back again did indeed matter. Since short mode is
24233      # case insensitive, let's make it lowercase to improve readability.
24234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24235      # Now convert it back to Unix-style (cygpath)
24236      input_path=`$CYGPATH -u "$shortmode_path"`
24237      new_path="$input_path"
24238    fi
24239  fi
24240
24241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24242  if test "x$test_cygdrive_prefix" = x; then
24243    # As a simple fix, exclude /usr/bin since it's not a real path.
24244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24246      # a path prefixed by /cygdrive for fixpath to work.
24247      new_path="$CYGWIN_ROOT_PATH$input_path"
24248    fi
24249  fi
24250
24251
24252  if test "x$path" != "x$new_path"; then
24253    BOOT_JDK="$new_path"
24254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24256  fi
24257
24258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24259
24260  path="$BOOT_JDK"
24261  has_colon=`$ECHO $path | $GREP ^.:`
24262  new_path="$path"
24263  if test "x$has_colon" = x; then
24264    # Not in mixed or Windows style, start by that.
24265    new_path=`cmd //c echo $path`
24266  fi
24267
24268
24269  input_path="$new_path"
24270  # Check if we need to convert this using DOS-style short mode. If the path
24271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24272  # take no chances and rewrite it.
24273  # Note: m4 eats our [], so we need to use [ and ] instead.
24274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24275  if test "x$has_forbidden_chars" != x; then
24276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24278  fi
24279
24280
24281  windows_path="$new_path"
24282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24283    unix_path=`$CYGPATH -u "$windows_path"`
24284    new_path="$unix_path"
24285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24287    new_path="$unix_path"
24288  fi
24289
24290  if test "x$path" != "x$new_path"; then
24291    BOOT_JDK="$new_path"
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24294  fi
24295
24296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24298
24299    else
24300      # We're on a unix platform. Hooray! :)
24301      path="$BOOT_JDK"
24302      has_space=`$ECHO "$path" | $GREP " "`
24303      if test "x$has_space" != x; then
24304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24306        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24307      fi
24308
24309      # Use eval to expand a potential ~
24310      eval path="$path"
24311      if test ! -f "$path" && test ! -d "$path"; then
24312        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24313      fi
24314
24315      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24316    fi
24317  fi
24318
24319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24320$as_echo_n "checking for Boot JDK... " >&6; }
24321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24322$as_echo "$BOOT_JDK" >&6; }
24323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24324$as_echo_n "checking Boot JDK version... " >&6; }
24325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24327$as_echo "$BOOT_JDK_VERSION" >&6; }
24328          fi # end check jdk version
24329        fi # end check javac
24330      fi # end check java
24331    fi # end check boot jdk found
24332  fi
24333
24334
24335  if test "x$BOOT_JDK_FOUND" = xno; then
24336    # Now execute the test
24337
24338  if test -x /usr/libexec/java_home; then
24339    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24340    BOOT_JDK_FOUND=maybe
24341    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24342$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24343  fi
24344
24345
24346    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24347    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24348      # Do we have a bin/java?
24349      if test ! -x "$BOOT_JDK/bin/java"; then
24350        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24352        BOOT_JDK_FOUND=no
24353      else
24354        # Do we have a bin/javac?
24355        if test ! -x "$BOOT_JDK/bin/javac"; then
24356          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24358          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24359$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24360          BOOT_JDK_FOUND=no
24361        else
24362          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24363          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24364
24365          # Extra M4 quote needed to protect [] in grep expression.
24366          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24367          if test "x$FOUND_CORRECT_VERSION" = x; then
24368            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24370            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24371$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24372            BOOT_JDK_FOUND=no
24373          else
24374            # We're done! :-)
24375            BOOT_JDK_FOUND=yes
24376
24377  # Only process if variable expands to non-empty
24378
24379  if test "x$BOOT_JDK" != x; then
24380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24381
24382  # Input might be given as Windows format, start by converting to
24383  # unix format.
24384  path="$BOOT_JDK"
24385  new_path=`$CYGPATH -u "$path"`
24386
24387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24390  # "foo.exe" is OK but "foo" is an error.
24391  #
24392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24393  # It is also a way to make sure we got the proper file name for the real test later on.
24394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24395  if test "x$test_shortpath" = x; then
24396    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24397$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24398    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24399  fi
24400
24401  # Call helper function which possibly converts this using DOS-style short mode.
24402  # If so, the updated path is stored in $new_path.
24403
24404  input_path="$new_path"
24405  # Check if we need to convert this using DOS-style short mode. If the path
24406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24407  # take no chances and rewrite it.
24408  # Note: m4 eats our [], so we need to use [ and ] instead.
24409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24410  if test "x$has_forbidden_chars" != x; then
24411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24415      # Going to short mode and back again did indeed matter. Since short mode is
24416      # case insensitive, let's make it lowercase to improve readability.
24417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24418      # Now convert it back to Unix-style (cygpath)
24419      input_path=`$CYGPATH -u "$shortmode_path"`
24420      new_path="$input_path"
24421    fi
24422  fi
24423
24424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24425  if test "x$test_cygdrive_prefix" = x; then
24426    # As a simple fix, exclude /usr/bin since it's not a real path.
24427    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24429      # a path prefixed by /cygdrive for fixpath to work.
24430      new_path="$CYGWIN_ROOT_PATH$input_path"
24431    fi
24432  fi
24433
24434
24435  if test "x$path" != "x$new_path"; then
24436    BOOT_JDK="$new_path"
24437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24439  fi
24440
24441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24442
24443  path="$BOOT_JDK"
24444  has_colon=`$ECHO $path | $GREP ^.:`
24445  new_path="$path"
24446  if test "x$has_colon" = x; then
24447    # Not in mixed or Windows style, start by that.
24448    new_path=`cmd //c echo $path`
24449  fi
24450
24451
24452  input_path="$new_path"
24453  # Check if we need to convert this using DOS-style short mode. If the path
24454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24455  # take no chances and rewrite it.
24456  # Note: m4 eats our [], so we need to use [ and ] instead.
24457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24458  if test "x$has_forbidden_chars" != x; then
24459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24461  fi
24462
24463
24464  windows_path="$new_path"
24465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24466    unix_path=`$CYGPATH -u "$windows_path"`
24467    new_path="$unix_path"
24468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24470    new_path="$unix_path"
24471  fi
24472
24473  if test "x$path" != "x$new_path"; then
24474    BOOT_JDK="$new_path"
24475    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24476$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24477  fi
24478
24479  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24480  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24481
24482    else
24483      # We're on a unix platform. Hooray! :)
24484      path="$BOOT_JDK"
24485      has_space=`$ECHO "$path" | $GREP " "`
24486      if test "x$has_space" != x; then
24487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24489        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24490      fi
24491
24492      # Use eval to expand a potential ~
24493      eval path="$path"
24494      if test ! -f "$path" && test ! -d "$path"; then
24495        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24496      fi
24497
24498      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24499    fi
24500  fi
24501
24502            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24503$as_echo_n "checking for Boot JDK... " >&6; }
24504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24505$as_echo "$BOOT_JDK" >&6; }
24506            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24507$as_echo_n "checking Boot JDK version... " >&6; }
24508            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24510$as_echo "$BOOT_JDK_VERSION" >&6; }
24511          fi # end check jdk version
24512        fi # end check javac
24513      fi # end check java
24514    fi # end check boot jdk found
24515  fi
24516
24517  fi
24518
24519
24520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24522      # Do we have a bin/java?
24523      if test ! -x "$BOOT_JDK/bin/java"; then
24524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24526        BOOT_JDK_FOUND=no
24527      else
24528        # Do we have a bin/javac?
24529        if test ! -x "$BOOT_JDK/bin/javac"; then
24530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24534          BOOT_JDK_FOUND=no
24535        else
24536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24538
24539          # Extra M4 quote needed to protect [] in grep expression.
24540          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24541          if test "x$FOUND_CORRECT_VERSION" = x; then
24542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24546            BOOT_JDK_FOUND=no
24547          else
24548            # We're done! :-)
24549            BOOT_JDK_FOUND=yes
24550
24551  # Only process if variable expands to non-empty
24552
24553  if test "x$BOOT_JDK" != x; then
24554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24555
24556  # Input might be given as Windows format, start by converting to
24557  # unix format.
24558  path="$BOOT_JDK"
24559  new_path=`$CYGPATH -u "$path"`
24560
24561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24564  # "foo.exe" is OK but "foo" is an error.
24565  #
24566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24567  # It is also a way to make sure we got the proper file name for the real test later on.
24568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24569  if test "x$test_shortpath" = x; then
24570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24573  fi
24574
24575  # Call helper function which possibly converts this using DOS-style short mode.
24576  # If so, the updated path is stored in $new_path.
24577
24578  input_path="$new_path"
24579  # Check if we need to convert this using DOS-style short mode. If the path
24580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24581  # take no chances and rewrite it.
24582  # Note: m4 eats our [], so we need to use [ and ] instead.
24583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24584  if test "x$has_forbidden_chars" != x; then
24585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24589      # Going to short mode and back again did indeed matter. Since short mode is
24590      # case insensitive, let's make it lowercase to improve readability.
24591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24592      # Now convert it back to Unix-style (cygpath)
24593      input_path=`$CYGPATH -u "$shortmode_path"`
24594      new_path="$input_path"
24595    fi
24596  fi
24597
24598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24599  if test "x$test_cygdrive_prefix" = x; then
24600    # As a simple fix, exclude /usr/bin since it's not a real path.
24601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24603      # a path prefixed by /cygdrive for fixpath to work.
24604      new_path="$CYGWIN_ROOT_PATH$input_path"
24605    fi
24606  fi
24607
24608
24609  if test "x$path" != "x$new_path"; then
24610    BOOT_JDK="$new_path"
24611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24613  fi
24614
24615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24616
24617  path="$BOOT_JDK"
24618  has_colon=`$ECHO $path | $GREP ^.:`
24619  new_path="$path"
24620  if test "x$has_colon" = x; then
24621    # Not in mixed or Windows style, start by that.
24622    new_path=`cmd //c echo $path`
24623  fi
24624
24625
24626  input_path="$new_path"
24627  # Check if we need to convert this using DOS-style short mode. If the path
24628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24629  # take no chances and rewrite it.
24630  # Note: m4 eats our [], so we need to use [ and ] instead.
24631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24632  if test "x$has_forbidden_chars" != x; then
24633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24635  fi
24636
24637
24638  windows_path="$new_path"
24639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24640    unix_path=`$CYGPATH -u "$windows_path"`
24641    new_path="$unix_path"
24642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24644    new_path="$unix_path"
24645  fi
24646
24647  if test "x$path" != "x$new_path"; then
24648    BOOT_JDK="$new_path"
24649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24651  fi
24652
24653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24655
24656    else
24657      # We're on a unix platform. Hooray! :)
24658      path="$BOOT_JDK"
24659      has_space=`$ECHO "$path" | $GREP " "`
24660      if test "x$has_space" != x; then
24661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24664      fi
24665
24666      # Use eval to expand a potential ~
24667      eval path="$path"
24668      if test ! -f "$path" && test ! -d "$path"; then
24669        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24670      fi
24671
24672      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24673    fi
24674  fi
24675
24676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24677$as_echo_n "checking for Boot JDK... " >&6; }
24678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24679$as_echo "$BOOT_JDK" >&6; }
24680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24681$as_echo_n "checking Boot JDK version... " >&6; }
24682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24684$as_echo "$BOOT_JDK_VERSION" >&6; }
24685          fi # end check jdk version
24686        fi # end check javac
24687      fi # end check java
24688    fi # end check boot jdk found
24689  fi
24690
24691
24692  # Test: Is $JAVA_HOME set?
24693
24694  if test "x$BOOT_JDK_FOUND" = xno; then
24695    # Now execute the test
24696
24697  if test "x$JAVA_HOME" != x; then
24698    JAVA_HOME_PROCESSED="$JAVA_HOME"
24699
24700  # Only process if variable expands to non-empty
24701
24702  if test "x$JAVA_HOME_PROCESSED" != x; then
24703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24704
24705  # Input might be given as Windows format, start by converting to
24706  # unix format.
24707  path="$JAVA_HOME_PROCESSED"
24708  new_path=`$CYGPATH -u "$path"`
24709
24710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24713  # "foo.exe" is OK but "foo" is an error.
24714  #
24715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24716  # It is also a way to make sure we got the proper file name for the real test later on.
24717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24718  if test "x$test_shortpath" = x; then
24719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24720$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24721    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24722  fi
24723
24724  # Call helper function which possibly converts this using DOS-style short mode.
24725  # If so, the updated path is stored in $new_path.
24726
24727  input_path="$new_path"
24728  # Check if we need to convert this using DOS-style short mode. If the path
24729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24730  # take no chances and rewrite it.
24731  # Note: m4 eats our [], so we need to use [ and ] instead.
24732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24733  if test "x$has_forbidden_chars" != x; then
24734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24738      # Going to short mode and back again did indeed matter. Since short mode is
24739      # case insensitive, let's make it lowercase to improve readability.
24740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24741      # Now convert it back to Unix-style (cygpath)
24742      input_path=`$CYGPATH -u "$shortmode_path"`
24743      new_path="$input_path"
24744    fi
24745  fi
24746
24747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24748  if test "x$test_cygdrive_prefix" = x; then
24749    # As a simple fix, exclude /usr/bin since it's not a real path.
24750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24752      # a path prefixed by /cygdrive for fixpath to work.
24753      new_path="$CYGWIN_ROOT_PATH$input_path"
24754    fi
24755  fi
24756
24757
24758  if test "x$path" != "x$new_path"; then
24759    JAVA_HOME_PROCESSED="$new_path"
24760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24761$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24762  fi
24763
24764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24765
24766  path="$JAVA_HOME_PROCESSED"
24767  has_colon=`$ECHO $path | $GREP ^.:`
24768  new_path="$path"
24769  if test "x$has_colon" = x; then
24770    # Not in mixed or Windows style, start by that.
24771    new_path=`cmd //c echo $path`
24772  fi
24773
24774
24775  input_path="$new_path"
24776  # Check if we need to convert this using DOS-style short mode. If the path
24777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24778  # take no chances and rewrite it.
24779  # Note: m4 eats our [], so we need to use [ and ] instead.
24780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24781  if test "x$has_forbidden_chars" != x; then
24782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24784  fi
24785
24786
24787  windows_path="$new_path"
24788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24789    unix_path=`$CYGPATH -u "$windows_path"`
24790    new_path="$unix_path"
24791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24793    new_path="$unix_path"
24794  fi
24795
24796  if test "x$path" != "x$new_path"; then
24797    JAVA_HOME_PROCESSED="$new_path"
24798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24799$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24800  fi
24801
24802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24804
24805    else
24806      # We're on a unix platform. Hooray! :)
24807      path="$JAVA_HOME_PROCESSED"
24808      has_space=`$ECHO "$path" | $GREP " "`
24809      if test "x$has_space" != x; then
24810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24811$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24813      fi
24814
24815      # Use eval to expand a potential ~
24816      eval path="$path"
24817      if test ! -f "$path" && test ! -d "$path"; then
24818        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24819      fi
24820
24821      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24822    fi
24823  fi
24824
24825    if test ! -d "$JAVA_HOME_PROCESSED"; then
24826      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24827$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24828    else
24829      # Aha, the user has set a JAVA_HOME
24830      # let us use that as the Boot JDK.
24831      BOOT_JDK="$JAVA_HOME_PROCESSED"
24832      BOOT_JDK_FOUND=maybe
24833      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24834$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24835    fi
24836  fi
24837
24838
24839    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24840    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24841      # Do we have a bin/java?
24842      if test ! -x "$BOOT_JDK/bin/java"; then
24843        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24845        BOOT_JDK_FOUND=no
24846      else
24847        # Do we have a bin/javac?
24848        if test ! -x "$BOOT_JDK/bin/javac"; then
24849          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24851          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24852$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24853          BOOT_JDK_FOUND=no
24854        else
24855          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24856          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24857
24858          # Extra M4 quote needed to protect [] in grep expression.
24859          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24860          if test "x$FOUND_CORRECT_VERSION" = x; then
24861            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24863            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24864$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24865            BOOT_JDK_FOUND=no
24866          else
24867            # We're done! :-)
24868            BOOT_JDK_FOUND=yes
24869
24870  # Only process if variable expands to non-empty
24871
24872  if test "x$BOOT_JDK" != x; then
24873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24874
24875  # Input might be given as Windows format, start by converting to
24876  # unix format.
24877  path="$BOOT_JDK"
24878  new_path=`$CYGPATH -u "$path"`
24879
24880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24883  # "foo.exe" is OK but "foo" is an error.
24884  #
24885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24886  # It is also a way to make sure we got the proper file name for the real test later on.
24887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24888  if test "x$test_shortpath" = x; then
24889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24891    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24892  fi
24893
24894  # Call helper function which possibly converts this using DOS-style short mode.
24895  # If so, the updated path is stored in $new_path.
24896
24897  input_path="$new_path"
24898  # Check if we need to convert this using DOS-style short mode. If the path
24899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24900  # take no chances and rewrite it.
24901  # Note: m4 eats our [], so we need to use [ and ] instead.
24902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24903  if test "x$has_forbidden_chars" != x; then
24904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24908      # Going to short mode and back again did indeed matter. Since short mode is
24909      # case insensitive, let's make it lowercase to improve readability.
24910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24911      # Now convert it back to Unix-style (cygpath)
24912      input_path=`$CYGPATH -u "$shortmode_path"`
24913      new_path="$input_path"
24914    fi
24915  fi
24916
24917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24918  if test "x$test_cygdrive_prefix" = x; then
24919    # As a simple fix, exclude /usr/bin since it's not a real path.
24920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24922      # a path prefixed by /cygdrive for fixpath to work.
24923      new_path="$CYGWIN_ROOT_PATH$input_path"
24924    fi
24925  fi
24926
24927
24928  if test "x$path" != "x$new_path"; then
24929    BOOT_JDK="$new_path"
24930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24932  fi
24933
24934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24935
24936  path="$BOOT_JDK"
24937  has_colon=`$ECHO $path | $GREP ^.:`
24938  new_path="$path"
24939  if test "x$has_colon" = x; then
24940    # Not in mixed or Windows style, start by that.
24941    new_path=`cmd //c echo $path`
24942  fi
24943
24944
24945  input_path="$new_path"
24946  # Check if we need to convert this using DOS-style short mode. If the path
24947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24948  # take no chances and rewrite it.
24949  # Note: m4 eats our [], so we need to use [ and ] instead.
24950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24951  if test "x$has_forbidden_chars" != x; then
24952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24954  fi
24955
24956
24957  windows_path="$new_path"
24958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24959    unix_path=`$CYGPATH -u "$windows_path"`
24960    new_path="$unix_path"
24961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24963    new_path="$unix_path"
24964  fi
24965
24966  if test "x$path" != "x$new_path"; then
24967    BOOT_JDK="$new_path"
24968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24970  fi
24971
24972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24974
24975    else
24976      # We're on a unix platform. Hooray! :)
24977      path="$BOOT_JDK"
24978      has_space=`$ECHO "$path" | $GREP " "`
24979      if test "x$has_space" != x; then
24980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24983      fi
24984
24985      # Use eval to expand a potential ~
24986      eval path="$path"
24987      if test ! -f "$path" && test ! -d "$path"; then
24988        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24989      fi
24990
24991      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24992    fi
24993  fi
24994
24995            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24996$as_echo_n "checking for Boot JDK... " >&6; }
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24998$as_echo "$BOOT_JDK" >&6; }
24999            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25000$as_echo_n "checking Boot JDK version... " >&6; }
25001            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25003$as_echo "$BOOT_JDK_VERSION" >&6; }
25004          fi # end check jdk version
25005        fi # end check javac
25006      fi # end check java
25007    fi # end check boot jdk found
25008  fi
25009
25010
25011  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25012
25013  if test "x$BOOT_JDK_FOUND" = xno; then
25014    # Now execute the test
25015
25016  # Extract the first word of "javac", so it can be a program name with args.
25017set dummy javac; ac_word=$2
25018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25019$as_echo_n "checking for $ac_word... " >&6; }
25020if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25021  $as_echo_n "(cached) " >&6
25022else
25023  case $JAVAC_CHECK in
25024  [\\/]* | ?:[\\/]*)
25025  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25026  ;;
25027  *)
25028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25029for as_dir in $PATH
25030do
25031  IFS=$as_save_IFS
25032  test -z "$as_dir" && as_dir=.
25033    for ac_exec_ext in '' $ac_executable_extensions; do
25034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25035    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25037    break 2
25038  fi
25039done
25040  done
25041IFS=$as_save_IFS
25042
25043  ;;
25044esac
25045fi
25046JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25047if test -n "$JAVAC_CHECK"; then
25048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25049$as_echo "$JAVAC_CHECK" >&6; }
25050else
25051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25052$as_echo "no" >&6; }
25053fi
25054
25055
25056  # Extract the first word of "java", so it can be a program name with args.
25057set dummy java; ac_word=$2
25058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25059$as_echo_n "checking for $ac_word... " >&6; }
25060if ${ac_cv_path_JAVA_CHECK+:} false; then :
25061  $as_echo_n "(cached) " >&6
25062else
25063  case $JAVA_CHECK in
25064  [\\/]* | ?:[\\/]*)
25065  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25066  ;;
25067  *)
25068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25069for as_dir in $PATH
25070do
25071  IFS=$as_save_IFS
25072  test -z "$as_dir" && as_dir=.
25073    for ac_exec_ext in '' $ac_executable_extensions; do
25074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25075    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25077    break 2
25078  fi
25079done
25080  done
25081IFS=$as_save_IFS
25082
25083  ;;
25084esac
25085fi
25086JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25087if test -n "$JAVA_CHECK"; then
25088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25089$as_echo "$JAVA_CHECK" >&6; }
25090else
25091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25092$as_echo "no" >&6; }
25093fi
25094
25095
25096  BINARY="$JAVAC_CHECK"
25097  if test "x$JAVAC_CHECK" = x; then
25098    BINARY="$JAVA_CHECK"
25099  fi
25100  if test "x$BINARY" != x; then
25101    # So there is a java(c) binary, it might be part of a JDK.
25102    # Lets find the JDK/JRE directory by following symbolic links.
25103    # Linux/GNU systems often have links from /usr/bin/java to
25104    # /etc/alternatives/java to the real JDK binary.
25105
25106  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25107    # Follow a chain of symbolic links. Use readlink
25108    # where it exists, else fall back to horribly
25109    # complicated shell code.
25110    if test "x$READLINK_TESTED" != yes; then
25111      # On MacOSX there is a readlink tool with a different
25112      # purpose than the GNU readlink tool. Check the found readlink.
25113      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25114      if test "x$ISGNU" = x; then
25115        # A readlink that we do not know how to use.
25116        # Are there other non-GNU readlinks out there?
25117        READLINK_TESTED=yes
25118        READLINK=
25119      fi
25120    fi
25121
25122    if test "x$READLINK" != x; then
25123      BINARY=`$READLINK -f $BINARY`
25124    else
25125      # Save the current directory for restoring afterwards
25126      STARTDIR=$PWD
25127      COUNTER=0
25128      sym_link_dir=`$DIRNAME $BINARY`
25129      sym_link_file=`$BASENAME $BINARY`
25130      cd $sym_link_dir
25131      # Use -P flag to resolve symlinks in directories.
25132      cd `$THEPWDCMD -P`
25133      sym_link_dir=`$THEPWDCMD -P`
25134      # Resolve file symlinks
25135      while test $COUNTER -lt 20; do
25136        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25137        if test "x$ISLINK" == x; then
25138          # This is not a symbolic link! We are done!
25139          break
25140        fi
25141        # Again resolve directory symlinks since the target of the just found
25142        # link could be in a different directory
25143        cd `$DIRNAME $ISLINK`
25144        sym_link_dir=`$THEPWDCMD -P`
25145        sym_link_file=`$BASENAME $ISLINK`
25146        let COUNTER=COUNTER+1
25147      done
25148      cd $STARTDIR
25149      BINARY=$sym_link_dir/$sym_link_file
25150    fi
25151  fi
25152
25153    BOOT_JDK=`dirname "$BINARY"`
25154    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25155    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25156      # Looks like we found ourselves an JDK
25157      BOOT_JDK_FOUND=maybe
25158      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25159$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25160    fi
25161  fi
25162
25163
25164    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25165    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25166      # Do we have a bin/java?
25167      if test ! -x "$BOOT_JDK/bin/java"; then
25168        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25170        BOOT_JDK_FOUND=no
25171      else
25172        # Do we have a bin/javac?
25173        if test ! -x "$BOOT_JDK/bin/javac"; then
25174          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25176          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25177$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25178          BOOT_JDK_FOUND=no
25179        else
25180          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25181          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25182
25183          # Extra M4 quote needed to protect [] in grep expression.
25184          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25185          if test "x$FOUND_CORRECT_VERSION" = x; then
25186            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25188            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25189$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25190            BOOT_JDK_FOUND=no
25191          else
25192            # We're done! :-)
25193            BOOT_JDK_FOUND=yes
25194
25195  # Only process if variable expands to non-empty
25196
25197  if test "x$BOOT_JDK" != x; then
25198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25199
25200  # Input might be given as Windows format, start by converting to
25201  # unix format.
25202  path="$BOOT_JDK"
25203  new_path=`$CYGPATH -u "$path"`
25204
25205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25208  # "foo.exe" is OK but "foo" is an error.
25209  #
25210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25211  # It is also a way to make sure we got the proper file name for the real test later on.
25212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25213  if test "x$test_shortpath" = x; then
25214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25216    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25217  fi
25218
25219  # Call helper function which possibly converts this using DOS-style short mode.
25220  # If so, the updated path is stored in $new_path.
25221
25222  input_path="$new_path"
25223  # Check if we need to convert this using DOS-style short mode. If the path
25224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25225  # take no chances and rewrite it.
25226  # Note: m4 eats our [], so we need to use [ and ] instead.
25227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25228  if test "x$has_forbidden_chars" != x; then
25229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25233      # Going to short mode and back again did indeed matter. Since short mode is
25234      # case insensitive, let's make it lowercase to improve readability.
25235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25236      # Now convert it back to Unix-style (cygpath)
25237      input_path=`$CYGPATH -u "$shortmode_path"`
25238      new_path="$input_path"
25239    fi
25240  fi
25241
25242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25243  if test "x$test_cygdrive_prefix" = x; then
25244    # As a simple fix, exclude /usr/bin since it's not a real path.
25245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25247      # a path prefixed by /cygdrive for fixpath to work.
25248      new_path="$CYGWIN_ROOT_PATH$input_path"
25249    fi
25250  fi
25251
25252
25253  if test "x$path" != "x$new_path"; then
25254    BOOT_JDK="$new_path"
25255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25256$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25257  fi
25258
25259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25260
25261  path="$BOOT_JDK"
25262  has_colon=`$ECHO $path | $GREP ^.:`
25263  new_path="$path"
25264  if test "x$has_colon" = x; then
25265    # Not in mixed or Windows style, start by that.
25266    new_path=`cmd //c echo $path`
25267  fi
25268
25269
25270  input_path="$new_path"
25271  # Check if we need to convert this using DOS-style short mode. If the path
25272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25273  # take no chances and rewrite it.
25274  # Note: m4 eats our [], so we need to use [ and ] instead.
25275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25276  if test "x$has_forbidden_chars" != x; then
25277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25279  fi
25280
25281
25282  windows_path="$new_path"
25283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25284    unix_path=`$CYGPATH -u "$windows_path"`
25285    new_path="$unix_path"
25286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25288    new_path="$unix_path"
25289  fi
25290
25291  if test "x$path" != "x$new_path"; then
25292    BOOT_JDK="$new_path"
25293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25294$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25295  fi
25296
25297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25299
25300    else
25301      # We're on a unix platform. Hooray! :)
25302      path="$BOOT_JDK"
25303      has_space=`$ECHO "$path" | $GREP " "`
25304      if test "x$has_space" != x; then
25305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25308      fi
25309
25310      # Use eval to expand a potential ~
25311      eval path="$path"
25312      if test ! -f "$path" && test ! -d "$path"; then
25313        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25314      fi
25315
25316      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25317    fi
25318  fi
25319
25320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25321$as_echo_n "checking for Boot JDK... " >&6; }
25322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25323$as_echo "$BOOT_JDK" >&6; }
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25325$as_echo_n "checking Boot JDK version... " >&6; }
25326            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25328$as_echo "$BOOT_JDK_VERSION" >&6; }
25329          fi # end check jdk version
25330        fi # end check javac
25331      fi # end check java
25332    fi # end check boot jdk found
25333  fi
25334
25335
25336  # Test: Is there a JDK installed in default, well-known locations?
25337
25338  if test "x$BOOT_JDK_FOUND" = xno; then
25339    # Now execute the test
25340
25341  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25342
25343  if test "x$BOOT_JDK_FOUND" = xno; then
25344    # Now execute the test
25345
25346  if test "x$ProgramW6432" != x; then
25347    VIRTUAL_DIR="$ProgramW6432/Java"
25348
25349  windows_path="$VIRTUAL_DIR"
25350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25351    unix_path=`$CYGPATH -u "$windows_path"`
25352    VIRTUAL_DIR="$unix_path"
25353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25355    VIRTUAL_DIR="$unix_path"
25356  fi
25357
25358
25359  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25360  BOOT_JDK_SUFFIX=""
25361  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25362  if test "x$ALL_JDKS_FOUND" != x; then
25363    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25364
25365  if test "x$BOOT_JDK_FOUND" = xno; then
25366    # Now execute the test
25367
25368        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25369        if test -d "$BOOT_JDK"; then
25370          BOOT_JDK_FOUND=maybe
25371          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25372$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25373        fi
25374
25375
25376    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25377    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25378      # Do we have a bin/java?
25379      if test ! -x "$BOOT_JDK/bin/java"; then
25380        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25382        BOOT_JDK_FOUND=no
25383      else
25384        # Do we have a bin/javac?
25385        if test ! -x "$BOOT_JDK/bin/javac"; then
25386          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25388          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25389$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25390          BOOT_JDK_FOUND=no
25391        else
25392          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25393          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25394
25395          # Extra M4 quote needed to protect [] in grep expression.
25396          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25397          if test "x$FOUND_CORRECT_VERSION" = x; then
25398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25400            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25401$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25402            BOOT_JDK_FOUND=no
25403          else
25404            # We're done! :-)
25405            BOOT_JDK_FOUND=yes
25406
25407  # Only process if variable expands to non-empty
25408
25409  if test "x$BOOT_JDK" != x; then
25410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25411
25412  # Input might be given as Windows format, start by converting to
25413  # unix format.
25414  path="$BOOT_JDK"
25415  new_path=`$CYGPATH -u "$path"`
25416
25417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25420  # "foo.exe" is OK but "foo" is an error.
25421  #
25422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25423  # It is also a way to make sure we got the proper file name for the real test later on.
25424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25425  if test "x$test_shortpath" = x; then
25426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25428    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25429  fi
25430
25431  # Call helper function which possibly converts this using DOS-style short mode.
25432  # If so, the updated path is stored in $new_path.
25433
25434  input_path="$new_path"
25435  # Check if we need to convert this using DOS-style short mode. If the path
25436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25437  # take no chances and rewrite it.
25438  # Note: m4 eats our [], so we need to use [ and ] instead.
25439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25440  if test "x$has_forbidden_chars" != x; then
25441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25445      # Going to short mode and back again did indeed matter. Since short mode is
25446      # case insensitive, let's make it lowercase to improve readability.
25447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25448      # Now convert it back to Unix-style (cygpath)
25449      input_path=`$CYGPATH -u "$shortmode_path"`
25450      new_path="$input_path"
25451    fi
25452  fi
25453
25454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25455  if test "x$test_cygdrive_prefix" = x; then
25456    # As a simple fix, exclude /usr/bin since it's not a real path.
25457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25459      # a path prefixed by /cygdrive for fixpath to work.
25460      new_path="$CYGWIN_ROOT_PATH$input_path"
25461    fi
25462  fi
25463
25464
25465  if test "x$path" != "x$new_path"; then
25466    BOOT_JDK="$new_path"
25467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25469  fi
25470
25471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25472
25473  path="$BOOT_JDK"
25474  has_colon=`$ECHO $path | $GREP ^.:`
25475  new_path="$path"
25476  if test "x$has_colon" = x; then
25477    # Not in mixed or Windows style, start by that.
25478    new_path=`cmd //c echo $path`
25479  fi
25480
25481
25482  input_path="$new_path"
25483  # Check if we need to convert this using DOS-style short mode. If the path
25484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485  # take no chances and rewrite it.
25486  # Note: m4 eats our [], so we need to use [ and ] instead.
25487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25488  if test "x$has_forbidden_chars" != x; then
25489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25491  fi
25492
25493
25494  windows_path="$new_path"
25495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25496    unix_path=`$CYGPATH -u "$windows_path"`
25497    new_path="$unix_path"
25498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25500    new_path="$unix_path"
25501  fi
25502
25503  if test "x$path" != "x$new_path"; then
25504    BOOT_JDK="$new_path"
25505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25506$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25507  fi
25508
25509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25511
25512    else
25513      # We're on a unix platform. Hooray! :)
25514      path="$BOOT_JDK"
25515      has_space=`$ECHO "$path" | $GREP " "`
25516      if test "x$has_space" != x; then
25517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25520      fi
25521
25522      # Use eval to expand a potential ~
25523      eval path="$path"
25524      if test ! -f "$path" && test ! -d "$path"; then
25525        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25526      fi
25527
25528      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25529    fi
25530  fi
25531
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25533$as_echo_n "checking for Boot JDK... " >&6; }
25534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25535$as_echo "$BOOT_JDK" >&6; }
25536            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25537$as_echo_n "checking Boot JDK version... " >&6; }
25538            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25540$as_echo "$BOOT_JDK_VERSION" >&6; }
25541          fi # end check jdk version
25542        fi # end check javac
25543      fi # end check java
25544    fi # end check boot jdk found
25545  fi
25546
25547    done
25548  fi
25549
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25706    fi
25707  fi
25708
25709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25710$as_echo_n "checking for Boot JDK... " >&6; }
25711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25712$as_echo "$BOOT_JDK" >&6; }
25713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25714$as_echo_n "checking Boot JDK version... " >&6; }
25715            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25717$as_echo "$BOOT_JDK_VERSION" >&6; }
25718          fi # end check jdk version
25719        fi # end check javac
25720      fi # end check java
25721    fi # end check boot jdk found
25722  fi
25723
25724
25725  if test "x$BOOT_JDK_FOUND" = xno; then
25726    # Now execute the test
25727
25728  if test "x$PROGRAMW6432" != x; then
25729    VIRTUAL_DIR="$PROGRAMW6432/Java"
25730
25731  windows_path="$VIRTUAL_DIR"
25732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733    unix_path=`$CYGPATH -u "$windows_path"`
25734    VIRTUAL_DIR="$unix_path"
25735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737    VIRTUAL_DIR="$unix_path"
25738  fi
25739
25740
25741  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25742  BOOT_JDK_SUFFIX=""
25743  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25744  if test "x$ALL_JDKS_FOUND" != x; then
25745    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25746
25747  if test "x$BOOT_JDK_FOUND" = xno; then
25748    # Now execute the test
25749
25750        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25751        if test -d "$BOOT_JDK"; then
25752          BOOT_JDK_FOUND=maybe
25753          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25754$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25755        fi
25756
25757
25758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25760      # Do we have a bin/java?
25761      if test ! -x "$BOOT_JDK/bin/java"; then
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25764        BOOT_JDK_FOUND=no
25765      else
25766        # Do we have a bin/javac?
25767        if test ! -x "$BOOT_JDK/bin/javac"; then
25768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25772          BOOT_JDK_FOUND=no
25773        else
25774          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25775          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25776
25777          # Extra M4 quote needed to protect [] in grep expression.
25778          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25779          if test "x$FOUND_CORRECT_VERSION" = x; then
25780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25782            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25783$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25784            BOOT_JDK_FOUND=no
25785          else
25786            # We're done! :-)
25787            BOOT_JDK_FOUND=yes
25788
25789  # Only process if variable expands to non-empty
25790
25791  if test "x$BOOT_JDK" != x; then
25792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25793
25794  # Input might be given as Windows format, start by converting to
25795  # unix format.
25796  path="$BOOT_JDK"
25797  new_path=`$CYGPATH -u "$path"`
25798
25799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25802  # "foo.exe" is OK but "foo" is an error.
25803  #
25804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25805  # It is also a way to make sure we got the proper file name for the real test later on.
25806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25807  if test "x$test_shortpath" = x; then
25808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25810    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25811  fi
25812
25813  # Call helper function which possibly converts this using DOS-style short mode.
25814  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25827      # Going to short mode and back again did indeed matter. Since short mode is
25828      # case insensitive, let's make it lowercase to improve readability.
25829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25830      # Now convert it back to Unix-style (cygpath)
25831      input_path=`$CYGPATH -u "$shortmode_path"`
25832      new_path="$input_path"
25833    fi
25834  fi
25835
25836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25837  if test "x$test_cygdrive_prefix" = x; then
25838    # As a simple fix, exclude /usr/bin since it's not a real path.
25839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25841      # a path prefixed by /cygdrive for fixpath to work.
25842      new_path="$CYGWIN_ROOT_PATH$input_path"
25843    fi
25844  fi
25845
25846
25847  if test "x$path" != "x$new_path"; then
25848    BOOT_JDK="$new_path"
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25850$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25851  fi
25852
25853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25854
25855  path="$BOOT_JDK"
25856  has_colon=`$ECHO $path | $GREP ^.:`
25857  new_path="$path"
25858  if test "x$has_colon" = x; then
25859    # Not in mixed or Windows style, start by that.
25860    new_path=`cmd //c echo $path`
25861  fi
25862
25863
25864  input_path="$new_path"
25865  # Check if we need to convert this using DOS-style short mode. If the path
25866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25867  # take no chances and rewrite it.
25868  # Note: m4 eats our [], so we need to use [ and ] instead.
25869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25870  if test "x$has_forbidden_chars" != x; then
25871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25873  fi
25874
25875
25876  windows_path="$new_path"
25877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878    unix_path=`$CYGPATH -u "$windows_path"`
25879    new_path="$unix_path"
25880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25882    new_path="$unix_path"
25883  fi
25884
25885  if test "x$path" != "x$new_path"; then
25886    BOOT_JDK="$new_path"
25887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25889  fi
25890
25891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25893
25894    else
25895      # We're on a unix platform. Hooray! :)
25896      path="$BOOT_JDK"
25897      has_space=`$ECHO "$path" | $GREP " "`
25898      if test "x$has_space" != x; then
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25902      fi
25903
25904      # Use eval to expand a potential ~
25905      eval path="$path"
25906      if test ! -f "$path" && test ! -d "$path"; then
25907        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25908      fi
25909
25910      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25911    fi
25912  fi
25913
25914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25915$as_echo_n "checking for Boot JDK... " >&6; }
25916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25917$as_echo "$BOOT_JDK" >&6; }
25918            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25919$as_echo_n "checking Boot JDK version... " >&6; }
25920            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25921            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25922$as_echo "$BOOT_JDK_VERSION" >&6; }
25923          fi # end check jdk version
25924        fi # end check javac
25925      fi # end check java
25926    fi # end check boot jdk found
25927  fi
25928
25929    done
25930  fi
25931
25932  fi
25933
25934
25935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25937      # Do we have a bin/java?
25938      if test ! -x "$BOOT_JDK/bin/java"; then
25939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25941        BOOT_JDK_FOUND=no
25942      else
25943        # Do we have a bin/javac?
25944        if test ! -x "$BOOT_JDK/bin/javac"; then
25945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25949          BOOT_JDK_FOUND=no
25950        else
25951          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25952          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25953
25954          # Extra M4 quote needed to protect [] in grep expression.
25955          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25956          if test "x$FOUND_CORRECT_VERSION" = x; then
25957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25959            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25960$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25961            BOOT_JDK_FOUND=no
25962          else
25963            # We're done! :-)
25964            BOOT_JDK_FOUND=yes
25965
25966  # Only process if variable expands to non-empty
25967
25968  if test "x$BOOT_JDK" != x; then
25969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25970
25971  # Input might be given as Windows format, start by converting to
25972  # unix format.
25973  path="$BOOT_JDK"
25974  new_path=`$CYGPATH -u "$path"`
25975
25976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25979  # "foo.exe" is OK but "foo" is an error.
25980  #
25981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25982  # It is also a way to make sure we got the proper file name for the real test later on.
25983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25984  if test "x$test_shortpath" = x; then
25985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25987    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25988  fi
25989
25990  # Call helper function which possibly converts this using DOS-style short mode.
25991  # If so, the updated path is stored in $new_path.
25992
25993  input_path="$new_path"
25994  # Check if we need to convert this using DOS-style short mode. If the path
25995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25996  # take no chances and rewrite it.
25997  # Note: m4 eats our [], so we need to use [ and ] instead.
25998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25999  if test "x$has_forbidden_chars" != x; then
26000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26004      # Going to short mode and back again did indeed matter. Since short mode is
26005      # case insensitive, let's make it lowercase to improve readability.
26006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26007      # Now convert it back to Unix-style (cygpath)
26008      input_path=`$CYGPATH -u "$shortmode_path"`
26009      new_path="$input_path"
26010    fi
26011  fi
26012
26013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26014  if test "x$test_cygdrive_prefix" = x; then
26015    # As a simple fix, exclude /usr/bin since it's not a real path.
26016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26018      # a path prefixed by /cygdrive for fixpath to work.
26019      new_path="$CYGWIN_ROOT_PATH$input_path"
26020    fi
26021  fi
26022
26023
26024  if test "x$path" != "x$new_path"; then
26025    BOOT_JDK="$new_path"
26026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26027$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26028  fi
26029
26030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26031
26032  path="$BOOT_JDK"
26033  has_colon=`$ECHO $path | $GREP ^.:`
26034  new_path="$path"
26035  if test "x$has_colon" = x; then
26036    # Not in mixed or Windows style, start by that.
26037    new_path=`cmd //c echo $path`
26038  fi
26039
26040
26041  input_path="$new_path"
26042  # Check if we need to convert this using DOS-style short mode. If the path
26043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26044  # take no chances and rewrite it.
26045  # Note: m4 eats our [], so we need to use [ and ] instead.
26046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26047  if test "x$has_forbidden_chars" != x; then
26048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26050  fi
26051
26052
26053  windows_path="$new_path"
26054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26055    unix_path=`$CYGPATH -u "$windows_path"`
26056    new_path="$unix_path"
26057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26059    new_path="$unix_path"
26060  fi
26061
26062  if test "x$path" != "x$new_path"; then
26063    BOOT_JDK="$new_path"
26064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26065$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26066  fi
26067
26068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26070
26071    else
26072      # We're on a unix platform. Hooray! :)
26073      path="$BOOT_JDK"
26074      has_space=`$ECHO "$path" | $GREP " "`
26075      if test "x$has_space" != x; then
26076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26079      fi
26080
26081      # Use eval to expand a potential ~
26082      eval path="$path"
26083      if test ! -f "$path" && test ! -d "$path"; then
26084        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26085      fi
26086
26087      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26088    fi
26089  fi
26090
26091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26092$as_echo_n "checking for Boot JDK... " >&6; }
26093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26094$as_echo "$BOOT_JDK" >&6; }
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26096$as_echo_n "checking Boot JDK version... " >&6; }
26097            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26099$as_echo "$BOOT_JDK_VERSION" >&6; }
26100          fi # end check jdk version
26101        fi # end check javac
26102      fi # end check java
26103    fi # end check boot jdk found
26104  fi
26105
26106
26107  if test "x$BOOT_JDK_FOUND" = xno; then
26108    # Now execute the test
26109
26110  if test "x$PROGRAMFILES" != x; then
26111    VIRTUAL_DIR="$PROGRAMFILES/Java"
26112
26113  windows_path="$VIRTUAL_DIR"
26114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26115    unix_path=`$CYGPATH -u "$windows_path"`
26116    VIRTUAL_DIR="$unix_path"
26117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26119    VIRTUAL_DIR="$unix_path"
26120  fi
26121
26122
26123  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26124  BOOT_JDK_SUFFIX=""
26125  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26126  if test "x$ALL_JDKS_FOUND" != x; then
26127    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26128
26129  if test "x$BOOT_JDK_FOUND" = xno; then
26130    # Now execute the test
26131
26132        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26133        if test -d "$BOOT_JDK"; then
26134          BOOT_JDK_FOUND=maybe
26135          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26136$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26137        fi
26138
26139
26140    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26141    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26142      # Do we have a bin/java?
26143      if test ! -x "$BOOT_JDK/bin/java"; then
26144        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26146        BOOT_JDK_FOUND=no
26147      else
26148        # Do we have a bin/javac?
26149        if test ! -x "$BOOT_JDK/bin/javac"; then
26150          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26152          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26153$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26154          BOOT_JDK_FOUND=no
26155        else
26156          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26157          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26158
26159          # Extra M4 quote needed to protect [] in grep expression.
26160          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26161          if test "x$FOUND_CORRECT_VERSION" = x; then
26162            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26164            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26165$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26166            BOOT_JDK_FOUND=no
26167          else
26168            # We're done! :-)
26169            BOOT_JDK_FOUND=yes
26170
26171  # Only process if variable expands to non-empty
26172
26173  if test "x$BOOT_JDK" != x; then
26174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26175
26176  # Input might be given as Windows format, start by converting to
26177  # unix format.
26178  path="$BOOT_JDK"
26179  new_path=`$CYGPATH -u "$path"`
26180
26181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26184  # "foo.exe" is OK but "foo" is an error.
26185  #
26186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26187  # It is also a way to make sure we got the proper file name for the real test later on.
26188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26189  if test "x$test_shortpath" = x; then
26190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26192    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26193  fi
26194
26195  # Call helper function which possibly converts this using DOS-style short mode.
26196  # If so, the updated path is stored in $new_path.
26197
26198  input_path="$new_path"
26199  # Check if we need to convert this using DOS-style short mode. If the path
26200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26201  # take no chances and rewrite it.
26202  # Note: m4 eats our [], so we need to use [ and ] instead.
26203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26204  if test "x$has_forbidden_chars" != x; then
26205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26209      # Going to short mode and back again did indeed matter. Since short mode is
26210      # case insensitive, let's make it lowercase to improve readability.
26211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26212      # Now convert it back to Unix-style (cygpath)
26213      input_path=`$CYGPATH -u "$shortmode_path"`
26214      new_path="$input_path"
26215    fi
26216  fi
26217
26218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26219  if test "x$test_cygdrive_prefix" = x; then
26220    # As a simple fix, exclude /usr/bin since it's not a real path.
26221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26223      # a path prefixed by /cygdrive for fixpath to work.
26224      new_path="$CYGWIN_ROOT_PATH$input_path"
26225    fi
26226  fi
26227
26228
26229  if test "x$path" != "x$new_path"; then
26230    BOOT_JDK="$new_path"
26231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26232$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26233  fi
26234
26235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26236
26237  path="$BOOT_JDK"
26238  has_colon=`$ECHO $path | $GREP ^.:`
26239  new_path="$path"
26240  if test "x$has_colon" = x; then
26241    # Not in mixed or Windows style, start by that.
26242    new_path=`cmd //c echo $path`
26243  fi
26244
26245
26246  input_path="$new_path"
26247  # Check if we need to convert this using DOS-style short mode. If the path
26248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26249  # take no chances and rewrite it.
26250  # Note: m4 eats our [], so we need to use [ and ] instead.
26251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26252  if test "x$has_forbidden_chars" != x; then
26253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26255  fi
26256
26257
26258  windows_path="$new_path"
26259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26260    unix_path=`$CYGPATH -u "$windows_path"`
26261    new_path="$unix_path"
26262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26264    new_path="$unix_path"
26265  fi
26266
26267  if test "x$path" != "x$new_path"; then
26268    BOOT_JDK="$new_path"
26269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26271  fi
26272
26273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26275
26276    else
26277      # We're on a unix platform. Hooray! :)
26278      path="$BOOT_JDK"
26279      has_space=`$ECHO "$path" | $GREP " "`
26280      if test "x$has_space" != x; then
26281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26282$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26284      fi
26285
26286      # Use eval to expand a potential ~
26287      eval path="$path"
26288      if test ! -f "$path" && test ! -d "$path"; then
26289        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26290      fi
26291
26292      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26293    fi
26294  fi
26295
26296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26297$as_echo_n "checking for Boot JDK... " >&6; }
26298            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26299$as_echo "$BOOT_JDK" >&6; }
26300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26301$as_echo_n "checking Boot JDK version... " >&6; }
26302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26304$as_echo "$BOOT_JDK_VERSION" >&6; }
26305          fi # end check jdk version
26306        fi # end check javac
26307      fi # end check java
26308    fi # end check boot jdk found
26309  fi
26310
26311    done
26312  fi
26313
26314  fi
26315
26316
26317    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26318    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26319      # Do we have a bin/java?
26320      if test ! -x "$BOOT_JDK/bin/java"; then
26321        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26323        BOOT_JDK_FOUND=no
26324      else
26325        # Do we have a bin/javac?
26326        if test ! -x "$BOOT_JDK/bin/javac"; then
26327          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26329          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26330$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26331          BOOT_JDK_FOUND=no
26332        else
26333          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26334          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26335
26336          # Extra M4 quote needed to protect [] in grep expression.
26337          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26338          if test "x$FOUND_CORRECT_VERSION" = x; then
26339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26341            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26342$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26343            BOOT_JDK_FOUND=no
26344          else
26345            # We're done! :-)
26346            BOOT_JDK_FOUND=yes
26347
26348  # Only process if variable expands to non-empty
26349
26350  if test "x$BOOT_JDK" != x; then
26351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26352
26353  # Input might be given as Windows format, start by converting to
26354  # unix format.
26355  path="$BOOT_JDK"
26356  new_path=`$CYGPATH -u "$path"`
26357
26358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26361  # "foo.exe" is OK but "foo" is an error.
26362  #
26363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26364  # It is also a way to make sure we got the proper file name for the real test later on.
26365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26366  if test "x$test_shortpath" = x; then
26367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26370  fi
26371
26372  # Call helper function which possibly converts this using DOS-style short mode.
26373  # If so, the updated path is stored in $new_path.
26374
26375  input_path="$new_path"
26376  # Check if we need to convert this using DOS-style short mode. If the path
26377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26378  # take no chances and rewrite it.
26379  # Note: m4 eats our [], so we need to use [ and ] instead.
26380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26381  if test "x$has_forbidden_chars" != x; then
26382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26386      # Going to short mode and back again did indeed matter. Since short mode is
26387      # case insensitive, let's make it lowercase to improve readability.
26388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26389      # Now convert it back to Unix-style (cygpath)
26390      input_path=`$CYGPATH -u "$shortmode_path"`
26391      new_path="$input_path"
26392    fi
26393  fi
26394
26395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26396  if test "x$test_cygdrive_prefix" = x; then
26397    # As a simple fix, exclude /usr/bin since it's not a real path.
26398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26400      # a path prefixed by /cygdrive for fixpath to work.
26401      new_path="$CYGWIN_ROOT_PATH$input_path"
26402    fi
26403  fi
26404
26405
26406  if test "x$path" != "x$new_path"; then
26407    BOOT_JDK="$new_path"
26408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26410  fi
26411
26412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26413
26414  path="$BOOT_JDK"
26415  has_colon=`$ECHO $path | $GREP ^.:`
26416  new_path="$path"
26417  if test "x$has_colon" = x; then
26418    # Not in mixed or Windows style, start by that.
26419    new_path=`cmd //c echo $path`
26420  fi
26421
26422
26423  input_path="$new_path"
26424  # Check if we need to convert this using DOS-style short mode. If the path
26425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26426  # take no chances and rewrite it.
26427  # Note: m4 eats our [], so we need to use [ and ] instead.
26428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26429  if test "x$has_forbidden_chars" != x; then
26430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26432  fi
26433
26434
26435  windows_path="$new_path"
26436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26437    unix_path=`$CYGPATH -u "$windows_path"`
26438    new_path="$unix_path"
26439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26441    new_path="$unix_path"
26442  fi
26443
26444  if test "x$path" != "x$new_path"; then
26445    BOOT_JDK="$new_path"
26446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26448  fi
26449
26450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26452
26453    else
26454      # We're on a unix platform. Hooray! :)
26455      path="$BOOT_JDK"
26456      has_space=`$ECHO "$path" | $GREP " "`
26457      if test "x$has_space" != x; then
26458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26461      fi
26462
26463      # Use eval to expand a potential ~
26464      eval path="$path"
26465      if test ! -f "$path" && test ! -d "$path"; then
26466        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26467      fi
26468
26469      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26470    fi
26471  fi
26472
26473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26474$as_echo_n "checking for Boot JDK... " >&6; }
26475            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26476$as_echo "$BOOT_JDK" >&6; }
26477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26478$as_echo_n "checking Boot JDK version... " >&6; }
26479            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26481$as_echo "$BOOT_JDK_VERSION" >&6; }
26482          fi # end check jdk version
26483        fi # end check javac
26484      fi # end check java
26485    fi # end check boot jdk found
26486  fi
26487
26488
26489  if test "x$BOOT_JDK_FOUND" = xno; then
26490    # Now execute the test
26491
26492  if test "x$ProgramFiles" != x; then
26493    VIRTUAL_DIR="$ProgramFiles/Java"
26494
26495  windows_path="$VIRTUAL_DIR"
26496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26497    unix_path=`$CYGPATH -u "$windows_path"`
26498    VIRTUAL_DIR="$unix_path"
26499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26501    VIRTUAL_DIR="$unix_path"
26502  fi
26503
26504
26505  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26506  BOOT_JDK_SUFFIX=""
26507  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26508  if test "x$ALL_JDKS_FOUND" != x; then
26509    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26510
26511  if test "x$BOOT_JDK_FOUND" = xno; then
26512    # Now execute the test
26513
26514        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26515        if test -d "$BOOT_JDK"; then
26516          BOOT_JDK_FOUND=maybe
26517          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26518$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26519        fi
26520
26521
26522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26524      # Do we have a bin/java?
26525      if test ! -x "$BOOT_JDK/bin/java"; then
26526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26528        BOOT_JDK_FOUND=no
26529      else
26530        # Do we have a bin/javac?
26531        if test ! -x "$BOOT_JDK/bin/javac"; then
26532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26536          BOOT_JDK_FOUND=no
26537        else
26538          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26539          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26540
26541          # Extra M4 quote needed to protect [] in grep expression.
26542          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26543          if test "x$FOUND_CORRECT_VERSION" = x; then
26544            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26546            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26547$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26548            BOOT_JDK_FOUND=no
26549          else
26550            # We're done! :-)
26551            BOOT_JDK_FOUND=yes
26552
26553  # Only process if variable expands to non-empty
26554
26555  if test "x$BOOT_JDK" != x; then
26556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26557
26558  # Input might be given as Windows format, start by converting to
26559  # unix format.
26560  path="$BOOT_JDK"
26561  new_path=`$CYGPATH -u "$path"`
26562
26563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26566  # "foo.exe" is OK but "foo" is an error.
26567  #
26568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26569  # It is also a way to make sure we got the proper file name for the real test later on.
26570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26571  if test "x$test_shortpath" = x; then
26572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26574    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26575  fi
26576
26577  # Call helper function which possibly converts this using DOS-style short mode.
26578  # If so, the updated path is stored in $new_path.
26579
26580  input_path="$new_path"
26581  # Check if we need to convert this using DOS-style short mode. If the path
26582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26583  # take no chances and rewrite it.
26584  # Note: m4 eats our [], so we need to use [ and ] instead.
26585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26586  if test "x$has_forbidden_chars" != x; then
26587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26591      # Going to short mode and back again did indeed matter. Since short mode is
26592      # case insensitive, let's make it lowercase to improve readability.
26593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26594      # Now convert it back to Unix-style (cygpath)
26595      input_path=`$CYGPATH -u "$shortmode_path"`
26596      new_path="$input_path"
26597    fi
26598  fi
26599
26600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26601  if test "x$test_cygdrive_prefix" = x; then
26602    # As a simple fix, exclude /usr/bin since it's not a real path.
26603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26605      # a path prefixed by /cygdrive for fixpath to work.
26606      new_path="$CYGWIN_ROOT_PATH$input_path"
26607    fi
26608  fi
26609
26610
26611  if test "x$path" != "x$new_path"; then
26612    BOOT_JDK="$new_path"
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26615  fi
26616
26617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26618
26619  path="$BOOT_JDK"
26620  has_colon=`$ECHO $path | $GREP ^.:`
26621  new_path="$path"
26622  if test "x$has_colon" = x; then
26623    # Not in mixed or Windows style, start by that.
26624    new_path=`cmd //c echo $path`
26625  fi
26626
26627
26628  input_path="$new_path"
26629  # Check if we need to convert this using DOS-style short mode. If the path
26630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26631  # take no chances and rewrite it.
26632  # Note: m4 eats our [], so we need to use [ and ] instead.
26633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26634  if test "x$has_forbidden_chars" != x; then
26635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26637  fi
26638
26639
26640  windows_path="$new_path"
26641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26642    unix_path=`$CYGPATH -u "$windows_path"`
26643    new_path="$unix_path"
26644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26646    new_path="$unix_path"
26647  fi
26648
26649  if test "x$path" != "x$new_path"; then
26650    BOOT_JDK="$new_path"
26651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26653  fi
26654
26655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26657
26658    else
26659      # We're on a unix platform. Hooray! :)
26660      path="$BOOT_JDK"
26661      has_space=`$ECHO "$path" | $GREP " "`
26662      if test "x$has_space" != x; then
26663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26665        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26666      fi
26667
26668      # Use eval to expand a potential ~
26669      eval path="$path"
26670      if test ! -f "$path" && test ! -d "$path"; then
26671        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26672      fi
26673
26674      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26675    fi
26676  fi
26677
26678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26679$as_echo_n "checking for Boot JDK... " >&6; }
26680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26681$as_echo "$BOOT_JDK" >&6; }
26682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26683$as_echo_n "checking Boot JDK version... " >&6; }
26684            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26686$as_echo "$BOOT_JDK_VERSION" >&6; }
26687          fi # end check jdk version
26688        fi # end check javac
26689      fi # end check java
26690    fi # end check boot jdk found
26691  fi
26692
26693    done
26694  fi
26695
26696  fi
26697
26698
26699    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26700    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26701      # Do we have a bin/java?
26702      if test ! -x "$BOOT_JDK/bin/java"; then
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26705        BOOT_JDK_FOUND=no
26706      else
26707        # Do we have a bin/javac?
26708        if test ! -x "$BOOT_JDK/bin/javac"; then
26709          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26711          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26712$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26713          BOOT_JDK_FOUND=no
26714        else
26715          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26716          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26717
26718          # Extra M4 quote needed to protect [] in grep expression.
26719          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26720          if test "x$FOUND_CORRECT_VERSION" = x; then
26721            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26723            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26724$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26725            BOOT_JDK_FOUND=no
26726          else
26727            # We're done! :-)
26728            BOOT_JDK_FOUND=yes
26729
26730  # Only process if variable expands to non-empty
26731
26732  if test "x$BOOT_JDK" != x; then
26733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26734
26735  # Input might be given as Windows format, start by converting to
26736  # unix format.
26737  path="$BOOT_JDK"
26738  new_path=`$CYGPATH -u "$path"`
26739
26740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26743  # "foo.exe" is OK but "foo" is an error.
26744  #
26745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26746  # It is also a way to make sure we got the proper file name for the real test later on.
26747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26748  if test "x$test_shortpath" = x; then
26749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26751    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26752  fi
26753
26754  # Call helper function which possibly converts this using DOS-style short mode.
26755  # If so, the updated path is stored in $new_path.
26756
26757  input_path="$new_path"
26758  # Check if we need to convert this using DOS-style short mode. If the path
26759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26760  # take no chances and rewrite it.
26761  # Note: m4 eats our [], so we need to use [ and ] instead.
26762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26763  if test "x$has_forbidden_chars" != x; then
26764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26768      # Going to short mode and back again did indeed matter. Since short mode is
26769      # case insensitive, let's make it lowercase to improve readability.
26770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26771      # Now convert it back to Unix-style (cygpath)
26772      input_path=`$CYGPATH -u "$shortmode_path"`
26773      new_path="$input_path"
26774    fi
26775  fi
26776
26777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26778  if test "x$test_cygdrive_prefix" = x; then
26779    # As a simple fix, exclude /usr/bin since it's not a real path.
26780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26782      # a path prefixed by /cygdrive for fixpath to work.
26783      new_path="$CYGWIN_ROOT_PATH$input_path"
26784    fi
26785  fi
26786
26787
26788  if test "x$path" != "x$new_path"; then
26789    BOOT_JDK="$new_path"
26790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26791$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26792  fi
26793
26794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795
26796  path="$BOOT_JDK"
26797  has_colon=`$ECHO $path | $GREP ^.:`
26798  new_path="$path"
26799  if test "x$has_colon" = x; then
26800    # Not in mixed or Windows style, start by that.
26801    new_path=`cmd //c echo $path`
26802  fi
26803
26804
26805  input_path="$new_path"
26806  # Check if we need to convert this using DOS-style short mode. If the path
26807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26808  # take no chances and rewrite it.
26809  # Note: m4 eats our [], so we need to use [ and ] instead.
26810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26811  if test "x$has_forbidden_chars" != x; then
26812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26814  fi
26815
26816
26817  windows_path="$new_path"
26818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26819    unix_path=`$CYGPATH -u "$windows_path"`
26820    new_path="$unix_path"
26821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26823    new_path="$unix_path"
26824  fi
26825
26826  if test "x$path" != "x$new_path"; then
26827    BOOT_JDK="$new_path"
26828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26830  fi
26831
26832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26834
26835    else
26836      # We're on a unix platform. Hooray! :)
26837      path="$BOOT_JDK"
26838      has_space=`$ECHO "$path" | $GREP " "`
26839      if test "x$has_space" != x; then
26840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26843      fi
26844
26845      # Use eval to expand a potential ~
26846      eval path="$path"
26847      if test ! -f "$path" && test ! -d "$path"; then
26848        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26849      fi
26850
26851      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26852    fi
26853  fi
26854
26855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26856$as_echo_n "checking for Boot JDK... " >&6; }
26857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26858$as_echo "$BOOT_JDK" >&6; }
26859            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26860$as_echo_n "checking Boot JDK version... " >&6; }
26861            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26863$as_echo "$BOOT_JDK_VERSION" >&6; }
26864          fi # end check jdk version
26865        fi # end check javac
26866      fi # end check java
26867    fi # end check boot jdk found
26868  fi
26869
26870
26871  if test "x$BOOT_JDK_FOUND" = xno; then
26872    # Now execute the test
26873
26874  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26875  BOOT_JDK_SUFFIX=""
26876  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26877  if test "x$ALL_JDKS_FOUND" != x; then
26878    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26879
26880  if test "x$BOOT_JDK_FOUND" = xno; then
26881    # Now execute the test
26882
26883        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26884        if test -d "$BOOT_JDK"; then
26885          BOOT_JDK_FOUND=maybe
26886          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26887$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26888        fi
26889
26890
26891    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26892    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26893      # Do we have a bin/java?
26894      if test ! -x "$BOOT_JDK/bin/java"; then
26895        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26897        BOOT_JDK_FOUND=no
26898      else
26899        # Do we have a bin/javac?
26900        if test ! -x "$BOOT_JDK/bin/javac"; then
26901          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26903          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26904$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26905          BOOT_JDK_FOUND=no
26906        else
26907          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26908          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26909
26910          # Extra M4 quote needed to protect [] in grep expression.
26911          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26912          if test "x$FOUND_CORRECT_VERSION" = x; then
26913            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26914$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26915            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26916$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26917            BOOT_JDK_FOUND=no
26918          else
26919            # We're done! :-)
26920            BOOT_JDK_FOUND=yes
26921
26922  # Only process if variable expands to non-empty
26923
26924  if test "x$BOOT_JDK" != x; then
26925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26926
26927  # Input might be given as Windows format, start by converting to
26928  # unix format.
26929  path="$BOOT_JDK"
26930  new_path=`$CYGPATH -u "$path"`
26931
26932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26935  # "foo.exe" is OK but "foo" is an error.
26936  #
26937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26938  # It is also a way to make sure we got the proper file name for the real test later on.
26939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26940  if test "x$test_shortpath" = x; then
26941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26943    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26944  fi
26945
26946  # Call helper function which possibly converts this using DOS-style short mode.
26947  # If so, the updated path is stored in $new_path.
26948
26949  input_path="$new_path"
26950  # Check if we need to convert this using DOS-style short mode. If the path
26951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26952  # take no chances and rewrite it.
26953  # Note: m4 eats our [], so we need to use [ and ] instead.
26954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26955  if test "x$has_forbidden_chars" != x; then
26956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26960      # Going to short mode and back again did indeed matter. Since short mode is
26961      # case insensitive, let's make it lowercase to improve readability.
26962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26963      # Now convert it back to Unix-style (cygpath)
26964      input_path=`$CYGPATH -u "$shortmode_path"`
26965      new_path="$input_path"
26966    fi
26967  fi
26968
26969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26970  if test "x$test_cygdrive_prefix" = x; then
26971    # As a simple fix, exclude /usr/bin since it's not a real path.
26972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26974      # a path prefixed by /cygdrive for fixpath to work.
26975      new_path="$CYGWIN_ROOT_PATH$input_path"
26976    fi
26977  fi
26978
26979
26980  if test "x$path" != "x$new_path"; then
26981    BOOT_JDK="$new_path"
26982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26983$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26984  fi
26985
26986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26987
26988  path="$BOOT_JDK"
26989  has_colon=`$ECHO $path | $GREP ^.:`
26990  new_path="$path"
26991  if test "x$has_colon" = x; then
26992    # Not in mixed or Windows style, start by that.
26993    new_path=`cmd //c echo $path`
26994  fi
26995
26996
26997  input_path="$new_path"
26998  # Check if we need to convert this using DOS-style short mode. If the path
26999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27000  # take no chances and rewrite it.
27001  # Note: m4 eats our [], so we need to use [ and ] instead.
27002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27003  if test "x$has_forbidden_chars" != x; then
27004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27006  fi
27007
27008
27009  windows_path="$new_path"
27010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27011    unix_path=`$CYGPATH -u "$windows_path"`
27012    new_path="$unix_path"
27013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27015    new_path="$unix_path"
27016  fi
27017
27018  if test "x$path" != "x$new_path"; then
27019    BOOT_JDK="$new_path"
27020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27021$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27022  fi
27023
27024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27026
27027    else
27028      # We're on a unix platform. Hooray! :)
27029      path="$BOOT_JDK"
27030      has_space=`$ECHO "$path" | $GREP " "`
27031      if test "x$has_space" != x; then
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27034        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27035      fi
27036
27037      # Use eval to expand a potential ~
27038      eval path="$path"
27039      if test ! -f "$path" && test ! -d "$path"; then
27040        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27041      fi
27042
27043      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27044    fi
27045  fi
27046
27047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27048$as_echo_n "checking for Boot JDK... " >&6; }
27049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27050$as_echo "$BOOT_JDK" >&6; }
27051            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27052$as_echo_n "checking Boot JDK version... " >&6; }
27053            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27055$as_echo "$BOOT_JDK_VERSION" >&6; }
27056          fi # end check jdk version
27057        fi # end check javac
27058      fi # end check java
27059    fi # end check boot jdk found
27060  fi
27061
27062    done
27063  fi
27064
27065
27066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27068      # Do we have a bin/java?
27069      if test ! -x "$BOOT_JDK/bin/java"; then
27070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27072        BOOT_JDK_FOUND=no
27073      else
27074        # Do we have a bin/javac?
27075        if test ! -x "$BOOT_JDK/bin/javac"; then
27076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27080          BOOT_JDK_FOUND=no
27081        else
27082          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27083          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27084
27085          # Extra M4 quote needed to protect [] in grep expression.
27086          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27087          if test "x$FOUND_CORRECT_VERSION" = x; then
27088            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27090            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27091$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27092            BOOT_JDK_FOUND=no
27093          else
27094            # We're done! :-)
27095            BOOT_JDK_FOUND=yes
27096
27097  # Only process if variable expands to non-empty
27098
27099  if test "x$BOOT_JDK" != x; then
27100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27101
27102  # Input might be given as Windows format, start by converting to
27103  # unix format.
27104  path="$BOOT_JDK"
27105  new_path=`$CYGPATH -u "$path"`
27106
27107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27110  # "foo.exe" is OK but "foo" is an error.
27111  #
27112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27113  # It is also a way to make sure we got the proper file name for the real test later on.
27114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27115  if test "x$test_shortpath" = x; then
27116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27119  fi
27120
27121  # Call helper function which possibly converts this using DOS-style short mode.
27122  # If so, the updated path is stored in $new_path.
27123
27124  input_path="$new_path"
27125  # Check if we need to convert this using DOS-style short mode. If the path
27126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27127  # take no chances and rewrite it.
27128  # Note: m4 eats our [], so we need to use [ and ] instead.
27129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27130  if test "x$has_forbidden_chars" != x; then
27131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27135      # Going to short mode and back again did indeed matter. Since short mode is
27136      # case insensitive, let's make it lowercase to improve readability.
27137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27138      # Now convert it back to Unix-style (cygpath)
27139      input_path=`$CYGPATH -u "$shortmode_path"`
27140      new_path="$input_path"
27141    fi
27142  fi
27143
27144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27145  if test "x$test_cygdrive_prefix" = x; then
27146    # As a simple fix, exclude /usr/bin since it's not a real path.
27147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27149      # a path prefixed by /cygdrive for fixpath to work.
27150      new_path="$CYGWIN_ROOT_PATH$input_path"
27151    fi
27152  fi
27153
27154
27155  if test "x$path" != "x$new_path"; then
27156    BOOT_JDK="$new_path"
27157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27159  fi
27160
27161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27162
27163  path="$BOOT_JDK"
27164  has_colon=`$ECHO $path | $GREP ^.:`
27165  new_path="$path"
27166  if test "x$has_colon" = x; then
27167    # Not in mixed or Windows style, start by that.
27168    new_path=`cmd //c echo $path`
27169  fi
27170
27171
27172  input_path="$new_path"
27173  # Check if we need to convert this using DOS-style short mode. If the path
27174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27175  # take no chances and rewrite it.
27176  # Note: m4 eats our [], so we need to use [ and ] instead.
27177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27178  if test "x$has_forbidden_chars" != x; then
27179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27181  fi
27182
27183
27184  windows_path="$new_path"
27185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27186    unix_path=`$CYGPATH -u "$windows_path"`
27187    new_path="$unix_path"
27188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27190    new_path="$unix_path"
27191  fi
27192
27193  if test "x$path" != "x$new_path"; then
27194    BOOT_JDK="$new_path"
27195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27197  fi
27198
27199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27201
27202    else
27203      # We're on a unix platform. Hooray! :)
27204      path="$BOOT_JDK"
27205      has_space=`$ECHO "$path" | $GREP " "`
27206      if test "x$has_space" != x; then
27207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27210      fi
27211
27212      # Use eval to expand a potential ~
27213      eval path="$path"
27214      if test ! -f "$path" && test ! -d "$path"; then
27215        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27216      fi
27217
27218      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27219    fi
27220  fi
27221
27222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27223$as_echo_n "checking for Boot JDK... " >&6; }
27224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27225$as_echo "$BOOT_JDK" >&6; }
27226            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27227$as_echo_n "checking Boot JDK version... " >&6; }
27228            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27230$as_echo "$BOOT_JDK_VERSION" >&6; }
27231          fi # end check jdk version
27232        fi # end check javac
27233      fi # end check java
27234    fi # end check boot jdk found
27235  fi
27236
27237  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27238
27239  if test "x$BOOT_JDK_FOUND" = xno; then
27240    # Now execute the test
27241
27242  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27243  BOOT_JDK_SUFFIX="/Contents/Home"
27244  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27245  if test "x$ALL_JDKS_FOUND" != x; then
27246    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27247
27248  if test "x$BOOT_JDK_FOUND" = xno; then
27249    # Now execute the test
27250
27251        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27252        if test -d "$BOOT_JDK"; then
27253          BOOT_JDK_FOUND=maybe
27254          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27255$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27256        fi
27257
27258
27259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27261      # Do we have a bin/java?
27262      if test ! -x "$BOOT_JDK/bin/java"; then
27263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27265        BOOT_JDK_FOUND=no
27266      else
27267        # Do we have a bin/javac?
27268        if test ! -x "$BOOT_JDK/bin/javac"; then
27269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27273          BOOT_JDK_FOUND=no
27274        else
27275          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27276          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27277
27278          # Extra M4 quote needed to protect [] in grep expression.
27279          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27280          if test "x$FOUND_CORRECT_VERSION" = x; then
27281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27283            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27284$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27285            BOOT_JDK_FOUND=no
27286          else
27287            # We're done! :-)
27288            BOOT_JDK_FOUND=yes
27289
27290  # Only process if variable expands to non-empty
27291
27292  if test "x$BOOT_JDK" != x; then
27293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27294
27295  # Input might be given as Windows format, start by converting to
27296  # unix format.
27297  path="$BOOT_JDK"
27298  new_path=`$CYGPATH -u "$path"`
27299
27300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27303  # "foo.exe" is OK but "foo" is an error.
27304  #
27305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27306  # It is also a way to make sure we got the proper file name for the real test later on.
27307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27308  if test "x$test_shortpath" = x; then
27309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27311    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27312  fi
27313
27314  # Call helper function which possibly converts this using DOS-style short mode.
27315  # If so, the updated path is stored in $new_path.
27316
27317  input_path="$new_path"
27318  # Check if we need to convert this using DOS-style short mode. If the path
27319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27320  # take no chances and rewrite it.
27321  # Note: m4 eats our [], so we need to use [ and ] instead.
27322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27323  if test "x$has_forbidden_chars" != x; then
27324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27328      # Going to short mode and back again did indeed matter. Since short mode is
27329      # case insensitive, let's make it lowercase to improve readability.
27330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27331      # Now convert it back to Unix-style (cygpath)
27332      input_path=`$CYGPATH -u "$shortmode_path"`
27333      new_path="$input_path"
27334    fi
27335  fi
27336
27337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27338  if test "x$test_cygdrive_prefix" = x; then
27339    # As a simple fix, exclude /usr/bin since it's not a real path.
27340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27342      # a path prefixed by /cygdrive for fixpath to work.
27343      new_path="$CYGWIN_ROOT_PATH$input_path"
27344    fi
27345  fi
27346
27347
27348  if test "x$path" != "x$new_path"; then
27349    BOOT_JDK="$new_path"
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27352  fi
27353
27354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27355
27356  path="$BOOT_JDK"
27357  has_colon=`$ECHO $path | $GREP ^.:`
27358  new_path="$path"
27359  if test "x$has_colon" = x; then
27360    # Not in mixed or Windows style, start by that.
27361    new_path=`cmd //c echo $path`
27362  fi
27363
27364
27365  input_path="$new_path"
27366  # Check if we need to convert this using DOS-style short mode. If the path
27367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27368  # take no chances and rewrite it.
27369  # Note: m4 eats our [], so we need to use [ and ] instead.
27370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27371  if test "x$has_forbidden_chars" != x; then
27372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27374  fi
27375
27376
27377  windows_path="$new_path"
27378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27379    unix_path=`$CYGPATH -u "$windows_path"`
27380    new_path="$unix_path"
27381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27383    new_path="$unix_path"
27384  fi
27385
27386  if test "x$path" != "x$new_path"; then
27387    BOOT_JDK="$new_path"
27388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27390  fi
27391
27392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27394
27395    else
27396      # We're on a unix platform. Hooray! :)
27397      path="$BOOT_JDK"
27398      has_space=`$ECHO "$path" | $GREP " "`
27399      if test "x$has_space" != x; then
27400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27403      fi
27404
27405      # Use eval to expand a potential ~
27406      eval path="$path"
27407      if test ! -f "$path" && test ! -d "$path"; then
27408        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27409      fi
27410
27411      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27412    fi
27413  fi
27414
27415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27416$as_echo_n "checking for Boot JDK... " >&6; }
27417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27418$as_echo "$BOOT_JDK" >&6; }
27419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27420$as_echo_n "checking Boot JDK version... " >&6; }
27421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27423$as_echo "$BOOT_JDK_VERSION" >&6; }
27424          fi # end check jdk version
27425        fi # end check javac
27426      fi # end check java
27427    fi # end check boot jdk found
27428  fi
27429
27430    done
27431  fi
27432
27433
27434    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27435    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27436      # Do we have a bin/java?
27437      if test ! -x "$BOOT_JDK/bin/java"; then
27438        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27440        BOOT_JDK_FOUND=no
27441      else
27442        # Do we have a bin/javac?
27443        if test ! -x "$BOOT_JDK/bin/javac"; then
27444          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27446          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27447$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27448          BOOT_JDK_FOUND=no
27449        else
27450          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27451          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27452
27453          # Extra M4 quote needed to protect [] in grep expression.
27454          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27455          if test "x$FOUND_CORRECT_VERSION" = x; then
27456            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27458            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27459$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27460            BOOT_JDK_FOUND=no
27461          else
27462            # We're done! :-)
27463            BOOT_JDK_FOUND=yes
27464
27465  # Only process if variable expands to non-empty
27466
27467  if test "x$BOOT_JDK" != x; then
27468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27469
27470  # Input might be given as Windows format, start by converting to
27471  # unix format.
27472  path="$BOOT_JDK"
27473  new_path=`$CYGPATH -u "$path"`
27474
27475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27478  # "foo.exe" is OK but "foo" is an error.
27479  #
27480  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27481  # It is also a way to make sure we got the proper file name for the real test later on.
27482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27483  if test "x$test_shortpath" = x; then
27484    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27486    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27487  fi
27488
27489  # Call helper function which possibly converts this using DOS-style short mode.
27490  # If so, the updated path is stored in $new_path.
27491
27492  input_path="$new_path"
27493  # Check if we need to convert this using DOS-style short mode. If the path
27494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27495  # take no chances and rewrite it.
27496  # Note: m4 eats our [], so we need to use [ and ] instead.
27497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27498  if test "x$has_forbidden_chars" != x; then
27499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27500    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27501    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27502    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27503      # Going to short mode and back again did indeed matter. Since short mode is
27504      # case insensitive, let's make it lowercase to improve readability.
27505      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27506      # Now convert it back to Unix-style (cygpath)
27507      input_path=`$CYGPATH -u "$shortmode_path"`
27508      new_path="$input_path"
27509    fi
27510  fi
27511
27512  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27513  if test "x$test_cygdrive_prefix" = x; then
27514    # As a simple fix, exclude /usr/bin since it's not a real path.
27515    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27516      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27517      # a path prefixed by /cygdrive for fixpath to work.
27518      new_path="$CYGWIN_ROOT_PATH$input_path"
27519    fi
27520  fi
27521
27522
27523  if test "x$path" != "x$new_path"; then
27524    BOOT_JDK="$new_path"
27525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27526$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27527  fi
27528
27529    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27530
27531  path="$BOOT_JDK"
27532  has_colon=`$ECHO $path | $GREP ^.:`
27533  new_path="$path"
27534  if test "x$has_colon" = x; then
27535    # Not in mixed or Windows style, start by that.
27536    new_path=`cmd //c echo $path`
27537  fi
27538
27539
27540  input_path="$new_path"
27541  # Check if we need to convert this using DOS-style short mode. If the path
27542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27543  # take no chances and rewrite it.
27544  # Note: m4 eats our [], so we need to use [ and ] instead.
27545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27546  if test "x$has_forbidden_chars" != x; then
27547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27549  fi
27550
27551
27552  windows_path="$new_path"
27553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27554    unix_path=`$CYGPATH -u "$windows_path"`
27555    new_path="$unix_path"
27556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27558    new_path="$unix_path"
27559  fi
27560
27561  if test "x$path" != "x$new_path"; then
27562    BOOT_JDK="$new_path"
27563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27565  fi
27566
27567  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27568  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27569
27570    else
27571      # We're on a unix platform. Hooray! :)
27572      path="$BOOT_JDK"
27573      has_space=`$ECHO "$path" | $GREP " "`
27574      if test "x$has_space" != x; then
27575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27576$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27577        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27578      fi
27579
27580      # Use eval to expand a potential ~
27581      eval path="$path"
27582      if test ! -f "$path" && test ! -d "$path"; then
27583        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27584      fi
27585
27586      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27587    fi
27588  fi
27589
27590            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27591$as_echo_n "checking for Boot JDK... " >&6; }
27592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27593$as_echo "$BOOT_JDK" >&6; }
27594            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27595$as_echo_n "checking Boot JDK version... " >&6; }
27596            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27598$as_echo "$BOOT_JDK_VERSION" >&6; }
27599          fi # end check jdk version
27600        fi # end check javac
27601      fi # end check java
27602    fi # end check boot jdk found
27603  fi
27604
27605
27606  if test "x$BOOT_JDK_FOUND" = xno; then
27607    # Now execute the test
27608
27609  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27610  BOOT_JDK_SUFFIX="/Contents/Home"
27611  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27612  if test "x$ALL_JDKS_FOUND" != x; then
27613    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27614
27615  if test "x$BOOT_JDK_FOUND" = xno; then
27616    # Now execute the test
27617
27618        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27619        if test -d "$BOOT_JDK"; then
27620          BOOT_JDK_FOUND=maybe
27621          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27622$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27623        fi
27624
27625
27626    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27627    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27628      # Do we have a bin/java?
27629      if test ! -x "$BOOT_JDK/bin/java"; then
27630        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27632        BOOT_JDK_FOUND=no
27633      else
27634        # Do we have a bin/javac?
27635        if test ! -x "$BOOT_JDK/bin/javac"; then
27636          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27638          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27639$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27640          BOOT_JDK_FOUND=no
27641        else
27642          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27643          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27644
27645          # Extra M4 quote needed to protect [] in grep expression.
27646          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27647          if test "x$FOUND_CORRECT_VERSION" = x; then
27648            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27650            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27651$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27652            BOOT_JDK_FOUND=no
27653          else
27654            # We're done! :-)
27655            BOOT_JDK_FOUND=yes
27656
27657  # Only process if variable expands to non-empty
27658
27659  if test "x$BOOT_JDK" != x; then
27660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27661
27662  # Input might be given as Windows format, start by converting to
27663  # unix format.
27664  path="$BOOT_JDK"
27665  new_path=`$CYGPATH -u "$path"`
27666
27667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27670  # "foo.exe" is OK but "foo" is an error.
27671  #
27672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27673  # It is also a way to make sure we got the proper file name for the real test later on.
27674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27675  if test "x$test_shortpath" = x; then
27676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27677$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27678    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27679  fi
27680
27681  # Call helper function which possibly converts this using DOS-style short mode.
27682  # If so, the updated path is stored in $new_path.
27683
27684  input_path="$new_path"
27685  # Check if we need to convert this using DOS-style short mode. If the path
27686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27687  # take no chances and rewrite it.
27688  # Note: m4 eats our [], so we need to use [ and ] instead.
27689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27690  if test "x$has_forbidden_chars" != x; then
27691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27695      # Going to short mode and back again did indeed matter. Since short mode is
27696      # case insensitive, let's make it lowercase to improve readability.
27697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27698      # Now convert it back to Unix-style (cygpath)
27699      input_path=`$CYGPATH -u "$shortmode_path"`
27700      new_path="$input_path"
27701    fi
27702  fi
27703
27704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27705  if test "x$test_cygdrive_prefix" = x; then
27706    # As a simple fix, exclude /usr/bin since it's not a real path.
27707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27709      # a path prefixed by /cygdrive for fixpath to work.
27710      new_path="$CYGWIN_ROOT_PATH$input_path"
27711    fi
27712  fi
27713
27714
27715  if test "x$path" != "x$new_path"; then
27716    BOOT_JDK="$new_path"
27717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27719  fi
27720
27721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27722
27723  path="$BOOT_JDK"
27724  has_colon=`$ECHO $path | $GREP ^.:`
27725  new_path="$path"
27726  if test "x$has_colon" = x; then
27727    # Not in mixed or Windows style, start by that.
27728    new_path=`cmd //c echo $path`
27729  fi
27730
27731
27732  input_path="$new_path"
27733  # Check if we need to convert this using DOS-style short mode. If the path
27734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27735  # take no chances and rewrite it.
27736  # Note: m4 eats our [], so we need to use [ and ] instead.
27737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27738  if test "x$has_forbidden_chars" != x; then
27739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27741  fi
27742
27743
27744  windows_path="$new_path"
27745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27746    unix_path=`$CYGPATH -u "$windows_path"`
27747    new_path="$unix_path"
27748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27750    new_path="$unix_path"
27751  fi
27752
27753  if test "x$path" != "x$new_path"; then
27754    BOOT_JDK="$new_path"
27755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27757  fi
27758
27759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27761
27762    else
27763      # We're on a unix platform. Hooray! :)
27764      path="$BOOT_JDK"
27765      has_space=`$ECHO "$path" | $GREP " "`
27766      if test "x$has_space" != x; then
27767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27770      fi
27771
27772      # Use eval to expand a potential ~
27773      eval path="$path"
27774      if test ! -f "$path" && test ! -d "$path"; then
27775        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27776      fi
27777
27778      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27779    fi
27780  fi
27781
27782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27783$as_echo_n "checking for Boot JDK... " >&6; }
27784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27785$as_echo "$BOOT_JDK" >&6; }
27786            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27787$as_echo_n "checking Boot JDK version... " >&6; }
27788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27790$as_echo "$BOOT_JDK_VERSION" >&6; }
27791          fi # end check jdk version
27792        fi # end check javac
27793      fi # end check java
27794    fi # end check boot jdk found
27795  fi
27796
27797    done
27798  fi
27799
27800
27801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27803      # Do we have a bin/java?
27804      if test ! -x "$BOOT_JDK/bin/java"; then
27805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27807        BOOT_JDK_FOUND=no
27808      else
27809        # Do we have a bin/javac?
27810        if test ! -x "$BOOT_JDK/bin/javac"; then
27811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27815          BOOT_JDK_FOUND=no
27816        else
27817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27819
27820          # Extra M4 quote needed to protect [] in grep expression.
27821          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27822          if test "x$FOUND_CORRECT_VERSION" = x; then
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27827            BOOT_JDK_FOUND=no
27828          else
27829            # We're done! :-)
27830            BOOT_JDK_FOUND=yes
27831
27832  # Only process if variable expands to non-empty
27833
27834  if test "x$BOOT_JDK" != x; then
27835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27836
27837  # Input might be given as Windows format, start by converting to
27838  # unix format.
27839  path="$BOOT_JDK"
27840  new_path=`$CYGPATH -u "$path"`
27841
27842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27845  # "foo.exe" is OK but "foo" is an error.
27846  #
27847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27848  # It is also a way to make sure we got the proper file name for the real test later on.
27849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27850  if test "x$test_shortpath" = x; then
27851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27854  fi
27855
27856  # Call helper function which possibly converts this using DOS-style short mode.
27857  # If so, the updated path is stored in $new_path.
27858
27859  input_path="$new_path"
27860  # Check if we need to convert this using DOS-style short mode. If the path
27861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27862  # take no chances and rewrite it.
27863  # Note: m4 eats our [], so we need to use [ and ] instead.
27864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27865  if test "x$has_forbidden_chars" != x; then
27866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27870      # Going to short mode and back again did indeed matter. Since short mode is
27871      # case insensitive, let's make it lowercase to improve readability.
27872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27873      # Now convert it back to Unix-style (cygpath)
27874      input_path=`$CYGPATH -u "$shortmode_path"`
27875      new_path="$input_path"
27876    fi
27877  fi
27878
27879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27880  if test "x$test_cygdrive_prefix" = x; then
27881    # As a simple fix, exclude /usr/bin since it's not a real path.
27882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27884      # a path prefixed by /cygdrive for fixpath to work.
27885      new_path="$CYGWIN_ROOT_PATH$input_path"
27886    fi
27887  fi
27888
27889
27890  if test "x$path" != "x$new_path"; then
27891    BOOT_JDK="$new_path"
27892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27894  fi
27895
27896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897
27898  path="$BOOT_JDK"
27899  has_colon=`$ECHO $path | $GREP ^.:`
27900  new_path="$path"
27901  if test "x$has_colon" = x; then
27902    # Not in mixed or Windows style, start by that.
27903    new_path=`cmd //c echo $path`
27904  fi
27905
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27916  fi
27917
27918
27919  windows_path="$new_path"
27920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27921    unix_path=`$CYGPATH -u "$windows_path"`
27922    new_path="$unix_path"
27923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27925    new_path="$unix_path"
27926  fi
27927
27928  if test "x$path" != "x$new_path"; then
27929    BOOT_JDK="$new_path"
27930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27932  fi
27933
27934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27936
27937    else
27938      # We're on a unix platform. Hooray! :)
27939      path="$BOOT_JDK"
27940      has_space=`$ECHO "$path" | $GREP " "`
27941      if test "x$has_space" != x; then
27942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27945      fi
27946
27947      # Use eval to expand a potential ~
27948      eval path="$path"
27949      if test ! -f "$path" && test ! -d "$path"; then
27950        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27951      fi
27952
27953      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27954    fi
27955  fi
27956
27957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27958$as_echo_n "checking for Boot JDK... " >&6; }
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27960$as_echo "$BOOT_JDK" >&6; }
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27962$as_echo_n "checking Boot JDK version... " >&6; }
27963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27965$as_echo "$BOOT_JDK_VERSION" >&6; }
27966          fi # end check jdk version
27967        fi # end check javac
27968      fi # end check java
27969    fi # end check boot jdk found
27970  fi
27971
27972  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27973
27974  if test "x$BOOT_JDK_FOUND" = xno; then
27975    # Now execute the test
27976
27977  BOOT_JDK_PREFIX="/usr/lib/jvm"
27978  BOOT_JDK_SUFFIX=""
27979  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27980  if test "x$ALL_JDKS_FOUND" != x; then
27981    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27982
27983  if test "x$BOOT_JDK_FOUND" = xno; then
27984    # Now execute the test
27985
27986        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27987        if test -d "$BOOT_JDK"; then
27988          BOOT_JDK_FOUND=maybe
27989          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27990$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27991        fi
27992
27993
27994    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27995    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27996      # Do we have a bin/java?
27997      if test ! -x "$BOOT_JDK/bin/java"; then
27998        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28000        BOOT_JDK_FOUND=no
28001      else
28002        # Do we have a bin/javac?
28003        if test ! -x "$BOOT_JDK/bin/javac"; then
28004          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28006          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28007$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28008          BOOT_JDK_FOUND=no
28009        else
28010          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28011          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28012
28013          # Extra M4 quote needed to protect [] in grep expression.
28014          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28015          if test "x$FOUND_CORRECT_VERSION" = x; then
28016            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28018            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28019$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28020            BOOT_JDK_FOUND=no
28021          else
28022            # We're done! :-)
28023            BOOT_JDK_FOUND=yes
28024
28025  # Only process if variable expands to non-empty
28026
28027  if test "x$BOOT_JDK" != x; then
28028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28029
28030  # Input might be given as Windows format, start by converting to
28031  # unix format.
28032  path="$BOOT_JDK"
28033  new_path=`$CYGPATH -u "$path"`
28034
28035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28038  # "foo.exe" is OK but "foo" is an error.
28039  #
28040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28041  # It is also a way to make sure we got the proper file name for the real test later on.
28042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28043  if test "x$test_shortpath" = x; then
28044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28045$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28046    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28047  fi
28048
28049  # Call helper function which possibly converts this using DOS-style short mode.
28050  # If so, the updated path is stored in $new_path.
28051
28052  input_path="$new_path"
28053  # Check if we need to convert this using DOS-style short mode. If the path
28054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28055  # take no chances and rewrite it.
28056  # Note: m4 eats our [], so we need to use [ and ] instead.
28057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28058  if test "x$has_forbidden_chars" != x; then
28059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28063      # Going to short mode and back again did indeed matter. Since short mode is
28064      # case insensitive, let's make it lowercase to improve readability.
28065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28066      # Now convert it back to Unix-style (cygpath)
28067      input_path=`$CYGPATH -u "$shortmode_path"`
28068      new_path="$input_path"
28069    fi
28070  fi
28071
28072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28073  if test "x$test_cygdrive_prefix" = x; then
28074    # As a simple fix, exclude /usr/bin since it's not a real path.
28075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28077      # a path prefixed by /cygdrive for fixpath to work.
28078      new_path="$CYGWIN_ROOT_PATH$input_path"
28079    fi
28080  fi
28081
28082
28083  if test "x$path" != "x$new_path"; then
28084    BOOT_JDK="$new_path"
28085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28087  fi
28088
28089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28090
28091  path="$BOOT_JDK"
28092  has_colon=`$ECHO $path | $GREP ^.:`
28093  new_path="$path"
28094  if test "x$has_colon" = x; then
28095    # Not in mixed or Windows style, start by that.
28096    new_path=`cmd //c echo $path`
28097  fi
28098
28099
28100  input_path="$new_path"
28101  # Check if we need to convert this using DOS-style short mode. If the path
28102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28103  # take no chances and rewrite it.
28104  # Note: m4 eats our [], so we need to use [ and ] instead.
28105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28106  if test "x$has_forbidden_chars" != x; then
28107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28109  fi
28110
28111
28112  windows_path="$new_path"
28113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28114    unix_path=`$CYGPATH -u "$windows_path"`
28115    new_path="$unix_path"
28116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28118    new_path="$unix_path"
28119  fi
28120
28121  if test "x$path" != "x$new_path"; then
28122    BOOT_JDK="$new_path"
28123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28124$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28125  fi
28126
28127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28129
28130    else
28131      # We're on a unix platform. Hooray! :)
28132      path="$BOOT_JDK"
28133      has_space=`$ECHO "$path" | $GREP " "`
28134      if test "x$has_space" != x; then
28135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28138      fi
28139
28140      # Use eval to expand a potential ~
28141      eval path="$path"
28142      if test ! -f "$path" && test ! -d "$path"; then
28143        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28144      fi
28145
28146      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28147    fi
28148  fi
28149
28150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28151$as_echo_n "checking for Boot JDK... " >&6; }
28152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28153$as_echo "$BOOT_JDK" >&6; }
28154            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28155$as_echo_n "checking Boot JDK version... " >&6; }
28156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28158$as_echo "$BOOT_JDK_VERSION" >&6; }
28159          fi # end check jdk version
28160        fi # end check javac
28161      fi # end check java
28162    fi # end check boot jdk found
28163  fi
28164
28165    done
28166  fi
28167
28168
28169    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28170    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28171      # Do we have a bin/java?
28172      if test ! -x "$BOOT_JDK/bin/java"; then
28173        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28175        BOOT_JDK_FOUND=no
28176      else
28177        # Do we have a bin/javac?
28178        if test ! -x "$BOOT_JDK/bin/javac"; then
28179          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28181          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28182$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28183          BOOT_JDK_FOUND=no
28184        else
28185          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28186          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28187
28188          # Extra M4 quote needed to protect [] in grep expression.
28189          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28190          if test "x$FOUND_CORRECT_VERSION" = x; then
28191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28193            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28194$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28195            BOOT_JDK_FOUND=no
28196          else
28197            # We're done! :-)
28198            BOOT_JDK_FOUND=yes
28199
28200  # Only process if variable expands to non-empty
28201
28202  if test "x$BOOT_JDK" != x; then
28203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28204
28205  # Input might be given as Windows format, start by converting to
28206  # unix format.
28207  path="$BOOT_JDK"
28208  new_path=`$CYGPATH -u "$path"`
28209
28210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28213  # "foo.exe" is OK but "foo" is an error.
28214  #
28215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28216  # It is also a way to make sure we got the proper file name for the real test later on.
28217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28218  if test "x$test_shortpath" = x; then
28219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28220$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28221    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28222  fi
28223
28224  # Call helper function which possibly converts this using DOS-style short mode.
28225  # If so, the updated path is stored in $new_path.
28226
28227  input_path="$new_path"
28228  # Check if we need to convert this using DOS-style short mode. If the path
28229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28230  # take no chances and rewrite it.
28231  # Note: m4 eats our [], so we need to use [ and ] instead.
28232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28233  if test "x$has_forbidden_chars" != x; then
28234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28238      # Going to short mode and back again did indeed matter. Since short mode is
28239      # case insensitive, let's make it lowercase to improve readability.
28240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28241      # Now convert it back to Unix-style (cygpath)
28242      input_path=`$CYGPATH -u "$shortmode_path"`
28243      new_path="$input_path"
28244    fi
28245  fi
28246
28247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28248  if test "x$test_cygdrive_prefix" = x; then
28249    # As a simple fix, exclude /usr/bin since it's not a real path.
28250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28252      # a path prefixed by /cygdrive for fixpath to work.
28253      new_path="$CYGWIN_ROOT_PATH$input_path"
28254    fi
28255  fi
28256
28257
28258  if test "x$path" != "x$new_path"; then
28259    BOOT_JDK="$new_path"
28260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28262  fi
28263
28264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28265
28266  path="$BOOT_JDK"
28267  has_colon=`$ECHO $path | $GREP ^.:`
28268  new_path="$path"
28269  if test "x$has_colon" = x; then
28270    # Not in mixed or Windows style, start by that.
28271    new_path=`cmd //c echo $path`
28272  fi
28273
28274
28275  input_path="$new_path"
28276  # Check if we need to convert this using DOS-style short mode. If the path
28277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28278  # take no chances and rewrite it.
28279  # Note: m4 eats our [], so we need to use [ and ] instead.
28280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28281  if test "x$has_forbidden_chars" != x; then
28282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28284  fi
28285
28286
28287  windows_path="$new_path"
28288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28289    unix_path=`$CYGPATH -u "$windows_path"`
28290    new_path="$unix_path"
28291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28293    new_path="$unix_path"
28294  fi
28295
28296  if test "x$path" != "x$new_path"; then
28297    BOOT_JDK="$new_path"
28298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28300  fi
28301
28302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28304
28305    else
28306      # We're on a unix platform. Hooray! :)
28307      path="$BOOT_JDK"
28308      has_space=`$ECHO "$path" | $GREP " "`
28309      if test "x$has_space" != x; then
28310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28313      fi
28314
28315      # Use eval to expand a potential ~
28316      eval path="$path"
28317      if test ! -f "$path" && test ! -d "$path"; then
28318        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28319      fi
28320
28321      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28322    fi
28323  fi
28324
28325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28326$as_echo_n "checking for Boot JDK... " >&6; }
28327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28328$as_echo "$BOOT_JDK" >&6; }
28329            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28330$as_echo_n "checking Boot JDK version... " >&6; }
28331            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28333$as_echo "$BOOT_JDK_VERSION" >&6; }
28334          fi # end check jdk version
28335        fi # end check javac
28336      fi # end check java
28337    fi # end check boot jdk found
28338  fi
28339
28340  fi
28341
28342
28343    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28344    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28345      # Do we have a bin/java?
28346      if test ! -x "$BOOT_JDK/bin/java"; then
28347        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28349        BOOT_JDK_FOUND=no
28350      else
28351        # Do we have a bin/javac?
28352        if test ! -x "$BOOT_JDK/bin/javac"; then
28353          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28355          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28356$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28357          BOOT_JDK_FOUND=no
28358        else
28359          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28360          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28361
28362          # Extra M4 quote needed to protect [] in grep expression.
28363          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28364          if test "x$FOUND_CORRECT_VERSION" = x; then
28365            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28367            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28368$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28369            BOOT_JDK_FOUND=no
28370          else
28371            # We're done! :-)
28372            BOOT_JDK_FOUND=yes
28373
28374  # Only process if variable expands to non-empty
28375
28376  if test "x$BOOT_JDK" != x; then
28377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28378
28379  # Input might be given as Windows format, start by converting to
28380  # unix format.
28381  path="$BOOT_JDK"
28382  new_path=`$CYGPATH -u "$path"`
28383
28384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28387  # "foo.exe" is OK but "foo" is an error.
28388  #
28389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28390  # It is also a way to make sure we got the proper file name for the real test later on.
28391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28392  if test "x$test_shortpath" = x; then
28393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28396  fi
28397
28398  # Call helper function which possibly converts this using DOS-style short mode.
28399  # If so, the updated path is stored in $new_path.
28400
28401  input_path="$new_path"
28402  # Check if we need to convert this using DOS-style short mode. If the path
28403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28404  # take no chances and rewrite it.
28405  # Note: m4 eats our [], so we need to use [ and ] instead.
28406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28407  if test "x$has_forbidden_chars" != x; then
28408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28412      # Going to short mode and back again did indeed matter. Since short mode is
28413      # case insensitive, let's make it lowercase to improve readability.
28414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28415      # Now convert it back to Unix-style (cygpath)
28416      input_path=`$CYGPATH -u "$shortmode_path"`
28417      new_path="$input_path"
28418    fi
28419  fi
28420
28421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28422  if test "x$test_cygdrive_prefix" = x; then
28423    # As a simple fix, exclude /usr/bin since it's not a real path.
28424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28426      # a path prefixed by /cygdrive for fixpath to work.
28427      new_path="$CYGWIN_ROOT_PATH$input_path"
28428    fi
28429  fi
28430
28431
28432  if test "x$path" != "x$new_path"; then
28433    BOOT_JDK="$new_path"
28434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28436  fi
28437
28438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28439
28440  path="$BOOT_JDK"
28441  has_colon=`$ECHO $path | $GREP ^.:`
28442  new_path="$path"
28443  if test "x$has_colon" = x; then
28444    # Not in mixed or Windows style, start by that.
28445    new_path=`cmd //c echo $path`
28446  fi
28447
28448
28449  input_path="$new_path"
28450  # Check if we need to convert this using DOS-style short mode. If the path
28451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28452  # take no chances and rewrite it.
28453  # Note: m4 eats our [], so we need to use [ and ] instead.
28454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28455  if test "x$has_forbidden_chars" != x; then
28456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28458  fi
28459
28460
28461  windows_path="$new_path"
28462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28463    unix_path=`$CYGPATH -u "$windows_path"`
28464    new_path="$unix_path"
28465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28467    new_path="$unix_path"
28468  fi
28469
28470  if test "x$path" != "x$new_path"; then
28471    BOOT_JDK="$new_path"
28472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28474  fi
28475
28476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28478
28479    else
28480      # We're on a unix platform. Hooray! :)
28481      path="$BOOT_JDK"
28482      has_space=`$ECHO "$path" | $GREP " "`
28483      if test "x$has_space" != x; then
28484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28487      fi
28488
28489      # Use eval to expand a potential ~
28490      eval path="$path"
28491      if test ! -f "$path" && test ! -d "$path"; then
28492        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28493      fi
28494
28495      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28496    fi
28497  fi
28498
28499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28500$as_echo_n "checking for Boot JDK... " >&6; }
28501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28502$as_echo "$BOOT_JDK" >&6; }
28503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28504$as_echo_n "checking Boot JDK version... " >&6; }
28505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28507$as_echo "$BOOT_JDK_VERSION" >&6; }
28508          fi # end check jdk version
28509        fi # end check javac
28510      fi # end check java
28511    fi # end check boot jdk found
28512  fi
28513
28514
28515  # If we haven't found anything yet, we've truly lost. Give up.
28516  if test "x$BOOT_JDK_FOUND" = xno; then
28517
28518  # Print a helpful message on how to acquire the necessary build dependency.
28519  # openjdk is the help tag: freetype, cups, alsa etc
28520  MISSING_DEPENDENCY=openjdk
28521
28522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28523    cygwin_help $MISSING_DEPENDENCY
28524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525    msys_help $MISSING_DEPENDENCY
28526  else
28527    PKGHANDLER_COMMAND=
28528
28529    case $PKGHANDLER in
28530      apt-get)
28531        apt_help     $MISSING_DEPENDENCY ;;
28532      yum)
28533        yum_help     $MISSING_DEPENDENCY ;;
28534      port)
28535        port_help    $MISSING_DEPENDENCY ;;
28536      pkgutil)
28537        pkgutil_help $MISSING_DEPENDENCY ;;
28538      pkgadd)
28539        pkgadd_help  $MISSING_DEPENDENCY ;;
28540    esac
28541
28542    if test "x$PKGHANDLER_COMMAND" != x; then
28543      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28544    fi
28545  fi
28546
28547    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28548$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28549    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28550$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28551    as_fn_error $? "Cannot continue" "$LINENO" 5
28552  fi
28553
28554
28555
28556  # Setup tools from the Boot JDK.
28557
28558  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28559
28560  # Publish this variable in the help.
28561
28562
28563  if [ -z "${JAVA+x}" ]; then
28564    # The variable is not set by user, try to locate tool using the code snippet
28565
28566      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28567$as_echo_n "checking for java in Boot JDK... " >&6; }
28568      JAVA=$BOOT_JDK/bin/java
28569      if test ! -x $JAVA; then
28570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28571$as_echo "not found" >&6; }
28572        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28573$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28574        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28575      fi
28576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28577$as_echo "ok" >&6; }
28578
28579
28580  else
28581    # The variable is set, but is it from the command line or the environment?
28582
28583    # Try to remove the string !JAVA! from our list.
28584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28586      # If it failed, the variable was not from the command line. Ignore it,
28587      # but warn the user (except for BASH, which is always set by the calling BASH).
28588      if test "xJAVA" != xBASH; then
28589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28590$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28591      fi
28592      # Try to locate tool using the code snippet
28593
28594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28595$as_echo_n "checking for java in Boot JDK... " >&6; }
28596      JAVA=$BOOT_JDK/bin/java
28597      if test ! -x $JAVA; then
28598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28599$as_echo "not found" >&6; }
28600        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28601$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28602        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28603      fi
28604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28605$as_echo "ok" >&6; }
28606
28607
28608    else
28609      # If it succeeded, then it was overridden by the user. We will use it
28610      # for the tool.
28611
28612      # First remove it from the list of overridden variables, so we can test
28613      # for unknown variables in the end.
28614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28615
28616      # Check if we try to supply an empty value
28617      if test "x$JAVA" = x; then
28618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28619$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28621$as_echo_n "checking for JAVA... " >&6; }
28622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28623$as_echo "disabled" >&6; }
28624      else
28625        # Check if the provided tool contains a complete path.
28626        tool_specified="$JAVA"
28627        tool_basename="${tool_specified##*/}"
28628        if test "x$tool_basename" = "x$tool_specified"; then
28629          # A command without a complete path is provided, search $PATH.
28630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28631$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28632          # Extract the first word of "$tool_basename", so it can be a program name with args.
28633set dummy $tool_basename; ac_word=$2
28634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28635$as_echo_n "checking for $ac_word... " >&6; }
28636if ${ac_cv_path_JAVA+:} false; then :
28637  $as_echo_n "(cached) " >&6
28638else
28639  case $JAVA in
28640  [\\/]* | ?:[\\/]*)
28641  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28642  ;;
28643  *)
28644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28645for as_dir in $PATH
28646do
28647  IFS=$as_save_IFS
28648  test -z "$as_dir" && as_dir=.
28649    for ac_exec_ext in '' $ac_executable_extensions; do
28650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28651    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28653    break 2
28654  fi
28655done
28656  done
28657IFS=$as_save_IFS
28658
28659  ;;
28660esac
28661fi
28662JAVA=$ac_cv_path_JAVA
28663if test -n "$JAVA"; then
28664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28665$as_echo "$JAVA" >&6; }
28666else
28667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28668$as_echo "no" >&6; }
28669fi
28670
28671
28672          if test "x$JAVA" = x; then
28673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28674          fi
28675        else
28676          # Otherwise we believe it is a complete path. Use it as it is.
28677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28678$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28680$as_echo_n "checking for JAVA... " >&6; }
28681          if test ! -x "$tool_specified"; then
28682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28683$as_echo "not found" >&6; }
28684            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28685          fi
28686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28687$as_echo "$tool_specified" >&6; }
28688        fi
28689      fi
28690    fi
28691
28692  fi
28693
28694
28695
28696  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28697
28698  # Publish this variable in the help.
28699
28700
28701  if [ -z "${JAVAC+x}" ]; then
28702    # The variable is not set by user, try to locate tool using the code snippet
28703
28704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28705$as_echo_n "checking for javac in Boot JDK... " >&6; }
28706      JAVAC=$BOOT_JDK/bin/javac
28707      if test ! -x $JAVAC; then
28708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28709$as_echo "not found" >&6; }
28710        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28711$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28712        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28713      fi
28714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28715$as_echo "ok" >&6; }
28716
28717
28718  else
28719    # The variable is set, but is it from the command line or the environment?
28720
28721    # Try to remove the string !JAVAC! from our list.
28722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28724      # If it failed, the variable was not from the command line. Ignore it,
28725      # but warn the user (except for BASH, which is always set by the calling BASH).
28726      if test "xJAVAC" != xBASH; then
28727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28728$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28729      fi
28730      # Try to locate tool using the code snippet
28731
28732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28733$as_echo_n "checking for javac in Boot JDK... " >&6; }
28734      JAVAC=$BOOT_JDK/bin/javac
28735      if test ! -x $JAVAC; then
28736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28737$as_echo "not found" >&6; }
28738        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28739$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28740        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28741      fi
28742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28743$as_echo "ok" >&6; }
28744
28745
28746    else
28747      # If it succeeded, then it was overridden by the user. We will use it
28748      # for the tool.
28749
28750      # First remove it from the list of overridden variables, so we can test
28751      # for unknown variables in the end.
28752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28753
28754      # Check if we try to supply an empty value
28755      if test "x$JAVAC" = x; then
28756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28757$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28759$as_echo_n "checking for JAVAC... " >&6; }
28760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28761$as_echo "disabled" >&6; }
28762      else
28763        # Check if the provided tool contains a complete path.
28764        tool_specified="$JAVAC"
28765        tool_basename="${tool_specified##*/}"
28766        if test "x$tool_basename" = "x$tool_specified"; then
28767          # A command without a complete path is provided, search $PATH.
28768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28769$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28770          # Extract the first word of "$tool_basename", so it can be a program name with args.
28771set dummy $tool_basename; ac_word=$2
28772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28773$as_echo_n "checking for $ac_word... " >&6; }
28774if ${ac_cv_path_JAVAC+:} false; then :
28775  $as_echo_n "(cached) " >&6
28776else
28777  case $JAVAC in
28778  [\\/]* | ?:[\\/]*)
28779  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28780  ;;
28781  *)
28782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28783for as_dir in $PATH
28784do
28785  IFS=$as_save_IFS
28786  test -z "$as_dir" && as_dir=.
28787    for ac_exec_ext in '' $ac_executable_extensions; do
28788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28789    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28791    break 2
28792  fi
28793done
28794  done
28795IFS=$as_save_IFS
28796
28797  ;;
28798esac
28799fi
28800JAVAC=$ac_cv_path_JAVAC
28801if test -n "$JAVAC"; then
28802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28803$as_echo "$JAVAC" >&6; }
28804else
28805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28806$as_echo "no" >&6; }
28807fi
28808
28809
28810          if test "x$JAVAC" = x; then
28811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28812          fi
28813        else
28814          # Otherwise we believe it is a complete path. Use it as it is.
28815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28816$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28818$as_echo_n "checking for JAVAC... " >&6; }
28819          if test ! -x "$tool_specified"; then
28820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28821$as_echo "not found" >&6; }
28822            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28823          fi
28824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28825$as_echo "$tool_specified" >&6; }
28826        fi
28827      fi
28828    fi
28829
28830  fi
28831
28832
28833
28834  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28835
28836  # Publish this variable in the help.
28837
28838
28839  if [ -z "${JAVAH+x}" ]; then
28840    # The variable is not set by user, try to locate tool using the code snippet
28841
28842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28843$as_echo_n "checking for javah in Boot JDK... " >&6; }
28844      JAVAH=$BOOT_JDK/bin/javah
28845      if test ! -x $JAVAH; then
28846        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28847$as_echo "not found" >&6; }
28848        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28849$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28850        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28851      fi
28852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28853$as_echo "ok" >&6; }
28854
28855
28856  else
28857    # The variable is set, but is it from the command line or the environment?
28858
28859    # Try to remove the string !JAVAH! from our list.
28860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28862      # If it failed, the variable was not from the command line. Ignore it,
28863      # but warn the user (except for BASH, which is always set by the calling BASH).
28864      if test "xJAVAH" != xBASH; then
28865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28866$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28867      fi
28868      # Try to locate tool using the code snippet
28869
28870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28871$as_echo_n "checking for javah in Boot JDK... " >&6; }
28872      JAVAH=$BOOT_JDK/bin/javah
28873      if test ! -x $JAVAH; then
28874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28875$as_echo "not found" >&6; }
28876        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28877$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28878        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28879      fi
28880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28881$as_echo "ok" >&6; }
28882
28883
28884    else
28885      # If it succeeded, then it was overridden by the user. We will use it
28886      # for the tool.
28887
28888      # First remove it from the list of overridden variables, so we can test
28889      # for unknown variables in the end.
28890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28891
28892      # Check if we try to supply an empty value
28893      if test "x$JAVAH" = x; then
28894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28895$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28897$as_echo_n "checking for JAVAH... " >&6; }
28898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28899$as_echo "disabled" >&6; }
28900      else
28901        # Check if the provided tool contains a complete path.
28902        tool_specified="$JAVAH"
28903        tool_basename="${tool_specified##*/}"
28904        if test "x$tool_basename" = "x$tool_specified"; then
28905          # A command without a complete path is provided, search $PATH.
28906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28907$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28908          # Extract the first word of "$tool_basename", so it can be a program name with args.
28909set dummy $tool_basename; ac_word=$2
28910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28911$as_echo_n "checking for $ac_word... " >&6; }
28912if ${ac_cv_path_JAVAH+:} false; then :
28913  $as_echo_n "(cached) " >&6
28914else
28915  case $JAVAH in
28916  [\\/]* | ?:[\\/]*)
28917  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28918  ;;
28919  *)
28920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28921for as_dir in $PATH
28922do
28923  IFS=$as_save_IFS
28924  test -z "$as_dir" && as_dir=.
28925    for ac_exec_ext in '' $ac_executable_extensions; do
28926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28927    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28929    break 2
28930  fi
28931done
28932  done
28933IFS=$as_save_IFS
28934
28935  ;;
28936esac
28937fi
28938JAVAH=$ac_cv_path_JAVAH
28939if test -n "$JAVAH"; then
28940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28941$as_echo "$JAVAH" >&6; }
28942else
28943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28944$as_echo "no" >&6; }
28945fi
28946
28947
28948          if test "x$JAVAH" = x; then
28949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28950          fi
28951        else
28952          # Otherwise we believe it is a complete path. Use it as it is.
28953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28954$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28956$as_echo_n "checking for JAVAH... " >&6; }
28957          if test ! -x "$tool_specified"; then
28958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28959$as_echo "not found" >&6; }
28960            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28961          fi
28962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28963$as_echo "$tool_specified" >&6; }
28964        fi
28965      fi
28966    fi
28967
28968  fi
28969
28970
28971
28972  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28973
28974  # Publish this variable in the help.
28975
28976
28977  if [ -z "${JAR+x}" ]; then
28978    # The variable is not set by user, try to locate tool using the code snippet
28979
28980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28981$as_echo_n "checking for jar in Boot JDK... " >&6; }
28982      JAR=$BOOT_JDK/bin/jar
28983      if test ! -x $JAR; then
28984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28985$as_echo "not found" >&6; }
28986        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28987$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28988        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28989      fi
28990      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28991$as_echo "ok" >&6; }
28992
28993
28994  else
28995    # The variable is set, but is it from the command line or the environment?
28996
28997    # Try to remove the string !JAR! from our list.
28998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29000      # If it failed, the variable was not from the command line. Ignore it,
29001      # but warn the user (except for BASH, which is always set by the calling BASH).
29002      if test "xJAR" != xBASH; then
29003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29004$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29005      fi
29006      # Try to locate tool using the code snippet
29007
29008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29009$as_echo_n "checking for jar in Boot JDK... " >&6; }
29010      JAR=$BOOT_JDK/bin/jar
29011      if test ! -x $JAR; then
29012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29013$as_echo "not found" >&6; }
29014        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29015$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29016        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29017      fi
29018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29019$as_echo "ok" >&6; }
29020
29021
29022    else
29023      # If it succeeded, then it was overridden by the user. We will use it
29024      # for the tool.
29025
29026      # First remove it from the list of overridden variables, so we can test
29027      # for unknown variables in the end.
29028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29029
29030      # Check if we try to supply an empty value
29031      if test "x$JAR" = x; then
29032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29033$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29035$as_echo_n "checking for JAR... " >&6; }
29036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29037$as_echo "disabled" >&6; }
29038      else
29039        # Check if the provided tool contains a complete path.
29040        tool_specified="$JAR"
29041        tool_basename="${tool_specified##*/}"
29042        if test "x$tool_basename" = "x$tool_specified"; then
29043          # A command without a complete path is provided, search $PATH.
29044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29045$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29046          # Extract the first word of "$tool_basename", so it can be a program name with args.
29047set dummy $tool_basename; ac_word=$2
29048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29049$as_echo_n "checking for $ac_word... " >&6; }
29050if ${ac_cv_path_JAR+:} false; then :
29051  $as_echo_n "(cached) " >&6
29052else
29053  case $JAR in
29054  [\\/]* | ?:[\\/]*)
29055  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29056  ;;
29057  *)
29058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29059for as_dir in $PATH
29060do
29061  IFS=$as_save_IFS
29062  test -z "$as_dir" && as_dir=.
29063    for ac_exec_ext in '' $ac_executable_extensions; do
29064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29065    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29067    break 2
29068  fi
29069done
29070  done
29071IFS=$as_save_IFS
29072
29073  ;;
29074esac
29075fi
29076JAR=$ac_cv_path_JAR
29077if test -n "$JAR"; then
29078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29079$as_echo "$JAR" >&6; }
29080else
29081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29082$as_echo "no" >&6; }
29083fi
29084
29085
29086          if test "x$JAR" = x; then
29087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29088          fi
29089        else
29090          # Otherwise we believe it is a complete path. Use it as it is.
29091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29092$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29094$as_echo_n "checking for JAR... " >&6; }
29095          if test ! -x "$tool_specified"; then
29096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29097$as_echo "not found" >&6; }
29098            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29099          fi
29100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29101$as_echo "$tool_specified" >&6; }
29102        fi
29103      fi
29104    fi
29105
29106  fi
29107
29108
29109
29110  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29111
29112  # Publish this variable in the help.
29113
29114
29115  if [ -z "${JARSIGNER+x}" ]; then
29116    # The variable is not set by user, try to locate tool using the code snippet
29117
29118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29119$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29120      JARSIGNER=$BOOT_JDK/bin/jarsigner
29121      if test ! -x $JARSIGNER; then
29122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29123$as_echo "not found" >&6; }
29124        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29125$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29126        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29127      fi
29128      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29129$as_echo "ok" >&6; }
29130
29131
29132  else
29133    # The variable is set, but is it from the command line or the environment?
29134
29135    # Try to remove the string !JARSIGNER! from our list.
29136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29138      # If it failed, the variable was not from the command line. Ignore it,
29139      # but warn the user (except for BASH, which is always set by the calling BASH).
29140      if test "xJARSIGNER" != xBASH; then
29141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29142$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29143      fi
29144      # Try to locate tool using the code snippet
29145
29146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29147$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29148      JARSIGNER=$BOOT_JDK/bin/jarsigner
29149      if test ! -x $JARSIGNER; then
29150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29151$as_echo "not found" >&6; }
29152        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29153$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29154        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29155      fi
29156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29157$as_echo "ok" >&6; }
29158
29159
29160    else
29161      # If it succeeded, then it was overridden by the user. We will use it
29162      # for the tool.
29163
29164      # First remove it from the list of overridden variables, so we can test
29165      # for unknown variables in the end.
29166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29167
29168      # Check if we try to supply an empty value
29169      if test "x$JARSIGNER" = x; then
29170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29171$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29173$as_echo_n "checking for JARSIGNER... " >&6; }
29174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29175$as_echo "disabled" >&6; }
29176      else
29177        # Check if the provided tool contains a complete path.
29178        tool_specified="$JARSIGNER"
29179        tool_basename="${tool_specified##*/}"
29180        if test "x$tool_basename" = "x$tool_specified"; then
29181          # A command without a complete path is provided, search $PATH.
29182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29183$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29184          # Extract the first word of "$tool_basename", so it can be a program name with args.
29185set dummy $tool_basename; ac_word=$2
29186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29187$as_echo_n "checking for $ac_word... " >&6; }
29188if ${ac_cv_path_JARSIGNER+:} false; then :
29189  $as_echo_n "(cached) " >&6
29190else
29191  case $JARSIGNER in
29192  [\\/]* | ?:[\\/]*)
29193  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29194  ;;
29195  *)
29196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29197for as_dir in $PATH
29198do
29199  IFS=$as_save_IFS
29200  test -z "$as_dir" && as_dir=.
29201    for ac_exec_ext in '' $ac_executable_extensions; do
29202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29203    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29205    break 2
29206  fi
29207done
29208  done
29209IFS=$as_save_IFS
29210
29211  ;;
29212esac
29213fi
29214JARSIGNER=$ac_cv_path_JARSIGNER
29215if test -n "$JARSIGNER"; then
29216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29217$as_echo "$JARSIGNER" >&6; }
29218else
29219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29220$as_echo "no" >&6; }
29221fi
29222
29223
29224          if test "x$JARSIGNER" = x; then
29225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29226          fi
29227        else
29228          # Otherwise we believe it is a complete path. Use it as it is.
29229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29230$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29232$as_echo_n "checking for JARSIGNER... " >&6; }
29233          if test ! -x "$tool_specified"; then
29234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29235$as_echo "not found" >&6; }
29236            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29237          fi
29238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29239$as_echo "$tool_specified" >&6; }
29240        fi
29241      fi
29242    fi
29243
29244  fi
29245
29246
29247
29248  # Finally, set some other options...
29249
29250  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29251  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29252
29253
29254
29255  # Check if the boot jdk is 32 or 64 bit
29256  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29257    BOOT_JDK_BITS="64"
29258  else
29259    BOOT_JDK_BITS="32"
29260  fi
29261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29262$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29264$as_echo "$BOOT_JDK_BITS" >&6; }
29265
29266
29267
29268###############################################################################
29269#
29270# Configure the sources to use. We can add or override individual directories.
29271#
29272###############################################################################
29273
29274
29275  # Where are the sources. Any of these can be overridden
29276  # using --with-override-corba and the likes.
29277  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29278  CORBA_TOPDIR="$SRC_ROOT/corba"
29279  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29280  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29281  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29282  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29283  JDK_TOPDIR="$SRC_ROOT/jdk"
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294  ###############################################################################
29295  #
29296  # Pickup additional source for a component from outside of the source root
29297  # or override source for a component.
29298  #
29299
29300# Check whether --with-add-source-root was given.
29301if test "${with_add_source_root+set}" = set; then :
29302  withval=$with_add_source_root;
29303fi
29304
29305
29306
29307# Check whether --with-override-source-root was given.
29308if test "${with_override_source_root+set}" = set; then :
29309  withval=$with_override_source_root;
29310fi
29311
29312
29313
29314# Check whether --with-adds-and-overrides was given.
29315if test "${with_adds_and_overrides+set}" = set; then :
29316  withval=$with_adds_and_overrides;
29317fi
29318
29319
29320  if test "x$with_adds_and_overrides" != x; then
29321    with_add_source_root="$with_adds_and_overrides/adds"
29322    with_override_source_root="$with_adds_and_overrides/overrides"
29323  fi
29324
29325  if test "x$with_add_source_root" != x; then
29326    if ! test -d $with_add_source_root; then
29327      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
29328    fi
29329    CURDIR="$PWD"
29330    cd "$with_add_source_root"
29331    ADD_SRC_ROOT="`pwd`"
29332    cd "$CURDIR"
29333    # Verify that the addon source root does not have any root makefiles.
29334    # If it does, then it is usually an error, prevent this.
29335    if test -f $with_add_source_root/langtools/make/Makefile; then
29336      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
29337    fi
29338    if test -f $with_add_source_root/corba/make/Makefile; then
29339      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
29340    fi
29341    if test -f $with_add_source_root/jaxp/make/Makefile; then
29342      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
29343    fi
29344    if test -f $with_add_source_root/jaxws/make/Makefile; then
29345      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
29346    fi
29347    if test -f $with_add_source_root/hotspot/make/Makefile; then
29348      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
29349    fi
29350    if test -f $with_add_source_root/nashorn/make/Makefile; then
29351      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
29352    fi
29353    if test -f $with_add_source_root/jdk/make/Makefile; then
29354      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
29355    fi
29356  fi
29357
29358
29359  if test "x$with_override_source_root" != x; then
29360    if ! test -d $with_override_source_root; then
29361      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
29362    fi
29363    CURDIR="$PWD"
29364    cd "$with_override_source_root"
29365    OVERRIDE_SRC_ROOT="`pwd`"
29366    cd "$CURDIR"
29367    if test -f $with_override_source_root/langtools/make/Makefile; then
29368      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
29369    fi
29370    if test -f $with_override_source_root/corba/make/Makefile; then
29371      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
29372    fi
29373    if test -f $with_override_source_root/jaxp/make/Makefile; then
29374      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
29375    fi
29376    if test -f $with_override_source_root/jaxws/make/Makefile; then
29377      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
29378    fi
29379    if test -f $with_override_source_root/hotspot/make/Makefile; then
29380      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
29381    fi
29382    if test -f $with_override_source_root/nashorn/make/Makefile; then
29383      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
29384    fi
29385    if test -f $with_override_source_root/jdk/make/Makefile; then
29386      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
29387    fi
29388  fi
29389
29390
29391  ###############################################################################
29392  #
29393  # Override a repo completely, this is used for example when you have 3 small
29394  # development sandboxes of the langtools sources and want to avoid having 3 full
29395  # OpenJDK sources checked out on disk.
29396  #
29397  # Assuming that the 3 langtools sandboxes are located here:
29398  # /home/fredrik/sandbox1/langtools
29399  # /home/fredrik/sandbox2/langtools
29400  # /home/fredrik/sandbox3/langtools
29401  #
29402  # From the source root you create build subdirs manually:
29403  #     mkdir -p build1 build2 build3
29404  # in each build directory run:
29405  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
29406  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
29407  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
29408  #
29409
29410
29411# Check whether --with-override-langtools was given.
29412if test "${with_override_langtools+set}" = set; then :
29413  withval=$with_override_langtools;
29414fi
29415
29416
29417
29418# Check whether --with-override-corba was given.
29419if test "${with_override_corba+set}" = set; then :
29420  withval=$with_override_corba;
29421fi
29422
29423
29424
29425# Check whether --with-override-jaxp was given.
29426if test "${with_override_jaxp+set}" = set; then :
29427  withval=$with_override_jaxp;
29428fi
29429
29430
29431
29432# Check whether --with-override-jaxws was given.
29433if test "${with_override_jaxws+set}" = set; then :
29434  withval=$with_override_jaxws;
29435fi
29436
29437
29438
29439# Check whether --with-override-hotspot was given.
29440if test "${with_override_hotspot+set}" = set; then :
29441  withval=$with_override_hotspot;
29442fi
29443
29444
29445
29446# Check whether --with-override-nashorn was given.
29447if test "${with_override_nashorn+set}" = set; then :
29448  withval=$with_override_nashorn;
29449fi
29450
29451
29452
29453# Check whether --with-override-jdk was given.
29454if test "${with_override_jdk+set}" = set; then :
29455  withval=$with_override_jdk;
29456fi
29457
29458
29459  if test "x$with_override_langtools" != x; then
29460    CURDIR="$PWD"
29461    cd "$with_override_langtools"
29462    LANGTOOLS_TOPDIR="`pwd`"
29463    cd "$CURDIR"
29464    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
29465      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
29466    fi
29467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
29468$as_echo_n "checking if langtools should be overridden... " >&6; }
29469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
29470$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
29471  fi
29472  if test "x$with_override_corba" != x; then
29473    CURDIR="$PWD"
29474    cd "$with_override_corba"
29475    CORBA_TOPDIR="`pwd`"
29476    cd "$CURDIR"
29477    if ! test -f $CORBA_TOPDIR/make/Makefile; then
29478      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
29479    fi
29480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
29481$as_echo_n "checking if corba should be overridden... " >&6; }
29482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
29483$as_echo "yes with $CORBA_TOPDIR" >&6; }
29484  fi
29485  if test "x$with_override_jaxp" != x; then
29486    CURDIR="$PWD"
29487    cd "$with_override_jaxp"
29488    JAXP_TOPDIR="`pwd`"
29489    cd "$CURDIR"
29490    if ! test -f $JAXP_TOPDIR/make/Makefile; then
29491      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
29492    fi
29493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
29494$as_echo_n "checking if jaxp should be overridden... " >&6; }
29495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
29496$as_echo "yes with $JAXP_TOPDIR" >&6; }
29497  fi
29498  if test "x$with_override_jaxws" != x; then
29499    CURDIR="$PWD"
29500    cd "$with_override_jaxws"
29501    JAXWS_TOPDIR="`pwd`"
29502    cd "$CURDIR"
29503    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
29504      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
29505    fi
29506    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
29507$as_echo_n "checking if jaxws should be overridden... " >&6; }
29508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
29509$as_echo "yes with $JAXWS_TOPDIR" >&6; }
29510  fi
29511  if test "x$with_override_hotspot" != x; then
29512    CURDIR="$PWD"
29513    cd "$with_override_hotspot"
29514    HOTSPOT_TOPDIR="`pwd`"
29515    cd "$CURDIR"
29516    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
29517      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
29518    fi
29519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
29520$as_echo_n "checking if hotspot should be overridden... " >&6; }
29521    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
29522$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
29523  fi
29524  if test "x$with_override_nashorn" != x; then
29525    CURDIR="$PWD"
29526    cd "$with_override_nashorn"
29527    NASHORN_TOPDIR="`pwd`"
29528    cd "$CURDIR"
29529    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
29530      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
29531    fi
29532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
29533$as_echo_n "checking if nashorn should be overridden... " >&6; }
29534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
29535$as_echo "yes with $NASHORN_TOPDIR" >&6; }
29536  fi
29537  if test "x$with_override_jdk" != x; then
29538    CURDIR="$PWD"
29539    cd "$with_override_jdk"
29540    JDK_TOPDIR="`pwd`"
29541    cd "$CURDIR"
29542    if ! test -f $JDK_TOPDIR/make/Makefile; then
29543      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
29544    fi
29545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
29546$as_echo_n "checking if JDK should be overridden... " >&6; }
29547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
29548$as_echo "yes with $JDK_TOPDIR" >&6; }
29549  fi
29550
29551
29552  BUILD_OUTPUT="$OUTPUT_ROOT"
29553
29554
29555  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29556  BUILD_HOTSPOT=true
29557
29558
29559
29560# Check whether --with-import-hotspot was given.
29561if test "${with_import_hotspot+set}" = set; then :
29562  withval=$with_import_hotspot;
29563fi
29564
29565  if test "x$with_import_hotspot" != x; then
29566    CURDIR="$PWD"
29567    cd "$with_import_hotspot"
29568    HOTSPOT_DIST="`pwd`"
29569    cd "$CURDIR"
29570    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29571      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29572    fi
29573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29574$as_echo_n "checking if hotspot should be imported... " >&6; }
29575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29576$as_echo "yes from $HOTSPOT_DIST" >&6; }
29577    BUILD_HOTSPOT=false
29578  fi
29579
29580  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29581
29582
29583###############################################################################
29584#
29585# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29586# native code.
29587#
29588###############################################################################
29589
29590# First determine the toolchain type (compiler family)
29591
29592
29593# Check whether --with-toolchain-type was given.
29594if test "${with_toolchain_type+set}" = set; then :
29595  withval=$with_toolchain_type;
29596fi
29597
29598
29599  # Use indirect variable referencing
29600  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29601  VALID_TOOLCHAINS=${!toolchain_var_name}
29602
29603  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29604    if test -n "$XCODEBUILD"; then
29605      # On Mac OS X, default toolchain to clang after Xcode 5
29606      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29607      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29608      if test $? -ne 0; then
29609        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29610      fi
29611      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29612          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29613          $CUT -f 1 -d .`
29614      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29615$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29616      if test $XCODE_MAJOR_VERSION -ge 5; then
29617          DEFAULT_TOOLCHAIN="clang"
29618      else
29619          DEFAULT_TOOLCHAIN="gcc"
29620      fi
29621    else
29622      # If Xcode is not installed, but the command line tools are
29623      # then we can't run xcodebuild. On these systems we should
29624      # default to clang
29625      DEFAULT_TOOLCHAIN="clang"
29626    fi
29627  else
29628    # First toolchain type in the list is the default
29629    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29630  fi
29631
29632  if test "x$with_toolchain_type" = xlist; then
29633    # List all toolchains
29634    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29635$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29636    for toolchain in $VALID_TOOLCHAINS; do
29637      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29638      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29639      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29640    done
29641
29642    exit 0
29643  elif test "x$with_toolchain_type" != x; then
29644    # User override; check that it is valid
29645    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29646      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29647$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29648      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29649$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29650      as_fn_error $? "Cannot continue." "$LINENO" 5
29651    fi
29652    TOOLCHAIN_TYPE=$with_toolchain_type
29653  else
29654    # No flag given, use default
29655    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29656  fi
29657
29658
29659  TOOLCHAIN_CC_BINARY_clang="clang"
29660  TOOLCHAIN_CC_BINARY_gcc="gcc"
29661  TOOLCHAIN_CC_BINARY_microsoft="cl"
29662  TOOLCHAIN_CC_BINARY_solstudio="cc"
29663  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29664
29665  TOOLCHAIN_CXX_BINARY_clang="clang++"
29666  TOOLCHAIN_CXX_BINARY_gcc="g++"
29667  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29668  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29669  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29670
29671  # Use indirect variable referencing
29672  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29673  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29674  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29675  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29676  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29677  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29678
29679
29680  # Define filename patterns
29681  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29682    LIBRARY_PREFIX=
29683    SHARED_LIBRARY_SUFFIX='.dll'
29684    STATIC_LIBRARY_SUFFIX='.lib'
29685    SHARED_LIBRARY='$1.dll'
29686    STATIC_LIBRARY='$1.lib'
29687    OBJ_SUFFIX='.obj'
29688    EXE_SUFFIX='.exe'
29689  else
29690    LIBRARY_PREFIX=lib
29691    SHARED_LIBRARY_SUFFIX='.so'
29692    STATIC_LIBRARY_SUFFIX='.a'
29693    SHARED_LIBRARY='lib$1.so'
29694    STATIC_LIBRARY='lib$1.a'
29695    OBJ_SUFFIX='.o'
29696    EXE_SUFFIX=''
29697    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29698      SHARED_LIBRARY='lib$1.dylib'
29699      SHARED_LIBRARY_SUFFIX='.dylib'
29700    fi
29701  fi
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29713    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29714$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29715  else
29716    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29717$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29718  fi
29719
29720
29721# User supplied flags should be used when configure detects compilers
29722
29723  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29724    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29725$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29726  fi
29727
29728  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29729    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29730$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29731  fi
29732
29733  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29734    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29735$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29736  fi
29737
29738
29739# Check whether --with-extra-cflags was given.
29740if test "${with_extra_cflags+set}" = set; then :
29741  withval=$with_extra_cflags;
29742fi
29743
29744
29745
29746# Check whether --with-extra-cxxflags was given.
29747if test "${with_extra_cxxflags+set}" = set; then :
29748  withval=$with_extra_cxxflags;
29749fi
29750
29751
29752
29753# Check whether --with-extra-ldflags was given.
29754if test "${with_extra_ldflags+set}" = set; then :
29755  withval=$with_extra_ldflags;
29756fi
29757
29758
29759  EXTRA_CFLAGS="$with_extra_cflags"
29760  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29761  EXTRA_LDFLAGS="$with_extra_ldflags"
29762
29763  # Hotspot needs these set in their legacy form
29764  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29765  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29766  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29767
29768
29769
29770
29771
29772  # The global CFLAGS and LDLAGS variables are used by configure tests and
29773  # should include the extra parameters
29774  CFLAGS="$EXTRA_CFLAGS"
29775  CXXFLAGS="$EXTRA_CXXFLAGS"
29776  LDFLAGS="$EXTRA_LDFLAGS"
29777  CPPFLAGS=""
29778
29779# The sysroot cflags are needed for configure to be able to run the compilers
29780
29781  if test "x$SYSROOT" != "x"; then
29782    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29783      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29784        # Solaris Studio does not have a concept of sysroot. Instead we must
29785        # make sure the default include and lib dirs are appended to each
29786        # compile and link command line.
29787        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29788        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29789            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29790            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29791      fi
29792    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29793      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29794      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29795    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29796      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29797      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29798    fi
29799    # Propagate the sysroot args to hotspot
29800    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29801    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29802    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29803    # The global CFLAGS and LDFLAGS variables need these for configure to function
29804    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29805    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29806    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29807    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29808  fi
29809
29810  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29811    # We also need -iframework<path>/System/Library/Frameworks
29812    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29813    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29814    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29815    # set this here so it doesn't have to be peppered throughout the forest
29816    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29817    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29818  fi
29819
29820
29821
29822
29823
29824# Then detect the actual binaries needed
29825
29826  # FIXME: Is this needed?
29827  ac_ext=cpp
29828ac_cpp='$CXXCPP $CPPFLAGS'
29829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29832
29833
29834  # Store the CFLAGS etc passed to the configure script.
29835  ORG_CFLAGS="$CFLAGS"
29836  ORG_CXXFLAGS="$CXXFLAGS"
29837
29838  # autoconf magic only relies on PATH, so update it if tools dir is specified
29839  OLD_PATH="$PATH"
29840
29841  # On Windows, we need to detect the visual studio installation first.
29842  # This will change the PATH, but we need to keep that new PATH even
29843  # after toolchain detection is done, since the compiler (on x86) uses
29844  # it for DLL resolution in runtime.
29845  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29846      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29847
29848  # Store path to cygwin link.exe to help excluding it when searching for
29849  # VS linker. This must be done before changing the PATH when looking for VS.
29850  # Extract the first word of "link", so it can be a program name with args.
29851set dummy link; ac_word=$2
29852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29853$as_echo_n "checking for $ac_word... " >&6; }
29854if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29855  $as_echo_n "(cached) " >&6
29856else
29857  case $CYGWIN_LINK in
29858  [\\/]* | ?:[\\/]*)
29859  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29860  ;;
29861  *)
29862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29863for as_dir in $PATH
29864do
29865  IFS=$as_save_IFS
29866  test -z "$as_dir" && as_dir=.
29867    for ac_exec_ext in '' $ac_executable_extensions; do
29868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29869    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29871    break 2
29872  fi
29873done
29874  done
29875IFS=$as_save_IFS
29876
29877  ;;
29878esac
29879fi
29880CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29881if test -n "$CYGWIN_LINK"; then
29882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29883$as_echo "$CYGWIN_LINK" >&6; }
29884else
29885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29886$as_echo "no" >&6; }
29887fi
29888
29889
29890  if test "x$CYGWIN_LINK" != x; then
29891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29892$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29893    "$CYGWIN_LINK" --version > /dev/null
29894    if test $? -eq 0 ; then
29895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29896$as_echo "yes" >&6; }
29897    else
29898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29899$as_echo "no" >&6; }
29900      # This might be the VS linker. Don't exclude it later on.
29901      CYGWIN_LINK=""
29902    fi
29903  fi
29904
29905  # First-hand choice is to locate and run the vsvars bat file.
29906
29907
29908# Check whether --with-toolchain-version was given.
29909if test "${with_toolchain_version+set}" = set; then :
29910  withval=$with_toolchain_version;
29911fi
29912
29913
29914  if test "x$with_toolchain_version" = xlist; then
29915    # List all toolchains
29916    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29917$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29918    for version in $VALID_VS_VERSIONS; do
29919      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29920      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29921    done
29922
29923    exit 0
29924  elif test "x$DEVKIT_VS_VERSION" != x; then
29925    VS_VERSION=$DEVKIT_VS_VERSION
29926    TOOLCHAIN_VERSION=$VS_VERSION
29927    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29928    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29929    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29930    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29931    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29932    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29933
29934    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29935    # can still be exported as INCLUDE for compiler invocations without
29936    # SYSROOT_CFLAGS
29937    OLDIFS="$IFS"
29938    IFS=";"
29939    for i in $DEVKIT_VS_INCLUDE; do
29940      ipath=$i
29941
29942  unix_path="$ipath"
29943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29944    windows_path=`$CYGPATH -m "$unix_path"`
29945    ipath="$windows_path"
29946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29947    windows_path=`cmd //c echo $unix_path`
29948    ipath="$windows_path"
29949  fi
29950
29951      VS_INCLUDE="$VS_INCLUDE;$ipath"
29952    done
29953    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29954    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29955    for i in $DEVKIT_VS_LIB; do
29956      libpath=$i
29957
29958  unix_path="$libpath"
29959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29960    windows_path=`$CYGPATH -m "$unix_path"`
29961    libpath="$windows_path"
29962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29963    windows_path=`cmd //c echo $unix_path`
29964    libpath="$windows_path"
29965  fi
29966
29967      VS_LIB="$VS_LIB;$libpath"
29968    done
29969    IFS="$OLDIFS"
29970
29971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29972$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29973
29974  elif test "x$with_toolchain_version" != x; then
29975    # User override; check that it is valid
29976    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29977      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29978$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29979      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29980$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29981      as_fn_error $? "Cannot continue." "$LINENO" 5
29982    fi
29983    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29984  else
29985    # No flag given, use default
29986    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29987  fi
29988
29989  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29990
29991  VS_VERSION="$VS_VERSION"
29992  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29993  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29994  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29995  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29996
29997  # When using --with-tools-dir, assume it points to the correct and default
29998  # version of Visual Studio or that --with-toolchain-version was also set.
29999  if test "x$with_tools_dir" != x; then
30000
30001  if test "x$VS_ENV_CMD" = x; then
30002    VS_VERSION="${VS_VERSION}"
30003    VS_BASE="$with_tools_dir/../.."
30004    METHOD="--with-tools-dir"
30005
30006    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30007      VCVARSFILE="vc/bin/vcvars32.bat"
30008    else
30009      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30010    fi
30011
30012
30013  windows_path="$VS_BASE"
30014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30015    unix_path=`$CYGPATH -u "$windows_path"`
30016    VS_BASE="$unix_path"
30017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30019    VS_BASE="$unix_path"
30020  fi
30021
30022    if test -d "$VS_BASE"; then
30023      if test -f "$VS_BASE/$VCVARSFILE"; then
30024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30025$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30026        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30027        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30028        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30029        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30030      else
30031        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30032$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30033        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30034$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30035      fi
30036    fi
30037  fi
30038
30039
30040  if test "x$VS_ENV_CMD" = x; then
30041    VS_VERSION="${VS_VERSION}"
30042    VS_BASE="$with_tools_dir/../../.."
30043    METHOD="--with-tools-dir"
30044
30045    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30046      VCVARSFILE="vc/bin/vcvars32.bat"
30047    else
30048      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30049    fi
30050
30051
30052  windows_path="$VS_BASE"
30053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30054    unix_path=`$CYGPATH -u "$windows_path"`
30055    VS_BASE="$unix_path"
30056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30058    VS_BASE="$unix_path"
30059  fi
30060
30061    if test -d "$VS_BASE"; then
30062      if test -f "$VS_BASE/$VCVARSFILE"; then
30063        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30064$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30065        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30066        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30067        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30068        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30069      else
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30071$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30072        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30073$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30074      fi
30075    fi
30076  fi
30077
30078    if test "x$VS_ENV_CMD" = x; then
30079      # Having specified an argument which is incorrect will produce an instant failure;
30080      # we should not go on looking
30081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30082$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30083      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30084$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30085      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30086$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30087      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30088    fi
30089  fi
30090
30091  VS_ENV_CMD=""
30092  VS_ENV_ARGS=""
30093
30094  if test "x$VS_COMNTOOLS" != x; then
30095
30096  if test "x$VS_ENV_CMD" = x; then
30097    VS_VERSION="${VS_VERSION}"
30098    VS_BASE="$VS_COMNTOOLS/../.."
30099    METHOD="$VS_COMNTOOLS_VAR variable"
30100
30101    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30102      VCVARSFILE="vc/bin/vcvars32.bat"
30103    else
30104      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30105    fi
30106
30107
30108  windows_path="$VS_BASE"
30109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30110    unix_path=`$CYGPATH -u "$windows_path"`
30111    VS_BASE="$unix_path"
30112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30114    VS_BASE="$unix_path"
30115  fi
30116
30117    if test -d "$VS_BASE"; then
30118      if test -f "$VS_BASE/$VCVARSFILE"; then
30119        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30120$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30121        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30122        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30123        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30124        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30125      else
30126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30127$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30128        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30129$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30130      fi
30131    fi
30132  fi
30133
30134  fi
30135  if test "x$PROGRAMFILES" != x; then
30136
30137  if test "x$VS_ENV_CMD" = x; then
30138    VS_VERSION="${VS_VERSION}"
30139    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30140    METHOD="well-known name"
30141
30142    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30143      VCVARSFILE="vc/bin/vcvars32.bat"
30144    else
30145      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30146    fi
30147
30148
30149  windows_path="$VS_BASE"
30150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30151    unix_path=`$CYGPATH -u "$windows_path"`
30152    VS_BASE="$unix_path"
30153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30155    VS_BASE="$unix_path"
30156  fi
30157
30158    if test -d "$VS_BASE"; then
30159      if test -f "$VS_BASE/$VCVARSFILE"; then
30160        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30161$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30162        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30163        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30164        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30165        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30166      else
30167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30168$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30170$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30171      fi
30172    fi
30173  fi
30174
30175  fi
30176  # Work around the insanely named ProgramFiles(x86) env variable
30177  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30178  if test "x$PROGRAMFILES_X86" != x; then
30179
30180  if test "x$VS_ENV_CMD" = x; then
30181    VS_VERSION="${VS_VERSION}"
30182    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30183    METHOD="well-known name"
30184
30185    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30186      VCVARSFILE="vc/bin/vcvars32.bat"
30187    else
30188      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30189    fi
30190
30191
30192  windows_path="$VS_BASE"
30193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30194    unix_path=`$CYGPATH -u "$windows_path"`
30195    VS_BASE="$unix_path"
30196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30198    VS_BASE="$unix_path"
30199  fi
30200
30201    if test -d "$VS_BASE"; then
30202      if test -f "$VS_BASE/$VCVARSFILE"; then
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30204$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30205        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30206        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30207        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30208        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30209      else
30210        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30211$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30212        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30213$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30214      fi
30215    fi
30216  fi
30217
30218  fi
30219
30220  if test "x$VS_ENV_CMD" = x; then
30221    VS_VERSION="${VS_VERSION}"
30222    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30223    METHOD="well-known name"
30224
30225    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30226      VCVARSFILE="vc/bin/vcvars32.bat"
30227    else
30228      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30229    fi
30230
30231
30232  windows_path="$VS_BASE"
30233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30234    unix_path=`$CYGPATH -u "$windows_path"`
30235    VS_BASE="$unix_path"
30236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30238    VS_BASE="$unix_path"
30239  fi
30240
30241    if test -d "$VS_BASE"; then
30242      if test -f "$VS_BASE/$VCVARSFILE"; then
30243        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30244$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30245        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30246        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30247        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30248        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30249      else
30250        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30251$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30252        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30253$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30254      fi
30255    fi
30256  fi
30257
30258
30259  if test "x$VS_ENV_CMD" = x; then
30260    VS_VERSION="${VS_VERSION}"
30261    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30262    METHOD="well-known name"
30263
30264    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30265      VCVARSFILE="vc/bin/vcvars32.bat"
30266    else
30267      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30268    fi
30269
30270
30271  windows_path="$VS_BASE"
30272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30273    unix_path=`$CYGPATH -u "$windows_path"`
30274    VS_BASE="$unix_path"
30275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30277    VS_BASE="$unix_path"
30278  fi
30279
30280    if test -d "$VS_BASE"; then
30281      if test -f "$VS_BASE/$VCVARSFILE"; then
30282        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30283$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30284        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30285        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30286        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30287        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30288      else
30289        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30290$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30291        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30292$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30293      fi
30294    fi
30295  fi
30296
30297
30298  if test "x$SDK_INSTALL_DIR" != x; then
30299    if test "x$ProgramW6432" != x; then
30300
30301  if test "x$VS_ENV_CMD" = x; then
30302    VS_VERSION="${VS_VERSION}"
30303    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30304    METHOD="well-known name"
30305
30306  windows_path="$WIN_SDK_BASE"
30307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30308    unix_path=`$CYGPATH -u "$windows_path"`
30309    WIN_SDK_BASE="$unix_path"
30310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30312    WIN_SDK_BASE="$unix_path"
30313  fi
30314
30315    if test -d "$WIN_SDK_BASE"; then
30316      # There have been cases of partial or broken SDK installations. A missing
30317      # lib dir is not going to work.
30318      if test ! -d "$WIN_SDK_BASE/lib"; then
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30320$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30321        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30322$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30323      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30324        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30325$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30326        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30327        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30328          VS_ENV_ARGS="/x86"
30329        else
30330          VS_ENV_ARGS="/x64"
30331        fi
30332        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30333        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30334        # TODO: improve detection for other versions of SDK
30335        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30336      else
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30338$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30339        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30340$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30341      fi
30342    fi
30343  fi
30344
30345    fi
30346    if test "x$PROGRAMW6432" != x; then
30347
30348  if test "x$VS_ENV_CMD" = x; then
30349    VS_VERSION="${VS_VERSION}"
30350    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30351    METHOD="well-known name"
30352
30353  windows_path="$WIN_SDK_BASE"
30354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30355    unix_path=`$CYGPATH -u "$windows_path"`
30356    WIN_SDK_BASE="$unix_path"
30357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30359    WIN_SDK_BASE="$unix_path"
30360  fi
30361
30362    if test -d "$WIN_SDK_BASE"; then
30363      # There have been cases of partial or broken SDK installations. A missing
30364      # lib dir is not going to work.
30365      if test ! -d "$WIN_SDK_BASE/lib"; then
30366        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30367$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30368        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30369$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30370      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30371        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30372$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30373        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30374        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30375          VS_ENV_ARGS="/x86"
30376        else
30377          VS_ENV_ARGS="/x64"
30378        fi
30379        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30380        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30381        # TODO: improve detection for other versions of SDK
30382        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30383      else
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30385$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30386        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30387$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30388      fi
30389    fi
30390  fi
30391
30392    fi
30393    if test "x$PROGRAMFILES" != x; then
30394
30395  if test "x$VS_ENV_CMD" = x; then
30396    VS_VERSION="${VS_VERSION}"
30397    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30398    METHOD="well-known name"
30399
30400  windows_path="$WIN_SDK_BASE"
30401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30402    unix_path=`$CYGPATH -u "$windows_path"`
30403    WIN_SDK_BASE="$unix_path"
30404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30406    WIN_SDK_BASE="$unix_path"
30407  fi
30408
30409    if test -d "$WIN_SDK_BASE"; then
30410      # There have been cases of partial or broken SDK installations. A missing
30411      # lib dir is not going to work.
30412      if test ! -d "$WIN_SDK_BASE/lib"; then
30413        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30414$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30415        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30416$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30417      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30418        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30419$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30420        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30421        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30422          VS_ENV_ARGS="/x86"
30423        else
30424          VS_ENV_ARGS="/x64"
30425        fi
30426        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30427        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30428        # TODO: improve detection for other versions of SDK
30429        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30430      else
30431        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30432$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30433        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30434$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30435      fi
30436    fi
30437  fi
30438
30439    fi
30440
30441  if test "x$VS_ENV_CMD" = x; then
30442    VS_VERSION="${VS_VERSION}"
30443    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30444    METHOD="well-known name"
30445
30446  windows_path="$WIN_SDK_BASE"
30447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30448    unix_path=`$CYGPATH -u "$windows_path"`
30449    WIN_SDK_BASE="$unix_path"
30450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30452    WIN_SDK_BASE="$unix_path"
30453  fi
30454
30455    if test -d "$WIN_SDK_BASE"; then
30456      # There have been cases of partial or broken SDK installations. A missing
30457      # lib dir is not going to work.
30458      if test ! -d "$WIN_SDK_BASE/lib"; then
30459        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30460$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30461        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30462$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30463      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30464        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30465$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30466        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30467        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30468          VS_ENV_ARGS="/x86"
30469        else
30470          VS_ENV_ARGS="/x64"
30471        fi
30472        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30473        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30474        # TODO: improve detection for other versions of SDK
30475        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30476      else
30477        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30478$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30479        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30480$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30481      fi
30482    fi
30483  fi
30484
30485
30486  if test "x$VS_ENV_CMD" = x; then
30487    VS_VERSION="${VS_VERSION}"
30488    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30489    METHOD="well-known name"
30490
30491  windows_path="$WIN_SDK_BASE"
30492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30493    unix_path=`$CYGPATH -u "$windows_path"`
30494    WIN_SDK_BASE="$unix_path"
30495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30497    WIN_SDK_BASE="$unix_path"
30498  fi
30499
30500    if test -d "$WIN_SDK_BASE"; then
30501      # There have been cases of partial or broken SDK installations. A missing
30502      # lib dir is not going to work.
30503      if test ! -d "$WIN_SDK_BASE/lib"; then
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30505$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30506        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30507$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30508      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30510$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30511        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30512        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30513          VS_ENV_ARGS="/x86"
30514        else
30515          VS_ENV_ARGS="/x64"
30516        fi
30517        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30518        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30519        # TODO: improve detection for other versions of SDK
30520        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30521      else
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30523$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30524        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30525$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30526      fi
30527    fi
30528  fi
30529
30530  fi
30531
30532    if test "x$VS_ENV_CMD" != x; then
30533      TOOLCHAIN_VERSION=$VS_VERSION
30534      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30535      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30536      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30537      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30538      # The rest of the variables are already evaled while probing
30539      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30540$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30541      break
30542    fi
30543  done
30544
30545
30546  # If we have a devkit, skip all of the below.
30547  if test "x$DEVKIT_VS_VERSION" = x; then
30548    if test "x$VS_ENV_CMD" != x; then
30549      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30550
30551  # Only process if variable expands to non-empty
30552
30553  if test "x$VS_ENV_CMD" != x; then
30554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30555
30556  # First separate the path from the arguments. This will split at the first
30557  # space.
30558  complete="$VS_ENV_CMD"
30559  path="${complete%% *}"
30560  tmp="$complete EOL"
30561  arguments="${tmp#* }"
30562
30563  # Input might be given as Windows format, start by converting to
30564  # unix format.
30565  new_path=`$CYGPATH -u "$path"`
30566
30567  # Now try to locate executable using which
30568  new_path=`$WHICH "$new_path" 2> /dev/null`
30569  # bat and cmd files are not always considered executable in cygwin causing which
30570  # to not find them
30571  if test "x$new_path" = x \
30572      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30573      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30574    new_path=`$CYGPATH -u "$path"`
30575  fi
30576  if test "x$new_path" = x; then
30577    # Oops. Which didn't find the executable.
30578    # The splitting of arguments from the executable at a space might have been incorrect,
30579    # since paths with space are more likely in Windows. Give it another try with the whole
30580    # argument.
30581    path="$complete"
30582    arguments="EOL"
30583    new_path=`$CYGPATH -u "$path"`
30584    new_path=`$WHICH "$new_path" 2> /dev/null`
30585    # bat and cmd files are not always considered executable in cygwin causing which
30586    # to not find them
30587    if test "x$new_path" = x \
30588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30590      new_path=`$CYGPATH -u "$path"`
30591    fi
30592    if test "x$new_path" = x; then
30593      # It's still not found. Now this is an unrecoverable error.
30594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30595$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30596      has_space=`$ECHO "$complete" | $GREP " "`
30597      if test "x$has_space" != x; then
30598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30600      fi
30601      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30602    fi
30603  fi
30604
30605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30608  # "foo.exe" is OK but "foo" is an error.
30609  #
30610  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30611  # It is also a way to make sure we got the proper file name for the real test later on.
30612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30613  if test "x$test_shortpath" = x; then
30614    # Short path failed, file does not exist as specified.
30615    # Try adding .exe or .cmd
30616    if test -f "${new_path}.exe"; then
30617      input_to_shortpath="${new_path}.exe"
30618    elif test -f "${new_path}.cmd"; then
30619      input_to_shortpath="${new_path}.cmd"
30620    else
30621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30622$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30625      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30626    fi
30627  else
30628    input_to_shortpath="$new_path"
30629  fi
30630
30631  # Call helper function which possibly converts this using DOS-style short mode.
30632  # If so, the updated path is stored in $new_path.
30633  new_path="$input_to_shortpath"
30634
30635  input_path="$input_to_shortpath"
30636  # Check if we need to convert this using DOS-style short mode. If the path
30637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30638  # take no chances and rewrite it.
30639  # Note: m4 eats our [], so we need to use [ and ] instead.
30640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30641  if test "x$has_forbidden_chars" != x; then
30642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30646      # Going to short mode and back again did indeed matter. Since short mode is
30647      # case insensitive, let's make it lowercase to improve readability.
30648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30649      # Now convert it back to Unix-style (cygpath)
30650      input_path=`$CYGPATH -u "$shortmode_path"`
30651      new_path="$input_path"
30652    fi
30653  fi
30654
30655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30656  if test "x$test_cygdrive_prefix" = x; then
30657    # As a simple fix, exclude /usr/bin since it's not a real path.
30658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30660      # a path prefixed by /cygdrive for fixpath to work.
30661      new_path="$CYGWIN_ROOT_PATH$input_path"
30662    fi
30663  fi
30664
30665  # remove trailing .exe if any
30666  new_path="${new_path/%.exe/}"
30667
30668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30669
30670  # First separate the path from the arguments. This will split at the first
30671  # space.
30672  complete="$VS_ENV_CMD"
30673  path="${complete%% *}"
30674  tmp="$complete EOL"
30675  arguments="${tmp#* }"
30676
30677  # Input might be given as Windows format, start by converting to
30678  # unix format.
30679  new_path="$path"
30680
30681  windows_path="$new_path"
30682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30683    unix_path=`$CYGPATH -u "$windows_path"`
30684    new_path="$unix_path"
30685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30687    new_path="$unix_path"
30688  fi
30689
30690
30691  # Now try to locate executable using which
30692  new_path=`$WHICH "$new_path" 2> /dev/null`
30693
30694  if test "x$new_path" = x; then
30695    # Oops. Which didn't find the executable.
30696    # The splitting of arguments from the executable at a space might have been incorrect,
30697    # since paths with space are more likely in Windows. Give it another try with the whole
30698    # argument.
30699    path="$complete"
30700    arguments="EOL"
30701    new_path="$path"
30702
30703  windows_path="$new_path"
30704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30705    unix_path=`$CYGPATH -u "$windows_path"`
30706    new_path="$unix_path"
30707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30709    new_path="$unix_path"
30710  fi
30711
30712
30713    new_path=`$WHICH "$new_path" 2> /dev/null`
30714    # bat and cmd files are not always considered executable in MSYS causing which
30715    # to not find them
30716    if test "x$new_path" = x \
30717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30719      new_path="$path"
30720
30721  windows_path="$new_path"
30722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30723    unix_path=`$CYGPATH -u "$windows_path"`
30724    new_path="$unix_path"
30725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30727    new_path="$unix_path"
30728  fi
30729
30730    fi
30731
30732    if test "x$new_path" = x; then
30733      # It's still not found. Now this is an unrecoverable error.
30734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30735$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30736      has_space=`$ECHO "$complete" | $GREP " "`
30737      if test "x$has_space" != x; then
30738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30740      fi
30741      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30742    fi
30743  fi
30744
30745  # Now new_path has a complete unix path to the binary
30746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30747    # Keep paths in /bin as-is, but remove trailing .exe if any
30748    new_path="${new_path/%.exe/}"
30749    # Do not save /bin paths to all_fixpath_prefixes!
30750  else
30751    # Not in mixed or Windows style, start by that.
30752    new_path=`cmd //c echo $new_path`
30753
30754  input_path="$new_path"
30755  # Check if we need to convert this using DOS-style short mode. If the path
30756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30757  # take no chances and rewrite it.
30758  # Note: m4 eats our [], so we need to use [ and ] instead.
30759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30760  if test "x$has_forbidden_chars" != x; then
30761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30763  fi
30764
30765    # Output is in $new_path
30766
30767  windows_path="$new_path"
30768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30769    unix_path=`$CYGPATH -u "$windows_path"`
30770    new_path="$unix_path"
30771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30773    new_path="$unix_path"
30774  fi
30775
30776    # remove trailing .exe if any
30777    new_path="${new_path/%.exe/}"
30778
30779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30781  fi
30782
30783    else
30784      # We're on a unix platform. Hooray! :)
30785      # First separate the path from the arguments. This will split at the first
30786      # space.
30787      complete="$VS_ENV_CMD"
30788      path="${complete%% *}"
30789      tmp="$complete EOL"
30790      arguments="${tmp#* }"
30791
30792      # Cannot rely on the command "which" here since it doesn't always work.
30793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30794      if test -z "$is_absolute_path"; then
30795        # Path to executable is not absolute. Find it.
30796        IFS_save="$IFS"
30797        IFS=:
30798        for p in $PATH; do
30799          if test -f "$p/$path" && test -x "$p/$path"; then
30800            new_path="$p/$path"
30801            break
30802          fi
30803        done
30804        IFS="$IFS_save"
30805      else
30806        # This is an absolute path, we can use it without further modifications.
30807        new_path="$path"
30808      fi
30809
30810      if test "x$new_path" = x; then
30811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30812$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30813        has_space=`$ECHO "$complete" | $GREP " "`
30814        if test "x$has_space" != x; then
30815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30817        fi
30818        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30819      fi
30820    fi
30821
30822    # Now join together the path and the arguments once again
30823    if test "x$arguments" != xEOL; then
30824      new_complete="$new_path ${arguments% *}"
30825    else
30826      new_complete="$new_path"
30827    fi
30828
30829    if test "x$complete" != "x$new_complete"; then
30830      VS_ENV_CMD="$new_complete"
30831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30832$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30833    fi
30834  fi
30835
30836
30837      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30838      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30839$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30840
30841      # We need to create a couple of temporary files.
30842      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30843      $MKDIR -p $VS_ENV_TMP_DIR
30844
30845      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30846      # Instead create a shell script which will set the relevant variables when run.
30847      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30848
30849  unix_path="$WINPATH_VS_ENV_CMD"
30850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30851    windows_path=`$CYGPATH -m "$unix_path"`
30852    WINPATH_VS_ENV_CMD="$windows_path"
30853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30854    windows_path=`cmd //c echo $unix_path`
30855    WINPATH_VS_ENV_CMD="$windows_path"
30856  fi
30857
30858      WINPATH_BASH="$BASH"
30859
30860  unix_path="$WINPATH_BASH"
30861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30862    windows_path=`$CYGPATH -m "$unix_path"`
30863    WINPATH_BASH="$windows_path"
30864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30865    windows_path=`cmd //c echo $unix_path`
30866    WINPATH_BASH="$windows_path"
30867  fi
30868
30869
30870      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30871      # script (executable by bash) that will setup the important variables.
30872      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30873      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30874      # This will end up something like:
30875      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30876      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30877      # These will end up something like:
30878      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30879      # The trailing space for everyone except PATH is no typo, but is needed due
30880      # to trailing \ in the Windows paths. These will be stripped later.
30881      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30882          >> $EXTRACT_VC_ENV_BAT_FILE
30883      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30884          >> $EXTRACT_VC_ENV_BAT_FILE
30885      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30886          >> $EXTRACT_VC_ENV_BAT_FILE
30887      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30888          >> $EXTRACT_VC_ENV_BAT_FILE
30889      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30890          >> $EXTRACT_VC_ENV_BAT_FILE
30891      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30892          >> $EXTRACT_VC_ENV_BAT_FILE
30893
30894      # Now execute the newly created bat file.
30895      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30896      # Change directory so we don't need to mess with Windows paths in redirects.
30897      cd $VS_ENV_TMP_DIR
30898      cmd /c extract-vs-env.bat | $CAT
30899      cd $CURDIR
30900
30901      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30902        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30903$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30904        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30905$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30906        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30907$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30908        as_fn_error $? "Cannot continue" "$LINENO" 5
30909      fi
30910
30911      # Now set all paths and other env variables. This will allow the rest of
30912      # the configure script to find and run the compiler in the proper way.
30913      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30914$as_echo "$as_me: Setting extracted environment variables" >&6;}
30915      . $VS_ENV_TMP_DIR/set-vs-env.sh
30916      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30917      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30918    else
30919      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30921$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30922    fi
30923  fi
30924
30925  # At this point, we should have correct variables in the environment, or we can't continue.
30926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30927$as_echo_n "checking for Visual Studio variables... " >&6; }
30928
30929  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30930      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30931    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30933$as_echo "present but broken" >&6; }
30934      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30935    else
30936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30937$as_echo "ok" >&6; }
30938      # Remove any trailing "\" ";" and " " from the variables.
30939      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30940      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30941      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30942      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30943      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30944      # Remove any paths containing # (typically F#) as that messes up make. This
30945      # is needed if visual studio was installed with F# support.
30946      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30947
30948
30949
30950
30951
30952      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30953      OLDIFS="$IFS"
30954      IFS=";"
30955      for i in $VS_INCLUDE; do
30956        ipath=$i
30957        # Only process non-empty elements
30958        if test "x$ipath" != x; then
30959          IFS="$OLDIFS"
30960          # Check that directory exists before calling fixup_path
30961          testpath=$ipath
30962
30963  windows_path="$testpath"
30964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30965    unix_path=`$CYGPATH -u "$windows_path"`
30966    testpath="$unix_path"
30967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30969    testpath="$unix_path"
30970  fi
30971
30972          if test -d "$testpath"; then
30973
30974  # Only process if variable expands to non-empty
30975
30976  if test "x$ipath" != x; then
30977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30978
30979  # Input might be given as Windows format, start by converting to
30980  # unix format.
30981  path="$ipath"
30982  new_path=`$CYGPATH -u "$path"`
30983
30984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30987  # "foo.exe" is OK but "foo" is an error.
30988  #
30989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30990  # It is also a way to make sure we got the proper file name for the real test later on.
30991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30992  if test "x$test_shortpath" = x; then
30993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30994$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30995    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30996  fi
30997
30998  # Call helper function which possibly converts this using DOS-style short mode.
30999  # If so, the updated path is stored in $new_path.
31000
31001  input_path="$new_path"
31002  # Check if we need to convert this using DOS-style short mode. If the path
31003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31004  # take no chances and rewrite it.
31005  # Note: m4 eats our [], so we need to use [ and ] instead.
31006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31007  if test "x$has_forbidden_chars" != x; then
31008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31012      # Going to short mode and back again did indeed matter. Since short mode is
31013      # case insensitive, let's make it lowercase to improve readability.
31014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31015      # Now convert it back to Unix-style (cygpath)
31016      input_path=`$CYGPATH -u "$shortmode_path"`
31017      new_path="$input_path"
31018    fi
31019  fi
31020
31021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31022  if test "x$test_cygdrive_prefix" = x; then
31023    # As a simple fix, exclude /usr/bin since it's not a real path.
31024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31026      # a path prefixed by /cygdrive for fixpath to work.
31027      new_path="$CYGWIN_ROOT_PATH$input_path"
31028    fi
31029  fi
31030
31031
31032  if test "x$path" != "x$new_path"; then
31033    ipath="$new_path"
31034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31035$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31036  fi
31037
31038    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31039
31040  path="$ipath"
31041  has_colon=`$ECHO $path | $GREP ^.:`
31042  new_path="$path"
31043  if test "x$has_colon" = x; then
31044    # Not in mixed or Windows style, start by that.
31045    new_path=`cmd //c echo $path`
31046  fi
31047
31048
31049  input_path="$new_path"
31050  # Check if we need to convert this using DOS-style short mode. If the path
31051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31052  # take no chances and rewrite it.
31053  # Note: m4 eats our [], so we need to use [ and ] instead.
31054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31055  if test "x$has_forbidden_chars" != x; then
31056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31058  fi
31059
31060
31061  windows_path="$new_path"
31062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31063    unix_path=`$CYGPATH -u "$windows_path"`
31064    new_path="$unix_path"
31065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31067    new_path="$unix_path"
31068  fi
31069
31070  if test "x$path" != "x$new_path"; then
31071    ipath="$new_path"
31072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31073$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31074  fi
31075
31076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31078
31079    else
31080      # We're on a unix platform. Hooray! :)
31081      path="$ipath"
31082      has_space=`$ECHO "$path" | $GREP " "`
31083      if test "x$has_space" != x; then
31084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31085$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31086        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31087      fi
31088
31089      # Use eval to expand a potential ~
31090      eval path="$path"
31091      if test ! -f "$path" && test ! -d "$path"; then
31092        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31093      fi
31094
31095      ipath="`cd "$path"; $THEPWDCMD -L`"
31096    fi
31097  fi
31098
31099            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31100          fi
31101          IFS=";"
31102        fi
31103      done
31104      # Convert VS_LIB into SYSROOT_LDFLAGS
31105      for i in $VS_LIB; do
31106        libpath=$i
31107        # Only process non-empty elements
31108        if test "x$libpath" != x; then
31109          IFS="$OLDIFS"
31110          # Check that directory exists before calling fixup_path
31111          testpath=$libpath
31112
31113  windows_path="$testpath"
31114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31115    unix_path=`$CYGPATH -u "$windows_path"`
31116    testpath="$unix_path"
31117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31119    testpath="$unix_path"
31120  fi
31121
31122          if test -d "$testpath"; then
31123
31124  # Only process if variable expands to non-empty
31125
31126  if test "x$libpath" != x; then
31127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31128
31129  # Input might be given as Windows format, start by converting to
31130  # unix format.
31131  path="$libpath"
31132  new_path=`$CYGPATH -u "$path"`
31133
31134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31137  # "foo.exe" is OK but "foo" is an error.
31138  #
31139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31140  # It is also a way to make sure we got the proper file name for the real test later on.
31141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31142  if test "x$test_shortpath" = x; then
31143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31144$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31145    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31146  fi
31147
31148  # Call helper function which possibly converts this using DOS-style short mode.
31149  # If so, the updated path is stored in $new_path.
31150
31151  input_path="$new_path"
31152  # Check if we need to convert this using DOS-style short mode. If the path
31153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31154  # take no chances and rewrite it.
31155  # Note: m4 eats our [], so we need to use [ and ] instead.
31156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31157  if test "x$has_forbidden_chars" != x; then
31158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31162      # Going to short mode and back again did indeed matter. Since short mode is
31163      # case insensitive, let's make it lowercase to improve readability.
31164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31165      # Now convert it back to Unix-style (cygpath)
31166      input_path=`$CYGPATH -u "$shortmode_path"`
31167      new_path="$input_path"
31168    fi
31169  fi
31170
31171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31172  if test "x$test_cygdrive_prefix" = x; then
31173    # As a simple fix, exclude /usr/bin since it's not a real path.
31174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31176      # a path prefixed by /cygdrive for fixpath to work.
31177      new_path="$CYGWIN_ROOT_PATH$input_path"
31178    fi
31179  fi
31180
31181
31182  if test "x$path" != "x$new_path"; then
31183    libpath="$new_path"
31184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31185$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31186  fi
31187
31188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31189
31190  path="$libpath"
31191  has_colon=`$ECHO $path | $GREP ^.:`
31192  new_path="$path"
31193  if test "x$has_colon" = x; then
31194    # Not in mixed or Windows style, start by that.
31195    new_path=`cmd //c echo $path`
31196  fi
31197
31198
31199  input_path="$new_path"
31200  # Check if we need to convert this using DOS-style short mode. If the path
31201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31202  # take no chances and rewrite it.
31203  # Note: m4 eats our [], so we need to use [ and ] instead.
31204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31205  if test "x$has_forbidden_chars" != x; then
31206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31208  fi
31209
31210
31211  windows_path="$new_path"
31212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31213    unix_path=`$CYGPATH -u "$windows_path"`
31214    new_path="$unix_path"
31215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31217    new_path="$unix_path"
31218  fi
31219
31220  if test "x$path" != "x$new_path"; then
31221    libpath="$new_path"
31222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31223$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31224  fi
31225
31226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31228
31229    else
31230      # We're on a unix platform. Hooray! :)
31231      path="$libpath"
31232      has_space=`$ECHO "$path" | $GREP " "`
31233      if test "x$has_space" != x; then
31234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31235$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31237      fi
31238
31239      # Use eval to expand a potential ~
31240      eval path="$path"
31241      if test ! -f "$path" && test ! -d "$path"; then
31242        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31243      fi
31244
31245      libpath="`cd "$path"; $THEPWDCMD -L`"
31246    fi
31247  fi
31248
31249            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31250          fi
31251          IFS=";"
31252        fi
31253      done
31254      IFS="$OLDIFS"
31255    fi
31256  else
31257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31258$as_echo "not found" >&6; }
31259
31260    if test "x$VS_ENV_CMD" = x; then
31261      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31262$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31263      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31264$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31265    else
31266      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31267$as_echo "$as_me: Running the extraction script failed." >&6;}
31268    fi
31269    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31270$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31272$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31273    as_fn_error $? "Cannot continue" "$LINENO" 5
31274  fi
31275
31276    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31277    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31278    PATH="$VS_PATH"
31279    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31280    export INCLUDE="$VS_INCLUDE"
31281    export LIB="$VS_LIB"
31282  fi
31283
31284  # For solaris we really need solaris tools, and not the GNU equivalent.
31285  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31286  # so add that to path before starting to probe.
31287  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31288  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31289    PATH="/usr/ccs/bin:$PATH"
31290  fi
31291
31292  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31293  # override all other locations.
31294  if test "x$TOOLCHAIN_PATH" != x; then
31295    PATH=$TOOLCHAIN_PATH:$PATH
31296  fi
31297
31298
31299  #
31300  # Setup the compilers (CC and CXX)
31301  #
31302
31303  COMPILER_NAME=C
31304  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31305
31306  if test "x$CC" != x; then
31307    # User has supplied compiler name already, always let that override.
31308    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31309$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31310    if test "x`basename $CC`" = "x$CC"; then
31311      # A command without a complete path is provided, search $PATH.
31312
31313      for ac_prog in $CC
31314do
31315  # Extract the first word of "$ac_prog", so it can be a program name with args.
31316set dummy $ac_prog; ac_word=$2
31317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31318$as_echo_n "checking for $ac_word... " >&6; }
31319if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31320  $as_echo_n "(cached) " >&6
31321else
31322  case $POTENTIAL_CC in
31323  [\\/]* | ?:[\\/]*)
31324  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31325  ;;
31326  *)
31327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31328for as_dir in $PATH
31329do
31330  IFS=$as_save_IFS
31331  test -z "$as_dir" && as_dir=.
31332    for ac_exec_ext in '' $ac_executable_extensions; do
31333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31334    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31336    break 2
31337  fi
31338done
31339  done
31340IFS=$as_save_IFS
31341
31342  ;;
31343esac
31344fi
31345POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31346if test -n "$POTENTIAL_CC"; then
31347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31348$as_echo "$POTENTIAL_CC" >&6; }
31349else
31350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31351$as_echo "no" >&6; }
31352fi
31353
31354
31355  test -n "$POTENTIAL_CC" && break
31356done
31357
31358      if test "x$POTENTIAL_CC" != x; then
31359        CC=$POTENTIAL_CC
31360      else
31361        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31362      fi
31363    else
31364      # Otherwise it might already be a complete path
31365      if test ! -x "$CC"; then
31366        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31367      fi
31368    fi
31369  else
31370    # No user supplied value. Locate compiler ourselves.
31371
31372    # If we are cross compiling, assume cross compilation tools follows the
31373    # cross compilation standard where they are prefixed with the autoconf
31374    # standard name for the target. For example the binary
31375    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31376    # If we are not cross compiling, then the default compiler name will be
31377    # used.
31378
31379    CC=
31380    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31381    # before checking the rest of the PATH.
31382    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31383    # step, this should not be necessary.
31384    if test -n "$TOOLCHAIN_PATH"; then
31385      PATH_save="$PATH"
31386      PATH="$TOOLCHAIN_PATH"
31387      for ac_prog in $SEARCH_LIST
31388do
31389  # Extract the first word of "$ac_prog", so it can be a program name with args.
31390set dummy $ac_prog; ac_word=$2
31391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31392$as_echo_n "checking for $ac_word... " >&6; }
31393if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31394  $as_echo_n "(cached) " >&6
31395else
31396  case $TOOLCHAIN_PATH_CC in
31397  [\\/]* | ?:[\\/]*)
31398  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31399  ;;
31400  *)
31401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31402for as_dir in $PATH
31403do
31404  IFS=$as_save_IFS
31405  test -z "$as_dir" && as_dir=.
31406    for ac_exec_ext in '' $ac_executable_extensions; do
31407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31408    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31410    break 2
31411  fi
31412done
31413  done
31414IFS=$as_save_IFS
31415
31416  ;;
31417esac
31418fi
31419TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31420if test -n "$TOOLCHAIN_PATH_CC"; then
31421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31422$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31423else
31424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31425$as_echo "no" >&6; }
31426fi
31427
31428
31429  test -n "$TOOLCHAIN_PATH_CC" && break
31430done
31431
31432      CC=$TOOLCHAIN_PATH_CC
31433      PATH="$PATH_save"
31434    fi
31435
31436    # AC_PATH_PROGS can't be run multiple times with the same variable,
31437    # so create a new name for this run.
31438    if test "x$CC" = x; then
31439      for ac_prog in $SEARCH_LIST
31440do
31441  # Extract the first word of "$ac_prog", so it can be a program name with args.
31442set dummy $ac_prog; ac_word=$2
31443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31444$as_echo_n "checking for $ac_word... " >&6; }
31445if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31446  $as_echo_n "(cached) " >&6
31447else
31448  case $POTENTIAL_CC in
31449  [\\/]* | ?:[\\/]*)
31450  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31451  ;;
31452  *)
31453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31454for as_dir in $PATH
31455do
31456  IFS=$as_save_IFS
31457  test -z "$as_dir" && as_dir=.
31458    for ac_exec_ext in '' $ac_executable_extensions; do
31459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31460    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31462    break 2
31463  fi
31464done
31465  done
31466IFS=$as_save_IFS
31467
31468  ;;
31469esac
31470fi
31471POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31472if test -n "$POTENTIAL_CC"; then
31473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31474$as_echo "$POTENTIAL_CC" >&6; }
31475else
31476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31477$as_echo "no" >&6; }
31478fi
31479
31480
31481  test -n "$POTENTIAL_CC" && break
31482done
31483
31484      CC=$POTENTIAL_CC
31485    fi
31486
31487    if test "x$CC" = x; then
31488
31489  # Print a helpful message on how to acquire the necessary build dependency.
31490  # devkit is the help tag: freetype, cups, alsa etc
31491  MISSING_DEPENDENCY=devkit
31492
31493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31494    cygwin_help $MISSING_DEPENDENCY
31495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31496    msys_help $MISSING_DEPENDENCY
31497  else
31498    PKGHANDLER_COMMAND=
31499
31500    case $PKGHANDLER in
31501      apt-get)
31502        apt_help     $MISSING_DEPENDENCY ;;
31503      yum)
31504        yum_help     $MISSING_DEPENDENCY ;;
31505      port)
31506        port_help    $MISSING_DEPENDENCY ;;
31507      pkgutil)
31508        pkgutil_help $MISSING_DEPENDENCY ;;
31509      pkgadd)
31510        pkgadd_help  $MISSING_DEPENDENCY ;;
31511    esac
31512
31513    if test "x$PKGHANDLER_COMMAND" != x; then
31514      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31515    fi
31516  fi
31517
31518      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31519    fi
31520  fi
31521
31522  # Now we have a compiler binary in CC. Make sure it's okay.
31523
31524  # Only process if variable expands to non-empty
31525
31526  if test "x$CC" != x; then
31527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31528
31529  # First separate the path from the arguments. This will split at the first
31530  # space.
31531  complete="$CC"
31532  path="${complete%% *}"
31533  tmp="$complete EOL"
31534  arguments="${tmp#* }"
31535
31536  # Input might be given as Windows format, start by converting to
31537  # unix format.
31538  new_path=`$CYGPATH -u "$path"`
31539
31540  # Now try to locate executable using which
31541  new_path=`$WHICH "$new_path" 2> /dev/null`
31542  # bat and cmd files are not always considered executable in cygwin causing which
31543  # to not find them
31544  if test "x$new_path" = x \
31545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31547    new_path=`$CYGPATH -u "$path"`
31548  fi
31549  if test "x$new_path" = x; then
31550    # Oops. Which didn't find the executable.
31551    # The splitting of arguments from the executable at a space might have been incorrect,
31552    # since paths with space are more likely in Windows. Give it another try with the whole
31553    # argument.
31554    path="$complete"
31555    arguments="EOL"
31556    new_path=`$CYGPATH -u "$path"`
31557    new_path=`$WHICH "$new_path" 2> /dev/null`
31558    # bat and cmd files are not always considered executable in cygwin causing which
31559    # to not find them
31560    if test "x$new_path" = x \
31561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31563      new_path=`$CYGPATH -u "$path"`
31564    fi
31565    if test "x$new_path" = x; then
31566      # It's still not found. Now this is an unrecoverable error.
31567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31568$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31569      has_space=`$ECHO "$complete" | $GREP " "`
31570      if test "x$has_space" != x; then
31571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31573      fi
31574      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31575    fi
31576  fi
31577
31578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31581  # "foo.exe" is OK but "foo" is an error.
31582  #
31583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31584  # It is also a way to make sure we got the proper file name for the real test later on.
31585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31586  if test "x$test_shortpath" = x; then
31587    # Short path failed, file does not exist as specified.
31588    # Try adding .exe or .cmd
31589    if test -f "${new_path}.exe"; then
31590      input_to_shortpath="${new_path}.exe"
31591    elif test -f "${new_path}.cmd"; then
31592      input_to_shortpath="${new_path}.cmd"
31593    else
31594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31595$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31598      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31599    fi
31600  else
31601    input_to_shortpath="$new_path"
31602  fi
31603
31604  # Call helper function which possibly converts this using DOS-style short mode.
31605  # If so, the updated path is stored in $new_path.
31606  new_path="$input_to_shortpath"
31607
31608  input_path="$input_to_shortpath"
31609  # Check if we need to convert this using DOS-style short mode. If the path
31610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31611  # take no chances and rewrite it.
31612  # Note: m4 eats our [], so we need to use [ and ] instead.
31613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31614  if test "x$has_forbidden_chars" != x; then
31615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31619      # Going to short mode and back again did indeed matter. Since short mode is
31620      # case insensitive, let's make it lowercase to improve readability.
31621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31622      # Now convert it back to Unix-style (cygpath)
31623      input_path=`$CYGPATH -u "$shortmode_path"`
31624      new_path="$input_path"
31625    fi
31626  fi
31627
31628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31629  if test "x$test_cygdrive_prefix" = x; then
31630    # As a simple fix, exclude /usr/bin since it's not a real path.
31631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31633      # a path prefixed by /cygdrive for fixpath to work.
31634      new_path="$CYGWIN_ROOT_PATH$input_path"
31635    fi
31636  fi
31637
31638  # remove trailing .exe if any
31639  new_path="${new_path/%.exe/}"
31640
31641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31642
31643  # First separate the path from the arguments. This will split at the first
31644  # space.
31645  complete="$CC"
31646  path="${complete%% *}"
31647  tmp="$complete EOL"
31648  arguments="${tmp#* }"
31649
31650  # Input might be given as Windows format, start by converting to
31651  # unix format.
31652  new_path="$path"
31653
31654  windows_path="$new_path"
31655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31656    unix_path=`$CYGPATH -u "$windows_path"`
31657    new_path="$unix_path"
31658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31660    new_path="$unix_path"
31661  fi
31662
31663
31664  # Now try to locate executable using which
31665  new_path=`$WHICH "$new_path" 2> /dev/null`
31666
31667  if test "x$new_path" = x; then
31668    # Oops. Which didn't find the executable.
31669    # The splitting of arguments from the executable at a space might have been incorrect,
31670    # since paths with space are more likely in Windows. Give it another try with the whole
31671    # argument.
31672    path="$complete"
31673    arguments="EOL"
31674    new_path="$path"
31675
31676  windows_path="$new_path"
31677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31678    unix_path=`$CYGPATH -u "$windows_path"`
31679    new_path="$unix_path"
31680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31682    new_path="$unix_path"
31683  fi
31684
31685
31686    new_path=`$WHICH "$new_path" 2> /dev/null`
31687    # bat and cmd files are not always considered executable in MSYS causing which
31688    # to not find them
31689    if test "x$new_path" = x \
31690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31692      new_path="$path"
31693
31694  windows_path="$new_path"
31695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31696    unix_path=`$CYGPATH -u "$windows_path"`
31697    new_path="$unix_path"
31698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31700    new_path="$unix_path"
31701  fi
31702
31703    fi
31704
31705    if test "x$new_path" = x; then
31706      # It's still not found. Now this is an unrecoverable error.
31707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31708$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31709      has_space=`$ECHO "$complete" | $GREP " "`
31710      if test "x$has_space" != x; then
31711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31713      fi
31714      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31715    fi
31716  fi
31717
31718  # Now new_path has a complete unix path to the binary
31719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31720    # Keep paths in /bin as-is, but remove trailing .exe if any
31721    new_path="${new_path/%.exe/}"
31722    # Do not save /bin paths to all_fixpath_prefixes!
31723  else
31724    # Not in mixed or Windows style, start by that.
31725    new_path=`cmd //c echo $new_path`
31726
31727  input_path="$new_path"
31728  # Check if we need to convert this using DOS-style short mode. If the path
31729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31730  # take no chances and rewrite it.
31731  # Note: m4 eats our [], so we need to use [ and ] instead.
31732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31733  if test "x$has_forbidden_chars" != x; then
31734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31736  fi
31737
31738    # Output is in $new_path
31739
31740  windows_path="$new_path"
31741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31742    unix_path=`$CYGPATH -u "$windows_path"`
31743    new_path="$unix_path"
31744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31746    new_path="$unix_path"
31747  fi
31748
31749    # remove trailing .exe if any
31750    new_path="${new_path/%.exe/}"
31751
31752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31754  fi
31755
31756    else
31757      # We're on a unix platform. Hooray! :)
31758      # First separate the path from the arguments. This will split at the first
31759      # space.
31760      complete="$CC"
31761      path="${complete%% *}"
31762      tmp="$complete EOL"
31763      arguments="${tmp#* }"
31764
31765      # Cannot rely on the command "which" here since it doesn't always work.
31766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31767      if test -z "$is_absolute_path"; then
31768        # Path to executable is not absolute. Find it.
31769        IFS_save="$IFS"
31770        IFS=:
31771        for p in $PATH; do
31772          if test -f "$p/$path" && test -x "$p/$path"; then
31773            new_path="$p/$path"
31774            break
31775          fi
31776        done
31777        IFS="$IFS_save"
31778      else
31779        # This is an absolute path, we can use it without further modifications.
31780        new_path="$path"
31781      fi
31782
31783      if test "x$new_path" = x; then
31784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31785$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31786        has_space=`$ECHO "$complete" | $GREP " "`
31787        if test "x$has_space" != x; then
31788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31790        fi
31791        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31792      fi
31793    fi
31794
31795    # Now join together the path and the arguments once again
31796    if test "x$arguments" != xEOL; then
31797      new_complete="$new_path ${arguments% *}"
31798    else
31799      new_complete="$new_path"
31800    fi
31801
31802    if test "x$complete" != "x$new_complete"; then
31803      CC="$new_complete"
31804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31805$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31806    fi
31807  fi
31808
31809  TEST_COMPILER="$CC"
31810  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31811  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31812  if test "x$OPENJDK_BUILD_OS" != xaix; then
31813    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31815$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31816
31817  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31818    # Follow a chain of symbolic links. Use readlink
31819    # where it exists, else fall back to horribly
31820    # complicated shell code.
31821    if test "x$READLINK_TESTED" != yes; then
31822      # On MacOSX there is a readlink tool with a different
31823      # purpose than the GNU readlink tool. Check the found readlink.
31824      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31825      if test "x$ISGNU" = x; then
31826        # A readlink that we do not know how to use.
31827        # Are there other non-GNU readlinks out there?
31828        READLINK_TESTED=yes
31829        READLINK=
31830      fi
31831    fi
31832
31833    if test "x$READLINK" != x; then
31834      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31835    else
31836      # Save the current directory for restoring afterwards
31837      STARTDIR=$PWD
31838      COUNTER=0
31839      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31840      sym_link_file=`$BASENAME $TEST_COMPILER`
31841      cd $sym_link_dir
31842      # Use -P flag to resolve symlinks in directories.
31843      cd `$THEPWDCMD -P`
31844      sym_link_dir=`$THEPWDCMD -P`
31845      # Resolve file symlinks
31846      while test $COUNTER -lt 20; do
31847        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31848        if test "x$ISLINK" == x; then
31849          # This is not a symbolic link! We are done!
31850          break
31851        fi
31852        # Again resolve directory symlinks since the target of the just found
31853        # link could be in a different directory
31854        cd `$DIRNAME $ISLINK`
31855        sym_link_dir=`$THEPWDCMD -P`
31856        sym_link_file=`$BASENAME $ISLINK`
31857        let COUNTER=COUNTER+1
31858      done
31859      cd $STARTDIR
31860      TEST_COMPILER=$sym_link_dir/$sym_link_file
31861    fi
31862  fi
31863
31864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31865$as_echo "$TEST_COMPILER" >&6; }
31866  fi
31867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31868$as_echo_n "checking if CC is disguised ccache... " >&6; }
31869
31870  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31871  if test "x$COMPILER_BASENAME" = "xccache"; then
31872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31873$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31874    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31875    # We want to control ccache invocation ourselves, so ignore this cc and try
31876    # searching again.
31877
31878    # Remove the path to the fake ccache cc from the PATH
31879    RETRY_COMPILER_SAVED_PATH="$PATH"
31880    COMPILER_DIRNAME=`$DIRNAME $CC`
31881    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31882
31883    # Try again looking for our compiler
31884    if test -n "$ac_tool_prefix"; then
31885  for ac_prog in $TOOLCHAIN_CC_BINARY
31886  do
31887    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31888set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31890$as_echo_n "checking for $ac_word... " >&6; }
31891if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31892  $as_echo_n "(cached) " >&6
31893else
31894  if test -n "$PROPER_COMPILER_CC"; then
31895  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31896else
31897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31898for as_dir in $PATH
31899do
31900  IFS=$as_save_IFS
31901  test -z "$as_dir" && as_dir=.
31902    for ac_exec_ext in '' $ac_executable_extensions; do
31903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31904    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31906    break 2
31907  fi
31908done
31909  done
31910IFS=$as_save_IFS
31911
31912fi
31913fi
31914PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31915if test -n "$PROPER_COMPILER_CC"; then
31916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31917$as_echo "$PROPER_COMPILER_CC" >&6; }
31918else
31919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31920$as_echo "no" >&6; }
31921fi
31922
31923
31924    test -n "$PROPER_COMPILER_CC" && break
31925  done
31926fi
31927if test -z "$PROPER_COMPILER_CC"; then
31928  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31929  for ac_prog in $TOOLCHAIN_CC_BINARY
31930do
31931  # Extract the first word of "$ac_prog", so it can be a program name with args.
31932set dummy $ac_prog; ac_word=$2
31933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31934$as_echo_n "checking for $ac_word... " >&6; }
31935if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31936  $as_echo_n "(cached) " >&6
31937else
31938  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31939  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31940else
31941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31942for as_dir in $PATH
31943do
31944  IFS=$as_save_IFS
31945  test -z "$as_dir" && as_dir=.
31946    for ac_exec_ext in '' $ac_executable_extensions; do
31947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31948    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31950    break 2
31951  fi
31952done
31953  done
31954IFS=$as_save_IFS
31955
31956fi
31957fi
31958ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31959if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31961$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31962else
31963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31964$as_echo "no" >&6; }
31965fi
31966
31967
31968  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31969done
31970
31971  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31972    PROPER_COMPILER_CC=""
31973  else
31974    case $cross_compiling:$ac_tool_warned in
31975yes:)
31976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31978ac_tool_warned=yes ;;
31979esac
31980    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31981  fi
31982fi
31983
31984
31985  # Only process if variable expands to non-empty
31986
31987  if test "x$PROPER_COMPILER_CC" != x; then
31988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989
31990  # First separate the path from the arguments. This will split at the first
31991  # space.
31992  complete="$PROPER_COMPILER_CC"
31993  path="${complete%% *}"
31994  tmp="$complete EOL"
31995  arguments="${tmp#* }"
31996
31997  # Input might be given as Windows format, start by converting to
31998  # unix format.
31999  new_path=`$CYGPATH -u "$path"`
32000
32001  # Now try to locate executable using which
32002  new_path=`$WHICH "$new_path" 2> /dev/null`
32003  # bat and cmd files are not always considered executable in cygwin causing which
32004  # to not find them
32005  if test "x$new_path" = x \
32006      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32007      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32008    new_path=`$CYGPATH -u "$path"`
32009  fi
32010  if test "x$new_path" = x; then
32011    # Oops. Which didn't find the executable.
32012    # The splitting of arguments from the executable at a space might have been incorrect,
32013    # since paths with space are more likely in Windows. Give it another try with the whole
32014    # argument.
32015    path="$complete"
32016    arguments="EOL"
32017    new_path=`$CYGPATH -u "$path"`
32018    new_path=`$WHICH "$new_path" 2> /dev/null`
32019    # bat and cmd files are not always considered executable in cygwin causing which
32020    # to not find them
32021    if test "x$new_path" = x \
32022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32024      new_path=`$CYGPATH -u "$path"`
32025    fi
32026    if test "x$new_path" = x; then
32027      # It's still not found. Now this is an unrecoverable error.
32028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32029$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32030      has_space=`$ECHO "$complete" | $GREP " "`
32031      if test "x$has_space" != x; then
32032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32034      fi
32035      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32036    fi
32037  fi
32038
32039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32042  # "foo.exe" is OK but "foo" is an error.
32043  #
32044  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32045  # It is also a way to make sure we got the proper file name for the real test later on.
32046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32047  if test "x$test_shortpath" = x; then
32048    # Short path failed, file does not exist as specified.
32049    # Try adding .exe or .cmd
32050    if test -f "${new_path}.exe"; then
32051      input_to_shortpath="${new_path}.exe"
32052    elif test -f "${new_path}.cmd"; then
32053      input_to_shortpath="${new_path}.cmd"
32054    else
32055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32056$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32059      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32060    fi
32061  else
32062    input_to_shortpath="$new_path"
32063  fi
32064
32065  # Call helper function which possibly converts this using DOS-style short mode.
32066  # If so, the updated path is stored in $new_path.
32067  new_path="$input_to_shortpath"
32068
32069  input_path="$input_to_shortpath"
32070  # Check if we need to convert this using DOS-style short mode. If the path
32071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32072  # take no chances and rewrite it.
32073  # Note: m4 eats our [], so we need to use [ and ] instead.
32074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32075  if test "x$has_forbidden_chars" != x; then
32076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32080      # Going to short mode and back again did indeed matter. Since short mode is
32081      # case insensitive, let's make it lowercase to improve readability.
32082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32083      # Now convert it back to Unix-style (cygpath)
32084      input_path=`$CYGPATH -u "$shortmode_path"`
32085      new_path="$input_path"
32086    fi
32087  fi
32088
32089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32090  if test "x$test_cygdrive_prefix" = x; then
32091    # As a simple fix, exclude /usr/bin since it's not a real path.
32092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32094      # a path prefixed by /cygdrive for fixpath to work.
32095      new_path="$CYGWIN_ROOT_PATH$input_path"
32096    fi
32097  fi
32098
32099  # remove trailing .exe if any
32100  new_path="${new_path/%.exe/}"
32101
32102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32103
32104  # First separate the path from the arguments. This will split at the first
32105  # space.
32106  complete="$PROPER_COMPILER_CC"
32107  path="${complete%% *}"
32108  tmp="$complete EOL"
32109  arguments="${tmp#* }"
32110
32111  # Input might be given as Windows format, start by converting to
32112  # unix format.
32113  new_path="$path"
32114
32115  windows_path="$new_path"
32116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32117    unix_path=`$CYGPATH -u "$windows_path"`
32118    new_path="$unix_path"
32119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32121    new_path="$unix_path"
32122  fi
32123
32124
32125  # Now try to locate executable using which
32126  new_path=`$WHICH "$new_path" 2> /dev/null`
32127
32128  if test "x$new_path" = x; then
32129    # Oops. Which didn't find the executable.
32130    # The splitting of arguments from the executable at a space might have been incorrect,
32131    # since paths with space are more likely in Windows. Give it another try with the whole
32132    # argument.
32133    path="$complete"
32134    arguments="EOL"
32135    new_path="$path"
32136
32137  windows_path="$new_path"
32138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32139    unix_path=`$CYGPATH -u "$windows_path"`
32140    new_path="$unix_path"
32141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32143    new_path="$unix_path"
32144  fi
32145
32146
32147    new_path=`$WHICH "$new_path" 2> /dev/null`
32148    # bat and cmd files are not always considered executable in MSYS causing which
32149    # to not find them
32150    if test "x$new_path" = x \
32151        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32152        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32153      new_path="$path"
32154
32155  windows_path="$new_path"
32156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32157    unix_path=`$CYGPATH -u "$windows_path"`
32158    new_path="$unix_path"
32159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32161    new_path="$unix_path"
32162  fi
32163
32164    fi
32165
32166    if test "x$new_path" = x; then
32167      # It's still not found. Now this is an unrecoverable error.
32168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32169$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32170      has_space=`$ECHO "$complete" | $GREP " "`
32171      if test "x$has_space" != x; then
32172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32174      fi
32175      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32176    fi
32177  fi
32178
32179  # Now new_path has a complete unix path to the binary
32180  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32181    # Keep paths in /bin as-is, but remove trailing .exe if any
32182    new_path="${new_path/%.exe/}"
32183    # Do not save /bin paths to all_fixpath_prefixes!
32184  else
32185    # Not in mixed or Windows style, start by that.
32186    new_path=`cmd //c echo $new_path`
32187
32188  input_path="$new_path"
32189  # Check if we need to convert this using DOS-style short mode. If the path
32190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32191  # take no chances and rewrite it.
32192  # Note: m4 eats our [], so we need to use [ and ] instead.
32193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32194  if test "x$has_forbidden_chars" != x; then
32195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32197  fi
32198
32199    # Output is in $new_path
32200
32201  windows_path="$new_path"
32202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32203    unix_path=`$CYGPATH -u "$windows_path"`
32204    new_path="$unix_path"
32205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32207    new_path="$unix_path"
32208  fi
32209
32210    # remove trailing .exe if any
32211    new_path="${new_path/%.exe/}"
32212
32213    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32214    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32215  fi
32216
32217    else
32218      # We're on a unix platform. Hooray! :)
32219      # First separate the path from the arguments. This will split at the first
32220      # space.
32221      complete="$PROPER_COMPILER_CC"
32222      path="${complete%% *}"
32223      tmp="$complete EOL"
32224      arguments="${tmp#* }"
32225
32226      # Cannot rely on the command "which" here since it doesn't always work.
32227      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32228      if test -z "$is_absolute_path"; then
32229        # Path to executable is not absolute. Find it.
32230        IFS_save="$IFS"
32231        IFS=:
32232        for p in $PATH; do
32233          if test -f "$p/$path" && test -x "$p/$path"; then
32234            new_path="$p/$path"
32235            break
32236          fi
32237        done
32238        IFS="$IFS_save"
32239      else
32240        # This is an absolute path, we can use it without further modifications.
32241        new_path="$path"
32242      fi
32243
32244      if test "x$new_path" = x; then
32245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32246$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32247        has_space=`$ECHO "$complete" | $GREP " "`
32248        if test "x$has_space" != x; then
32249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32251        fi
32252        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32253      fi
32254    fi
32255
32256    # Now join together the path and the arguments once again
32257    if test "x$arguments" != xEOL; then
32258      new_complete="$new_path ${arguments% *}"
32259    else
32260      new_complete="$new_path"
32261    fi
32262
32263    if test "x$complete" != "x$new_complete"; then
32264      PROPER_COMPILER_CC="$new_complete"
32265      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32266$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32267    fi
32268  fi
32269
32270    PATH="$RETRY_COMPILER_SAVED_PATH"
32271
32272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32273$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32274
32275  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32276    # Follow a chain of symbolic links. Use readlink
32277    # where it exists, else fall back to horribly
32278    # complicated shell code.
32279    if test "x$READLINK_TESTED" != yes; then
32280      # On MacOSX there is a readlink tool with a different
32281      # purpose than the GNU readlink tool. Check the found readlink.
32282      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32283      if test "x$ISGNU" = x; then
32284        # A readlink that we do not know how to use.
32285        # Are there other non-GNU readlinks out there?
32286        READLINK_TESTED=yes
32287        READLINK=
32288      fi
32289    fi
32290
32291    if test "x$READLINK" != x; then
32292      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32293    else
32294      # Save the current directory for restoring afterwards
32295      STARTDIR=$PWD
32296      COUNTER=0
32297      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32298      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32299      cd $sym_link_dir
32300      # Use -P flag to resolve symlinks in directories.
32301      cd `$THEPWDCMD -P`
32302      sym_link_dir=`$THEPWDCMD -P`
32303      # Resolve file symlinks
32304      while test $COUNTER -lt 20; do
32305        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32306        if test "x$ISLINK" == x; then
32307          # This is not a symbolic link! We are done!
32308          break
32309        fi
32310        # Again resolve directory symlinks since the target of the just found
32311        # link could be in a different directory
32312        cd `$DIRNAME $ISLINK`
32313        sym_link_dir=`$THEPWDCMD -P`
32314        sym_link_file=`$BASENAME $ISLINK`
32315        let COUNTER=COUNTER+1
32316      done
32317      cd $STARTDIR
32318      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32319    fi
32320  fi
32321
32322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32323$as_echo "$PROPER_COMPILER_CC" >&6; }
32324    CC="$PROPER_COMPILER_CC"
32325  else
32326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32327$as_echo "no, keeping CC" >&6; }
32328  fi
32329
32330
32331  COMPILER=$CC
32332  COMPILER_NAME=$COMPILER_NAME
32333
32334  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32335    # cc -V output typically looks like
32336    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32337    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32338    # Check that this is likely to be the Solaris Studio cc.
32339    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32340    if test $? -ne 0; then
32341      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32342      { $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
32343$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32344      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32345$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32346      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32347$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32348      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32349    fi
32350    # Remove usage instructions (if present), and
32351    # collapse compiler output into a single line
32352    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32353        $SED -e 's/ *[Uu]sage:.*//'`
32354    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32355        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32356  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32357    # xlc -qversion output typically looks like
32358    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32359    #     Version: 11.01.0000.0015
32360    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32361    # Check that this is likely to be the IBM XL C compiler.
32362    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32363    if test $? -ne 0; then
32364      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32365      { $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
32366$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32367      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32368$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32369      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32370$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32371      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32372    fi
32373    # Collapse compiler output into a single line
32374    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32376        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32377  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32378    # There is no specific version flag, but all output starts with a version string.
32379    # First line typically looks something like:
32380    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32381    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32382    # Check that this is likely to be Microsoft CL.EXE.
32383    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32384    if test $? -ne 0; then
32385      { $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
32386$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32387      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32388$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32389      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32390    fi
32391    # Collapse compiler output into a single line
32392    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32393    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32394        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32395  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32396    # gcc --version output typically looks like
32397    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32398    #     Copyright (C) 2013 Free Software Foundation, Inc.
32399    #     This is free software; see the source for copying conditions.  There is NO
32400    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32401    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32402    # Check that this is likely to be GCC.
32403    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32404    if test $? -ne 0; then
32405      { $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
32406$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32407      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32408$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32409      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32410    fi
32411    # Remove Copyright and legalese from version string, and
32412    # collapse into a single line
32413    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32414        $SED -e 's/ *Copyright .*//'`
32415    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32416        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32417  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32418    # clang --version output typically looks like
32419    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32420    #    clang version 3.3 (tags/RELEASE_33/final)
32421    # or
32422    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32423    #    Target: x86_64-pc-linux-gnu
32424    #    Thread model: posix
32425    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32426    # Check that this is likely to be clang
32427    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32428    if test $? -ne 0; then
32429      { $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
32430$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32432$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32434    fi
32435    # Collapse compiler output into a single line
32436    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32437    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32438        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32439  else
32440      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32441  fi
32442  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32443  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32444  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32445  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32446
32447  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32448$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32449
32450
32451  # Now that we have resolved CC ourself, let autoconf have its go at it
32452  ac_ext=c
32453ac_cpp='$CPP $CPPFLAGS'
32454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32456ac_compiler_gnu=$ac_cv_c_compiler_gnu
32457if test -n "$ac_tool_prefix"; then
32458  for ac_prog in $CC
32459  do
32460    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32461set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32463$as_echo_n "checking for $ac_word... " >&6; }
32464if ${ac_cv_prog_CC+:} false; then :
32465  $as_echo_n "(cached) " >&6
32466else
32467  if test -n "$CC"; then
32468  ac_cv_prog_CC="$CC" # Let the user override the test.
32469else
32470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32471for as_dir in $PATH
32472do
32473  IFS=$as_save_IFS
32474  test -z "$as_dir" && as_dir=.
32475    for ac_exec_ext in '' $ac_executable_extensions; do
32476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32477    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32479    break 2
32480  fi
32481done
32482  done
32483IFS=$as_save_IFS
32484
32485fi
32486fi
32487CC=$ac_cv_prog_CC
32488if test -n "$CC"; then
32489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32490$as_echo "$CC" >&6; }
32491else
32492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32493$as_echo "no" >&6; }
32494fi
32495
32496
32497    test -n "$CC" && break
32498  done
32499fi
32500if test -z "$CC"; then
32501  ac_ct_CC=$CC
32502  for ac_prog in $CC
32503do
32504  # Extract the first word of "$ac_prog", so it can be a program name with args.
32505set dummy $ac_prog; ac_word=$2
32506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32507$as_echo_n "checking for $ac_word... " >&6; }
32508if ${ac_cv_prog_ac_ct_CC+:} false; then :
32509  $as_echo_n "(cached) " >&6
32510else
32511  if test -n "$ac_ct_CC"; then
32512  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32513else
32514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32515for as_dir in $PATH
32516do
32517  IFS=$as_save_IFS
32518  test -z "$as_dir" && as_dir=.
32519    for ac_exec_ext in '' $ac_executable_extensions; do
32520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32521    ac_cv_prog_ac_ct_CC="$ac_prog"
32522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32523    break 2
32524  fi
32525done
32526  done
32527IFS=$as_save_IFS
32528
32529fi
32530fi
32531ac_ct_CC=$ac_cv_prog_ac_ct_CC
32532if test -n "$ac_ct_CC"; then
32533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32534$as_echo "$ac_ct_CC" >&6; }
32535else
32536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32537$as_echo "no" >&6; }
32538fi
32539
32540
32541  test -n "$ac_ct_CC" && break
32542done
32543
32544  if test "x$ac_ct_CC" = x; then
32545    CC=""
32546  else
32547    case $cross_compiling:$ac_tool_warned in
32548yes:)
32549{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32550$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32551ac_tool_warned=yes ;;
32552esac
32553    CC=$ac_ct_CC
32554  fi
32555fi
32556
32557
32558test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32560as_fn_error $? "no acceptable C compiler found in \$PATH
32561See \`config.log' for more details" "$LINENO" 5; }
32562
32563# Provide some information about the compiler.
32564$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32565set X $ac_compile
32566ac_compiler=$2
32567for ac_option in --version -v -V -qversion; do
32568  { { ac_try="$ac_compiler $ac_option >&5"
32569case "(($ac_try" in
32570  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32571  *) ac_try_echo=$ac_try;;
32572esac
32573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32574$as_echo "$ac_try_echo"; } >&5
32575  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32576  ac_status=$?
32577  if test -s conftest.err; then
32578    sed '10a\
32579... rest of stderr output deleted ...
32580         10q' conftest.err >conftest.er1
32581    cat conftest.er1 >&5
32582  fi
32583  rm -f conftest.er1 conftest.err
32584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32585  test $ac_status = 0; }
32586done
32587
32588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32589/* end confdefs.h.  */
32590
32591int
32592main ()
32593{
32594
32595  ;
32596  return 0;
32597}
32598_ACEOF
32599ac_clean_files_save=$ac_clean_files
32600ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32601# Try to create an executable without -o first, disregard a.out.
32602# It will help us diagnose broken compilers, and finding out an intuition
32603# of exeext.
32604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32605$as_echo_n "checking whether the C compiler works... " >&6; }
32606ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32607
32608# The possible output files:
32609ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32610
32611ac_rmfiles=
32612for ac_file in $ac_files
32613do
32614  case $ac_file in
32615    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32616    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32617  esac
32618done
32619rm -f $ac_rmfiles
32620
32621if { { ac_try="$ac_link_default"
32622case "(($ac_try" in
32623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32624  *) ac_try_echo=$ac_try;;
32625esac
32626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32627$as_echo "$ac_try_echo"; } >&5
32628  (eval "$ac_link_default") 2>&5
32629  ac_status=$?
32630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32631  test $ac_status = 0; }; then :
32632  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32633# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32634# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32635# so that the user can short-circuit this test for compilers unknown to
32636# Autoconf.
32637for ac_file in $ac_files ''
32638do
32639  test -f "$ac_file" || continue
32640  case $ac_file in
32641    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32642	;;
32643    [ab].out )
32644	# We found the default executable, but exeext='' is most
32645	# certainly right.
32646	break;;
32647    *.* )
32648	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32649	then :; else
32650	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32651	fi
32652	# We set ac_cv_exeext here because the later test for it is not
32653	# safe: cross compilers may not add the suffix if given an `-o'
32654	# argument, so we may need to know it at that point already.
32655	# Even if this section looks crufty: it has the advantage of
32656	# actually working.
32657	break;;
32658    * )
32659	break;;
32660  esac
32661done
32662test "$ac_cv_exeext" = no && ac_cv_exeext=
32663
32664else
32665  ac_file=''
32666fi
32667if test -z "$ac_file"; then :
32668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32669$as_echo "no" >&6; }
32670$as_echo "$as_me: failed program was:" >&5
32671sed 's/^/| /' conftest.$ac_ext >&5
32672
32673{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32675as_fn_error 77 "C compiler cannot create executables
32676See \`config.log' for more details" "$LINENO" 5; }
32677else
32678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32679$as_echo "yes" >&6; }
32680fi
32681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32682$as_echo_n "checking for C compiler default output file name... " >&6; }
32683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32684$as_echo "$ac_file" >&6; }
32685ac_exeext=$ac_cv_exeext
32686
32687rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32688ac_clean_files=$ac_clean_files_save
32689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32690$as_echo_n "checking for suffix of executables... " >&6; }
32691if { { ac_try="$ac_link"
32692case "(($ac_try" in
32693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32694  *) ac_try_echo=$ac_try;;
32695esac
32696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32697$as_echo "$ac_try_echo"; } >&5
32698  (eval "$ac_link") 2>&5
32699  ac_status=$?
32700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32701  test $ac_status = 0; }; then :
32702  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32703# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32704# work properly (i.e., refer to `conftest.exe'), while it won't with
32705# `rm'.
32706for ac_file in conftest.exe conftest conftest.*; do
32707  test -f "$ac_file" || continue
32708  case $ac_file in
32709    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32710    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32711	  break;;
32712    * ) break;;
32713  esac
32714done
32715else
32716  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32718as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32719See \`config.log' for more details" "$LINENO" 5; }
32720fi
32721rm -f conftest conftest$ac_cv_exeext
32722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32723$as_echo "$ac_cv_exeext" >&6; }
32724
32725rm -f conftest.$ac_ext
32726EXEEXT=$ac_cv_exeext
32727ac_exeext=$EXEEXT
32728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32729/* end confdefs.h.  */
32730#include <stdio.h>
32731int
32732main ()
32733{
32734FILE *f = fopen ("conftest.out", "w");
32735 return ferror (f) || fclose (f) != 0;
32736
32737  ;
32738  return 0;
32739}
32740_ACEOF
32741ac_clean_files="$ac_clean_files conftest.out"
32742# Check that the compiler produces executables we can run.  If not, either
32743# the compiler is broken, or we cross compile.
32744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32745$as_echo_n "checking whether we are cross compiling... " >&6; }
32746if test "$cross_compiling" != yes; then
32747  { { ac_try="$ac_link"
32748case "(($ac_try" in
32749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32750  *) ac_try_echo=$ac_try;;
32751esac
32752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32753$as_echo "$ac_try_echo"; } >&5
32754  (eval "$ac_link") 2>&5
32755  ac_status=$?
32756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32757  test $ac_status = 0; }
32758  if { ac_try='./conftest$ac_cv_exeext'
32759  { { case "(($ac_try" in
32760  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32761  *) ac_try_echo=$ac_try;;
32762esac
32763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32764$as_echo "$ac_try_echo"; } >&5
32765  (eval "$ac_try") 2>&5
32766  ac_status=$?
32767  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32768  test $ac_status = 0; }; }; then
32769    cross_compiling=no
32770  else
32771    if test "$cross_compiling" = maybe; then
32772	cross_compiling=yes
32773    else
32774	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32776as_fn_error $? "cannot run C compiled programs.
32777If you meant to cross compile, use \`--host'.
32778See \`config.log' for more details" "$LINENO" 5; }
32779    fi
32780  fi
32781fi
32782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32783$as_echo "$cross_compiling" >&6; }
32784
32785rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32786ac_clean_files=$ac_clean_files_save
32787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32788$as_echo_n "checking for suffix of object files... " >&6; }
32789if ${ac_cv_objext+:} false; then :
32790  $as_echo_n "(cached) " >&6
32791else
32792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32793/* end confdefs.h.  */
32794
32795int
32796main ()
32797{
32798
32799  ;
32800  return 0;
32801}
32802_ACEOF
32803rm -f conftest.o conftest.obj
32804if { { ac_try="$ac_compile"
32805case "(($ac_try" in
32806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32807  *) ac_try_echo=$ac_try;;
32808esac
32809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32810$as_echo "$ac_try_echo"; } >&5
32811  (eval "$ac_compile") 2>&5
32812  ac_status=$?
32813  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32814  test $ac_status = 0; }; then :
32815  for ac_file in conftest.o conftest.obj conftest.*; do
32816  test -f "$ac_file" || continue;
32817  case $ac_file in
32818    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32819    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32820       break;;
32821  esac
32822done
32823else
32824  $as_echo "$as_me: failed program was:" >&5
32825sed 's/^/| /' conftest.$ac_ext >&5
32826
32827{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32829as_fn_error $? "cannot compute suffix of object files: cannot compile
32830See \`config.log' for more details" "$LINENO" 5; }
32831fi
32832rm -f conftest.$ac_cv_objext conftest.$ac_ext
32833fi
32834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32835$as_echo "$ac_cv_objext" >&6; }
32836OBJEXT=$ac_cv_objext
32837ac_objext=$OBJEXT
32838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32839$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32840if ${ac_cv_c_compiler_gnu+:} false; then :
32841  $as_echo_n "(cached) " >&6
32842else
32843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32844/* end confdefs.h.  */
32845
32846int
32847main ()
32848{
32849#ifndef __GNUC__
32850       choke me
32851#endif
32852
32853  ;
32854  return 0;
32855}
32856_ACEOF
32857if ac_fn_c_try_compile "$LINENO"; then :
32858  ac_compiler_gnu=yes
32859else
32860  ac_compiler_gnu=no
32861fi
32862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32863ac_cv_c_compiler_gnu=$ac_compiler_gnu
32864
32865fi
32866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32867$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32868if test $ac_compiler_gnu = yes; then
32869  GCC=yes
32870else
32871  GCC=
32872fi
32873ac_test_CFLAGS=${CFLAGS+set}
32874ac_save_CFLAGS=$CFLAGS
32875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32876$as_echo_n "checking whether $CC accepts -g... " >&6; }
32877if ${ac_cv_prog_cc_g+:} false; then :
32878  $as_echo_n "(cached) " >&6
32879else
32880  ac_save_c_werror_flag=$ac_c_werror_flag
32881   ac_c_werror_flag=yes
32882   ac_cv_prog_cc_g=no
32883   CFLAGS="-g"
32884   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32885/* end confdefs.h.  */
32886
32887int
32888main ()
32889{
32890
32891  ;
32892  return 0;
32893}
32894_ACEOF
32895if ac_fn_c_try_compile "$LINENO"; then :
32896  ac_cv_prog_cc_g=yes
32897else
32898  CFLAGS=""
32899      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32900/* end confdefs.h.  */
32901
32902int
32903main ()
32904{
32905
32906  ;
32907  return 0;
32908}
32909_ACEOF
32910if ac_fn_c_try_compile "$LINENO"; then :
32911
32912else
32913  ac_c_werror_flag=$ac_save_c_werror_flag
32914	 CFLAGS="-g"
32915	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32916/* end confdefs.h.  */
32917
32918int
32919main ()
32920{
32921
32922  ;
32923  return 0;
32924}
32925_ACEOF
32926if ac_fn_c_try_compile "$LINENO"; then :
32927  ac_cv_prog_cc_g=yes
32928fi
32929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32930fi
32931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32932fi
32933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32934   ac_c_werror_flag=$ac_save_c_werror_flag
32935fi
32936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32937$as_echo "$ac_cv_prog_cc_g" >&6; }
32938if test "$ac_test_CFLAGS" = set; then
32939  CFLAGS=$ac_save_CFLAGS
32940elif test $ac_cv_prog_cc_g = yes; then
32941  if test "$GCC" = yes; then
32942    CFLAGS="-g -O2"
32943  else
32944    CFLAGS="-g"
32945  fi
32946else
32947  if test "$GCC" = yes; then
32948    CFLAGS="-O2"
32949  else
32950    CFLAGS=
32951  fi
32952fi
32953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32954$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32955if ${ac_cv_prog_cc_c89+:} false; then :
32956  $as_echo_n "(cached) " >&6
32957else
32958  ac_cv_prog_cc_c89=no
32959ac_save_CC=$CC
32960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32961/* end confdefs.h.  */
32962#include <stdarg.h>
32963#include <stdio.h>
32964struct stat;
32965/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32966struct buf { int x; };
32967FILE * (*rcsopen) (struct buf *, struct stat *, int);
32968static char *e (p, i)
32969     char **p;
32970     int i;
32971{
32972  return p[i];
32973}
32974static char *f (char * (*g) (char **, int), char **p, ...)
32975{
32976  char *s;
32977  va_list v;
32978  va_start (v,p);
32979  s = g (p, va_arg (v,int));
32980  va_end (v);
32981  return s;
32982}
32983
32984/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32985   function prototypes and stuff, but not '\xHH' hex character constants.
32986   These don't provoke an error unfortunately, instead are silently treated
32987   as 'x'.  The following induces an error, until -std is added to get
32988   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32989   array size at least.  It's necessary to write '\x00'==0 to get something
32990   that's true only with -std.  */
32991int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32992
32993/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32994   inside strings and character constants.  */
32995#define FOO(x) 'x'
32996int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32997
32998int test (int i, double x);
32999struct s1 {int (*f) (int a);};
33000struct s2 {int (*f) (double a);};
33001int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33002int argc;
33003char **argv;
33004int
33005main ()
33006{
33007return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33008  ;
33009  return 0;
33010}
33011_ACEOF
33012for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33013	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33014do
33015  CC="$ac_save_CC $ac_arg"
33016  if ac_fn_c_try_compile "$LINENO"; then :
33017  ac_cv_prog_cc_c89=$ac_arg
33018fi
33019rm -f core conftest.err conftest.$ac_objext
33020  test "x$ac_cv_prog_cc_c89" != "xno" && break
33021done
33022rm -f conftest.$ac_ext
33023CC=$ac_save_CC
33024
33025fi
33026# AC_CACHE_VAL
33027case "x$ac_cv_prog_cc_c89" in
33028  x)
33029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33030$as_echo "none needed" >&6; } ;;
33031  xno)
33032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33033$as_echo "unsupported" >&6; } ;;
33034  *)
33035    CC="$CC $ac_cv_prog_cc_c89"
33036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33037$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33038esac
33039if test "x$ac_cv_prog_cc_c89" != xno; then :
33040
33041fi
33042
33043ac_ext=cpp
33044ac_cpp='$CXXCPP $CPPFLAGS'
33045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33048
33049
33050
33051  COMPILER_NAME=C++
33052  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33053
33054  if test "x$CXX" != x; then
33055    # User has supplied compiler name already, always let that override.
33056    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33057$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33058    if test "x`basename $CXX`" = "x$CXX"; then
33059      # A command without a complete path is provided, search $PATH.
33060
33061      for ac_prog in $CXX
33062do
33063  # Extract the first word of "$ac_prog", so it can be a program name with args.
33064set dummy $ac_prog; ac_word=$2
33065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33066$as_echo_n "checking for $ac_word... " >&6; }
33067if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33068  $as_echo_n "(cached) " >&6
33069else
33070  case $POTENTIAL_CXX in
33071  [\\/]* | ?:[\\/]*)
33072  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33073  ;;
33074  *)
33075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33076for as_dir in $PATH
33077do
33078  IFS=$as_save_IFS
33079  test -z "$as_dir" && as_dir=.
33080    for ac_exec_ext in '' $ac_executable_extensions; do
33081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33082    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33084    break 2
33085  fi
33086done
33087  done
33088IFS=$as_save_IFS
33089
33090  ;;
33091esac
33092fi
33093POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33094if test -n "$POTENTIAL_CXX"; then
33095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33096$as_echo "$POTENTIAL_CXX" >&6; }
33097else
33098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33099$as_echo "no" >&6; }
33100fi
33101
33102
33103  test -n "$POTENTIAL_CXX" && break
33104done
33105
33106      if test "x$POTENTIAL_CXX" != x; then
33107        CXX=$POTENTIAL_CXX
33108      else
33109        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33110      fi
33111    else
33112      # Otherwise it might already be a complete path
33113      if test ! -x "$CXX"; then
33114        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33115      fi
33116    fi
33117  else
33118    # No user supplied value. Locate compiler ourselves.
33119
33120    # If we are cross compiling, assume cross compilation tools follows the
33121    # cross compilation standard where they are prefixed with the autoconf
33122    # standard name for the target. For example the binary
33123    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33124    # If we are not cross compiling, then the default compiler name will be
33125    # used.
33126
33127    CXX=
33128    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33129    # before checking the rest of the PATH.
33130    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33131    # step, this should not be necessary.
33132    if test -n "$TOOLCHAIN_PATH"; then
33133      PATH_save="$PATH"
33134      PATH="$TOOLCHAIN_PATH"
33135      for ac_prog in $SEARCH_LIST
33136do
33137  # Extract the first word of "$ac_prog", so it can be a program name with args.
33138set dummy $ac_prog; ac_word=$2
33139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33140$as_echo_n "checking for $ac_word... " >&6; }
33141if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33142  $as_echo_n "(cached) " >&6
33143else
33144  case $TOOLCHAIN_PATH_CXX in
33145  [\\/]* | ?:[\\/]*)
33146  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33147  ;;
33148  *)
33149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33150for as_dir in $PATH
33151do
33152  IFS=$as_save_IFS
33153  test -z "$as_dir" && as_dir=.
33154    for ac_exec_ext in '' $ac_executable_extensions; do
33155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33156    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33158    break 2
33159  fi
33160done
33161  done
33162IFS=$as_save_IFS
33163
33164  ;;
33165esac
33166fi
33167TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33168if test -n "$TOOLCHAIN_PATH_CXX"; then
33169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33170$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33171else
33172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33173$as_echo "no" >&6; }
33174fi
33175
33176
33177  test -n "$TOOLCHAIN_PATH_CXX" && break
33178done
33179
33180      CXX=$TOOLCHAIN_PATH_CXX
33181      PATH="$PATH_save"
33182    fi
33183
33184    # AC_PATH_PROGS can't be run multiple times with the same variable,
33185    # so create a new name for this run.
33186    if test "x$CXX" = x; then
33187      for ac_prog in $SEARCH_LIST
33188do
33189  # Extract the first word of "$ac_prog", so it can be a program name with args.
33190set dummy $ac_prog; ac_word=$2
33191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33192$as_echo_n "checking for $ac_word... " >&6; }
33193if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33194  $as_echo_n "(cached) " >&6
33195else
33196  case $POTENTIAL_CXX in
33197  [\\/]* | ?:[\\/]*)
33198  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33199  ;;
33200  *)
33201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33202for as_dir in $PATH
33203do
33204  IFS=$as_save_IFS
33205  test -z "$as_dir" && as_dir=.
33206    for ac_exec_ext in '' $ac_executable_extensions; do
33207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33208    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33210    break 2
33211  fi
33212done
33213  done
33214IFS=$as_save_IFS
33215
33216  ;;
33217esac
33218fi
33219POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33220if test -n "$POTENTIAL_CXX"; then
33221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33222$as_echo "$POTENTIAL_CXX" >&6; }
33223else
33224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33225$as_echo "no" >&6; }
33226fi
33227
33228
33229  test -n "$POTENTIAL_CXX" && break
33230done
33231
33232      CXX=$POTENTIAL_CXX
33233    fi
33234
33235    if test "x$CXX" = x; then
33236
33237  # Print a helpful message on how to acquire the necessary build dependency.
33238  # devkit is the help tag: freetype, cups, alsa etc
33239  MISSING_DEPENDENCY=devkit
33240
33241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33242    cygwin_help $MISSING_DEPENDENCY
33243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33244    msys_help $MISSING_DEPENDENCY
33245  else
33246    PKGHANDLER_COMMAND=
33247
33248    case $PKGHANDLER in
33249      apt-get)
33250        apt_help     $MISSING_DEPENDENCY ;;
33251      yum)
33252        yum_help     $MISSING_DEPENDENCY ;;
33253      port)
33254        port_help    $MISSING_DEPENDENCY ;;
33255      pkgutil)
33256        pkgutil_help $MISSING_DEPENDENCY ;;
33257      pkgadd)
33258        pkgadd_help  $MISSING_DEPENDENCY ;;
33259    esac
33260
33261    if test "x$PKGHANDLER_COMMAND" != x; then
33262      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33263    fi
33264  fi
33265
33266      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33267    fi
33268  fi
33269
33270  # Now we have a compiler binary in CXX. Make sure it's okay.
33271
33272  # Only process if variable expands to non-empty
33273
33274  if test "x$CXX" != x; then
33275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33276
33277  # First separate the path from the arguments. This will split at the first
33278  # space.
33279  complete="$CXX"
33280  path="${complete%% *}"
33281  tmp="$complete EOL"
33282  arguments="${tmp#* }"
33283
33284  # Input might be given as Windows format, start by converting to
33285  # unix format.
33286  new_path=`$CYGPATH -u "$path"`
33287
33288  # Now try to locate executable using which
33289  new_path=`$WHICH "$new_path" 2> /dev/null`
33290  # bat and cmd files are not always considered executable in cygwin causing which
33291  # to not find them
33292  if test "x$new_path" = x \
33293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33295    new_path=`$CYGPATH -u "$path"`
33296  fi
33297  if test "x$new_path" = x; then
33298    # Oops. Which didn't find the executable.
33299    # The splitting of arguments from the executable at a space might have been incorrect,
33300    # since paths with space are more likely in Windows. Give it another try with the whole
33301    # argument.
33302    path="$complete"
33303    arguments="EOL"
33304    new_path=`$CYGPATH -u "$path"`
33305    new_path=`$WHICH "$new_path" 2> /dev/null`
33306    # bat and cmd files are not always considered executable in cygwin causing which
33307    # to not find them
33308    if test "x$new_path" = x \
33309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33311      new_path=`$CYGPATH -u "$path"`
33312    fi
33313    if test "x$new_path" = x; then
33314      # It's still not found. Now this is an unrecoverable error.
33315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33316$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33317      has_space=`$ECHO "$complete" | $GREP " "`
33318      if test "x$has_space" != x; then
33319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33321      fi
33322      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33323    fi
33324  fi
33325
33326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33329  # "foo.exe" is OK but "foo" is an error.
33330  #
33331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33332  # It is also a way to make sure we got the proper file name for the real test later on.
33333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33334  if test "x$test_shortpath" = x; then
33335    # Short path failed, file does not exist as specified.
33336    # Try adding .exe or .cmd
33337    if test -f "${new_path}.exe"; then
33338      input_to_shortpath="${new_path}.exe"
33339    elif test -f "${new_path}.cmd"; then
33340      input_to_shortpath="${new_path}.cmd"
33341    else
33342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33343$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33346      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33347    fi
33348  else
33349    input_to_shortpath="$new_path"
33350  fi
33351
33352  # Call helper function which possibly converts this using DOS-style short mode.
33353  # If so, the updated path is stored in $new_path.
33354  new_path="$input_to_shortpath"
33355
33356  input_path="$input_to_shortpath"
33357  # Check if we need to convert this using DOS-style short mode. If the path
33358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33359  # take no chances and rewrite it.
33360  # Note: m4 eats our [], so we need to use [ and ] instead.
33361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33362  if test "x$has_forbidden_chars" != x; then
33363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33367      # Going to short mode and back again did indeed matter. Since short mode is
33368      # case insensitive, let's make it lowercase to improve readability.
33369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33370      # Now convert it back to Unix-style (cygpath)
33371      input_path=`$CYGPATH -u "$shortmode_path"`
33372      new_path="$input_path"
33373    fi
33374  fi
33375
33376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33377  if test "x$test_cygdrive_prefix" = x; then
33378    # As a simple fix, exclude /usr/bin since it's not a real path.
33379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33381      # a path prefixed by /cygdrive for fixpath to work.
33382      new_path="$CYGWIN_ROOT_PATH$input_path"
33383    fi
33384  fi
33385
33386  # remove trailing .exe if any
33387  new_path="${new_path/%.exe/}"
33388
33389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33390
33391  # First separate the path from the arguments. This will split at the first
33392  # space.
33393  complete="$CXX"
33394  path="${complete%% *}"
33395  tmp="$complete EOL"
33396  arguments="${tmp#* }"
33397
33398  # Input might be given as Windows format, start by converting to
33399  # unix format.
33400  new_path="$path"
33401
33402  windows_path="$new_path"
33403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33404    unix_path=`$CYGPATH -u "$windows_path"`
33405    new_path="$unix_path"
33406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33408    new_path="$unix_path"
33409  fi
33410
33411
33412  # Now try to locate executable using which
33413  new_path=`$WHICH "$new_path" 2> /dev/null`
33414
33415  if test "x$new_path" = x; then
33416    # Oops. Which didn't find the executable.
33417    # The splitting of arguments from the executable at a space might have been incorrect,
33418    # since paths with space are more likely in Windows. Give it another try with the whole
33419    # argument.
33420    path="$complete"
33421    arguments="EOL"
33422    new_path="$path"
33423
33424  windows_path="$new_path"
33425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33426    unix_path=`$CYGPATH -u "$windows_path"`
33427    new_path="$unix_path"
33428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33430    new_path="$unix_path"
33431  fi
33432
33433
33434    new_path=`$WHICH "$new_path" 2> /dev/null`
33435    # bat and cmd files are not always considered executable in MSYS causing which
33436    # to not find them
33437    if test "x$new_path" = x \
33438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33440      new_path="$path"
33441
33442  windows_path="$new_path"
33443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33444    unix_path=`$CYGPATH -u "$windows_path"`
33445    new_path="$unix_path"
33446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33448    new_path="$unix_path"
33449  fi
33450
33451    fi
33452
33453    if test "x$new_path" = x; then
33454      # It's still not found. Now this is an unrecoverable error.
33455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33456$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33457      has_space=`$ECHO "$complete" | $GREP " "`
33458      if test "x$has_space" != x; then
33459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33461      fi
33462      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33463    fi
33464  fi
33465
33466  # Now new_path has a complete unix path to the binary
33467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33468    # Keep paths in /bin as-is, but remove trailing .exe if any
33469    new_path="${new_path/%.exe/}"
33470    # Do not save /bin paths to all_fixpath_prefixes!
33471  else
33472    # Not in mixed or Windows style, start by that.
33473    new_path=`cmd //c echo $new_path`
33474
33475  input_path="$new_path"
33476  # Check if we need to convert this using DOS-style short mode. If the path
33477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33478  # take no chances and rewrite it.
33479  # Note: m4 eats our [], so we need to use [ and ] instead.
33480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33481  if test "x$has_forbidden_chars" != x; then
33482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33484  fi
33485
33486    # Output is in $new_path
33487
33488  windows_path="$new_path"
33489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33490    unix_path=`$CYGPATH -u "$windows_path"`
33491    new_path="$unix_path"
33492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33494    new_path="$unix_path"
33495  fi
33496
33497    # remove trailing .exe if any
33498    new_path="${new_path/%.exe/}"
33499
33500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33502  fi
33503
33504    else
33505      # We're on a unix platform. Hooray! :)
33506      # First separate the path from the arguments. This will split at the first
33507      # space.
33508      complete="$CXX"
33509      path="${complete%% *}"
33510      tmp="$complete EOL"
33511      arguments="${tmp#* }"
33512
33513      # Cannot rely on the command "which" here since it doesn't always work.
33514      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33515      if test -z "$is_absolute_path"; then
33516        # Path to executable is not absolute. Find it.
33517        IFS_save="$IFS"
33518        IFS=:
33519        for p in $PATH; do
33520          if test -f "$p/$path" && test -x "$p/$path"; then
33521            new_path="$p/$path"
33522            break
33523          fi
33524        done
33525        IFS="$IFS_save"
33526      else
33527        # This is an absolute path, we can use it without further modifications.
33528        new_path="$path"
33529      fi
33530
33531      if test "x$new_path" = x; then
33532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33533$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33534        has_space=`$ECHO "$complete" | $GREP " "`
33535        if test "x$has_space" != x; then
33536          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33538        fi
33539        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33540      fi
33541    fi
33542
33543    # Now join together the path and the arguments once again
33544    if test "x$arguments" != xEOL; then
33545      new_complete="$new_path ${arguments% *}"
33546    else
33547      new_complete="$new_path"
33548    fi
33549
33550    if test "x$complete" != "x$new_complete"; then
33551      CXX="$new_complete"
33552      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33553$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33554    fi
33555  fi
33556
33557  TEST_COMPILER="$CXX"
33558  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33559  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33560  if test "x$OPENJDK_BUILD_OS" != xaix; then
33561    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33563$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33564
33565  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33566    # Follow a chain of symbolic links. Use readlink
33567    # where it exists, else fall back to horribly
33568    # complicated shell code.
33569    if test "x$READLINK_TESTED" != yes; then
33570      # On MacOSX there is a readlink tool with a different
33571      # purpose than the GNU readlink tool. Check the found readlink.
33572      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33573      if test "x$ISGNU" = x; then
33574        # A readlink that we do not know how to use.
33575        # Are there other non-GNU readlinks out there?
33576        READLINK_TESTED=yes
33577        READLINK=
33578      fi
33579    fi
33580
33581    if test "x$READLINK" != x; then
33582      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33583    else
33584      # Save the current directory for restoring afterwards
33585      STARTDIR=$PWD
33586      COUNTER=0
33587      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33588      sym_link_file=`$BASENAME $TEST_COMPILER`
33589      cd $sym_link_dir
33590      # Use -P flag to resolve symlinks in directories.
33591      cd `$THEPWDCMD -P`
33592      sym_link_dir=`$THEPWDCMD -P`
33593      # Resolve file symlinks
33594      while test $COUNTER -lt 20; do
33595        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33596        if test "x$ISLINK" == x; then
33597          # This is not a symbolic link! We are done!
33598          break
33599        fi
33600        # Again resolve directory symlinks since the target of the just found
33601        # link could be in a different directory
33602        cd `$DIRNAME $ISLINK`
33603        sym_link_dir=`$THEPWDCMD -P`
33604        sym_link_file=`$BASENAME $ISLINK`
33605        let COUNTER=COUNTER+1
33606      done
33607      cd $STARTDIR
33608      TEST_COMPILER=$sym_link_dir/$sym_link_file
33609    fi
33610  fi
33611
33612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33613$as_echo "$TEST_COMPILER" >&6; }
33614  fi
33615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33616$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33617
33618  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33619  if test "x$COMPILER_BASENAME" = "xccache"; then
33620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33621$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33622    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33623    # We want to control ccache invocation ourselves, so ignore this cc and try
33624    # searching again.
33625
33626    # Remove the path to the fake ccache cc from the PATH
33627    RETRY_COMPILER_SAVED_PATH="$PATH"
33628    COMPILER_DIRNAME=`$DIRNAME $CXX`
33629    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33630
33631    # Try again looking for our compiler
33632    if test -n "$ac_tool_prefix"; then
33633  for ac_prog in $TOOLCHAIN_CXX_BINARY
33634  do
33635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33638$as_echo_n "checking for $ac_word... " >&6; }
33639if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33640  $as_echo_n "(cached) " >&6
33641else
33642  if test -n "$PROPER_COMPILER_CXX"; then
33643  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33644else
33645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33646for as_dir in $PATH
33647do
33648  IFS=$as_save_IFS
33649  test -z "$as_dir" && as_dir=.
33650    for ac_exec_ext in '' $ac_executable_extensions; do
33651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33652    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33654    break 2
33655  fi
33656done
33657  done
33658IFS=$as_save_IFS
33659
33660fi
33661fi
33662PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33663if test -n "$PROPER_COMPILER_CXX"; then
33664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33665$as_echo "$PROPER_COMPILER_CXX" >&6; }
33666else
33667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33668$as_echo "no" >&6; }
33669fi
33670
33671
33672    test -n "$PROPER_COMPILER_CXX" && break
33673  done
33674fi
33675if test -z "$PROPER_COMPILER_CXX"; then
33676  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33677  for ac_prog in $TOOLCHAIN_CXX_BINARY
33678do
33679  # Extract the first word of "$ac_prog", so it can be a program name with args.
33680set dummy $ac_prog; ac_word=$2
33681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33682$as_echo_n "checking for $ac_word... " >&6; }
33683if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33684  $as_echo_n "(cached) " >&6
33685else
33686  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33687  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33688else
33689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33690for as_dir in $PATH
33691do
33692  IFS=$as_save_IFS
33693  test -z "$as_dir" && as_dir=.
33694    for ac_exec_ext in '' $ac_executable_extensions; do
33695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33696    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33698    break 2
33699  fi
33700done
33701  done
33702IFS=$as_save_IFS
33703
33704fi
33705fi
33706ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33707if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33709$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33710else
33711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33712$as_echo "no" >&6; }
33713fi
33714
33715
33716  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33717done
33718
33719  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33720    PROPER_COMPILER_CXX=""
33721  else
33722    case $cross_compiling:$ac_tool_warned in
33723yes:)
33724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33726ac_tool_warned=yes ;;
33727esac
33728    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33729  fi
33730fi
33731
33732
33733  # Only process if variable expands to non-empty
33734
33735  if test "x$PROPER_COMPILER_CXX" != x; then
33736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33737
33738  # First separate the path from the arguments. This will split at the first
33739  # space.
33740  complete="$PROPER_COMPILER_CXX"
33741  path="${complete%% *}"
33742  tmp="$complete EOL"
33743  arguments="${tmp#* }"
33744
33745  # Input might be given as Windows format, start by converting to
33746  # unix format.
33747  new_path=`$CYGPATH -u "$path"`
33748
33749  # Now try to locate executable using which
33750  new_path=`$WHICH "$new_path" 2> /dev/null`
33751  # bat and cmd files are not always considered executable in cygwin causing which
33752  # to not find them
33753  if test "x$new_path" = x \
33754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33756    new_path=`$CYGPATH -u "$path"`
33757  fi
33758  if test "x$new_path" = x; then
33759    # Oops. Which didn't find the executable.
33760    # The splitting of arguments from the executable at a space might have been incorrect,
33761    # since paths with space are more likely in Windows. Give it another try with the whole
33762    # argument.
33763    path="$complete"
33764    arguments="EOL"
33765    new_path=`$CYGPATH -u "$path"`
33766    new_path=`$WHICH "$new_path" 2> /dev/null`
33767    # bat and cmd files are not always considered executable in cygwin causing which
33768    # to not find them
33769    if test "x$new_path" = x \
33770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33772      new_path=`$CYGPATH -u "$path"`
33773    fi
33774    if test "x$new_path" = x; then
33775      # It's still not found. Now this is an unrecoverable error.
33776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33777$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33778      has_space=`$ECHO "$complete" | $GREP " "`
33779      if test "x$has_space" != x; then
33780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33782      fi
33783      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33784    fi
33785  fi
33786
33787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33790  # "foo.exe" is OK but "foo" is an error.
33791  #
33792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33793  # It is also a way to make sure we got the proper file name for the real test later on.
33794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33795  if test "x$test_shortpath" = x; then
33796    # Short path failed, file does not exist as specified.
33797    # Try adding .exe or .cmd
33798    if test -f "${new_path}.exe"; then
33799      input_to_shortpath="${new_path}.exe"
33800    elif test -f "${new_path}.cmd"; then
33801      input_to_shortpath="${new_path}.cmd"
33802    else
33803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33804$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33807      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33808    fi
33809  else
33810    input_to_shortpath="$new_path"
33811  fi
33812
33813  # Call helper function which possibly converts this using DOS-style short mode.
33814  # If so, the updated path is stored in $new_path.
33815  new_path="$input_to_shortpath"
33816
33817  input_path="$input_to_shortpath"
33818  # Check if we need to convert this using DOS-style short mode. If the path
33819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33820  # take no chances and rewrite it.
33821  # Note: m4 eats our [], so we need to use [ and ] instead.
33822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33823  if test "x$has_forbidden_chars" != x; then
33824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33828      # Going to short mode and back again did indeed matter. Since short mode is
33829      # case insensitive, let's make it lowercase to improve readability.
33830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33831      # Now convert it back to Unix-style (cygpath)
33832      input_path=`$CYGPATH -u "$shortmode_path"`
33833      new_path="$input_path"
33834    fi
33835  fi
33836
33837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33838  if test "x$test_cygdrive_prefix" = x; then
33839    # As a simple fix, exclude /usr/bin since it's not a real path.
33840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33842      # a path prefixed by /cygdrive for fixpath to work.
33843      new_path="$CYGWIN_ROOT_PATH$input_path"
33844    fi
33845  fi
33846
33847  # remove trailing .exe if any
33848  new_path="${new_path/%.exe/}"
33849
33850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33851
33852  # First separate the path from the arguments. This will split at the first
33853  # space.
33854  complete="$PROPER_COMPILER_CXX"
33855  path="${complete%% *}"
33856  tmp="$complete EOL"
33857  arguments="${tmp#* }"
33858
33859  # Input might be given as Windows format, start by converting to
33860  # unix format.
33861  new_path="$path"
33862
33863  windows_path="$new_path"
33864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33865    unix_path=`$CYGPATH -u "$windows_path"`
33866    new_path="$unix_path"
33867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33869    new_path="$unix_path"
33870  fi
33871
33872
33873  # Now try to locate executable using which
33874  new_path=`$WHICH "$new_path" 2> /dev/null`
33875
33876  if test "x$new_path" = x; then
33877    # Oops. Which didn't find the executable.
33878    # The splitting of arguments from the executable at a space might have been incorrect,
33879    # since paths with space are more likely in Windows. Give it another try with the whole
33880    # argument.
33881    path="$complete"
33882    arguments="EOL"
33883    new_path="$path"
33884
33885  windows_path="$new_path"
33886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33887    unix_path=`$CYGPATH -u "$windows_path"`
33888    new_path="$unix_path"
33889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33891    new_path="$unix_path"
33892  fi
33893
33894
33895    new_path=`$WHICH "$new_path" 2> /dev/null`
33896    # bat and cmd files are not always considered executable in MSYS causing which
33897    # to not find them
33898    if test "x$new_path" = x \
33899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33901      new_path="$path"
33902
33903  windows_path="$new_path"
33904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33905    unix_path=`$CYGPATH -u "$windows_path"`
33906    new_path="$unix_path"
33907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33909    new_path="$unix_path"
33910  fi
33911
33912    fi
33913
33914    if test "x$new_path" = x; then
33915      # It's still not found. Now this is an unrecoverable error.
33916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33917$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33918      has_space=`$ECHO "$complete" | $GREP " "`
33919      if test "x$has_space" != x; then
33920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33922      fi
33923      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33924    fi
33925  fi
33926
33927  # Now new_path has a complete unix path to the binary
33928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33929    # Keep paths in /bin as-is, but remove trailing .exe if any
33930    new_path="${new_path/%.exe/}"
33931    # Do not save /bin paths to all_fixpath_prefixes!
33932  else
33933    # Not in mixed or Windows style, start by that.
33934    new_path=`cmd //c echo $new_path`
33935
33936  input_path="$new_path"
33937  # Check if we need to convert this using DOS-style short mode. If the path
33938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33939  # take no chances and rewrite it.
33940  # Note: m4 eats our [], so we need to use [ and ] instead.
33941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33942  if test "x$has_forbidden_chars" != x; then
33943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33945  fi
33946
33947    # Output is in $new_path
33948
33949  windows_path="$new_path"
33950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33951    unix_path=`$CYGPATH -u "$windows_path"`
33952    new_path="$unix_path"
33953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33955    new_path="$unix_path"
33956  fi
33957
33958    # remove trailing .exe if any
33959    new_path="${new_path/%.exe/}"
33960
33961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33963  fi
33964
33965    else
33966      # We're on a unix platform. Hooray! :)
33967      # First separate the path from the arguments. This will split at the first
33968      # space.
33969      complete="$PROPER_COMPILER_CXX"
33970      path="${complete%% *}"
33971      tmp="$complete EOL"
33972      arguments="${tmp#* }"
33973
33974      # Cannot rely on the command "which" here since it doesn't always work.
33975      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33976      if test -z "$is_absolute_path"; then
33977        # Path to executable is not absolute. Find it.
33978        IFS_save="$IFS"
33979        IFS=:
33980        for p in $PATH; do
33981          if test -f "$p/$path" && test -x "$p/$path"; then
33982            new_path="$p/$path"
33983            break
33984          fi
33985        done
33986        IFS="$IFS_save"
33987      else
33988        # This is an absolute path, we can use it without further modifications.
33989        new_path="$path"
33990      fi
33991
33992      if test "x$new_path" = x; then
33993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33994$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33995        has_space=`$ECHO "$complete" | $GREP " "`
33996        if test "x$has_space" != x; then
33997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33999        fi
34000        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34001      fi
34002    fi
34003
34004    # Now join together the path and the arguments once again
34005    if test "x$arguments" != xEOL; then
34006      new_complete="$new_path ${arguments% *}"
34007    else
34008      new_complete="$new_path"
34009    fi
34010
34011    if test "x$complete" != "x$new_complete"; then
34012      PROPER_COMPILER_CXX="$new_complete"
34013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34014$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34015    fi
34016  fi
34017
34018    PATH="$RETRY_COMPILER_SAVED_PATH"
34019
34020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34021$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34022
34023  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34024    # Follow a chain of symbolic links. Use readlink
34025    # where it exists, else fall back to horribly
34026    # complicated shell code.
34027    if test "x$READLINK_TESTED" != yes; then
34028      # On MacOSX there is a readlink tool with a different
34029      # purpose than the GNU readlink tool. Check the found readlink.
34030      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34031      if test "x$ISGNU" = x; then
34032        # A readlink that we do not know how to use.
34033        # Are there other non-GNU readlinks out there?
34034        READLINK_TESTED=yes
34035        READLINK=
34036      fi
34037    fi
34038
34039    if test "x$READLINK" != x; then
34040      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34041    else
34042      # Save the current directory for restoring afterwards
34043      STARTDIR=$PWD
34044      COUNTER=0
34045      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34046      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34047      cd $sym_link_dir
34048      # Use -P flag to resolve symlinks in directories.
34049      cd `$THEPWDCMD -P`
34050      sym_link_dir=`$THEPWDCMD -P`
34051      # Resolve file symlinks
34052      while test $COUNTER -lt 20; do
34053        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34054        if test "x$ISLINK" == x; then
34055          # This is not a symbolic link! We are done!
34056          break
34057        fi
34058        # Again resolve directory symlinks since the target of the just found
34059        # link could be in a different directory
34060        cd `$DIRNAME $ISLINK`
34061        sym_link_dir=`$THEPWDCMD -P`
34062        sym_link_file=`$BASENAME $ISLINK`
34063        let COUNTER=COUNTER+1
34064      done
34065      cd $STARTDIR
34066      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34067    fi
34068  fi
34069
34070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34071$as_echo "$PROPER_COMPILER_CXX" >&6; }
34072    CXX="$PROPER_COMPILER_CXX"
34073  else
34074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34075$as_echo "no, keeping CXX" >&6; }
34076  fi
34077
34078
34079  COMPILER=$CXX
34080  COMPILER_NAME=$COMPILER_NAME
34081
34082  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34083    # cc -V output typically looks like
34084    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34085    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34086    # Check that this is likely to be the Solaris Studio cc.
34087    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34088    if test $? -ne 0; then
34089      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34090      { $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
34091$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34093$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34095$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34096      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34097    fi
34098    # Remove usage instructions (if present), and
34099    # collapse compiler output into a single line
34100    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34101        $SED -e 's/ *[Uu]sage:.*//'`
34102    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34103        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34104  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34105    # xlc -qversion output typically looks like
34106    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34107    #     Version: 11.01.0000.0015
34108    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34109    # Check that this is likely to be the IBM XL C compiler.
34110    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34111    if test $? -ne 0; then
34112      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34113      { $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
34114$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34115      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34116$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34118$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34119      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34120    fi
34121    # Collapse compiler output into a single line
34122    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34123    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34124        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34125  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34126    # There is no specific version flag, but all output starts with a version string.
34127    # First line typically looks something like:
34128    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34129    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34130    # Check that this is likely to be Microsoft CL.EXE.
34131    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34132    if test $? -ne 0; then
34133      { $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
34134$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34135      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34136$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34137      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34138    fi
34139    # Collapse compiler output into a single line
34140    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34141    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34142        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34143  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34144    # gcc --version output typically looks like
34145    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34146    #     Copyright (C) 2013 Free Software Foundation, Inc.
34147    #     This is free software; see the source for copying conditions.  There is NO
34148    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34149    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34150    # Check that this is likely to be GCC.
34151    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34152    if test $? -ne 0; then
34153      { $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
34154$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34155      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34156$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34157      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34158    fi
34159    # Remove Copyright and legalese from version string, and
34160    # collapse into a single line
34161    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34162        $SED -e 's/ *Copyright .*//'`
34163    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34164        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34165  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34166    # clang --version output typically looks like
34167    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34168    #    clang version 3.3 (tags/RELEASE_33/final)
34169    # or
34170    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34171    #    Target: x86_64-pc-linux-gnu
34172    #    Thread model: posix
34173    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34174    # Check that this is likely to be clang
34175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34176    if test $? -ne 0; then
34177      { $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
34178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34180$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34181      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34182    fi
34183    # Collapse compiler output into a single line
34184    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34185    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34186        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34187  else
34188      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34189  fi
34190  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34191  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34192  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34193  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34194
34195  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34196$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34197
34198
34199  # Now that we have resolved CXX ourself, let autoconf have its go at it
34200  ac_ext=cpp
34201ac_cpp='$CXXCPP $CPPFLAGS'
34202ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34203ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34204ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34205if test -z "$CXX"; then
34206  if test -n "$CCC"; then
34207    CXX=$CCC
34208  else
34209    if test -n "$ac_tool_prefix"; then
34210  for ac_prog in $CXX
34211  do
34212    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34213set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34215$as_echo_n "checking for $ac_word... " >&6; }
34216if ${ac_cv_prog_CXX+:} false; then :
34217  $as_echo_n "(cached) " >&6
34218else
34219  if test -n "$CXX"; then
34220  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34221else
34222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34223for as_dir in $PATH
34224do
34225  IFS=$as_save_IFS
34226  test -z "$as_dir" && as_dir=.
34227    for ac_exec_ext in '' $ac_executable_extensions; do
34228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34229    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34231    break 2
34232  fi
34233done
34234  done
34235IFS=$as_save_IFS
34236
34237fi
34238fi
34239CXX=$ac_cv_prog_CXX
34240if test -n "$CXX"; then
34241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34242$as_echo "$CXX" >&6; }
34243else
34244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34245$as_echo "no" >&6; }
34246fi
34247
34248
34249    test -n "$CXX" && break
34250  done
34251fi
34252if test -z "$CXX"; then
34253  ac_ct_CXX=$CXX
34254  for ac_prog in $CXX
34255do
34256  # Extract the first word of "$ac_prog", so it can be a program name with args.
34257set dummy $ac_prog; ac_word=$2
34258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34259$as_echo_n "checking for $ac_word... " >&6; }
34260if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34261  $as_echo_n "(cached) " >&6
34262else
34263  if test -n "$ac_ct_CXX"; then
34264  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34265else
34266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34267for as_dir in $PATH
34268do
34269  IFS=$as_save_IFS
34270  test -z "$as_dir" && as_dir=.
34271    for ac_exec_ext in '' $ac_executable_extensions; do
34272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34273    ac_cv_prog_ac_ct_CXX="$ac_prog"
34274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34275    break 2
34276  fi
34277done
34278  done
34279IFS=$as_save_IFS
34280
34281fi
34282fi
34283ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34284if test -n "$ac_ct_CXX"; then
34285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34286$as_echo "$ac_ct_CXX" >&6; }
34287else
34288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34289$as_echo "no" >&6; }
34290fi
34291
34292
34293  test -n "$ac_ct_CXX" && break
34294done
34295
34296  if test "x$ac_ct_CXX" = x; then
34297    CXX="g++"
34298  else
34299    case $cross_compiling:$ac_tool_warned in
34300yes:)
34301{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34302$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34303ac_tool_warned=yes ;;
34304esac
34305    CXX=$ac_ct_CXX
34306  fi
34307fi
34308
34309  fi
34310fi
34311# Provide some information about the compiler.
34312$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34313set X $ac_compile
34314ac_compiler=$2
34315for ac_option in --version -v -V -qversion; do
34316  { { ac_try="$ac_compiler $ac_option >&5"
34317case "(($ac_try" in
34318  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34319  *) ac_try_echo=$ac_try;;
34320esac
34321eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34322$as_echo "$ac_try_echo"; } >&5
34323  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34324  ac_status=$?
34325  if test -s conftest.err; then
34326    sed '10a\
34327... rest of stderr output deleted ...
34328         10q' conftest.err >conftest.er1
34329    cat conftest.er1 >&5
34330  fi
34331  rm -f conftest.er1 conftest.err
34332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34333  test $ac_status = 0; }
34334done
34335
34336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34337$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34338if ${ac_cv_cxx_compiler_gnu+:} false; then :
34339  $as_echo_n "(cached) " >&6
34340else
34341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34342/* end confdefs.h.  */
34343
34344int
34345main ()
34346{
34347#ifndef __GNUC__
34348       choke me
34349#endif
34350
34351  ;
34352  return 0;
34353}
34354_ACEOF
34355if ac_fn_cxx_try_compile "$LINENO"; then :
34356  ac_compiler_gnu=yes
34357else
34358  ac_compiler_gnu=no
34359fi
34360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34361ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34362
34363fi
34364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34365$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34366if test $ac_compiler_gnu = yes; then
34367  GXX=yes
34368else
34369  GXX=
34370fi
34371ac_test_CXXFLAGS=${CXXFLAGS+set}
34372ac_save_CXXFLAGS=$CXXFLAGS
34373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34374$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34375if ${ac_cv_prog_cxx_g+:} false; then :
34376  $as_echo_n "(cached) " >&6
34377else
34378  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34379   ac_cxx_werror_flag=yes
34380   ac_cv_prog_cxx_g=no
34381   CXXFLAGS="-g"
34382   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34383/* end confdefs.h.  */
34384
34385int
34386main ()
34387{
34388
34389  ;
34390  return 0;
34391}
34392_ACEOF
34393if ac_fn_cxx_try_compile "$LINENO"; then :
34394  ac_cv_prog_cxx_g=yes
34395else
34396  CXXFLAGS=""
34397      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34398/* end confdefs.h.  */
34399
34400int
34401main ()
34402{
34403
34404  ;
34405  return 0;
34406}
34407_ACEOF
34408if ac_fn_cxx_try_compile "$LINENO"; then :
34409
34410else
34411  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34412	 CXXFLAGS="-g"
34413	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34414/* end confdefs.h.  */
34415
34416int
34417main ()
34418{
34419
34420  ;
34421  return 0;
34422}
34423_ACEOF
34424if ac_fn_cxx_try_compile "$LINENO"; then :
34425  ac_cv_prog_cxx_g=yes
34426fi
34427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34428fi
34429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34430fi
34431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34432   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34433fi
34434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34435$as_echo "$ac_cv_prog_cxx_g" >&6; }
34436if test "$ac_test_CXXFLAGS" = set; then
34437  CXXFLAGS=$ac_save_CXXFLAGS
34438elif test $ac_cv_prog_cxx_g = yes; then
34439  if test "$GXX" = yes; then
34440    CXXFLAGS="-g -O2"
34441  else
34442    CXXFLAGS="-g"
34443  fi
34444else
34445  if test "$GXX" = yes; then
34446    CXXFLAGS="-O2"
34447  else
34448    CXXFLAGS=
34449  fi
34450fi
34451ac_ext=cpp
34452ac_cpp='$CXXCPP $CPPFLAGS'
34453ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34454ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34455ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34456
34457
34458  #
34459  # Setup the preprocessor (CPP and CXXCPP)
34460  #
34461  ac_ext=c
34462ac_cpp='$CPP $CPPFLAGS'
34463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34465ac_compiler_gnu=$ac_cv_c_compiler_gnu
34466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34467$as_echo_n "checking how to run the C preprocessor... " >&6; }
34468# On Suns, sometimes $CPP names a directory.
34469if test -n "$CPP" && test -d "$CPP"; then
34470  CPP=
34471fi
34472if test -z "$CPP"; then
34473  if ${ac_cv_prog_CPP+:} false; then :
34474  $as_echo_n "(cached) " >&6
34475else
34476      # Double quotes because CPP needs to be expanded
34477    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34478    do
34479      ac_preproc_ok=false
34480for ac_c_preproc_warn_flag in '' yes
34481do
34482  # Use a header file that comes with gcc, so configuring glibc
34483  # with a fresh cross-compiler works.
34484  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34485  # <limits.h> exists even on freestanding compilers.
34486  # On the NeXT, cc -E runs the code through the compiler's parser,
34487  # not just through cpp. "Syntax error" is here to catch this case.
34488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34489/* end confdefs.h.  */
34490#ifdef __STDC__
34491# include <limits.h>
34492#else
34493# include <assert.h>
34494#endif
34495		     Syntax error
34496_ACEOF
34497if ac_fn_c_try_cpp "$LINENO"; then :
34498
34499else
34500  # Broken: fails on valid input.
34501continue
34502fi
34503rm -f conftest.err conftest.i conftest.$ac_ext
34504
34505  # OK, works on sane cases.  Now check whether nonexistent headers
34506  # can be detected and how.
34507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34508/* end confdefs.h.  */
34509#include <ac_nonexistent.h>
34510_ACEOF
34511if ac_fn_c_try_cpp "$LINENO"; then :
34512  # Broken: success on invalid input.
34513continue
34514else
34515  # Passes both tests.
34516ac_preproc_ok=:
34517break
34518fi
34519rm -f conftest.err conftest.i conftest.$ac_ext
34520
34521done
34522# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34523rm -f conftest.i conftest.err conftest.$ac_ext
34524if $ac_preproc_ok; then :
34525  break
34526fi
34527
34528    done
34529    ac_cv_prog_CPP=$CPP
34530
34531fi
34532  CPP=$ac_cv_prog_CPP
34533else
34534  ac_cv_prog_CPP=$CPP
34535fi
34536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34537$as_echo "$CPP" >&6; }
34538ac_preproc_ok=false
34539for ac_c_preproc_warn_flag in '' yes
34540do
34541  # Use a header file that comes with gcc, so configuring glibc
34542  # with a fresh cross-compiler works.
34543  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34544  # <limits.h> exists even on freestanding compilers.
34545  # On the NeXT, cc -E runs the code through the compiler's parser,
34546  # not just through cpp. "Syntax error" is here to catch this case.
34547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34548/* end confdefs.h.  */
34549#ifdef __STDC__
34550# include <limits.h>
34551#else
34552# include <assert.h>
34553#endif
34554		     Syntax error
34555_ACEOF
34556if ac_fn_c_try_cpp "$LINENO"; then :
34557
34558else
34559  # Broken: fails on valid input.
34560continue
34561fi
34562rm -f conftest.err conftest.i conftest.$ac_ext
34563
34564  # OK, works on sane cases.  Now check whether nonexistent headers
34565  # can be detected and how.
34566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34567/* end confdefs.h.  */
34568#include <ac_nonexistent.h>
34569_ACEOF
34570if ac_fn_c_try_cpp "$LINENO"; then :
34571  # Broken: success on invalid input.
34572continue
34573else
34574  # Passes both tests.
34575ac_preproc_ok=:
34576break
34577fi
34578rm -f conftest.err conftest.i conftest.$ac_ext
34579
34580done
34581# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34582rm -f conftest.i conftest.err conftest.$ac_ext
34583if $ac_preproc_ok; then :
34584
34585else
34586  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34588as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34589See \`config.log' for more details" "$LINENO" 5; }
34590fi
34591
34592ac_ext=cpp
34593ac_cpp='$CXXCPP $CPPFLAGS'
34594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34597
34598
34599  # Only process if variable expands to non-empty
34600
34601  if test "x$CPP" != x; then
34602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34603
34604  # First separate the path from the arguments. This will split at the first
34605  # space.
34606  complete="$CPP"
34607  path="${complete%% *}"
34608  tmp="$complete EOL"
34609  arguments="${tmp#* }"
34610
34611  # Input might be given as Windows format, start by converting to
34612  # unix format.
34613  new_path=`$CYGPATH -u "$path"`
34614
34615  # Now try to locate executable using which
34616  new_path=`$WHICH "$new_path" 2> /dev/null`
34617  # bat and cmd files are not always considered executable in cygwin causing which
34618  # to not find them
34619  if test "x$new_path" = x \
34620      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34621      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34622    new_path=`$CYGPATH -u "$path"`
34623  fi
34624  if test "x$new_path" = x; then
34625    # Oops. Which didn't find the executable.
34626    # The splitting of arguments from the executable at a space might have been incorrect,
34627    # since paths with space are more likely in Windows. Give it another try with the whole
34628    # argument.
34629    path="$complete"
34630    arguments="EOL"
34631    new_path=`$CYGPATH -u "$path"`
34632    new_path=`$WHICH "$new_path" 2> /dev/null`
34633    # bat and cmd files are not always considered executable in cygwin causing which
34634    # to not find them
34635    if test "x$new_path" = x \
34636        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34637        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34638      new_path=`$CYGPATH -u "$path"`
34639    fi
34640    if test "x$new_path" = x; then
34641      # It's still not found. Now this is an unrecoverable error.
34642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34643$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34644      has_space=`$ECHO "$complete" | $GREP " "`
34645      if test "x$has_space" != x; then
34646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34648      fi
34649      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34650    fi
34651  fi
34652
34653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34656  # "foo.exe" is OK but "foo" is an error.
34657  #
34658  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34659  # It is also a way to make sure we got the proper file name for the real test later on.
34660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34661  if test "x$test_shortpath" = x; then
34662    # Short path failed, file does not exist as specified.
34663    # Try adding .exe or .cmd
34664    if test -f "${new_path}.exe"; then
34665      input_to_shortpath="${new_path}.exe"
34666    elif test -f "${new_path}.cmd"; then
34667      input_to_shortpath="${new_path}.cmd"
34668    else
34669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34670$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34671      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34672$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34673      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34674    fi
34675  else
34676    input_to_shortpath="$new_path"
34677  fi
34678
34679  # Call helper function which possibly converts this using DOS-style short mode.
34680  # If so, the updated path is stored in $new_path.
34681  new_path="$input_to_shortpath"
34682
34683  input_path="$input_to_shortpath"
34684  # Check if we need to convert this using DOS-style short mode. If the path
34685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34686  # take no chances and rewrite it.
34687  # Note: m4 eats our [], so we need to use [ and ] instead.
34688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34689  if test "x$has_forbidden_chars" != x; then
34690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34694      # Going to short mode and back again did indeed matter. Since short mode is
34695      # case insensitive, let's make it lowercase to improve readability.
34696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34697      # Now convert it back to Unix-style (cygpath)
34698      input_path=`$CYGPATH -u "$shortmode_path"`
34699      new_path="$input_path"
34700    fi
34701  fi
34702
34703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34704  if test "x$test_cygdrive_prefix" = x; then
34705    # As a simple fix, exclude /usr/bin since it's not a real path.
34706    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34708      # a path prefixed by /cygdrive for fixpath to work.
34709      new_path="$CYGWIN_ROOT_PATH$input_path"
34710    fi
34711  fi
34712
34713  # remove trailing .exe if any
34714  new_path="${new_path/%.exe/}"
34715
34716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34717
34718  # First separate the path from the arguments. This will split at the first
34719  # space.
34720  complete="$CPP"
34721  path="${complete%% *}"
34722  tmp="$complete EOL"
34723  arguments="${tmp#* }"
34724
34725  # Input might be given as Windows format, start by converting to
34726  # unix format.
34727  new_path="$path"
34728
34729  windows_path="$new_path"
34730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34731    unix_path=`$CYGPATH -u "$windows_path"`
34732    new_path="$unix_path"
34733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34735    new_path="$unix_path"
34736  fi
34737
34738
34739  # Now try to locate executable using which
34740  new_path=`$WHICH "$new_path" 2> /dev/null`
34741
34742  if test "x$new_path" = x; then
34743    # Oops. Which didn't find the executable.
34744    # The splitting of arguments from the executable at a space might have been incorrect,
34745    # since paths with space are more likely in Windows. Give it another try with the whole
34746    # argument.
34747    path="$complete"
34748    arguments="EOL"
34749    new_path="$path"
34750
34751  windows_path="$new_path"
34752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34753    unix_path=`$CYGPATH -u "$windows_path"`
34754    new_path="$unix_path"
34755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34757    new_path="$unix_path"
34758  fi
34759
34760
34761    new_path=`$WHICH "$new_path" 2> /dev/null`
34762    # bat and cmd files are not always considered executable in MSYS causing which
34763    # to not find them
34764    if test "x$new_path" = x \
34765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34767      new_path="$path"
34768
34769  windows_path="$new_path"
34770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34771    unix_path=`$CYGPATH -u "$windows_path"`
34772    new_path="$unix_path"
34773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34775    new_path="$unix_path"
34776  fi
34777
34778    fi
34779
34780    if test "x$new_path" = x; then
34781      # It's still not found. Now this is an unrecoverable error.
34782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34783$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34784      has_space=`$ECHO "$complete" | $GREP " "`
34785      if test "x$has_space" != x; then
34786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34788      fi
34789      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34790    fi
34791  fi
34792
34793  # Now new_path has a complete unix path to the binary
34794  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34795    # Keep paths in /bin as-is, but remove trailing .exe if any
34796    new_path="${new_path/%.exe/}"
34797    # Do not save /bin paths to all_fixpath_prefixes!
34798  else
34799    # Not in mixed or Windows style, start by that.
34800    new_path=`cmd //c echo $new_path`
34801
34802  input_path="$new_path"
34803  # Check if we need to convert this using DOS-style short mode. If the path
34804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34805  # take no chances and rewrite it.
34806  # Note: m4 eats our [], so we need to use [ and ] instead.
34807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34808  if test "x$has_forbidden_chars" != x; then
34809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34811  fi
34812
34813    # Output is in $new_path
34814
34815  windows_path="$new_path"
34816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34817    unix_path=`$CYGPATH -u "$windows_path"`
34818    new_path="$unix_path"
34819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34821    new_path="$unix_path"
34822  fi
34823
34824    # remove trailing .exe if any
34825    new_path="${new_path/%.exe/}"
34826
34827    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34828    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34829  fi
34830
34831    else
34832      # We're on a unix platform. Hooray! :)
34833      # First separate the path from the arguments. This will split at the first
34834      # space.
34835      complete="$CPP"
34836      path="${complete%% *}"
34837      tmp="$complete EOL"
34838      arguments="${tmp#* }"
34839
34840      # Cannot rely on the command "which" here since it doesn't always work.
34841      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34842      if test -z "$is_absolute_path"; then
34843        # Path to executable is not absolute. Find it.
34844        IFS_save="$IFS"
34845        IFS=:
34846        for p in $PATH; do
34847          if test -f "$p/$path" && test -x "$p/$path"; then
34848            new_path="$p/$path"
34849            break
34850          fi
34851        done
34852        IFS="$IFS_save"
34853      else
34854        # This is an absolute path, we can use it without further modifications.
34855        new_path="$path"
34856      fi
34857
34858      if test "x$new_path" = x; then
34859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34860$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34861        has_space=`$ECHO "$complete" | $GREP " "`
34862        if test "x$has_space" != x; then
34863          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34864$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34865        fi
34866        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34867      fi
34868    fi
34869
34870    # Now join together the path and the arguments once again
34871    if test "x$arguments" != xEOL; then
34872      new_complete="$new_path ${arguments% *}"
34873    else
34874      new_complete="$new_path"
34875    fi
34876
34877    if test "x$complete" != "x$new_complete"; then
34878      CPP="$new_complete"
34879      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34880$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34881    fi
34882  fi
34883
34884  ac_ext=cpp
34885ac_cpp='$CXXCPP $CPPFLAGS'
34886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34890$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34891if test -z "$CXXCPP"; then
34892  if ${ac_cv_prog_CXXCPP+:} false; then :
34893  $as_echo_n "(cached) " >&6
34894else
34895      # Double quotes because CXXCPP needs to be expanded
34896    for CXXCPP in "$CXX -E" "/lib/cpp"
34897    do
34898      ac_preproc_ok=false
34899for ac_cxx_preproc_warn_flag in '' yes
34900do
34901  # Use a header file that comes with gcc, so configuring glibc
34902  # with a fresh cross-compiler works.
34903  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34904  # <limits.h> exists even on freestanding compilers.
34905  # On the NeXT, cc -E runs the code through the compiler's parser,
34906  # not just through cpp. "Syntax error" is here to catch this case.
34907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34908/* end confdefs.h.  */
34909#ifdef __STDC__
34910# include <limits.h>
34911#else
34912# include <assert.h>
34913#endif
34914		     Syntax error
34915_ACEOF
34916if ac_fn_cxx_try_cpp "$LINENO"; then :
34917
34918else
34919  # Broken: fails on valid input.
34920continue
34921fi
34922rm -f conftest.err conftest.i conftest.$ac_ext
34923
34924  # OK, works on sane cases.  Now check whether nonexistent headers
34925  # can be detected and how.
34926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34927/* end confdefs.h.  */
34928#include <ac_nonexistent.h>
34929_ACEOF
34930if ac_fn_cxx_try_cpp "$LINENO"; then :
34931  # Broken: success on invalid input.
34932continue
34933else
34934  # Passes both tests.
34935ac_preproc_ok=:
34936break
34937fi
34938rm -f conftest.err conftest.i conftest.$ac_ext
34939
34940done
34941# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34942rm -f conftest.i conftest.err conftest.$ac_ext
34943if $ac_preproc_ok; then :
34944  break
34945fi
34946
34947    done
34948    ac_cv_prog_CXXCPP=$CXXCPP
34949
34950fi
34951  CXXCPP=$ac_cv_prog_CXXCPP
34952else
34953  ac_cv_prog_CXXCPP=$CXXCPP
34954fi
34955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34956$as_echo "$CXXCPP" >&6; }
34957ac_preproc_ok=false
34958for ac_cxx_preproc_warn_flag in '' yes
34959do
34960  # Use a header file that comes with gcc, so configuring glibc
34961  # with a fresh cross-compiler works.
34962  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34963  # <limits.h> exists even on freestanding compilers.
34964  # On the NeXT, cc -E runs the code through the compiler's parser,
34965  # not just through cpp. "Syntax error" is here to catch this case.
34966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34967/* end confdefs.h.  */
34968#ifdef __STDC__
34969# include <limits.h>
34970#else
34971# include <assert.h>
34972#endif
34973		     Syntax error
34974_ACEOF
34975if ac_fn_cxx_try_cpp "$LINENO"; then :
34976
34977else
34978  # Broken: fails on valid input.
34979continue
34980fi
34981rm -f conftest.err conftest.i conftest.$ac_ext
34982
34983  # OK, works on sane cases.  Now check whether nonexistent headers
34984  # can be detected and how.
34985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34986/* end confdefs.h.  */
34987#include <ac_nonexistent.h>
34988_ACEOF
34989if ac_fn_cxx_try_cpp "$LINENO"; then :
34990  # Broken: success on invalid input.
34991continue
34992else
34993  # Passes both tests.
34994ac_preproc_ok=:
34995break
34996fi
34997rm -f conftest.err conftest.i conftest.$ac_ext
34998
34999done
35000# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35001rm -f conftest.i conftest.err conftest.$ac_ext
35002if $ac_preproc_ok; then :
35003
35004else
35005  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35007as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35008See \`config.log' for more details" "$LINENO" 5; }
35009fi
35010
35011ac_ext=cpp
35012ac_cpp='$CXXCPP $CPPFLAGS'
35013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35016
35017
35018  # Only process if variable expands to non-empty
35019
35020  if test "x$CXXCPP" != x; then
35021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35022
35023  # First separate the path from the arguments. This will split at the first
35024  # space.
35025  complete="$CXXCPP"
35026  path="${complete%% *}"
35027  tmp="$complete EOL"
35028  arguments="${tmp#* }"
35029
35030  # Input might be given as Windows format, start by converting to
35031  # unix format.
35032  new_path=`$CYGPATH -u "$path"`
35033
35034  # Now try to locate executable using which
35035  new_path=`$WHICH "$new_path" 2> /dev/null`
35036  # bat and cmd files are not always considered executable in cygwin causing which
35037  # to not find them
35038  if test "x$new_path" = x \
35039      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35040      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35041    new_path=`$CYGPATH -u "$path"`
35042  fi
35043  if test "x$new_path" = x; then
35044    # Oops. Which didn't find the executable.
35045    # The splitting of arguments from the executable at a space might have been incorrect,
35046    # since paths with space are more likely in Windows. Give it another try with the whole
35047    # argument.
35048    path="$complete"
35049    arguments="EOL"
35050    new_path=`$CYGPATH -u "$path"`
35051    new_path=`$WHICH "$new_path" 2> /dev/null`
35052    # bat and cmd files are not always considered executable in cygwin causing which
35053    # to not find them
35054    if test "x$new_path" = x \
35055        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35056        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35057      new_path=`$CYGPATH -u "$path"`
35058    fi
35059    if test "x$new_path" = x; then
35060      # It's still not found. Now this is an unrecoverable error.
35061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35062$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35063      has_space=`$ECHO "$complete" | $GREP " "`
35064      if test "x$has_space" != x; then
35065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35067      fi
35068      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35069    fi
35070  fi
35071
35072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35075  # "foo.exe" is OK but "foo" is an error.
35076  #
35077  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35078  # It is also a way to make sure we got the proper file name for the real test later on.
35079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35080  if test "x$test_shortpath" = x; then
35081    # Short path failed, file does not exist as specified.
35082    # Try adding .exe or .cmd
35083    if test -f "${new_path}.exe"; then
35084      input_to_shortpath="${new_path}.exe"
35085    elif test -f "${new_path}.cmd"; then
35086      input_to_shortpath="${new_path}.cmd"
35087    else
35088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35089$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35090      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35091$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35092      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35093    fi
35094  else
35095    input_to_shortpath="$new_path"
35096  fi
35097
35098  # Call helper function which possibly converts this using DOS-style short mode.
35099  # If so, the updated path is stored in $new_path.
35100  new_path="$input_to_shortpath"
35101
35102  input_path="$input_to_shortpath"
35103  # Check if we need to convert this using DOS-style short mode. If the path
35104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35105  # take no chances and rewrite it.
35106  # Note: m4 eats our [], so we need to use [ and ] instead.
35107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35108  if test "x$has_forbidden_chars" != x; then
35109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35113      # Going to short mode and back again did indeed matter. Since short mode is
35114      # case insensitive, let's make it lowercase to improve readability.
35115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35116      # Now convert it back to Unix-style (cygpath)
35117      input_path=`$CYGPATH -u "$shortmode_path"`
35118      new_path="$input_path"
35119    fi
35120  fi
35121
35122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35123  if test "x$test_cygdrive_prefix" = x; then
35124    # As a simple fix, exclude /usr/bin since it's not a real path.
35125    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35127      # a path prefixed by /cygdrive for fixpath to work.
35128      new_path="$CYGWIN_ROOT_PATH$input_path"
35129    fi
35130  fi
35131
35132  # remove trailing .exe if any
35133  new_path="${new_path/%.exe/}"
35134
35135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35136
35137  # First separate the path from the arguments. This will split at the first
35138  # space.
35139  complete="$CXXCPP"
35140  path="${complete%% *}"
35141  tmp="$complete EOL"
35142  arguments="${tmp#* }"
35143
35144  # Input might be given as Windows format, start by converting to
35145  # unix format.
35146  new_path="$path"
35147
35148  windows_path="$new_path"
35149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35150    unix_path=`$CYGPATH -u "$windows_path"`
35151    new_path="$unix_path"
35152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35154    new_path="$unix_path"
35155  fi
35156
35157
35158  # Now try to locate executable using which
35159  new_path=`$WHICH "$new_path" 2> /dev/null`
35160
35161  if test "x$new_path" = x; then
35162    # Oops. Which didn't find the executable.
35163    # The splitting of arguments from the executable at a space might have been incorrect,
35164    # since paths with space are more likely in Windows. Give it another try with the whole
35165    # argument.
35166    path="$complete"
35167    arguments="EOL"
35168    new_path="$path"
35169
35170  windows_path="$new_path"
35171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35172    unix_path=`$CYGPATH -u "$windows_path"`
35173    new_path="$unix_path"
35174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35176    new_path="$unix_path"
35177  fi
35178
35179
35180    new_path=`$WHICH "$new_path" 2> /dev/null`
35181    # bat and cmd files are not always considered executable in MSYS causing which
35182    # to not find them
35183    if test "x$new_path" = x \
35184        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35185        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35186      new_path="$path"
35187
35188  windows_path="$new_path"
35189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35190    unix_path=`$CYGPATH -u "$windows_path"`
35191    new_path="$unix_path"
35192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35194    new_path="$unix_path"
35195  fi
35196
35197    fi
35198
35199    if test "x$new_path" = x; then
35200      # It's still not found. Now this is an unrecoverable error.
35201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35202$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35203      has_space=`$ECHO "$complete" | $GREP " "`
35204      if test "x$has_space" != x; then
35205        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35206$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35207      fi
35208      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35209    fi
35210  fi
35211
35212  # Now new_path has a complete unix path to the binary
35213  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35214    # Keep paths in /bin as-is, but remove trailing .exe if any
35215    new_path="${new_path/%.exe/}"
35216    # Do not save /bin paths to all_fixpath_prefixes!
35217  else
35218    # Not in mixed or Windows style, start by that.
35219    new_path=`cmd //c echo $new_path`
35220
35221  input_path="$new_path"
35222  # Check if we need to convert this using DOS-style short mode. If the path
35223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35224  # take no chances and rewrite it.
35225  # Note: m4 eats our [], so we need to use [ and ] instead.
35226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35227  if test "x$has_forbidden_chars" != x; then
35228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35230  fi
35231
35232    # Output is in $new_path
35233
35234  windows_path="$new_path"
35235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35236    unix_path=`$CYGPATH -u "$windows_path"`
35237    new_path="$unix_path"
35238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35240    new_path="$unix_path"
35241  fi
35242
35243    # remove trailing .exe if any
35244    new_path="${new_path/%.exe/}"
35245
35246    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35247    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35248  fi
35249
35250    else
35251      # We're on a unix platform. Hooray! :)
35252      # First separate the path from the arguments. This will split at the first
35253      # space.
35254      complete="$CXXCPP"
35255      path="${complete%% *}"
35256      tmp="$complete EOL"
35257      arguments="${tmp#* }"
35258
35259      # Cannot rely on the command "which" here since it doesn't always work.
35260      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35261      if test -z "$is_absolute_path"; then
35262        # Path to executable is not absolute. Find it.
35263        IFS_save="$IFS"
35264        IFS=:
35265        for p in $PATH; do
35266          if test -f "$p/$path" && test -x "$p/$path"; then
35267            new_path="$p/$path"
35268            break
35269          fi
35270        done
35271        IFS="$IFS_save"
35272      else
35273        # This is an absolute path, we can use it without further modifications.
35274        new_path="$path"
35275      fi
35276
35277      if test "x$new_path" = x; then
35278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35279$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35280        has_space=`$ECHO "$complete" | $GREP " "`
35281        if test "x$has_space" != x; then
35282          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35283$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35284        fi
35285        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35286      fi
35287    fi
35288
35289    # Now join together the path and the arguments once again
35290    if test "x$arguments" != xEOL; then
35291      new_complete="$new_path ${arguments% *}"
35292    else
35293      new_complete="$new_path"
35294    fi
35295
35296    if test "x$complete" != "x$new_complete"; then
35297      CXXCPP="$new_complete"
35298      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35299$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35300    fi
35301  fi
35302
35303
35304  #
35305  # Setup the linker (LD)
35306  #
35307  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35308    # In the Microsoft toolchain we have a separate LD command "link".
35309    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35310    # a cygwin program for something completely different.
35311    # Extract the first word of "link", so it can be a program name with args.
35312set dummy link; ac_word=$2
35313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35314$as_echo_n "checking for $ac_word... " >&6; }
35315if ${ac_cv_prog_LD+:} false; then :
35316  $as_echo_n "(cached) " >&6
35317else
35318  if test -n "$LD"; then
35319  ac_cv_prog_LD="$LD" # Let the user override the test.
35320else
35321  ac_prog_rejected=no
35322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35323for as_dir in $PATH
35324do
35325  IFS=$as_save_IFS
35326  test -z "$as_dir" && as_dir=.
35327    for ac_exec_ext in '' $ac_executable_extensions; do
35328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35329    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35330       ac_prog_rejected=yes
35331       continue
35332     fi
35333    ac_cv_prog_LD="link"
35334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35335    break 2
35336  fi
35337done
35338  done
35339IFS=$as_save_IFS
35340
35341if test $ac_prog_rejected = yes; then
35342  # We found a bogon in the path, so make sure we never use it.
35343  set dummy $ac_cv_prog_LD
35344  shift
35345  if test $# != 0; then
35346    # We chose a different compiler from the bogus one.
35347    # However, it has the same basename, so the bogon will be chosen
35348    # first if we set LD to just the basename; use the full file name.
35349    shift
35350    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35351  fi
35352fi
35353fi
35354fi
35355LD=$ac_cv_prog_LD
35356if test -n "$LD"; then
35357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35358$as_echo "$LD" >&6; }
35359else
35360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35361$as_echo "no" >&6; }
35362fi
35363
35364
35365
35366  # Only process if variable expands to non-empty
35367
35368  if test "x$LD" != x; then
35369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35370
35371  # First separate the path from the arguments. This will split at the first
35372  # space.
35373  complete="$LD"
35374  path="${complete%% *}"
35375  tmp="$complete EOL"
35376  arguments="${tmp#* }"
35377
35378  # Input might be given as Windows format, start by converting to
35379  # unix format.
35380  new_path=`$CYGPATH -u "$path"`
35381
35382  # Now try to locate executable using which
35383  new_path=`$WHICH "$new_path" 2> /dev/null`
35384  # bat and cmd files are not always considered executable in cygwin causing which
35385  # to not find them
35386  if test "x$new_path" = x \
35387      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35388      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35389    new_path=`$CYGPATH -u "$path"`
35390  fi
35391  if test "x$new_path" = x; then
35392    # Oops. Which didn't find the executable.
35393    # The splitting of arguments from the executable at a space might have been incorrect,
35394    # since paths with space are more likely in Windows. Give it another try with the whole
35395    # argument.
35396    path="$complete"
35397    arguments="EOL"
35398    new_path=`$CYGPATH -u "$path"`
35399    new_path=`$WHICH "$new_path" 2> /dev/null`
35400    # bat and cmd files are not always considered executable in cygwin causing which
35401    # to not find them
35402    if test "x$new_path" = x \
35403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35405      new_path=`$CYGPATH -u "$path"`
35406    fi
35407    if test "x$new_path" = x; then
35408      # It's still not found. Now this is an unrecoverable error.
35409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35410$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35411      has_space=`$ECHO "$complete" | $GREP " "`
35412      if test "x$has_space" != x; then
35413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35415      fi
35416      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35417    fi
35418  fi
35419
35420  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35421  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35422  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35423  # "foo.exe" is OK but "foo" is an error.
35424  #
35425  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35426  # It is also a way to make sure we got the proper file name for the real test later on.
35427  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35428  if test "x$test_shortpath" = x; then
35429    # Short path failed, file does not exist as specified.
35430    # Try adding .exe or .cmd
35431    if test -f "${new_path}.exe"; then
35432      input_to_shortpath="${new_path}.exe"
35433    elif test -f "${new_path}.cmd"; then
35434      input_to_shortpath="${new_path}.cmd"
35435    else
35436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35437$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35438      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35439$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35440      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35441    fi
35442  else
35443    input_to_shortpath="$new_path"
35444  fi
35445
35446  # Call helper function which possibly converts this using DOS-style short mode.
35447  # If so, the updated path is stored in $new_path.
35448  new_path="$input_to_shortpath"
35449
35450  input_path="$input_to_shortpath"
35451  # Check if we need to convert this using DOS-style short mode. If the path
35452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35453  # take no chances and rewrite it.
35454  # Note: m4 eats our [], so we need to use [ and ] instead.
35455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35456  if test "x$has_forbidden_chars" != x; then
35457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35461      # Going to short mode and back again did indeed matter. Since short mode is
35462      # case insensitive, let's make it lowercase to improve readability.
35463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35464      # Now convert it back to Unix-style (cygpath)
35465      input_path=`$CYGPATH -u "$shortmode_path"`
35466      new_path="$input_path"
35467    fi
35468  fi
35469
35470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35471  if test "x$test_cygdrive_prefix" = x; then
35472    # As a simple fix, exclude /usr/bin since it's not a real path.
35473    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35475      # a path prefixed by /cygdrive for fixpath to work.
35476      new_path="$CYGWIN_ROOT_PATH$input_path"
35477    fi
35478  fi
35479
35480  # remove trailing .exe if any
35481  new_path="${new_path/%.exe/}"
35482
35483    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35484
35485  # First separate the path from the arguments. This will split at the first
35486  # space.
35487  complete="$LD"
35488  path="${complete%% *}"
35489  tmp="$complete EOL"
35490  arguments="${tmp#* }"
35491
35492  # Input might be given as Windows format, start by converting to
35493  # unix format.
35494  new_path="$path"
35495
35496  windows_path="$new_path"
35497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35498    unix_path=`$CYGPATH -u "$windows_path"`
35499    new_path="$unix_path"
35500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35502    new_path="$unix_path"
35503  fi
35504
35505
35506  # Now try to locate executable using which
35507  new_path=`$WHICH "$new_path" 2> /dev/null`
35508
35509  if test "x$new_path" = x; then
35510    # Oops. Which didn't find the executable.
35511    # The splitting of arguments from the executable at a space might have been incorrect,
35512    # since paths with space are more likely in Windows. Give it another try with the whole
35513    # argument.
35514    path="$complete"
35515    arguments="EOL"
35516    new_path="$path"
35517
35518  windows_path="$new_path"
35519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35520    unix_path=`$CYGPATH -u "$windows_path"`
35521    new_path="$unix_path"
35522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35524    new_path="$unix_path"
35525  fi
35526
35527
35528    new_path=`$WHICH "$new_path" 2> /dev/null`
35529    # bat and cmd files are not always considered executable in MSYS causing which
35530    # to not find them
35531    if test "x$new_path" = x \
35532        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35533        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35534      new_path="$path"
35535
35536  windows_path="$new_path"
35537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35538    unix_path=`$CYGPATH -u "$windows_path"`
35539    new_path="$unix_path"
35540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35542    new_path="$unix_path"
35543  fi
35544
35545    fi
35546
35547    if test "x$new_path" = x; then
35548      # It's still not found. Now this is an unrecoverable error.
35549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35550$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35551      has_space=`$ECHO "$complete" | $GREP " "`
35552      if test "x$has_space" != x; then
35553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35555      fi
35556      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35557    fi
35558  fi
35559
35560  # Now new_path has a complete unix path to the binary
35561  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35562    # Keep paths in /bin as-is, but remove trailing .exe if any
35563    new_path="${new_path/%.exe/}"
35564    # Do not save /bin paths to all_fixpath_prefixes!
35565  else
35566    # Not in mixed or Windows style, start by that.
35567    new_path=`cmd //c echo $new_path`
35568
35569  input_path="$new_path"
35570  # Check if we need to convert this using DOS-style short mode. If the path
35571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35572  # take no chances and rewrite it.
35573  # Note: m4 eats our [], so we need to use [ and ] instead.
35574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35575  if test "x$has_forbidden_chars" != x; then
35576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35578  fi
35579
35580    # Output is in $new_path
35581
35582  windows_path="$new_path"
35583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35584    unix_path=`$CYGPATH -u "$windows_path"`
35585    new_path="$unix_path"
35586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35588    new_path="$unix_path"
35589  fi
35590
35591    # remove trailing .exe if any
35592    new_path="${new_path/%.exe/}"
35593
35594    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35595    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35596  fi
35597
35598    else
35599      # We're on a unix platform. Hooray! :)
35600      # First separate the path from the arguments. This will split at the first
35601      # space.
35602      complete="$LD"
35603      path="${complete%% *}"
35604      tmp="$complete EOL"
35605      arguments="${tmp#* }"
35606
35607      # Cannot rely on the command "which" here since it doesn't always work.
35608      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35609      if test -z "$is_absolute_path"; then
35610        # Path to executable is not absolute. Find it.
35611        IFS_save="$IFS"
35612        IFS=:
35613        for p in $PATH; do
35614          if test -f "$p/$path" && test -x "$p/$path"; then
35615            new_path="$p/$path"
35616            break
35617          fi
35618        done
35619        IFS="$IFS_save"
35620      else
35621        # This is an absolute path, we can use it without further modifications.
35622        new_path="$path"
35623      fi
35624
35625      if test "x$new_path" = x; then
35626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35627$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35628        has_space=`$ECHO "$complete" | $GREP " "`
35629        if test "x$has_space" != x; then
35630          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35631$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35632        fi
35633        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35634      fi
35635    fi
35636
35637    # Now join together the path and the arguments once again
35638    if test "x$arguments" != xEOL; then
35639      new_complete="$new_path ${arguments% *}"
35640    else
35641      new_complete="$new_path"
35642    fi
35643
35644    if test "x$complete" != "x$new_complete"; then
35645      LD="$new_complete"
35646      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35647$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35648    fi
35649  fi
35650
35651    # Verify that we indeed succeeded with this trick.
35652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35653$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35654    "$LD" --version > /dev/null
35655    if test $? -eq 0 ; then
35656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35657$as_echo "no" >&6; }
35658      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35659    else
35660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35661$as_echo "yes" >&6; }
35662    fi
35663    LDCXX="$LD"
35664  else
35665    # All other toolchains use the compiler to link.
35666    LD="$CC"
35667    LDCXX="$CXX"
35668  fi
35669
35670  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35671
35672
35673  #
35674  # Setup the assembler (AS)
35675  #
35676  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35677    # FIXME: should this really be solaris, or solstudio?
35678
35679
35680  # Publish this variable in the help.
35681
35682
35683  if [ -z "${AS+x}" ]; then
35684    # The variable is not set by user, try to locate tool using the code snippet
35685    for ac_prog in as
35686do
35687  # Extract the first word of "$ac_prog", so it can be a program name with args.
35688set dummy $ac_prog; ac_word=$2
35689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35690$as_echo_n "checking for $ac_word... " >&6; }
35691if ${ac_cv_path_AS+:} false; then :
35692  $as_echo_n "(cached) " >&6
35693else
35694  case $AS in
35695  [\\/]* | ?:[\\/]*)
35696  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35697  ;;
35698  *)
35699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35700for as_dir in $PATH
35701do
35702  IFS=$as_save_IFS
35703  test -z "$as_dir" && as_dir=.
35704    for ac_exec_ext in '' $ac_executable_extensions; do
35705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35706    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35708    break 2
35709  fi
35710done
35711  done
35712IFS=$as_save_IFS
35713
35714  ;;
35715esac
35716fi
35717AS=$ac_cv_path_AS
35718if test -n "$AS"; then
35719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35720$as_echo "$AS" >&6; }
35721else
35722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35723$as_echo "no" >&6; }
35724fi
35725
35726
35727  test -n "$AS" && break
35728done
35729
35730  else
35731    # The variable is set, but is it from the command line or the environment?
35732
35733    # Try to remove the string !AS! from our list.
35734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35736      # If it failed, the variable was not from the command line. Ignore it,
35737      # but warn the user (except for BASH, which is always set by the calling BASH).
35738      if test "xAS" != xBASH; then
35739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35740$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35741      fi
35742      # Try to locate tool using the code snippet
35743      for ac_prog in as
35744do
35745  # Extract the first word of "$ac_prog", so it can be a program name with args.
35746set dummy $ac_prog; ac_word=$2
35747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35748$as_echo_n "checking for $ac_word... " >&6; }
35749if ${ac_cv_path_AS+:} false; then :
35750  $as_echo_n "(cached) " >&6
35751else
35752  case $AS in
35753  [\\/]* | ?:[\\/]*)
35754  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35755  ;;
35756  *)
35757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35758for as_dir in $PATH
35759do
35760  IFS=$as_save_IFS
35761  test -z "$as_dir" && as_dir=.
35762    for ac_exec_ext in '' $ac_executable_extensions; do
35763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35764    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35766    break 2
35767  fi
35768done
35769  done
35770IFS=$as_save_IFS
35771
35772  ;;
35773esac
35774fi
35775AS=$ac_cv_path_AS
35776if test -n "$AS"; then
35777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35778$as_echo "$AS" >&6; }
35779else
35780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35781$as_echo "no" >&6; }
35782fi
35783
35784
35785  test -n "$AS" && break
35786done
35787
35788    else
35789      # If it succeeded, then it was overridden by the user. We will use it
35790      # for the tool.
35791
35792      # First remove it from the list of overridden variables, so we can test
35793      # for unknown variables in the end.
35794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35795
35796      # Check if we try to supply an empty value
35797      if test "x$AS" = x; then
35798        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35799$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35801$as_echo_n "checking for AS... " >&6; }
35802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35803$as_echo "disabled" >&6; }
35804      else
35805        # Check if the provided tool contains a complete path.
35806        tool_specified="$AS"
35807        tool_basename="${tool_specified##*/}"
35808        if test "x$tool_basename" = "x$tool_specified"; then
35809          # A command without a complete path is provided, search $PATH.
35810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35811$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35812          # Extract the first word of "$tool_basename", so it can be a program name with args.
35813set dummy $tool_basename; ac_word=$2
35814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35815$as_echo_n "checking for $ac_word... " >&6; }
35816if ${ac_cv_path_AS+:} false; then :
35817  $as_echo_n "(cached) " >&6
35818else
35819  case $AS in
35820  [\\/]* | ?:[\\/]*)
35821  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35822  ;;
35823  *)
35824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35825for as_dir in $PATH
35826do
35827  IFS=$as_save_IFS
35828  test -z "$as_dir" && as_dir=.
35829    for ac_exec_ext in '' $ac_executable_extensions; do
35830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35831    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35833    break 2
35834  fi
35835done
35836  done
35837IFS=$as_save_IFS
35838
35839  ;;
35840esac
35841fi
35842AS=$ac_cv_path_AS
35843if test -n "$AS"; then
35844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35845$as_echo "$AS" >&6; }
35846else
35847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35848$as_echo "no" >&6; }
35849fi
35850
35851
35852          if test "x$AS" = x; then
35853            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35854          fi
35855        else
35856          # Otherwise we believe it is a complete path. Use it as it is.
35857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35858$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35860$as_echo_n "checking for AS... " >&6; }
35861          if test ! -x "$tool_specified"; then
35862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35863$as_echo "not found" >&6; }
35864            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35865          fi
35866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35867$as_echo "$tool_specified" >&6; }
35868        fi
35869      fi
35870    fi
35871
35872  fi
35873
35874
35875
35876  # Only process if variable expands to non-empty
35877
35878  if test "x$AS" != x; then
35879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35880
35881  # First separate the path from the arguments. This will split at the first
35882  # space.
35883  complete="$AS"
35884  path="${complete%% *}"
35885  tmp="$complete EOL"
35886  arguments="${tmp#* }"
35887
35888  # Input might be given as Windows format, start by converting to
35889  # unix format.
35890  new_path=`$CYGPATH -u "$path"`
35891
35892  # Now try to locate executable using which
35893  new_path=`$WHICH "$new_path" 2> /dev/null`
35894  # bat and cmd files are not always considered executable in cygwin causing which
35895  # to not find them
35896  if test "x$new_path" = x \
35897      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35898      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35899    new_path=`$CYGPATH -u "$path"`
35900  fi
35901  if test "x$new_path" = x; then
35902    # Oops. Which didn't find the executable.
35903    # The splitting of arguments from the executable at a space might have been incorrect,
35904    # since paths with space are more likely in Windows. Give it another try with the whole
35905    # argument.
35906    path="$complete"
35907    arguments="EOL"
35908    new_path=`$CYGPATH -u "$path"`
35909    new_path=`$WHICH "$new_path" 2> /dev/null`
35910    # bat and cmd files are not always considered executable in cygwin causing which
35911    # to not find them
35912    if test "x$new_path" = x \
35913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35915      new_path=`$CYGPATH -u "$path"`
35916    fi
35917    if test "x$new_path" = x; then
35918      # It's still not found. Now this is an unrecoverable error.
35919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35920$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35921      has_space=`$ECHO "$complete" | $GREP " "`
35922      if test "x$has_space" != x; then
35923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35925      fi
35926      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35927    fi
35928  fi
35929
35930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35933  # "foo.exe" is OK but "foo" is an error.
35934  #
35935  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35936  # It is also a way to make sure we got the proper file name for the real test later on.
35937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35938  if test "x$test_shortpath" = x; then
35939    # Short path failed, file does not exist as specified.
35940    # Try adding .exe or .cmd
35941    if test -f "${new_path}.exe"; then
35942      input_to_shortpath="${new_path}.exe"
35943    elif test -f "${new_path}.cmd"; then
35944      input_to_shortpath="${new_path}.cmd"
35945    else
35946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35947$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35948      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35950      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35951    fi
35952  else
35953    input_to_shortpath="$new_path"
35954  fi
35955
35956  # Call helper function which possibly converts this using DOS-style short mode.
35957  # If so, the updated path is stored in $new_path.
35958  new_path="$input_to_shortpath"
35959
35960  input_path="$input_to_shortpath"
35961  # Check if we need to convert this using DOS-style short mode. If the path
35962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35963  # take no chances and rewrite it.
35964  # Note: m4 eats our [], so we need to use [ and ] instead.
35965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35966  if test "x$has_forbidden_chars" != x; then
35967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35971      # Going to short mode and back again did indeed matter. Since short mode is
35972      # case insensitive, let's make it lowercase to improve readability.
35973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35974      # Now convert it back to Unix-style (cygpath)
35975      input_path=`$CYGPATH -u "$shortmode_path"`
35976      new_path="$input_path"
35977    fi
35978  fi
35979
35980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35981  if test "x$test_cygdrive_prefix" = x; then
35982    # As a simple fix, exclude /usr/bin since it's not a real path.
35983    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35985      # a path prefixed by /cygdrive for fixpath to work.
35986      new_path="$CYGWIN_ROOT_PATH$input_path"
35987    fi
35988  fi
35989
35990  # remove trailing .exe if any
35991  new_path="${new_path/%.exe/}"
35992
35993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35994
35995  # First separate the path from the arguments. This will split at the first
35996  # space.
35997  complete="$AS"
35998  path="${complete%% *}"
35999  tmp="$complete EOL"
36000  arguments="${tmp#* }"
36001
36002  # Input might be given as Windows format, start by converting to
36003  # unix format.
36004  new_path="$path"
36005
36006  windows_path="$new_path"
36007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36008    unix_path=`$CYGPATH -u "$windows_path"`
36009    new_path="$unix_path"
36010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36012    new_path="$unix_path"
36013  fi
36014
36015
36016  # Now try to locate executable using which
36017  new_path=`$WHICH "$new_path" 2> /dev/null`
36018
36019  if test "x$new_path" = x; then
36020    # Oops. Which didn't find the executable.
36021    # The splitting of arguments from the executable at a space might have been incorrect,
36022    # since paths with space are more likely in Windows. Give it another try with the whole
36023    # argument.
36024    path="$complete"
36025    arguments="EOL"
36026    new_path="$path"
36027
36028  windows_path="$new_path"
36029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36030    unix_path=`$CYGPATH -u "$windows_path"`
36031    new_path="$unix_path"
36032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36034    new_path="$unix_path"
36035  fi
36036
36037
36038    new_path=`$WHICH "$new_path" 2> /dev/null`
36039    # bat and cmd files are not always considered executable in MSYS causing which
36040    # to not find them
36041    if test "x$new_path" = x \
36042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36044      new_path="$path"
36045
36046  windows_path="$new_path"
36047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36048    unix_path=`$CYGPATH -u "$windows_path"`
36049    new_path="$unix_path"
36050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36052    new_path="$unix_path"
36053  fi
36054
36055    fi
36056
36057    if test "x$new_path" = x; then
36058      # It's still not found. Now this is an unrecoverable error.
36059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36060$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36061      has_space=`$ECHO "$complete" | $GREP " "`
36062      if test "x$has_space" != x; then
36063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36065      fi
36066      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36067    fi
36068  fi
36069
36070  # Now new_path has a complete unix path to the binary
36071  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36072    # Keep paths in /bin as-is, but remove trailing .exe if any
36073    new_path="${new_path/%.exe/}"
36074    # Do not save /bin paths to all_fixpath_prefixes!
36075  else
36076    # Not in mixed or Windows style, start by that.
36077    new_path=`cmd //c echo $new_path`
36078
36079  input_path="$new_path"
36080  # Check if we need to convert this using DOS-style short mode. If the path
36081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36082  # take no chances and rewrite it.
36083  # Note: m4 eats our [], so we need to use [ and ] instead.
36084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36085  if test "x$has_forbidden_chars" != x; then
36086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36088  fi
36089
36090    # Output is in $new_path
36091
36092  windows_path="$new_path"
36093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36094    unix_path=`$CYGPATH -u "$windows_path"`
36095    new_path="$unix_path"
36096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36098    new_path="$unix_path"
36099  fi
36100
36101    # remove trailing .exe if any
36102    new_path="${new_path/%.exe/}"
36103
36104    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36105    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36106  fi
36107
36108    else
36109      # We're on a unix platform. Hooray! :)
36110      # First separate the path from the arguments. This will split at the first
36111      # space.
36112      complete="$AS"
36113      path="${complete%% *}"
36114      tmp="$complete EOL"
36115      arguments="${tmp#* }"
36116
36117      # Cannot rely on the command "which" here since it doesn't always work.
36118      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36119      if test -z "$is_absolute_path"; then
36120        # Path to executable is not absolute. Find it.
36121        IFS_save="$IFS"
36122        IFS=:
36123        for p in $PATH; do
36124          if test -f "$p/$path" && test -x "$p/$path"; then
36125            new_path="$p/$path"
36126            break
36127          fi
36128        done
36129        IFS="$IFS_save"
36130      else
36131        # This is an absolute path, we can use it without further modifications.
36132        new_path="$path"
36133      fi
36134
36135      if test "x$new_path" = x; then
36136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36137$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36138        has_space=`$ECHO "$complete" | $GREP " "`
36139        if test "x$has_space" != x; then
36140          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36141$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36142        fi
36143        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36144      fi
36145    fi
36146
36147    # Now join together the path and the arguments once again
36148    if test "x$arguments" != xEOL; then
36149      new_complete="$new_path ${arguments% *}"
36150    else
36151      new_complete="$new_path"
36152    fi
36153
36154    if test "x$complete" != "x$new_complete"; then
36155      AS="$new_complete"
36156      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36157$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36158    fi
36159  fi
36160
36161  else
36162    # FIXME: is this correct for microsoft?
36163    AS="$CC -c"
36164  fi
36165
36166
36167  #
36168  # Setup the archiver (AR)
36169  #
36170  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36171    # The corresponding ar tool is lib.exe (used to create static libraries)
36172    # Extract the first word of "lib", so it can be a program name with args.
36173set dummy lib; ac_word=$2
36174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36175$as_echo_n "checking for $ac_word... " >&6; }
36176if ${ac_cv_prog_AR+:} false; then :
36177  $as_echo_n "(cached) " >&6
36178else
36179  if test -n "$AR"; then
36180  ac_cv_prog_AR="$AR" # Let the user override the test.
36181else
36182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36183for as_dir in $PATH
36184do
36185  IFS=$as_save_IFS
36186  test -z "$as_dir" && as_dir=.
36187    for ac_exec_ext in '' $ac_executable_extensions; do
36188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36189    ac_cv_prog_AR="lib"
36190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36191    break 2
36192  fi
36193done
36194  done
36195IFS=$as_save_IFS
36196
36197fi
36198fi
36199AR=$ac_cv_prog_AR
36200if test -n "$AR"; then
36201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36202$as_echo "$AR" >&6; }
36203else
36204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36205$as_echo "no" >&6; }
36206fi
36207
36208
36209  else
36210
36211
36212  # Publish this variable in the help.
36213
36214
36215  if [ -z "${AR+x}" ]; then
36216    # The variable is not set by user, try to locate tool using the code snippet
36217    if test -n "$ac_tool_prefix"; then
36218  for ac_prog in ar
36219  do
36220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36223$as_echo_n "checking for $ac_word... " >&6; }
36224if ${ac_cv_prog_AR+:} false; then :
36225  $as_echo_n "(cached) " >&6
36226else
36227  if test -n "$AR"; then
36228  ac_cv_prog_AR="$AR" # Let the user override the test.
36229else
36230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36231for as_dir in $PATH
36232do
36233  IFS=$as_save_IFS
36234  test -z "$as_dir" && as_dir=.
36235    for ac_exec_ext in '' $ac_executable_extensions; do
36236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36237    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36239    break 2
36240  fi
36241done
36242  done
36243IFS=$as_save_IFS
36244
36245fi
36246fi
36247AR=$ac_cv_prog_AR
36248if test -n "$AR"; then
36249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36250$as_echo "$AR" >&6; }
36251else
36252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36253$as_echo "no" >&6; }
36254fi
36255
36256
36257    test -n "$AR" && break
36258  done
36259fi
36260if test -z "$AR"; then
36261  ac_ct_AR=$AR
36262  for ac_prog in ar
36263do
36264  # Extract the first word of "$ac_prog", so it can be a program name with args.
36265set dummy $ac_prog; ac_word=$2
36266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36267$as_echo_n "checking for $ac_word... " >&6; }
36268if ${ac_cv_prog_ac_ct_AR+:} false; then :
36269  $as_echo_n "(cached) " >&6
36270else
36271  if test -n "$ac_ct_AR"; then
36272  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36273else
36274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36275for as_dir in $PATH
36276do
36277  IFS=$as_save_IFS
36278  test -z "$as_dir" && as_dir=.
36279    for ac_exec_ext in '' $ac_executable_extensions; do
36280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36281    ac_cv_prog_ac_ct_AR="$ac_prog"
36282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36283    break 2
36284  fi
36285done
36286  done
36287IFS=$as_save_IFS
36288
36289fi
36290fi
36291ac_ct_AR=$ac_cv_prog_ac_ct_AR
36292if test -n "$ac_ct_AR"; then
36293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36294$as_echo "$ac_ct_AR" >&6; }
36295else
36296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36297$as_echo "no" >&6; }
36298fi
36299
36300
36301  test -n "$ac_ct_AR" && break
36302done
36303
36304  if test "x$ac_ct_AR" = x; then
36305    AR=""
36306  else
36307    case $cross_compiling:$ac_tool_warned in
36308yes:)
36309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36311ac_tool_warned=yes ;;
36312esac
36313    AR=$ac_ct_AR
36314  fi
36315fi
36316
36317  else
36318    # The variable is set, but is it from the command line or the environment?
36319
36320    # Try to remove the string !AR! from our list.
36321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36323      # If it failed, the variable was not from the command line. Ignore it,
36324      # but warn the user (except for BASH, which is always set by the calling BASH).
36325      if test "xAR" != xBASH; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36327$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36328      fi
36329      # Try to locate tool using the code snippet
36330      if test -n "$ac_tool_prefix"; then
36331  for ac_prog in ar
36332  do
36333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36336$as_echo_n "checking for $ac_word... " >&6; }
36337if ${ac_cv_prog_AR+:} false; then :
36338  $as_echo_n "(cached) " >&6
36339else
36340  if test -n "$AR"; then
36341  ac_cv_prog_AR="$AR" # Let the user override the test.
36342else
36343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36344for as_dir in $PATH
36345do
36346  IFS=$as_save_IFS
36347  test -z "$as_dir" && as_dir=.
36348    for ac_exec_ext in '' $ac_executable_extensions; do
36349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36350    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36352    break 2
36353  fi
36354done
36355  done
36356IFS=$as_save_IFS
36357
36358fi
36359fi
36360AR=$ac_cv_prog_AR
36361if test -n "$AR"; then
36362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36363$as_echo "$AR" >&6; }
36364else
36365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36366$as_echo "no" >&6; }
36367fi
36368
36369
36370    test -n "$AR" && break
36371  done
36372fi
36373if test -z "$AR"; then
36374  ac_ct_AR=$AR
36375  for ac_prog in ar
36376do
36377  # Extract the first word of "$ac_prog", so it can be a program name with args.
36378set dummy $ac_prog; ac_word=$2
36379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36380$as_echo_n "checking for $ac_word... " >&6; }
36381if ${ac_cv_prog_ac_ct_AR+:} false; then :
36382  $as_echo_n "(cached) " >&6
36383else
36384  if test -n "$ac_ct_AR"; then
36385  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36386else
36387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36388for as_dir in $PATH
36389do
36390  IFS=$as_save_IFS
36391  test -z "$as_dir" && as_dir=.
36392    for ac_exec_ext in '' $ac_executable_extensions; do
36393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36394    ac_cv_prog_ac_ct_AR="$ac_prog"
36395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36396    break 2
36397  fi
36398done
36399  done
36400IFS=$as_save_IFS
36401
36402fi
36403fi
36404ac_ct_AR=$ac_cv_prog_ac_ct_AR
36405if test -n "$ac_ct_AR"; then
36406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36407$as_echo "$ac_ct_AR" >&6; }
36408else
36409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36410$as_echo "no" >&6; }
36411fi
36412
36413
36414  test -n "$ac_ct_AR" && break
36415done
36416
36417  if test "x$ac_ct_AR" = x; then
36418    AR=""
36419  else
36420    case $cross_compiling:$ac_tool_warned in
36421yes:)
36422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36424ac_tool_warned=yes ;;
36425esac
36426    AR=$ac_ct_AR
36427  fi
36428fi
36429
36430    else
36431      # If it succeeded, then it was overridden by the user. We will use it
36432      # for the tool.
36433
36434      # First remove it from the list of overridden variables, so we can test
36435      # for unknown variables in the end.
36436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36437
36438      # Check if we try to supply an empty value
36439      if test "x$AR" = x; then
36440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36441$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36443$as_echo_n "checking for AR... " >&6; }
36444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36445$as_echo "disabled" >&6; }
36446      else
36447        # Check if the provided tool contains a complete path.
36448        tool_specified="$AR"
36449        tool_basename="${tool_specified##*/}"
36450        if test "x$tool_basename" = "x$tool_specified"; then
36451          # A command without a complete path is provided, search $PATH.
36452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36453$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36454          # Extract the first word of "$tool_basename", so it can be a program name with args.
36455set dummy $tool_basename; ac_word=$2
36456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36457$as_echo_n "checking for $ac_word... " >&6; }
36458if ${ac_cv_path_AR+:} false; then :
36459  $as_echo_n "(cached) " >&6
36460else
36461  case $AR in
36462  [\\/]* | ?:[\\/]*)
36463  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36464  ;;
36465  *)
36466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36467for as_dir in $PATH
36468do
36469  IFS=$as_save_IFS
36470  test -z "$as_dir" && as_dir=.
36471    for ac_exec_ext in '' $ac_executable_extensions; do
36472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36473    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36475    break 2
36476  fi
36477done
36478  done
36479IFS=$as_save_IFS
36480
36481  ;;
36482esac
36483fi
36484AR=$ac_cv_path_AR
36485if test -n "$AR"; then
36486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36487$as_echo "$AR" >&6; }
36488else
36489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36490$as_echo "no" >&6; }
36491fi
36492
36493
36494          if test "x$AR" = x; then
36495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36496          fi
36497        else
36498          # Otherwise we believe it is a complete path. Use it as it is.
36499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36500$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36502$as_echo_n "checking for AR... " >&6; }
36503          if test ! -x "$tool_specified"; then
36504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36505$as_echo "not found" >&6; }
36506            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36507          fi
36508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36509$as_echo "$tool_specified" >&6; }
36510        fi
36511      fi
36512    fi
36513
36514  fi
36515
36516
36517  fi
36518
36519  # Only process if variable expands to non-empty
36520
36521  if test "x$AR" != x; then
36522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36523
36524  # First separate the path from the arguments. This will split at the first
36525  # space.
36526  complete="$AR"
36527  path="${complete%% *}"
36528  tmp="$complete EOL"
36529  arguments="${tmp#* }"
36530
36531  # Input might be given as Windows format, start by converting to
36532  # unix format.
36533  new_path=`$CYGPATH -u "$path"`
36534
36535  # Now try to locate executable using which
36536  new_path=`$WHICH "$new_path" 2> /dev/null`
36537  # bat and cmd files are not always considered executable in cygwin causing which
36538  # to not find them
36539  if test "x$new_path" = x \
36540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36542    new_path=`$CYGPATH -u "$path"`
36543  fi
36544  if test "x$new_path" = x; then
36545    # Oops. Which didn't find the executable.
36546    # The splitting of arguments from the executable at a space might have been incorrect,
36547    # since paths with space are more likely in Windows. Give it another try with the whole
36548    # argument.
36549    path="$complete"
36550    arguments="EOL"
36551    new_path=`$CYGPATH -u "$path"`
36552    new_path=`$WHICH "$new_path" 2> /dev/null`
36553    # bat and cmd files are not always considered executable in cygwin causing which
36554    # to not find them
36555    if test "x$new_path" = x \
36556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36558      new_path=`$CYGPATH -u "$path"`
36559    fi
36560    if test "x$new_path" = x; then
36561      # It's still not found. Now this is an unrecoverable error.
36562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36563$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36564      has_space=`$ECHO "$complete" | $GREP " "`
36565      if test "x$has_space" != x; then
36566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36568      fi
36569      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36570    fi
36571  fi
36572
36573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36576  # "foo.exe" is OK but "foo" is an error.
36577  #
36578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36579  # It is also a way to make sure we got the proper file name for the real test later on.
36580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36581  if test "x$test_shortpath" = x; then
36582    # Short path failed, file does not exist as specified.
36583    # Try adding .exe or .cmd
36584    if test -f "${new_path}.exe"; then
36585      input_to_shortpath="${new_path}.exe"
36586    elif test -f "${new_path}.cmd"; then
36587      input_to_shortpath="${new_path}.cmd"
36588    else
36589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36590$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36593      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36594    fi
36595  else
36596    input_to_shortpath="$new_path"
36597  fi
36598
36599  # Call helper function which possibly converts this using DOS-style short mode.
36600  # If so, the updated path is stored in $new_path.
36601  new_path="$input_to_shortpath"
36602
36603  input_path="$input_to_shortpath"
36604  # Check if we need to convert this using DOS-style short mode. If the path
36605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36606  # take no chances and rewrite it.
36607  # Note: m4 eats our [], so we need to use [ and ] instead.
36608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36609  if test "x$has_forbidden_chars" != x; then
36610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36614      # Going to short mode and back again did indeed matter. Since short mode is
36615      # case insensitive, let's make it lowercase to improve readability.
36616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36617      # Now convert it back to Unix-style (cygpath)
36618      input_path=`$CYGPATH -u "$shortmode_path"`
36619      new_path="$input_path"
36620    fi
36621  fi
36622
36623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36624  if test "x$test_cygdrive_prefix" = x; then
36625    # As a simple fix, exclude /usr/bin since it's not a real path.
36626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36628      # a path prefixed by /cygdrive for fixpath to work.
36629      new_path="$CYGWIN_ROOT_PATH$input_path"
36630    fi
36631  fi
36632
36633  # remove trailing .exe if any
36634  new_path="${new_path/%.exe/}"
36635
36636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36637
36638  # First separate the path from the arguments. This will split at the first
36639  # space.
36640  complete="$AR"
36641  path="${complete%% *}"
36642  tmp="$complete EOL"
36643  arguments="${tmp#* }"
36644
36645  # Input might be given as Windows format, start by converting to
36646  # unix format.
36647  new_path="$path"
36648
36649  windows_path="$new_path"
36650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36651    unix_path=`$CYGPATH -u "$windows_path"`
36652    new_path="$unix_path"
36653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36655    new_path="$unix_path"
36656  fi
36657
36658
36659  # Now try to locate executable using which
36660  new_path=`$WHICH "$new_path" 2> /dev/null`
36661
36662  if test "x$new_path" = x; then
36663    # Oops. Which didn't find the executable.
36664    # The splitting of arguments from the executable at a space might have been incorrect,
36665    # since paths with space are more likely in Windows. Give it another try with the whole
36666    # argument.
36667    path="$complete"
36668    arguments="EOL"
36669    new_path="$path"
36670
36671  windows_path="$new_path"
36672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36673    unix_path=`$CYGPATH -u "$windows_path"`
36674    new_path="$unix_path"
36675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36677    new_path="$unix_path"
36678  fi
36679
36680
36681    new_path=`$WHICH "$new_path" 2> /dev/null`
36682    # bat and cmd files are not always considered executable in MSYS causing which
36683    # to not find them
36684    if test "x$new_path" = x \
36685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36687      new_path="$path"
36688
36689  windows_path="$new_path"
36690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36691    unix_path=`$CYGPATH -u "$windows_path"`
36692    new_path="$unix_path"
36693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36695    new_path="$unix_path"
36696  fi
36697
36698    fi
36699
36700    if test "x$new_path" = x; then
36701      # It's still not found. Now this is an unrecoverable error.
36702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36703$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36704      has_space=`$ECHO "$complete" | $GREP " "`
36705      if test "x$has_space" != x; then
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36708      fi
36709      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36710    fi
36711  fi
36712
36713  # Now new_path has a complete unix path to the binary
36714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36715    # Keep paths in /bin as-is, but remove trailing .exe if any
36716    new_path="${new_path/%.exe/}"
36717    # Do not save /bin paths to all_fixpath_prefixes!
36718  else
36719    # Not in mixed or Windows style, start by that.
36720    new_path=`cmd //c echo $new_path`
36721
36722  input_path="$new_path"
36723  # Check if we need to convert this using DOS-style short mode. If the path
36724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36725  # take no chances and rewrite it.
36726  # Note: m4 eats our [], so we need to use [ and ] instead.
36727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36728  if test "x$has_forbidden_chars" != x; then
36729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36731  fi
36732
36733    # Output is in $new_path
36734
36735  windows_path="$new_path"
36736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36737    unix_path=`$CYGPATH -u "$windows_path"`
36738    new_path="$unix_path"
36739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36741    new_path="$unix_path"
36742  fi
36743
36744    # remove trailing .exe if any
36745    new_path="${new_path/%.exe/}"
36746
36747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36749  fi
36750
36751    else
36752      # We're on a unix platform. Hooray! :)
36753      # First separate the path from the arguments. This will split at the first
36754      # space.
36755      complete="$AR"
36756      path="${complete%% *}"
36757      tmp="$complete EOL"
36758      arguments="${tmp#* }"
36759
36760      # Cannot rely on the command "which" here since it doesn't always work.
36761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36762      if test -z "$is_absolute_path"; then
36763        # Path to executable is not absolute. Find it.
36764        IFS_save="$IFS"
36765        IFS=:
36766        for p in $PATH; do
36767          if test -f "$p/$path" && test -x "$p/$path"; then
36768            new_path="$p/$path"
36769            break
36770          fi
36771        done
36772        IFS="$IFS_save"
36773      else
36774        # This is an absolute path, we can use it without further modifications.
36775        new_path="$path"
36776      fi
36777
36778      if test "x$new_path" = x; then
36779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36780$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36781        has_space=`$ECHO "$complete" | $GREP " "`
36782        if test "x$has_space" != x; then
36783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36785        fi
36786        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36787      fi
36788    fi
36789
36790    # Now join together the path and the arguments once again
36791    if test "x$arguments" != xEOL; then
36792      new_complete="$new_path ${arguments% *}"
36793    else
36794      new_complete="$new_path"
36795    fi
36796
36797    if test "x$complete" != "x$new_complete"; then
36798      AR="$new_complete"
36799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36800$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36801    fi
36802  fi
36803
36804
36805
36806  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36807
36808
36809  # Publish this variable in the help.
36810
36811
36812  if [ -z "${LIPO+x}" ]; then
36813    # The variable is not set by user, try to locate tool using the code snippet
36814    for ac_prog in lipo
36815do
36816  # Extract the first word of "$ac_prog", so it can be a program name with args.
36817set dummy $ac_prog; ac_word=$2
36818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36819$as_echo_n "checking for $ac_word... " >&6; }
36820if ${ac_cv_path_LIPO+:} false; then :
36821  $as_echo_n "(cached) " >&6
36822else
36823  case $LIPO in
36824  [\\/]* | ?:[\\/]*)
36825  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36826  ;;
36827  *)
36828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36829for as_dir in $PATH
36830do
36831  IFS=$as_save_IFS
36832  test -z "$as_dir" && as_dir=.
36833    for ac_exec_ext in '' $ac_executable_extensions; do
36834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36835    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36837    break 2
36838  fi
36839done
36840  done
36841IFS=$as_save_IFS
36842
36843  ;;
36844esac
36845fi
36846LIPO=$ac_cv_path_LIPO
36847if test -n "$LIPO"; then
36848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36849$as_echo "$LIPO" >&6; }
36850else
36851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36852$as_echo "no" >&6; }
36853fi
36854
36855
36856  test -n "$LIPO" && break
36857done
36858
36859  else
36860    # The variable is set, but is it from the command line or the environment?
36861
36862    # Try to remove the string !LIPO! from our list.
36863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36865      # If it failed, the variable was not from the command line. Ignore it,
36866      # but warn the user (except for BASH, which is always set by the calling BASH).
36867      if test "xLIPO" != xBASH; then
36868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36869$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36870      fi
36871      # Try to locate tool using the code snippet
36872      for ac_prog in lipo
36873do
36874  # Extract the first word of "$ac_prog", so it can be a program name with args.
36875set dummy $ac_prog; ac_word=$2
36876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36877$as_echo_n "checking for $ac_word... " >&6; }
36878if ${ac_cv_path_LIPO+:} false; then :
36879  $as_echo_n "(cached) " >&6
36880else
36881  case $LIPO in
36882  [\\/]* | ?:[\\/]*)
36883  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36884  ;;
36885  *)
36886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36887for as_dir in $PATH
36888do
36889  IFS=$as_save_IFS
36890  test -z "$as_dir" && as_dir=.
36891    for ac_exec_ext in '' $ac_executable_extensions; do
36892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36893    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36895    break 2
36896  fi
36897done
36898  done
36899IFS=$as_save_IFS
36900
36901  ;;
36902esac
36903fi
36904LIPO=$ac_cv_path_LIPO
36905if test -n "$LIPO"; then
36906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36907$as_echo "$LIPO" >&6; }
36908else
36909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36910$as_echo "no" >&6; }
36911fi
36912
36913
36914  test -n "$LIPO" && break
36915done
36916
36917    else
36918      # If it succeeded, then it was overridden by the user. We will use it
36919      # for the tool.
36920
36921      # First remove it from the list of overridden variables, so we can test
36922      # for unknown variables in the end.
36923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36924
36925      # Check if we try to supply an empty value
36926      if test "x$LIPO" = x; then
36927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36928$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36930$as_echo_n "checking for LIPO... " >&6; }
36931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36932$as_echo "disabled" >&6; }
36933      else
36934        # Check if the provided tool contains a complete path.
36935        tool_specified="$LIPO"
36936        tool_basename="${tool_specified##*/}"
36937        if test "x$tool_basename" = "x$tool_specified"; then
36938          # A command without a complete path is provided, search $PATH.
36939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36940$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36941          # Extract the first word of "$tool_basename", so it can be a program name with args.
36942set dummy $tool_basename; ac_word=$2
36943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36944$as_echo_n "checking for $ac_word... " >&6; }
36945if ${ac_cv_path_LIPO+:} false; then :
36946  $as_echo_n "(cached) " >&6
36947else
36948  case $LIPO in
36949  [\\/]* | ?:[\\/]*)
36950  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36951  ;;
36952  *)
36953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36954for as_dir in $PATH
36955do
36956  IFS=$as_save_IFS
36957  test -z "$as_dir" && as_dir=.
36958    for ac_exec_ext in '' $ac_executable_extensions; do
36959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36960    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36962    break 2
36963  fi
36964done
36965  done
36966IFS=$as_save_IFS
36967
36968  ;;
36969esac
36970fi
36971LIPO=$ac_cv_path_LIPO
36972if test -n "$LIPO"; then
36973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36974$as_echo "$LIPO" >&6; }
36975else
36976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36977$as_echo "no" >&6; }
36978fi
36979
36980
36981          if test "x$LIPO" = x; then
36982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36983          fi
36984        else
36985          # Otherwise we believe it is a complete path. Use it as it is.
36986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36987$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36989$as_echo_n "checking for LIPO... " >&6; }
36990          if test ! -x "$tool_specified"; then
36991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36992$as_echo "not found" >&6; }
36993            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36994          fi
36995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36996$as_echo "$tool_specified" >&6; }
36997        fi
36998      fi
36999    fi
37000
37001  fi
37002
37003
37004
37005  # Only process if variable expands to non-empty
37006
37007  if test "x$LIPO" != x; then
37008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37009
37010  # First separate the path from the arguments. This will split at the first
37011  # space.
37012  complete="$LIPO"
37013  path="${complete%% *}"
37014  tmp="$complete EOL"
37015  arguments="${tmp#* }"
37016
37017  # Input might be given as Windows format, start by converting to
37018  # unix format.
37019  new_path=`$CYGPATH -u "$path"`
37020
37021  # Now try to locate executable using which
37022  new_path=`$WHICH "$new_path" 2> /dev/null`
37023  # bat and cmd files are not always considered executable in cygwin causing which
37024  # to not find them
37025  if test "x$new_path" = x \
37026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37028    new_path=`$CYGPATH -u "$path"`
37029  fi
37030  if test "x$new_path" = x; then
37031    # Oops. Which didn't find the executable.
37032    # The splitting of arguments from the executable at a space might have been incorrect,
37033    # since paths with space are more likely in Windows. Give it another try with the whole
37034    # argument.
37035    path="$complete"
37036    arguments="EOL"
37037    new_path=`$CYGPATH -u "$path"`
37038    new_path=`$WHICH "$new_path" 2> /dev/null`
37039    # bat and cmd files are not always considered executable in cygwin causing which
37040    # to not find them
37041    if test "x$new_path" = x \
37042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37044      new_path=`$CYGPATH -u "$path"`
37045    fi
37046    if test "x$new_path" = x; then
37047      # It's still not found. Now this is an unrecoverable error.
37048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37049$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37050      has_space=`$ECHO "$complete" | $GREP " "`
37051      if test "x$has_space" != x; then
37052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37054      fi
37055      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37056    fi
37057  fi
37058
37059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37062  # "foo.exe" is OK but "foo" is an error.
37063  #
37064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37065  # It is also a way to make sure we got the proper file name for the real test later on.
37066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37067  if test "x$test_shortpath" = x; then
37068    # Short path failed, file does not exist as specified.
37069    # Try adding .exe or .cmd
37070    if test -f "${new_path}.exe"; then
37071      input_to_shortpath="${new_path}.exe"
37072    elif test -f "${new_path}.cmd"; then
37073      input_to_shortpath="${new_path}.cmd"
37074    else
37075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37076$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37079      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37080    fi
37081  else
37082    input_to_shortpath="$new_path"
37083  fi
37084
37085  # Call helper function which possibly converts this using DOS-style short mode.
37086  # If so, the updated path is stored in $new_path.
37087  new_path="$input_to_shortpath"
37088
37089  input_path="$input_to_shortpath"
37090  # Check if we need to convert this using DOS-style short mode. If the path
37091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37092  # take no chances and rewrite it.
37093  # Note: m4 eats our [], so we need to use [ and ] instead.
37094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37095  if test "x$has_forbidden_chars" != x; then
37096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37100      # Going to short mode and back again did indeed matter. Since short mode is
37101      # case insensitive, let's make it lowercase to improve readability.
37102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37103      # Now convert it back to Unix-style (cygpath)
37104      input_path=`$CYGPATH -u "$shortmode_path"`
37105      new_path="$input_path"
37106    fi
37107  fi
37108
37109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37110  if test "x$test_cygdrive_prefix" = x; then
37111    # As a simple fix, exclude /usr/bin since it's not a real path.
37112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37114      # a path prefixed by /cygdrive for fixpath to work.
37115      new_path="$CYGWIN_ROOT_PATH$input_path"
37116    fi
37117  fi
37118
37119  # remove trailing .exe if any
37120  new_path="${new_path/%.exe/}"
37121
37122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37123
37124  # First separate the path from the arguments. This will split at the first
37125  # space.
37126  complete="$LIPO"
37127  path="${complete%% *}"
37128  tmp="$complete EOL"
37129  arguments="${tmp#* }"
37130
37131  # Input might be given as Windows format, start by converting to
37132  # unix format.
37133  new_path="$path"
37134
37135  windows_path="$new_path"
37136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37137    unix_path=`$CYGPATH -u "$windows_path"`
37138    new_path="$unix_path"
37139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37141    new_path="$unix_path"
37142  fi
37143
37144
37145  # Now try to locate executable using which
37146  new_path=`$WHICH "$new_path" 2> /dev/null`
37147
37148  if test "x$new_path" = x; then
37149    # Oops. Which didn't find the executable.
37150    # The splitting of arguments from the executable at a space might have been incorrect,
37151    # since paths with space are more likely in Windows. Give it another try with the whole
37152    # argument.
37153    path="$complete"
37154    arguments="EOL"
37155    new_path="$path"
37156
37157  windows_path="$new_path"
37158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37159    unix_path=`$CYGPATH -u "$windows_path"`
37160    new_path="$unix_path"
37161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37163    new_path="$unix_path"
37164  fi
37165
37166
37167    new_path=`$WHICH "$new_path" 2> /dev/null`
37168    # bat and cmd files are not always considered executable in MSYS causing which
37169    # to not find them
37170    if test "x$new_path" = x \
37171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37173      new_path="$path"
37174
37175  windows_path="$new_path"
37176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37177    unix_path=`$CYGPATH -u "$windows_path"`
37178    new_path="$unix_path"
37179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37181    new_path="$unix_path"
37182  fi
37183
37184    fi
37185
37186    if test "x$new_path" = x; then
37187      # It's still not found. Now this is an unrecoverable error.
37188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37189$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37190      has_space=`$ECHO "$complete" | $GREP " "`
37191      if test "x$has_space" != x; then
37192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37194      fi
37195      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37196    fi
37197  fi
37198
37199  # Now new_path has a complete unix path to the binary
37200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37201    # Keep paths in /bin as-is, but remove trailing .exe if any
37202    new_path="${new_path/%.exe/}"
37203    # Do not save /bin paths to all_fixpath_prefixes!
37204  else
37205    # Not in mixed or Windows style, start by that.
37206    new_path=`cmd //c echo $new_path`
37207
37208  input_path="$new_path"
37209  # Check if we need to convert this using DOS-style short mode. If the path
37210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37211  # take no chances and rewrite it.
37212  # Note: m4 eats our [], so we need to use [ and ] instead.
37213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37214  if test "x$has_forbidden_chars" != x; then
37215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37217  fi
37218
37219    # Output is in $new_path
37220
37221  windows_path="$new_path"
37222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37223    unix_path=`$CYGPATH -u "$windows_path"`
37224    new_path="$unix_path"
37225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37227    new_path="$unix_path"
37228  fi
37229
37230    # remove trailing .exe if any
37231    new_path="${new_path/%.exe/}"
37232
37233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37235  fi
37236
37237    else
37238      # We're on a unix platform. Hooray! :)
37239      # First separate the path from the arguments. This will split at the first
37240      # space.
37241      complete="$LIPO"
37242      path="${complete%% *}"
37243      tmp="$complete EOL"
37244      arguments="${tmp#* }"
37245
37246      # Cannot rely on the command "which" here since it doesn't always work.
37247      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37248      if test -z "$is_absolute_path"; then
37249        # Path to executable is not absolute. Find it.
37250        IFS_save="$IFS"
37251        IFS=:
37252        for p in $PATH; do
37253          if test -f "$p/$path" && test -x "$p/$path"; then
37254            new_path="$p/$path"
37255            break
37256          fi
37257        done
37258        IFS="$IFS_save"
37259      else
37260        # This is an absolute path, we can use it without further modifications.
37261        new_path="$path"
37262      fi
37263
37264      if test "x$new_path" = x; then
37265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37266$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37267        has_space=`$ECHO "$complete" | $GREP " "`
37268        if test "x$has_space" != x; then
37269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37271        fi
37272        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37273      fi
37274    fi
37275
37276    # Now join together the path and the arguments once again
37277    if test "x$arguments" != xEOL; then
37278      new_complete="$new_path ${arguments% *}"
37279    else
37280      new_complete="$new_path"
37281    fi
37282
37283    if test "x$complete" != "x$new_complete"; then
37284      LIPO="$new_complete"
37285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37286$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37287    fi
37288  fi
37289
37290  fi
37291
37292  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37293    # Extract the first word of "mt", so it can be a program name with args.
37294set dummy mt; ac_word=$2
37295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37296$as_echo_n "checking for $ac_word... " >&6; }
37297if ${ac_cv_prog_MT+:} false; then :
37298  $as_echo_n "(cached) " >&6
37299else
37300  if test -n "$MT"; then
37301  ac_cv_prog_MT="$MT" # Let the user override the test.
37302else
37303  ac_prog_rejected=no
37304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37305for as_dir in $PATH
37306do
37307  IFS=$as_save_IFS
37308  test -z "$as_dir" && as_dir=.
37309    for ac_exec_ext in '' $ac_executable_extensions; do
37310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37311    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37312       ac_prog_rejected=yes
37313       continue
37314     fi
37315    ac_cv_prog_MT="mt"
37316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37317    break 2
37318  fi
37319done
37320  done
37321IFS=$as_save_IFS
37322
37323if test $ac_prog_rejected = yes; then
37324  # We found a bogon in the path, so make sure we never use it.
37325  set dummy $ac_cv_prog_MT
37326  shift
37327  if test $# != 0; then
37328    # We chose a different compiler from the bogus one.
37329    # However, it has the same basename, so the bogon will be chosen
37330    # first if we set MT to just the basename; use the full file name.
37331    shift
37332    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37333  fi
37334fi
37335fi
37336fi
37337MT=$ac_cv_prog_MT
37338if test -n "$MT"; then
37339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37340$as_echo "$MT" >&6; }
37341else
37342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37343$as_echo "no" >&6; }
37344fi
37345
37346
37347
37348  # Only process if variable expands to non-empty
37349
37350  if test "x$MT" != x; then
37351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37352
37353  # First separate the path from the arguments. This will split at the first
37354  # space.
37355  complete="$MT"
37356  path="${complete%% *}"
37357  tmp="$complete EOL"
37358  arguments="${tmp#* }"
37359
37360  # Input might be given as Windows format, start by converting to
37361  # unix format.
37362  new_path=`$CYGPATH -u "$path"`
37363
37364  # Now try to locate executable using which
37365  new_path=`$WHICH "$new_path" 2> /dev/null`
37366  # bat and cmd files are not always considered executable in cygwin causing which
37367  # to not find them
37368  if test "x$new_path" = x \
37369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37371    new_path=`$CYGPATH -u "$path"`
37372  fi
37373  if test "x$new_path" = x; then
37374    # Oops. Which didn't find the executable.
37375    # The splitting of arguments from the executable at a space might have been incorrect,
37376    # since paths with space are more likely in Windows. Give it another try with the whole
37377    # argument.
37378    path="$complete"
37379    arguments="EOL"
37380    new_path=`$CYGPATH -u "$path"`
37381    new_path=`$WHICH "$new_path" 2> /dev/null`
37382    # bat and cmd files are not always considered executable in cygwin causing which
37383    # to not find them
37384    if test "x$new_path" = x \
37385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37387      new_path=`$CYGPATH -u "$path"`
37388    fi
37389    if test "x$new_path" = x; then
37390      # It's still not found. Now this is an unrecoverable error.
37391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37392$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37393      has_space=`$ECHO "$complete" | $GREP " "`
37394      if test "x$has_space" != x; then
37395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37397      fi
37398      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37399    fi
37400  fi
37401
37402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37405  # "foo.exe" is OK but "foo" is an error.
37406  #
37407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37408  # It is also a way to make sure we got the proper file name for the real test later on.
37409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37410  if test "x$test_shortpath" = x; then
37411    # Short path failed, file does not exist as specified.
37412    # Try adding .exe or .cmd
37413    if test -f "${new_path}.exe"; then
37414      input_to_shortpath="${new_path}.exe"
37415    elif test -f "${new_path}.cmd"; then
37416      input_to_shortpath="${new_path}.cmd"
37417    else
37418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37419$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37422      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37423    fi
37424  else
37425    input_to_shortpath="$new_path"
37426  fi
37427
37428  # Call helper function which possibly converts this using DOS-style short mode.
37429  # If so, the updated path is stored in $new_path.
37430  new_path="$input_to_shortpath"
37431
37432  input_path="$input_to_shortpath"
37433  # Check if we need to convert this using DOS-style short mode. If the path
37434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37435  # take no chances and rewrite it.
37436  # Note: m4 eats our [], so we need to use [ and ] instead.
37437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37438  if test "x$has_forbidden_chars" != x; then
37439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37443      # Going to short mode and back again did indeed matter. Since short mode is
37444      # case insensitive, let's make it lowercase to improve readability.
37445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37446      # Now convert it back to Unix-style (cygpath)
37447      input_path=`$CYGPATH -u "$shortmode_path"`
37448      new_path="$input_path"
37449    fi
37450  fi
37451
37452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37453  if test "x$test_cygdrive_prefix" = x; then
37454    # As a simple fix, exclude /usr/bin since it's not a real path.
37455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37457      # a path prefixed by /cygdrive for fixpath to work.
37458      new_path="$CYGWIN_ROOT_PATH$input_path"
37459    fi
37460  fi
37461
37462  # remove trailing .exe if any
37463  new_path="${new_path/%.exe/}"
37464
37465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37466
37467  # First separate the path from the arguments. This will split at the first
37468  # space.
37469  complete="$MT"
37470  path="${complete%% *}"
37471  tmp="$complete EOL"
37472  arguments="${tmp#* }"
37473
37474  # Input might be given as Windows format, start by converting to
37475  # unix format.
37476  new_path="$path"
37477
37478  windows_path="$new_path"
37479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37480    unix_path=`$CYGPATH -u "$windows_path"`
37481    new_path="$unix_path"
37482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37484    new_path="$unix_path"
37485  fi
37486
37487
37488  # Now try to locate executable using which
37489  new_path=`$WHICH "$new_path" 2> /dev/null`
37490
37491  if test "x$new_path" = x; then
37492    # Oops. Which didn't find the executable.
37493    # The splitting of arguments from the executable at a space might have been incorrect,
37494    # since paths with space are more likely in Windows. Give it another try with the whole
37495    # argument.
37496    path="$complete"
37497    arguments="EOL"
37498    new_path="$path"
37499
37500  windows_path="$new_path"
37501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37502    unix_path=`$CYGPATH -u "$windows_path"`
37503    new_path="$unix_path"
37504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37506    new_path="$unix_path"
37507  fi
37508
37509
37510    new_path=`$WHICH "$new_path" 2> /dev/null`
37511    # bat and cmd files are not always considered executable in MSYS causing which
37512    # to not find them
37513    if test "x$new_path" = x \
37514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37516      new_path="$path"
37517
37518  windows_path="$new_path"
37519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37520    unix_path=`$CYGPATH -u "$windows_path"`
37521    new_path="$unix_path"
37522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37524    new_path="$unix_path"
37525  fi
37526
37527    fi
37528
37529    if test "x$new_path" = x; then
37530      # It's still not found. Now this is an unrecoverable error.
37531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37532$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37533      has_space=`$ECHO "$complete" | $GREP " "`
37534      if test "x$has_space" != x; then
37535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37537      fi
37538      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37539    fi
37540  fi
37541
37542  # Now new_path has a complete unix path to the binary
37543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37544    # Keep paths in /bin as-is, but remove trailing .exe if any
37545    new_path="${new_path/%.exe/}"
37546    # Do not save /bin paths to all_fixpath_prefixes!
37547  else
37548    # Not in mixed or Windows style, start by that.
37549    new_path=`cmd //c echo $new_path`
37550
37551  input_path="$new_path"
37552  # Check if we need to convert this using DOS-style short mode. If the path
37553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37554  # take no chances and rewrite it.
37555  # Note: m4 eats our [], so we need to use [ and ] instead.
37556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37557  if test "x$has_forbidden_chars" != x; then
37558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37560  fi
37561
37562    # Output is in $new_path
37563
37564  windows_path="$new_path"
37565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37566    unix_path=`$CYGPATH -u "$windows_path"`
37567    new_path="$unix_path"
37568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37570    new_path="$unix_path"
37571  fi
37572
37573    # remove trailing .exe if any
37574    new_path="${new_path/%.exe/}"
37575
37576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37578  fi
37579
37580    else
37581      # We're on a unix platform. Hooray! :)
37582      # First separate the path from the arguments. This will split at the first
37583      # space.
37584      complete="$MT"
37585      path="${complete%% *}"
37586      tmp="$complete EOL"
37587      arguments="${tmp#* }"
37588
37589      # Cannot rely on the command "which" here since it doesn't always work.
37590      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37591      if test -z "$is_absolute_path"; then
37592        # Path to executable is not absolute. Find it.
37593        IFS_save="$IFS"
37594        IFS=:
37595        for p in $PATH; do
37596          if test -f "$p/$path" && test -x "$p/$path"; then
37597            new_path="$p/$path"
37598            break
37599          fi
37600        done
37601        IFS="$IFS_save"
37602      else
37603        # This is an absolute path, we can use it without further modifications.
37604        new_path="$path"
37605      fi
37606
37607      if test "x$new_path" = x; then
37608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37609$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37610        has_space=`$ECHO "$complete" | $GREP " "`
37611        if test "x$has_space" != x; then
37612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37614        fi
37615        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37616      fi
37617    fi
37618
37619    # Now join together the path and the arguments once again
37620    if test "x$arguments" != xEOL; then
37621      new_complete="$new_path ${arguments% *}"
37622    else
37623      new_complete="$new_path"
37624    fi
37625
37626    if test "x$complete" != "x$new_complete"; then
37627      MT="$new_complete"
37628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37629$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37630    fi
37631  fi
37632
37633    # Setup the resource compiler (RC)
37634    # Extract the first word of "rc", so it can be a program name with args.
37635set dummy rc; ac_word=$2
37636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37637$as_echo_n "checking for $ac_word... " >&6; }
37638if ${ac_cv_prog_RC+:} false; then :
37639  $as_echo_n "(cached) " >&6
37640else
37641  if test -n "$RC"; then
37642  ac_cv_prog_RC="$RC" # Let the user override the test.
37643else
37644  ac_prog_rejected=no
37645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37646for as_dir in $PATH
37647do
37648  IFS=$as_save_IFS
37649  test -z "$as_dir" && as_dir=.
37650    for ac_exec_ext in '' $ac_executable_extensions; do
37651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37652    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37653       ac_prog_rejected=yes
37654       continue
37655     fi
37656    ac_cv_prog_RC="rc"
37657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37658    break 2
37659  fi
37660done
37661  done
37662IFS=$as_save_IFS
37663
37664if test $ac_prog_rejected = yes; then
37665  # We found a bogon in the path, so make sure we never use it.
37666  set dummy $ac_cv_prog_RC
37667  shift
37668  if test $# != 0; then
37669    # We chose a different compiler from the bogus one.
37670    # However, it has the same basename, so the bogon will be chosen
37671    # first if we set RC to just the basename; use the full file name.
37672    shift
37673    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37674  fi
37675fi
37676fi
37677fi
37678RC=$ac_cv_prog_RC
37679if test -n "$RC"; then
37680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37681$as_echo "$RC" >&6; }
37682else
37683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37684$as_echo "no" >&6; }
37685fi
37686
37687
37688
37689  # Only process if variable expands to non-empty
37690
37691  if test "x$RC" != x; then
37692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37693
37694  # First separate the path from the arguments. This will split at the first
37695  # space.
37696  complete="$RC"
37697  path="${complete%% *}"
37698  tmp="$complete EOL"
37699  arguments="${tmp#* }"
37700
37701  # Input might be given as Windows format, start by converting to
37702  # unix format.
37703  new_path=`$CYGPATH -u "$path"`
37704
37705  # Now try to locate executable using which
37706  new_path=`$WHICH "$new_path" 2> /dev/null`
37707  # bat and cmd files are not always considered executable in cygwin causing which
37708  # to not find them
37709  if test "x$new_path" = x \
37710      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37711      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37712    new_path=`$CYGPATH -u "$path"`
37713  fi
37714  if test "x$new_path" = x; then
37715    # Oops. Which didn't find the executable.
37716    # The splitting of arguments from the executable at a space might have been incorrect,
37717    # since paths with space are more likely in Windows. Give it another try with the whole
37718    # argument.
37719    path="$complete"
37720    arguments="EOL"
37721    new_path=`$CYGPATH -u "$path"`
37722    new_path=`$WHICH "$new_path" 2> /dev/null`
37723    # bat and cmd files are not always considered executable in cygwin causing which
37724    # to not find them
37725    if test "x$new_path" = x \
37726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37728      new_path=`$CYGPATH -u "$path"`
37729    fi
37730    if test "x$new_path" = x; then
37731      # It's still not found. Now this is an unrecoverable error.
37732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37733$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37734      has_space=`$ECHO "$complete" | $GREP " "`
37735      if test "x$has_space" != x; then
37736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37738      fi
37739      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37740    fi
37741  fi
37742
37743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37746  # "foo.exe" is OK but "foo" is an error.
37747  #
37748  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37749  # It is also a way to make sure we got the proper file name for the real test later on.
37750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37751  if test "x$test_shortpath" = x; then
37752    # Short path failed, file does not exist as specified.
37753    # Try adding .exe or .cmd
37754    if test -f "${new_path}.exe"; then
37755      input_to_shortpath="${new_path}.exe"
37756    elif test -f "${new_path}.cmd"; then
37757      input_to_shortpath="${new_path}.cmd"
37758    else
37759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37760$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37761      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37762$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37763      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37764    fi
37765  else
37766    input_to_shortpath="$new_path"
37767  fi
37768
37769  # Call helper function which possibly converts this using DOS-style short mode.
37770  # If so, the updated path is stored in $new_path.
37771  new_path="$input_to_shortpath"
37772
37773  input_path="$input_to_shortpath"
37774  # Check if we need to convert this using DOS-style short mode. If the path
37775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37776  # take no chances and rewrite it.
37777  # Note: m4 eats our [], so we need to use [ and ] instead.
37778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37779  if test "x$has_forbidden_chars" != x; then
37780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37784      # Going to short mode and back again did indeed matter. Since short mode is
37785      # case insensitive, let's make it lowercase to improve readability.
37786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37787      # Now convert it back to Unix-style (cygpath)
37788      input_path=`$CYGPATH -u "$shortmode_path"`
37789      new_path="$input_path"
37790    fi
37791  fi
37792
37793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37794  if test "x$test_cygdrive_prefix" = x; then
37795    # As a simple fix, exclude /usr/bin since it's not a real path.
37796    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37798      # a path prefixed by /cygdrive for fixpath to work.
37799      new_path="$CYGWIN_ROOT_PATH$input_path"
37800    fi
37801  fi
37802
37803  # remove trailing .exe if any
37804  new_path="${new_path/%.exe/}"
37805
37806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37807
37808  # First separate the path from the arguments. This will split at the first
37809  # space.
37810  complete="$RC"
37811  path="${complete%% *}"
37812  tmp="$complete EOL"
37813  arguments="${tmp#* }"
37814
37815  # Input might be given as Windows format, start by converting to
37816  # unix format.
37817  new_path="$path"
37818
37819  windows_path="$new_path"
37820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37821    unix_path=`$CYGPATH -u "$windows_path"`
37822    new_path="$unix_path"
37823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37825    new_path="$unix_path"
37826  fi
37827
37828
37829  # Now try to locate executable using which
37830  new_path=`$WHICH "$new_path" 2> /dev/null`
37831
37832  if test "x$new_path" = x; then
37833    # Oops. Which didn't find the executable.
37834    # The splitting of arguments from the executable at a space might have been incorrect,
37835    # since paths with space are more likely in Windows. Give it another try with the whole
37836    # argument.
37837    path="$complete"
37838    arguments="EOL"
37839    new_path="$path"
37840
37841  windows_path="$new_path"
37842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37843    unix_path=`$CYGPATH -u "$windows_path"`
37844    new_path="$unix_path"
37845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37847    new_path="$unix_path"
37848  fi
37849
37850
37851    new_path=`$WHICH "$new_path" 2> /dev/null`
37852    # bat and cmd files are not always considered executable in MSYS causing which
37853    # to not find them
37854    if test "x$new_path" = x \
37855        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37856        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37857      new_path="$path"
37858
37859  windows_path="$new_path"
37860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37861    unix_path=`$CYGPATH -u "$windows_path"`
37862    new_path="$unix_path"
37863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37865    new_path="$unix_path"
37866  fi
37867
37868    fi
37869
37870    if test "x$new_path" = x; then
37871      # It's still not found. Now this is an unrecoverable error.
37872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37873$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37874      has_space=`$ECHO "$complete" | $GREP " "`
37875      if test "x$has_space" != x; then
37876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37878      fi
37879      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37880    fi
37881  fi
37882
37883  # Now new_path has a complete unix path to the binary
37884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37885    # Keep paths in /bin as-is, but remove trailing .exe if any
37886    new_path="${new_path/%.exe/}"
37887    # Do not save /bin paths to all_fixpath_prefixes!
37888  else
37889    # Not in mixed or Windows style, start by that.
37890    new_path=`cmd //c echo $new_path`
37891
37892  input_path="$new_path"
37893  # Check if we need to convert this using DOS-style short mode. If the path
37894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37895  # take no chances and rewrite it.
37896  # Note: m4 eats our [], so we need to use [ and ] instead.
37897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37898  if test "x$has_forbidden_chars" != x; then
37899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37901  fi
37902
37903    # Output is in $new_path
37904
37905  windows_path="$new_path"
37906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37907    unix_path=`$CYGPATH -u "$windows_path"`
37908    new_path="$unix_path"
37909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37911    new_path="$unix_path"
37912  fi
37913
37914    # remove trailing .exe if any
37915    new_path="${new_path/%.exe/}"
37916
37917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37919  fi
37920
37921    else
37922      # We're on a unix platform. Hooray! :)
37923      # First separate the path from the arguments. This will split at the first
37924      # space.
37925      complete="$RC"
37926      path="${complete%% *}"
37927      tmp="$complete EOL"
37928      arguments="${tmp#* }"
37929
37930      # Cannot rely on the command "which" here since it doesn't always work.
37931      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37932      if test -z "$is_absolute_path"; then
37933        # Path to executable is not absolute. Find it.
37934        IFS_save="$IFS"
37935        IFS=:
37936        for p in $PATH; do
37937          if test -f "$p/$path" && test -x "$p/$path"; then
37938            new_path="$p/$path"
37939            break
37940          fi
37941        done
37942        IFS="$IFS_save"
37943      else
37944        # This is an absolute path, we can use it without further modifications.
37945        new_path="$path"
37946      fi
37947
37948      if test "x$new_path" = x; then
37949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37950$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37951        has_space=`$ECHO "$complete" | $GREP " "`
37952        if test "x$has_space" != x; then
37953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37955        fi
37956        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37957      fi
37958    fi
37959
37960    # Now join together the path and the arguments once again
37961    if test "x$arguments" != xEOL; then
37962      new_complete="$new_path ${arguments% *}"
37963    else
37964      new_complete="$new_path"
37965    fi
37966
37967    if test "x$complete" != "x$new_complete"; then
37968      RC="$new_complete"
37969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37970$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37971    fi
37972  fi
37973
37974    # Extract the first word of "dumpbin", so it can be a program name with args.
37975set dummy dumpbin; ac_word=$2
37976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37977$as_echo_n "checking for $ac_word... " >&6; }
37978if ${ac_cv_prog_DUMPBIN+:} false; then :
37979  $as_echo_n "(cached) " >&6
37980else
37981  if test -n "$DUMPBIN"; then
37982  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37983else
37984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37985for as_dir in $PATH
37986do
37987  IFS=$as_save_IFS
37988  test -z "$as_dir" && as_dir=.
37989    for ac_exec_ext in '' $ac_executable_extensions; do
37990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37991    ac_cv_prog_DUMPBIN="dumpbin"
37992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37993    break 2
37994  fi
37995done
37996  done
37997IFS=$as_save_IFS
37998
37999fi
38000fi
38001DUMPBIN=$ac_cv_prog_DUMPBIN
38002if test -n "$DUMPBIN"; then
38003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38004$as_echo "$DUMPBIN" >&6; }
38005else
38006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38007$as_echo "no" >&6; }
38008fi
38009
38010
38011
38012  # Only process if variable expands to non-empty
38013
38014  if test "x$DUMPBIN" != x; then
38015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38016
38017  # First separate the path from the arguments. This will split at the first
38018  # space.
38019  complete="$DUMPBIN"
38020  path="${complete%% *}"
38021  tmp="$complete EOL"
38022  arguments="${tmp#* }"
38023
38024  # Input might be given as Windows format, start by converting to
38025  # unix format.
38026  new_path=`$CYGPATH -u "$path"`
38027
38028  # Now try to locate executable using which
38029  new_path=`$WHICH "$new_path" 2> /dev/null`
38030  # bat and cmd files are not always considered executable in cygwin causing which
38031  # to not find them
38032  if test "x$new_path" = x \
38033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38035    new_path=`$CYGPATH -u "$path"`
38036  fi
38037  if test "x$new_path" = x; then
38038    # Oops. Which didn't find the executable.
38039    # The splitting of arguments from the executable at a space might have been incorrect,
38040    # since paths with space are more likely in Windows. Give it another try with the whole
38041    # argument.
38042    path="$complete"
38043    arguments="EOL"
38044    new_path=`$CYGPATH -u "$path"`
38045    new_path=`$WHICH "$new_path" 2> /dev/null`
38046    # bat and cmd files are not always considered executable in cygwin causing which
38047    # to not find them
38048    if test "x$new_path" = x \
38049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38051      new_path=`$CYGPATH -u "$path"`
38052    fi
38053    if test "x$new_path" = x; then
38054      # It's still not found. Now this is an unrecoverable error.
38055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38056$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38057      has_space=`$ECHO "$complete" | $GREP " "`
38058      if test "x$has_space" != x; then
38059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38061      fi
38062      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38063    fi
38064  fi
38065
38066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38069  # "foo.exe" is OK but "foo" is an error.
38070  #
38071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38072  # It is also a way to make sure we got the proper file name for the real test later on.
38073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38074  if test "x$test_shortpath" = x; then
38075    # Short path failed, file does not exist as specified.
38076    # Try adding .exe or .cmd
38077    if test -f "${new_path}.exe"; then
38078      input_to_shortpath="${new_path}.exe"
38079    elif test -f "${new_path}.cmd"; then
38080      input_to_shortpath="${new_path}.cmd"
38081    else
38082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38083$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38086      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38087    fi
38088  else
38089    input_to_shortpath="$new_path"
38090  fi
38091
38092  # Call helper function which possibly converts this using DOS-style short mode.
38093  # If so, the updated path is stored in $new_path.
38094  new_path="$input_to_shortpath"
38095
38096  input_path="$input_to_shortpath"
38097  # Check if we need to convert this using DOS-style short mode. If the path
38098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38099  # take no chances and rewrite it.
38100  # Note: m4 eats our [], so we need to use [ and ] instead.
38101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38102  if test "x$has_forbidden_chars" != x; then
38103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38107      # Going to short mode and back again did indeed matter. Since short mode is
38108      # case insensitive, let's make it lowercase to improve readability.
38109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38110      # Now convert it back to Unix-style (cygpath)
38111      input_path=`$CYGPATH -u "$shortmode_path"`
38112      new_path="$input_path"
38113    fi
38114  fi
38115
38116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38117  if test "x$test_cygdrive_prefix" = x; then
38118    # As a simple fix, exclude /usr/bin since it's not a real path.
38119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38121      # a path prefixed by /cygdrive for fixpath to work.
38122      new_path="$CYGWIN_ROOT_PATH$input_path"
38123    fi
38124  fi
38125
38126  # remove trailing .exe if any
38127  new_path="${new_path/%.exe/}"
38128
38129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130
38131  # First separate the path from the arguments. This will split at the first
38132  # space.
38133  complete="$DUMPBIN"
38134  path="${complete%% *}"
38135  tmp="$complete EOL"
38136  arguments="${tmp#* }"
38137
38138  # Input might be given as Windows format, start by converting to
38139  # unix format.
38140  new_path="$path"
38141
38142  windows_path="$new_path"
38143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38144    unix_path=`$CYGPATH -u "$windows_path"`
38145    new_path="$unix_path"
38146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38148    new_path="$unix_path"
38149  fi
38150
38151
38152  # Now try to locate executable using which
38153  new_path=`$WHICH "$new_path" 2> /dev/null`
38154
38155  if test "x$new_path" = x; then
38156    # Oops. Which didn't find the executable.
38157    # The splitting of arguments from the executable at a space might have been incorrect,
38158    # since paths with space are more likely in Windows. Give it another try with the whole
38159    # argument.
38160    path="$complete"
38161    arguments="EOL"
38162    new_path="$path"
38163
38164  windows_path="$new_path"
38165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38166    unix_path=`$CYGPATH -u "$windows_path"`
38167    new_path="$unix_path"
38168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38170    new_path="$unix_path"
38171  fi
38172
38173
38174    new_path=`$WHICH "$new_path" 2> /dev/null`
38175    # bat and cmd files are not always considered executable in MSYS 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="$path"
38181
38182  windows_path="$new_path"
38183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38184    unix_path=`$CYGPATH -u "$windows_path"`
38185    new_path="$unix_path"
38186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38188    new_path="$unix_path"
38189  fi
38190
38191    fi
38192
38193    if test "x$new_path" = x; then
38194      # It's still not found. Now this is an unrecoverable error.
38195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38196$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38197      has_space=`$ECHO "$complete" | $GREP " "`
38198      if test "x$has_space" != x; then
38199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38201      fi
38202      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38203    fi
38204  fi
38205
38206  # Now new_path has a complete unix path to the binary
38207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38208    # Keep paths in /bin as-is, but remove trailing .exe if any
38209    new_path="${new_path/%.exe/}"
38210    # Do not save /bin paths to all_fixpath_prefixes!
38211  else
38212    # Not in mixed or Windows style, start by that.
38213    new_path=`cmd //c echo $new_path`
38214
38215  input_path="$new_path"
38216  # Check if we need to convert this using DOS-style short mode. If the path
38217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38218  # take no chances and rewrite it.
38219  # Note: m4 eats our [], so we need to use [ and ] instead.
38220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38221  if test "x$has_forbidden_chars" != x; then
38222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38224  fi
38225
38226    # Output is in $new_path
38227
38228  windows_path="$new_path"
38229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38230    unix_path=`$CYGPATH -u "$windows_path"`
38231    new_path="$unix_path"
38232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38234    new_path="$unix_path"
38235  fi
38236
38237    # remove trailing .exe if any
38238    new_path="${new_path/%.exe/}"
38239
38240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38242  fi
38243
38244    else
38245      # We're on a unix platform. Hooray! :)
38246      # First separate the path from the arguments. This will split at the first
38247      # space.
38248      complete="$DUMPBIN"
38249      path="${complete%% *}"
38250      tmp="$complete EOL"
38251      arguments="${tmp#* }"
38252
38253      # Cannot rely on the command "which" here since it doesn't always work.
38254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38255      if test -z "$is_absolute_path"; then
38256        # Path to executable is not absolute. Find it.
38257        IFS_save="$IFS"
38258        IFS=:
38259        for p in $PATH; do
38260          if test -f "$p/$path" && test -x "$p/$path"; then
38261            new_path="$p/$path"
38262            break
38263          fi
38264        done
38265        IFS="$IFS_save"
38266      else
38267        # This is an absolute path, we can use it without further modifications.
38268        new_path="$path"
38269      fi
38270
38271      if test "x$new_path" = x; then
38272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38273$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38274        has_space=`$ECHO "$complete" | $GREP " "`
38275        if test "x$has_space" != x; then
38276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38278        fi
38279        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38280      fi
38281    fi
38282
38283    # Now join together the path and the arguments once again
38284    if test "x$arguments" != xEOL; then
38285      new_complete="$new_path ${arguments% *}"
38286    else
38287      new_complete="$new_path"
38288    fi
38289
38290    if test "x$complete" != "x$new_complete"; then
38291      DUMPBIN="$new_complete"
38292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38293$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38294    fi
38295  fi
38296
38297    # We need to check for 'msbuild.exe' because at the place where we expect to
38298    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38299    # won't find the 'msbuild.exe' executable in that case (and the
38300    # 'ac_executable_extensions' is unusable due to performance reasons).
38301    # Notice that we intentionally don't fix up the path to MSBUILD because we
38302    # will call it in a DOS shell during freetype detection on Windows (see
38303    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38304    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38305set dummy msbuild.exe; ac_word=$2
38306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38307$as_echo_n "checking for $ac_word... " >&6; }
38308if ${ac_cv_prog_MSBUILD+:} false; then :
38309  $as_echo_n "(cached) " >&6
38310else
38311  if test -n "$MSBUILD"; then
38312  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38313else
38314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38315for as_dir in $PATH
38316do
38317  IFS=$as_save_IFS
38318  test -z "$as_dir" && as_dir=.
38319    for ac_exec_ext in '' $ac_executable_extensions; do
38320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38321    ac_cv_prog_MSBUILD="msbuild.exe"
38322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38323    break 2
38324  fi
38325done
38326  done
38327IFS=$as_save_IFS
38328
38329fi
38330fi
38331MSBUILD=$ac_cv_prog_MSBUILD
38332if test -n "$MSBUILD"; then
38333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38334$as_echo "$MSBUILD" >&6; }
38335else
38336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38337$as_echo "no" >&6; }
38338fi
38339
38340
38341  fi
38342
38343  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38344
38345
38346  # Publish this variable in the help.
38347
38348
38349  if [ -z "${STRIP+x}" ]; then
38350    # The variable is not set by user, try to locate tool using the code snippet
38351    for ac_prog in strip
38352do
38353  # Extract the first word of "$ac_prog", so it can be a program name with args.
38354set dummy $ac_prog; ac_word=$2
38355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38356$as_echo_n "checking for $ac_word... " >&6; }
38357if ${ac_cv_path_STRIP+:} false; then :
38358  $as_echo_n "(cached) " >&6
38359else
38360  case $STRIP in
38361  [\\/]* | ?:[\\/]*)
38362  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38363  ;;
38364  *)
38365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38366for as_dir in $PATH
38367do
38368  IFS=$as_save_IFS
38369  test -z "$as_dir" && as_dir=.
38370    for ac_exec_ext in '' $ac_executable_extensions; do
38371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38372    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38374    break 2
38375  fi
38376done
38377  done
38378IFS=$as_save_IFS
38379
38380  ;;
38381esac
38382fi
38383STRIP=$ac_cv_path_STRIP
38384if test -n "$STRIP"; then
38385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38386$as_echo "$STRIP" >&6; }
38387else
38388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38389$as_echo "no" >&6; }
38390fi
38391
38392
38393  test -n "$STRIP" && break
38394done
38395
38396  else
38397    # The variable is set, but is it from the command line or the environment?
38398
38399    # Try to remove the string !STRIP! from our list.
38400    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38401    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38402      # If it failed, the variable was not from the command line. Ignore it,
38403      # but warn the user (except for BASH, which is always set by the calling BASH).
38404      if test "xSTRIP" != xBASH; then
38405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38406$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38407      fi
38408      # Try to locate tool using the code snippet
38409      for ac_prog in strip
38410do
38411  # Extract the first word of "$ac_prog", so it can be a program name with args.
38412set dummy $ac_prog; ac_word=$2
38413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38414$as_echo_n "checking for $ac_word... " >&6; }
38415if ${ac_cv_path_STRIP+:} false; then :
38416  $as_echo_n "(cached) " >&6
38417else
38418  case $STRIP in
38419  [\\/]* | ?:[\\/]*)
38420  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38421  ;;
38422  *)
38423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38424for as_dir in $PATH
38425do
38426  IFS=$as_save_IFS
38427  test -z "$as_dir" && as_dir=.
38428    for ac_exec_ext in '' $ac_executable_extensions; do
38429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38430    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38432    break 2
38433  fi
38434done
38435  done
38436IFS=$as_save_IFS
38437
38438  ;;
38439esac
38440fi
38441STRIP=$ac_cv_path_STRIP
38442if test -n "$STRIP"; then
38443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38444$as_echo "$STRIP" >&6; }
38445else
38446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38447$as_echo "no" >&6; }
38448fi
38449
38450
38451  test -n "$STRIP" && break
38452done
38453
38454    else
38455      # If it succeeded, then it was overridden by the user. We will use it
38456      # for the tool.
38457
38458      # First remove it from the list of overridden variables, so we can test
38459      # for unknown variables in the end.
38460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38461
38462      # Check if we try to supply an empty value
38463      if test "x$STRIP" = x; then
38464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38465$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38467$as_echo_n "checking for STRIP... " >&6; }
38468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38469$as_echo "disabled" >&6; }
38470      else
38471        # Check if the provided tool contains a complete path.
38472        tool_specified="$STRIP"
38473        tool_basename="${tool_specified##*/}"
38474        if test "x$tool_basename" = "x$tool_specified"; then
38475          # A command without a complete path is provided, search $PATH.
38476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38477$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38478          # Extract the first word of "$tool_basename", so it can be a program name with args.
38479set dummy $tool_basename; ac_word=$2
38480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38481$as_echo_n "checking for $ac_word... " >&6; }
38482if ${ac_cv_path_STRIP+:} false; then :
38483  $as_echo_n "(cached) " >&6
38484else
38485  case $STRIP in
38486  [\\/]* | ?:[\\/]*)
38487  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38488  ;;
38489  *)
38490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38491for as_dir in $PATH
38492do
38493  IFS=$as_save_IFS
38494  test -z "$as_dir" && as_dir=.
38495    for ac_exec_ext in '' $ac_executable_extensions; do
38496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38497    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38499    break 2
38500  fi
38501done
38502  done
38503IFS=$as_save_IFS
38504
38505  ;;
38506esac
38507fi
38508STRIP=$ac_cv_path_STRIP
38509if test -n "$STRIP"; then
38510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38511$as_echo "$STRIP" >&6; }
38512else
38513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38514$as_echo "no" >&6; }
38515fi
38516
38517
38518          if test "x$STRIP" = x; then
38519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38520          fi
38521        else
38522          # Otherwise we believe it is a complete path. Use it as it is.
38523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38524$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38526$as_echo_n "checking for STRIP... " >&6; }
38527          if test ! -x "$tool_specified"; then
38528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38529$as_echo "not found" >&6; }
38530            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38531          fi
38532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38533$as_echo "$tool_specified" >&6; }
38534        fi
38535      fi
38536    fi
38537
38538  fi
38539
38540
38541
38542  # Only process if variable expands to non-empty
38543
38544  if test "x$STRIP" != x; then
38545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38546
38547  # First separate the path from the arguments. This will split at the first
38548  # space.
38549  complete="$STRIP"
38550  path="${complete%% *}"
38551  tmp="$complete EOL"
38552  arguments="${tmp#* }"
38553
38554  # Input might be given as Windows format, start by converting to
38555  # unix format.
38556  new_path=`$CYGPATH -u "$path"`
38557
38558  # Now try to locate executable using which
38559  new_path=`$WHICH "$new_path" 2> /dev/null`
38560  # bat and cmd files are not always considered executable in cygwin causing which
38561  # to not find them
38562  if test "x$new_path" = x \
38563      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38564      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38565    new_path=`$CYGPATH -u "$path"`
38566  fi
38567  if test "x$new_path" = x; then
38568    # Oops. Which didn't find the executable.
38569    # The splitting of arguments from the executable at a space might have been incorrect,
38570    # since paths with space are more likely in Windows. Give it another try with the whole
38571    # argument.
38572    path="$complete"
38573    arguments="EOL"
38574    new_path=`$CYGPATH -u "$path"`
38575    new_path=`$WHICH "$new_path" 2> /dev/null`
38576    # bat and cmd files are not always considered executable in cygwin causing which
38577    # to not find them
38578    if test "x$new_path" = x \
38579        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38580        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38581      new_path=`$CYGPATH -u "$path"`
38582    fi
38583    if test "x$new_path" = x; then
38584      # It's still not found. Now this is an unrecoverable error.
38585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38586$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38587      has_space=`$ECHO "$complete" | $GREP " "`
38588      if test "x$has_space" != x; then
38589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38591      fi
38592      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38593    fi
38594  fi
38595
38596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38599  # "foo.exe" is OK but "foo" is an error.
38600  #
38601  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38602  # It is also a way to make sure we got the proper file name for the real test later on.
38603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38604  if test "x$test_shortpath" = x; then
38605    # Short path failed, file does not exist as specified.
38606    # Try adding .exe or .cmd
38607    if test -f "${new_path}.exe"; then
38608      input_to_shortpath="${new_path}.exe"
38609    elif test -f "${new_path}.cmd"; then
38610      input_to_shortpath="${new_path}.cmd"
38611    else
38612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38613$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38614      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38615$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38616      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38617    fi
38618  else
38619    input_to_shortpath="$new_path"
38620  fi
38621
38622  # Call helper function which possibly converts this using DOS-style short mode.
38623  # If so, the updated path is stored in $new_path.
38624  new_path="$input_to_shortpath"
38625
38626  input_path="$input_to_shortpath"
38627  # Check if we need to convert this using DOS-style short mode. If the path
38628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38629  # take no chances and rewrite it.
38630  # Note: m4 eats our [], so we need to use [ and ] instead.
38631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38632  if test "x$has_forbidden_chars" != x; then
38633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38637      # Going to short mode and back again did indeed matter. Since short mode is
38638      # case insensitive, let's make it lowercase to improve readability.
38639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38640      # Now convert it back to Unix-style (cygpath)
38641      input_path=`$CYGPATH -u "$shortmode_path"`
38642      new_path="$input_path"
38643    fi
38644  fi
38645
38646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38647  if test "x$test_cygdrive_prefix" = x; then
38648    # As a simple fix, exclude /usr/bin since it's not a real path.
38649    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38651      # a path prefixed by /cygdrive for fixpath to work.
38652      new_path="$CYGWIN_ROOT_PATH$input_path"
38653    fi
38654  fi
38655
38656  # remove trailing .exe if any
38657  new_path="${new_path/%.exe/}"
38658
38659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38660
38661  # First separate the path from the arguments. This will split at the first
38662  # space.
38663  complete="$STRIP"
38664  path="${complete%% *}"
38665  tmp="$complete EOL"
38666  arguments="${tmp#* }"
38667
38668  # Input might be given as Windows format, start by converting to
38669  # unix format.
38670  new_path="$path"
38671
38672  windows_path="$new_path"
38673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38674    unix_path=`$CYGPATH -u "$windows_path"`
38675    new_path="$unix_path"
38676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38678    new_path="$unix_path"
38679  fi
38680
38681
38682  # Now try to locate executable using which
38683  new_path=`$WHICH "$new_path" 2> /dev/null`
38684
38685  if test "x$new_path" = x; then
38686    # Oops. Which didn't find the executable.
38687    # The splitting of arguments from the executable at a space might have been incorrect,
38688    # since paths with space are more likely in Windows. Give it another try with the whole
38689    # argument.
38690    path="$complete"
38691    arguments="EOL"
38692    new_path="$path"
38693
38694  windows_path="$new_path"
38695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38696    unix_path=`$CYGPATH -u "$windows_path"`
38697    new_path="$unix_path"
38698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38700    new_path="$unix_path"
38701  fi
38702
38703
38704    new_path=`$WHICH "$new_path" 2> /dev/null`
38705    # bat and cmd files are not always considered executable in MSYS causing which
38706    # to not find them
38707    if test "x$new_path" = x \
38708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38710      new_path="$path"
38711
38712  windows_path="$new_path"
38713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38714    unix_path=`$CYGPATH -u "$windows_path"`
38715    new_path="$unix_path"
38716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38718    new_path="$unix_path"
38719  fi
38720
38721    fi
38722
38723    if test "x$new_path" = x; then
38724      # It's still not found. Now this is an unrecoverable error.
38725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38726$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38727      has_space=`$ECHO "$complete" | $GREP " "`
38728      if test "x$has_space" != x; then
38729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38731      fi
38732      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38733    fi
38734  fi
38735
38736  # Now new_path has a complete unix path to the binary
38737  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38738    # Keep paths in /bin as-is, but remove trailing .exe if any
38739    new_path="${new_path/%.exe/}"
38740    # Do not save /bin paths to all_fixpath_prefixes!
38741  else
38742    # Not in mixed or Windows style, start by that.
38743    new_path=`cmd //c echo $new_path`
38744
38745  input_path="$new_path"
38746  # Check if we need to convert this using DOS-style short mode. If the path
38747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38748  # take no chances and rewrite it.
38749  # Note: m4 eats our [], so we need to use [ and ] instead.
38750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38751  if test "x$has_forbidden_chars" != x; then
38752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38754  fi
38755
38756    # Output is in $new_path
38757
38758  windows_path="$new_path"
38759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38760    unix_path=`$CYGPATH -u "$windows_path"`
38761    new_path="$unix_path"
38762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38764    new_path="$unix_path"
38765  fi
38766
38767    # remove trailing .exe if any
38768    new_path="${new_path/%.exe/}"
38769
38770    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38771    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38772  fi
38773
38774    else
38775      # We're on a unix platform. Hooray! :)
38776      # First separate the path from the arguments. This will split at the first
38777      # space.
38778      complete="$STRIP"
38779      path="${complete%% *}"
38780      tmp="$complete EOL"
38781      arguments="${tmp#* }"
38782
38783      # Cannot rely on the command "which" here since it doesn't always work.
38784      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38785      if test -z "$is_absolute_path"; then
38786        # Path to executable is not absolute. Find it.
38787        IFS_save="$IFS"
38788        IFS=:
38789        for p in $PATH; do
38790          if test -f "$p/$path" && test -x "$p/$path"; then
38791            new_path="$p/$path"
38792            break
38793          fi
38794        done
38795        IFS="$IFS_save"
38796      else
38797        # This is an absolute path, we can use it without further modifications.
38798        new_path="$path"
38799      fi
38800
38801      if test "x$new_path" = x; then
38802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38803$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38804        has_space=`$ECHO "$complete" | $GREP " "`
38805        if test "x$has_space" != x; then
38806          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38807$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38808        fi
38809        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38810      fi
38811    fi
38812
38813    # Now join together the path and the arguments once again
38814    if test "x$arguments" != xEOL; then
38815      new_complete="$new_path ${arguments% *}"
38816    else
38817      new_complete="$new_path"
38818    fi
38819
38820    if test "x$complete" != "x$new_complete"; then
38821      STRIP="$new_complete"
38822      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38823$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38824    fi
38825  fi
38826
38827
38828
38829  # Publish this variable in the help.
38830
38831
38832  if [ -z "${NM+x}" ]; then
38833    # The variable is not set by user, try to locate tool using the code snippet
38834    for ac_prog in nm
38835do
38836  # Extract the first word of "$ac_prog", so it can be a program name with args.
38837set dummy $ac_prog; ac_word=$2
38838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38839$as_echo_n "checking for $ac_word... " >&6; }
38840if ${ac_cv_path_NM+:} false; then :
38841  $as_echo_n "(cached) " >&6
38842else
38843  case $NM in
38844  [\\/]* | ?:[\\/]*)
38845  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38846  ;;
38847  *)
38848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38849for as_dir in $PATH
38850do
38851  IFS=$as_save_IFS
38852  test -z "$as_dir" && as_dir=.
38853    for ac_exec_ext in '' $ac_executable_extensions; do
38854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38855    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38857    break 2
38858  fi
38859done
38860  done
38861IFS=$as_save_IFS
38862
38863  ;;
38864esac
38865fi
38866NM=$ac_cv_path_NM
38867if test -n "$NM"; then
38868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38869$as_echo "$NM" >&6; }
38870else
38871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38872$as_echo "no" >&6; }
38873fi
38874
38875
38876  test -n "$NM" && break
38877done
38878
38879  else
38880    # The variable is set, but is it from the command line or the environment?
38881
38882    # Try to remove the string !NM! from our list.
38883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38885      # If it failed, the variable was not from the command line. Ignore it,
38886      # but warn the user (except for BASH, which is always set by the calling BASH).
38887      if test "xNM" != xBASH; then
38888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38889$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38890      fi
38891      # Try to locate tool using the code snippet
38892      for ac_prog in nm
38893do
38894  # Extract the first word of "$ac_prog", so it can be a program name with args.
38895set dummy $ac_prog; ac_word=$2
38896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38897$as_echo_n "checking for $ac_word... " >&6; }
38898if ${ac_cv_path_NM+:} false; then :
38899  $as_echo_n "(cached) " >&6
38900else
38901  case $NM in
38902  [\\/]* | ?:[\\/]*)
38903  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38904  ;;
38905  *)
38906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38907for as_dir in $PATH
38908do
38909  IFS=$as_save_IFS
38910  test -z "$as_dir" && as_dir=.
38911    for ac_exec_ext in '' $ac_executable_extensions; do
38912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38913    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38915    break 2
38916  fi
38917done
38918  done
38919IFS=$as_save_IFS
38920
38921  ;;
38922esac
38923fi
38924NM=$ac_cv_path_NM
38925if test -n "$NM"; then
38926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38927$as_echo "$NM" >&6; }
38928else
38929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38930$as_echo "no" >&6; }
38931fi
38932
38933
38934  test -n "$NM" && break
38935done
38936
38937    else
38938      # If it succeeded, then it was overridden by the user. We will use it
38939      # for the tool.
38940
38941      # First remove it from the list of overridden variables, so we can test
38942      # for unknown variables in the end.
38943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38944
38945      # Check if we try to supply an empty value
38946      if test "x$NM" = x; then
38947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38948$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38950$as_echo_n "checking for NM... " >&6; }
38951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38952$as_echo "disabled" >&6; }
38953      else
38954        # Check if the provided tool contains a complete path.
38955        tool_specified="$NM"
38956        tool_basename="${tool_specified##*/}"
38957        if test "x$tool_basename" = "x$tool_specified"; then
38958          # A command without a complete path is provided, search $PATH.
38959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38960$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38961          # Extract the first word of "$tool_basename", so it can be a program name with args.
38962set dummy $tool_basename; ac_word=$2
38963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38964$as_echo_n "checking for $ac_word... " >&6; }
38965if ${ac_cv_path_NM+:} false; then :
38966  $as_echo_n "(cached) " >&6
38967else
38968  case $NM in
38969  [\\/]* | ?:[\\/]*)
38970  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38971  ;;
38972  *)
38973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38974for as_dir in $PATH
38975do
38976  IFS=$as_save_IFS
38977  test -z "$as_dir" && as_dir=.
38978    for ac_exec_ext in '' $ac_executable_extensions; do
38979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38980    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38982    break 2
38983  fi
38984done
38985  done
38986IFS=$as_save_IFS
38987
38988  ;;
38989esac
38990fi
38991NM=$ac_cv_path_NM
38992if test -n "$NM"; then
38993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38994$as_echo "$NM" >&6; }
38995else
38996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38997$as_echo "no" >&6; }
38998fi
38999
39000
39001          if test "x$NM" = x; then
39002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39003          fi
39004        else
39005          # Otherwise we believe it is a complete path. Use it as it is.
39006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39007$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39009$as_echo_n "checking for NM... " >&6; }
39010          if test ! -x "$tool_specified"; then
39011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39012$as_echo "not found" >&6; }
39013            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39014          fi
39015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39016$as_echo "$tool_specified" >&6; }
39017        fi
39018      fi
39019    fi
39020
39021  fi
39022
39023
39024
39025  # Only process if variable expands to non-empty
39026
39027  if test "x$NM" != x; then
39028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39029
39030  # First separate the path from the arguments. This will split at the first
39031  # space.
39032  complete="$NM"
39033  path="${complete%% *}"
39034  tmp="$complete EOL"
39035  arguments="${tmp#* }"
39036
39037  # Input might be given as Windows format, start by converting to
39038  # unix format.
39039  new_path=`$CYGPATH -u "$path"`
39040
39041  # Now try to locate executable using which
39042  new_path=`$WHICH "$new_path" 2> /dev/null`
39043  # bat and cmd files are not always considered executable in cygwin causing which
39044  # to not find them
39045  if test "x$new_path" = x \
39046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39048    new_path=`$CYGPATH -u "$path"`
39049  fi
39050  if test "x$new_path" = x; then
39051    # Oops. Which didn't find the executable.
39052    # The splitting of arguments from the executable at a space might have been incorrect,
39053    # since paths with space are more likely in Windows. Give it another try with the whole
39054    # argument.
39055    path="$complete"
39056    arguments="EOL"
39057    new_path=`$CYGPATH -u "$path"`
39058    new_path=`$WHICH "$new_path" 2> /dev/null`
39059    # bat and cmd files are not always considered executable in cygwin causing which
39060    # to not find them
39061    if test "x$new_path" = x \
39062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39064      new_path=`$CYGPATH -u "$path"`
39065    fi
39066    if test "x$new_path" = x; then
39067      # It's still not found. Now this is an unrecoverable error.
39068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39069$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39070      has_space=`$ECHO "$complete" | $GREP " "`
39071      if test "x$has_space" != x; then
39072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39074      fi
39075      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39076    fi
39077  fi
39078
39079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39082  # "foo.exe" is OK but "foo" is an error.
39083  #
39084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39085  # It is also a way to make sure we got the proper file name for the real test later on.
39086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39087  if test "x$test_shortpath" = x; then
39088    # Short path failed, file does not exist as specified.
39089    # Try adding .exe or .cmd
39090    if test -f "${new_path}.exe"; then
39091      input_to_shortpath="${new_path}.exe"
39092    elif test -f "${new_path}.cmd"; then
39093      input_to_shortpath="${new_path}.cmd"
39094    else
39095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39096$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39099      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39100    fi
39101  else
39102    input_to_shortpath="$new_path"
39103  fi
39104
39105  # Call helper function which possibly converts this using DOS-style short mode.
39106  # If so, the updated path is stored in $new_path.
39107  new_path="$input_to_shortpath"
39108
39109  input_path="$input_to_shortpath"
39110  # Check if we need to convert this using DOS-style short mode. If the path
39111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39112  # take no chances and rewrite it.
39113  # Note: m4 eats our [], so we need to use [ and ] instead.
39114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39115  if test "x$has_forbidden_chars" != x; then
39116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39120      # Going to short mode and back again did indeed matter. Since short mode is
39121      # case insensitive, let's make it lowercase to improve readability.
39122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39123      # Now convert it back to Unix-style (cygpath)
39124      input_path=`$CYGPATH -u "$shortmode_path"`
39125      new_path="$input_path"
39126    fi
39127  fi
39128
39129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39130  if test "x$test_cygdrive_prefix" = x; then
39131    # As a simple fix, exclude /usr/bin since it's not a real path.
39132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39134      # a path prefixed by /cygdrive for fixpath to work.
39135      new_path="$CYGWIN_ROOT_PATH$input_path"
39136    fi
39137  fi
39138
39139  # remove trailing .exe if any
39140  new_path="${new_path/%.exe/}"
39141
39142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39143
39144  # First separate the path from the arguments. This will split at the first
39145  # space.
39146  complete="$NM"
39147  path="${complete%% *}"
39148  tmp="$complete EOL"
39149  arguments="${tmp#* }"
39150
39151  # Input might be given as Windows format, start by converting to
39152  # unix format.
39153  new_path="$path"
39154
39155  windows_path="$new_path"
39156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39157    unix_path=`$CYGPATH -u "$windows_path"`
39158    new_path="$unix_path"
39159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39161    new_path="$unix_path"
39162  fi
39163
39164
39165  # Now try to locate executable using which
39166  new_path=`$WHICH "$new_path" 2> /dev/null`
39167
39168  if test "x$new_path" = x; then
39169    # Oops. Which didn't find the executable.
39170    # The splitting of arguments from the executable at a space might have been incorrect,
39171    # since paths with space are more likely in Windows. Give it another try with the whole
39172    # argument.
39173    path="$complete"
39174    arguments="EOL"
39175    new_path="$path"
39176
39177  windows_path="$new_path"
39178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39179    unix_path=`$CYGPATH -u "$windows_path"`
39180    new_path="$unix_path"
39181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39183    new_path="$unix_path"
39184  fi
39185
39186
39187    new_path=`$WHICH "$new_path" 2> /dev/null`
39188    # bat and cmd files are not always considered executable in MSYS causing which
39189    # to not find them
39190    if test "x$new_path" = x \
39191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39193      new_path="$path"
39194
39195  windows_path="$new_path"
39196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39197    unix_path=`$CYGPATH -u "$windows_path"`
39198    new_path="$unix_path"
39199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39201    new_path="$unix_path"
39202  fi
39203
39204    fi
39205
39206    if test "x$new_path" = x; then
39207      # It's still not found. Now this is an unrecoverable error.
39208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39209$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39210      has_space=`$ECHO "$complete" | $GREP " "`
39211      if test "x$has_space" != x; then
39212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39214      fi
39215      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39216    fi
39217  fi
39218
39219  # Now new_path has a complete unix path to the binary
39220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39221    # Keep paths in /bin as-is, but remove trailing .exe if any
39222    new_path="${new_path/%.exe/}"
39223    # Do not save /bin paths to all_fixpath_prefixes!
39224  else
39225    # Not in mixed or Windows style, start by that.
39226    new_path=`cmd //c echo $new_path`
39227
39228  input_path="$new_path"
39229  # Check if we need to convert this using DOS-style short mode. If the path
39230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39231  # take no chances and rewrite it.
39232  # Note: m4 eats our [], so we need to use [ and ] instead.
39233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39234  if test "x$has_forbidden_chars" != x; then
39235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39237  fi
39238
39239    # Output is in $new_path
39240
39241  windows_path="$new_path"
39242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39243    unix_path=`$CYGPATH -u "$windows_path"`
39244    new_path="$unix_path"
39245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39247    new_path="$unix_path"
39248  fi
39249
39250    # remove trailing .exe if any
39251    new_path="${new_path/%.exe/}"
39252
39253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39255  fi
39256
39257    else
39258      # We're on a unix platform. Hooray! :)
39259      # First separate the path from the arguments. This will split at the first
39260      # space.
39261      complete="$NM"
39262      path="${complete%% *}"
39263      tmp="$complete EOL"
39264      arguments="${tmp#* }"
39265
39266      # Cannot rely on the command "which" here since it doesn't always work.
39267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39268      if test -z "$is_absolute_path"; then
39269        # Path to executable is not absolute. Find it.
39270        IFS_save="$IFS"
39271        IFS=:
39272        for p in $PATH; do
39273          if test -f "$p/$path" && test -x "$p/$path"; then
39274            new_path="$p/$path"
39275            break
39276          fi
39277        done
39278        IFS="$IFS_save"
39279      else
39280        # This is an absolute path, we can use it without further modifications.
39281        new_path="$path"
39282      fi
39283
39284      if test "x$new_path" = x; then
39285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39286$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39287        has_space=`$ECHO "$complete" | $GREP " "`
39288        if test "x$has_space" != x; then
39289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39291        fi
39292        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39293      fi
39294    fi
39295
39296    # Now join together the path and the arguments once again
39297    if test "x$arguments" != xEOL; then
39298      new_complete="$new_path ${arguments% *}"
39299    else
39300      new_complete="$new_path"
39301    fi
39302
39303    if test "x$complete" != "x$new_complete"; then
39304      NM="$new_complete"
39305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39306$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39307    fi
39308  fi
39309
39310
39311
39312  # Publish this variable in the help.
39313
39314
39315  if [ -z "${GNM+x}" ]; then
39316    # The variable is not set by user, try to locate tool using the code snippet
39317    for ac_prog in gnm
39318do
39319  # Extract the first word of "$ac_prog", so it can be a program name with args.
39320set dummy $ac_prog; ac_word=$2
39321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39322$as_echo_n "checking for $ac_word... " >&6; }
39323if ${ac_cv_path_GNM+:} false; then :
39324  $as_echo_n "(cached) " >&6
39325else
39326  case $GNM in
39327  [\\/]* | ?:[\\/]*)
39328  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39329  ;;
39330  *)
39331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39332for as_dir in $PATH
39333do
39334  IFS=$as_save_IFS
39335  test -z "$as_dir" && as_dir=.
39336    for ac_exec_ext in '' $ac_executable_extensions; do
39337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39338    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39340    break 2
39341  fi
39342done
39343  done
39344IFS=$as_save_IFS
39345
39346  ;;
39347esac
39348fi
39349GNM=$ac_cv_path_GNM
39350if test -n "$GNM"; then
39351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39352$as_echo "$GNM" >&6; }
39353else
39354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39355$as_echo "no" >&6; }
39356fi
39357
39358
39359  test -n "$GNM" && break
39360done
39361
39362  else
39363    # The variable is set, but is it from the command line or the environment?
39364
39365    # Try to remove the string !GNM! from our list.
39366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39368      # If it failed, the variable was not from the command line. Ignore it,
39369      # but warn the user (except for BASH, which is always set by the calling BASH).
39370      if test "xGNM" != xBASH; then
39371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39372$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39373      fi
39374      # Try to locate tool using the code snippet
39375      for ac_prog in gnm
39376do
39377  # Extract the first word of "$ac_prog", so it can be a program name with args.
39378set dummy $ac_prog; ac_word=$2
39379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39380$as_echo_n "checking for $ac_word... " >&6; }
39381if ${ac_cv_path_GNM+:} false; then :
39382  $as_echo_n "(cached) " >&6
39383else
39384  case $GNM in
39385  [\\/]* | ?:[\\/]*)
39386  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39387  ;;
39388  *)
39389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39390for as_dir in $PATH
39391do
39392  IFS=$as_save_IFS
39393  test -z "$as_dir" && as_dir=.
39394    for ac_exec_ext in '' $ac_executable_extensions; do
39395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39396    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39398    break 2
39399  fi
39400done
39401  done
39402IFS=$as_save_IFS
39403
39404  ;;
39405esac
39406fi
39407GNM=$ac_cv_path_GNM
39408if test -n "$GNM"; then
39409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39410$as_echo "$GNM" >&6; }
39411else
39412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39413$as_echo "no" >&6; }
39414fi
39415
39416
39417  test -n "$GNM" && break
39418done
39419
39420    else
39421      # If it succeeded, then it was overridden by the user. We will use it
39422      # for the tool.
39423
39424      # First remove it from the list of overridden variables, so we can test
39425      # for unknown variables in the end.
39426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39427
39428      # Check if we try to supply an empty value
39429      if test "x$GNM" = x; then
39430        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39431$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39433$as_echo_n "checking for GNM... " >&6; }
39434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39435$as_echo "disabled" >&6; }
39436      else
39437        # Check if the provided tool contains a complete path.
39438        tool_specified="$GNM"
39439        tool_basename="${tool_specified##*/}"
39440        if test "x$tool_basename" = "x$tool_specified"; then
39441          # A command without a complete path is provided, search $PATH.
39442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39443$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39444          # Extract the first word of "$tool_basename", so it can be a program name with args.
39445set dummy $tool_basename; ac_word=$2
39446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39447$as_echo_n "checking for $ac_word... " >&6; }
39448if ${ac_cv_path_GNM+:} false; then :
39449  $as_echo_n "(cached) " >&6
39450else
39451  case $GNM in
39452  [\\/]* | ?:[\\/]*)
39453  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39454  ;;
39455  *)
39456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39457for as_dir in $PATH
39458do
39459  IFS=$as_save_IFS
39460  test -z "$as_dir" && as_dir=.
39461    for ac_exec_ext in '' $ac_executable_extensions; do
39462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39463    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39465    break 2
39466  fi
39467done
39468  done
39469IFS=$as_save_IFS
39470
39471  ;;
39472esac
39473fi
39474GNM=$ac_cv_path_GNM
39475if test -n "$GNM"; then
39476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39477$as_echo "$GNM" >&6; }
39478else
39479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39480$as_echo "no" >&6; }
39481fi
39482
39483
39484          if test "x$GNM" = x; then
39485            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39486          fi
39487        else
39488          # Otherwise we believe it is a complete path. Use it as it is.
39489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39490$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39491          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39492$as_echo_n "checking for GNM... " >&6; }
39493          if test ! -x "$tool_specified"; then
39494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39495$as_echo "not found" >&6; }
39496            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39497          fi
39498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39499$as_echo "$tool_specified" >&6; }
39500        fi
39501      fi
39502    fi
39503
39504  fi
39505
39506
39507
39508  # Only process if variable expands to non-empty
39509
39510  if test "x$GNM" != x; then
39511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39512
39513  # First separate the path from the arguments. This will split at the first
39514  # space.
39515  complete="$GNM"
39516  path="${complete%% *}"
39517  tmp="$complete EOL"
39518  arguments="${tmp#* }"
39519
39520  # Input might be given as Windows format, start by converting to
39521  # unix format.
39522  new_path=`$CYGPATH -u "$path"`
39523
39524  # Now try to locate executable using which
39525  new_path=`$WHICH "$new_path" 2> /dev/null`
39526  # bat and cmd files are not always considered executable in cygwin causing which
39527  # to not find them
39528  if test "x$new_path" = x \
39529      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39530      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39531    new_path=`$CYGPATH -u "$path"`
39532  fi
39533  if test "x$new_path" = x; then
39534    # Oops. Which didn't find the executable.
39535    # The splitting of arguments from the executable at a space might have been incorrect,
39536    # since paths with space are more likely in Windows. Give it another try with the whole
39537    # argument.
39538    path="$complete"
39539    arguments="EOL"
39540    new_path=`$CYGPATH -u "$path"`
39541    new_path=`$WHICH "$new_path" 2> /dev/null`
39542    # bat and cmd files are not always considered executable in cygwin causing which
39543    # to not find them
39544    if test "x$new_path" = x \
39545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39547      new_path=`$CYGPATH -u "$path"`
39548    fi
39549    if test "x$new_path" = x; then
39550      # It's still not found. Now this is an unrecoverable error.
39551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39552$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39553      has_space=`$ECHO "$complete" | $GREP " "`
39554      if test "x$has_space" != x; then
39555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39557      fi
39558      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39559    fi
39560  fi
39561
39562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39565  # "foo.exe" is OK but "foo" is an error.
39566  #
39567  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39568  # It is also a way to make sure we got the proper file name for the real test later on.
39569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39570  if test "x$test_shortpath" = x; then
39571    # Short path failed, file does not exist as specified.
39572    # Try adding .exe or .cmd
39573    if test -f "${new_path}.exe"; then
39574      input_to_shortpath="${new_path}.exe"
39575    elif test -f "${new_path}.cmd"; then
39576      input_to_shortpath="${new_path}.cmd"
39577    else
39578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39579$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39580      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39581$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39582      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39583    fi
39584  else
39585    input_to_shortpath="$new_path"
39586  fi
39587
39588  # Call helper function which possibly converts this using DOS-style short mode.
39589  # If so, the updated path is stored in $new_path.
39590  new_path="$input_to_shortpath"
39591
39592  input_path="$input_to_shortpath"
39593  # Check if we need to convert this using DOS-style short mode. If the path
39594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39595  # take no chances and rewrite it.
39596  # Note: m4 eats our [], so we need to use [ and ] instead.
39597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39598  if test "x$has_forbidden_chars" != x; then
39599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39603      # Going to short mode and back again did indeed matter. Since short mode is
39604      # case insensitive, let's make it lowercase to improve readability.
39605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39606      # Now convert it back to Unix-style (cygpath)
39607      input_path=`$CYGPATH -u "$shortmode_path"`
39608      new_path="$input_path"
39609    fi
39610  fi
39611
39612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39613  if test "x$test_cygdrive_prefix" = x; then
39614    # As a simple fix, exclude /usr/bin since it's not a real path.
39615    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39617      # a path prefixed by /cygdrive for fixpath to work.
39618      new_path="$CYGWIN_ROOT_PATH$input_path"
39619    fi
39620  fi
39621
39622  # remove trailing .exe if any
39623  new_path="${new_path/%.exe/}"
39624
39625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39626
39627  # First separate the path from the arguments. This will split at the first
39628  # space.
39629  complete="$GNM"
39630  path="${complete%% *}"
39631  tmp="$complete EOL"
39632  arguments="${tmp#* }"
39633
39634  # Input might be given as Windows format, start by converting to
39635  # unix format.
39636  new_path="$path"
39637
39638  windows_path="$new_path"
39639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39640    unix_path=`$CYGPATH -u "$windows_path"`
39641    new_path="$unix_path"
39642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39644    new_path="$unix_path"
39645  fi
39646
39647
39648  # Now try to locate executable using which
39649  new_path=`$WHICH "$new_path" 2> /dev/null`
39650
39651  if test "x$new_path" = x; then
39652    # Oops. Which didn't find the executable.
39653    # The splitting of arguments from the executable at a space might have been incorrect,
39654    # since paths with space are more likely in Windows. Give it another try with the whole
39655    # argument.
39656    path="$complete"
39657    arguments="EOL"
39658    new_path="$path"
39659
39660  windows_path="$new_path"
39661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39662    unix_path=`$CYGPATH -u "$windows_path"`
39663    new_path="$unix_path"
39664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39666    new_path="$unix_path"
39667  fi
39668
39669
39670    new_path=`$WHICH "$new_path" 2> /dev/null`
39671    # bat and cmd files are not always considered executable in MSYS causing which
39672    # to not find them
39673    if test "x$new_path" = x \
39674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39676      new_path="$path"
39677
39678  windows_path="$new_path"
39679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39680    unix_path=`$CYGPATH -u "$windows_path"`
39681    new_path="$unix_path"
39682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39684    new_path="$unix_path"
39685  fi
39686
39687    fi
39688
39689    if test "x$new_path" = x; then
39690      # It's still not found. Now this is an unrecoverable error.
39691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39692$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39693      has_space=`$ECHO "$complete" | $GREP " "`
39694      if test "x$has_space" != x; then
39695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39697      fi
39698      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39699    fi
39700  fi
39701
39702  # Now new_path has a complete unix path to the binary
39703  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39704    # Keep paths in /bin as-is, but remove trailing .exe if any
39705    new_path="${new_path/%.exe/}"
39706    # Do not save /bin paths to all_fixpath_prefixes!
39707  else
39708    # Not in mixed or Windows style, start by that.
39709    new_path=`cmd //c echo $new_path`
39710
39711  input_path="$new_path"
39712  # Check if we need to convert this using DOS-style short mode. If the path
39713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39714  # take no chances and rewrite it.
39715  # Note: m4 eats our [], so we need to use [ and ] instead.
39716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39717  if test "x$has_forbidden_chars" != x; then
39718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39720  fi
39721
39722    # Output is in $new_path
39723
39724  windows_path="$new_path"
39725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39726    unix_path=`$CYGPATH -u "$windows_path"`
39727    new_path="$unix_path"
39728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39730    new_path="$unix_path"
39731  fi
39732
39733    # remove trailing .exe if any
39734    new_path="${new_path/%.exe/}"
39735
39736    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39737    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39738  fi
39739
39740    else
39741      # We're on a unix platform. Hooray! :)
39742      # First separate the path from the arguments. This will split at the first
39743      # space.
39744      complete="$GNM"
39745      path="${complete%% *}"
39746      tmp="$complete EOL"
39747      arguments="${tmp#* }"
39748
39749      # Cannot rely on the command "which" here since it doesn't always work.
39750      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39751      if test -z "$is_absolute_path"; then
39752        # Path to executable is not absolute. Find it.
39753        IFS_save="$IFS"
39754        IFS=:
39755        for p in $PATH; do
39756          if test -f "$p/$path" && test -x "$p/$path"; then
39757            new_path="$p/$path"
39758            break
39759          fi
39760        done
39761        IFS="$IFS_save"
39762      else
39763        # This is an absolute path, we can use it without further modifications.
39764        new_path="$path"
39765      fi
39766
39767      if test "x$new_path" = x; then
39768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39769$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39770        has_space=`$ECHO "$complete" | $GREP " "`
39771        if test "x$has_space" != x; then
39772          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39774        fi
39775        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39776      fi
39777    fi
39778
39779    # Now join together the path and the arguments once again
39780    if test "x$arguments" != xEOL; then
39781      new_complete="$new_path ${arguments% *}"
39782    else
39783      new_complete="$new_path"
39784    fi
39785
39786    if test "x$complete" != "x$new_complete"; then
39787      GNM="$new_complete"
39788      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39789$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39790    fi
39791  fi
39792
39793  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39794    # FIXME: we should unify this with the solaris case above.
39795
39796
39797  # Publish this variable in the help.
39798
39799
39800  if [ -z "${STRIP+x}" ]; then
39801    # The variable is not set by user, try to locate tool using the code snippet
39802    if test -n "$ac_tool_prefix"; then
39803  for ac_prog in strip
39804  do
39805    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39806set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39808$as_echo_n "checking for $ac_word... " >&6; }
39809if ${ac_cv_prog_STRIP+:} false; then :
39810  $as_echo_n "(cached) " >&6
39811else
39812  if test -n "$STRIP"; then
39813  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39814else
39815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39816for as_dir in $PATH
39817do
39818  IFS=$as_save_IFS
39819  test -z "$as_dir" && as_dir=.
39820    for ac_exec_ext in '' $ac_executable_extensions; do
39821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39822    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39824    break 2
39825  fi
39826done
39827  done
39828IFS=$as_save_IFS
39829
39830fi
39831fi
39832STRIP=$ac_cv_prog_STRIP
39833if test -n "$STRIP"; then
39834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39835$as_echo "$STRIP" >&6; }
39836else
39837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39838$as_echo "no" >&6; }
39839fi
39840
39841
39842    test -n "$STRIP" && break
39843  done
39844fi
39845if test -z "$STRIP"; then
39846  ac_ct_STRIP=$STRIP
39847  for ac_prog in strip
39848do
39849  # Extract the first word of "$ac_prog", so it can be a program name with args.
39850set dummy $ac_prog; ac_word=$2
39851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39852$as_echo_n "checking for $ac_word... " >&6; }
39853if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39854  $as_echo_n "(cached) " >&6
39855else
39856  if test -n "$ac_ct_STRIP"; then
39857  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39858else
39859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39860for as_dir in $PATH
39861do
39862  IFS=$as_save_IFS
39863  test -z "$as_dir" && as_dir=.
39864    for ac_exec_ext in '' $ac_executable_extensions; do
39865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39866    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39868    break 2
39869  fi
39870done
39871  done
39872IFS=$as_save_IFS
39873
39874fi
39875fi
39876ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39877if test -n "$ac_ct_STRIP"; then
39878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39879$as_echo "$ac_ct_STRIP" >&6; }
39880else
39881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39882$as_echo "no" >&6; }
39883fi
39884
39885
39886  test -n "$ac_ct_STRIP" && break
39887done
39888
39889  if test "x$ac_ct_STRIP" = x; then
39890    STRIP=""
39891  else
39892    case $cross_compiling:$ac_tool_warned in
39893yes:)
39894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39896ac_tool_warned=yes ;;
39897esac
39898    STRIP=$ac_ct_STRIP
39899  fi
39900fi
39901
39902  else
39903    # The variable is set, but is it from the command line or the environment?
39904
39905    # Try to remove the string !STRIP! from our list.
39906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39908      # If it failed, the variable was not from the command line. Ignore it,
39909      # but warn the user (except for BASH, which is always set by the calling BASH).
39910      if test "xSTRIP" != xBASH; then
39911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39912$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39913      fi
39914      # Try to locate tool using the code snippet
39915      if test -n "$ac_tool_prefix"; then
39916  for ac_prog in strip
39917  do
39918    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39921$as_echo_n "checking for $ac_word... " >&6; }
39922if ${ac_cv_prog_STRIP+:} false; then :
39923  $as_echo_n "(cached) " >&6
39924else
39925  if test -n "$STRIP"; then
39926  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39927else
39928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39929for as_dir in $PATH
39930do
39931  IFS=$as_save_IFS
39932  test -z "$as_dir" && as_dir=.
39933    for ac_exec_ext in '' $ac_executable_extensions; do
39934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39935    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39937    break 2
39938  fi
39939done
39940  done
39941IFS=$as_save_IFS
39942
39943fi
39944fi
39945STRIP=$ac_cv_prog_STRIP
39946if test -n "$STRIP"; then
39947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39948$as_echo "$STRIP" >&6; }
39949else
39950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39951$as_echo "no" >&6; }
39952fi
39953
39954
39955    test -n "$STRIP" && break
39956  done
39957fi
39958if test -z "$STRIP"; then
39959  ac_ct_STRIP=$STRIP
39960  for ac_prog in strip
39961do
39962  # Extract the first word of "$ac_prog", so it can be a program name with args.
39963set dummy $ac_prog; ac_word=$2
39964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39965$as_echo_n "checking for $ac_word... " >&6; }
39966if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39967  $as_echo_n "(cached) " >&6
39968else
39969  if test -n "$ac_ct_STRIP"; then
39970  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39971else
39972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39973for as_dir in $PATH
39974do
39975  IFS=$as_save_IFS
39976  test -z "$as_dir" && as_dir=.
39977    for ac_exec_ext in '' $ac_executable_extensions; do
39978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39979    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39981    break 2
39982  fi
39983done
39984  done
39985IFS=$as_save_IFS
39986
39987fi
39988fi
39989ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39990if test -n "$ac_ct_STRIP"; then
39991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39992$as_echo "$ac_ct_STRIP" >&6; }
39993else
39994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39995$as_echo "no" >&6; }
39996fi
39997
39998
39999  test -n "$ac_ct_STRIP" && break
40000done
40001
40002  if test "x$ac_ct_STRIP" = x; then
40003    STRIP=""
40004  else
40005    case $cross_compiling:$ac_tool_warned in
40006yes:)
40007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40009ac_tool_warned=yes ;;
40010esac
40011    STRIP=$ac_ct_STRIP
40012  fi
40013fi
40014
40015    else
40016      # If it succeeded, then it was overridden by the user. We will use it
40017      # for the tool.
40018
40019      # First remove it from the list of overridden variables, so we can test
40020      # for unknown variables in the end.
40021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40022
40023      # Check if we try to supply an empty value
40024      if test "x$STRIP" = x; then
40025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40026$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40028$as_echo_n "checking for STRIP... " >&6; }
40029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40030$as_echo "disabled" >&6; }
40031      else
40032        # Check if the provided tool contains a complete path.
40033        tool_specified="$STRIP"
40034        tool_basename="${tool_specified##*/}"
40035        if test "x$tool_basename" = "x$tool_specified"; then
40036          # A command without a complete path is provided, search $PATH.
40037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40038$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40039          # Extract the first word of "$tool_basename", so it can be a program name with args.
40040set dummy $tool_basename; ac_word=$2
40041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40042$as_echo_n "checking for $ac_word... " >&6; }
40043if ${ac_cv_path_STRIP+:} false; then :
40044  $as_echo_n "(cached) " >&6
40045else
40046  case $STRIP in
40047  [\\/]* | ?:[\\/]*)
40048  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40049  ;;
40050  *)
40051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40052for as_dir in $PATH
40053do
40054  IFS=$as_save_IFS
40055  test -z "$as_dir" && as_dir=.
40056    for ac_exec_ext in '' $ac_executable_extensions; do
40057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40058    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40060    break 2
40061  fi
40062done
40063  done
40064IFS=$as_save_IFS
40065
40066  ;;
40067esac
40068fi
40069STRIP=$ac_cv_path_STRIP
40070if test -n "$STRIP"; then
40071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40072$as_echo "$STRIP" >&6; }
40073else
40074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40075$as_echo "no" >&6; }
40076fi
40077
40078
40079          if test "x$STRIP" = x; then
40080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40081          fi
40082        else
40083          # Otherwise we believe it is a complete path. Use it as it is.
40084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40085$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40087$as_echo_n "checking for STRIP... " >&6; }
40088          if test ! -x "$tool_specified"; then
40089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40090$as_echo "not found" >&6; }
40091            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40092          fi
40093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40094$as_echo "$tool_specified" >&6; }
40095        fi
40096      fi
40097    fi
40098
40099  fi
40100
40101
40102
40103  # Only process if variable expands to non-empty
40104
40105  if test "x$STRIP" != x; then
40106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107
40108  # First separate the path from the arguments. This will split at the first
40109  # space.
40110  complete="$STRIP"
40111  path="${complete%% *}"
40112  tmp="$complete EOL"
40113  arguments="${tmp#* }"
40114
40115  # Input might be given as Windows format, start by converting to
40116  # unix format.
40117  new_path=`$CYGPATH -u "$path"`
40118
40119  # Now try to locate executable using which
40120  new_path=`$WHICH "$new_path" 2> /dev/null`
40121  # bat and cmd files are not always considered executable in cygwin causing which
40122  # to not find them
40123  if test "x$new_path" = x \
40124      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40125      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40126    new_path=`$CYGPATH -u "$path"`
40127  fi
40128  if test "x$new_path" = x; then
40129    # Oops. Which didn't find the executable.
40130    # The splitting of arguments from the executable at a space might have been incorrect,
40131    # since paths with space are more likely in Windows. Give it another try with the whole
40132    # argument.
40133    path="$complete"
40134    arguments="EOL"
40135    new_path=`$CYGPATH -u "$path"`
40136    new_path=`$WHICH "$new_path" 2> /dev/null`
40137    # bat and cmd files are not always considered executable in cygwin causing which
40138    # to not find them
40139    if test "x$new_path" = x \
40140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40142      new_path=`$CYGPATH -u "$path"`
40143    fi
40144    if test "x$new_path" = x; then
40145      # It's still not found. Now this is an unrecoverable error.
40146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40147$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40148      has_space=`$ECHO "$complete" | $GREP " "`
40149      if test "x$has_space" != x; then
40150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40152      fi
40153      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40154    fi
40155  fi
40156
40157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40160  # "foo.exe" is OK but "foo" is an error.
40161  #
40162  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40163  # It is also a way to make sure we got the proper file name for the real test later on.
40164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40165  if test "x$test_shortpath" = x; then
40166    # Short path failed, file does not exist as specified.
40167    # Try adding .exe or .cmd
40168    if test -f "${new_path}.exe"; then
40169      input_to_shortpath="${new_path}.exe"
40170    elif test -f "${new_path}.cmd"; then
40171      input_to_shortpath="${new_path}.cmd"
40172    else
40173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40174$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40177      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40178    fi
40179  else
40180    input_to_shortpath="$new_path"
40181  fi
40182
40183  # Call helper function which possibly converts this using DOS-style short mode.
40184  # If so, the updated path is stored in $new_path.
40185  new_path="$input_to_shortpath"
40186
40187  input_path="$input_to_shortpath"
40188  # Check if we need to convert this using DOS-style short mode. If the path
40189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40190  # take no chances and rewrite it.
40191  # Note: m4 eats our [], so we need to use [ and ] instead.
40192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40193  if test "x$has_forbidden_chars" != x; then
40194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40198      # Going to short mode and back again did indeed matter. Since short mode is
40199      # case insensitive, let's make it lowercase to improve readability.
40200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40201      # Now convert it back to Unix-style (cygpath)
40202      input_path=`$CYGPATH -u "$shortmode_path"`
40203      new_path="$input_path"
40204    fi
40205  fi
40206
40207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40208  if test "x$test_cygdrive_prefix" = x; then
40209    # As a simple fix, exclude /usr/bin since it's not a real path.
40210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40212      # a path prefixed by /cygdrive for fixpath to work.
40213      new_path="$CYGWIN_ROOT_PATH$input_path"
40214    fi
40215  fi
40216
40217  # remove trailing .exe if any
40218  new_path="${new_path/%.exe/}"
40219
40220    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40221
40222  # First separate the path from the arguments. This will split at the first
40223  # space.
40224  complete="$STRIP"
40225  path="${complete%% *}"
40226  tmp="$complete EOL"
40227  arguments="${tmp#* }"
40228
40229  # Input might be given as Windows format, start by converting to
40230  # unix format.
40231  new_path="$path"
40232
40233  windows_path="$new_path"
40234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40235    unix_path=`$CYGPATH -u "$windows_path"`
40236    new_path="$unix_path"
40237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40239    new_path="$unix_path"
40240  fi
40241
40242
40243  # Now try to locate executable using which
40244  new_path=`$WHICH "$new_path" 2> /dev/null`
40245
40246  if test "x$new_path" = x; then
40247    # Oops. Which didn't find the executable.
40248    # The splitting of arguments from the executable at a space might have been incorrect,
40249    # since paths with space are more likely in Windows. Give it another try with the whole
40250    # argument.
40251    path="$complete"
40252    arguments="EOL"
40253    new_path="$path"
40254
40255  windows_path="$new_path"
40256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40257    unix_path=`$CYGPATH -u "$windows_path"`
40258    new_path="$unix_path"
40259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40261    new_path="$unix_path"
40262  fi
40263
40264
40265    new_path=`$WHICH "$new_path" 2> /dev/null`
40266    # bat and cmd files are not always considered executable in MSYS causing which
40267    # to not find them
40268    if test "x$new_path" = x \
40269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40271      new_path="$path"
40272
40273  windows_path="$new_path"
40274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40275    unix_path=`$CYGPATH -u "$windows_path"`
40276    new_path="$unix_path"
40277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40279    new_path="$unix_path"
40280  fi
40281
40282    fi
40283
40284    if test "x$new_path" = x; then
40285      # It's still not found. Now this is an unrecoverable error.
40286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40287$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40288      has_space=`$ECHO "$complete" | $GREP " "`
40289      if test "x$has_space" != x; then
40290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40292      fi
40293      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40294    fi
40295  fi
40296
40297  # Now new_path has a complete unix path to the binary
40298  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40299    # Keep paths in /bin as-is, but remove trailing .exe if any
40300    new_path="${new_path/%.exe/}"
40301    # Do not save /bin paths to all_fixpath_prefixes!
40302  else
40303    # Not in mixed or Windows style, start by that.
40304    new_path=`cmd //c echo $new_path`
40305
40306  input_path="$new_path"
40307  # Check if we need to convert this using DOS-style short mode. If the path
40308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40309  # take no chances and rewrite it.
40310  # Note: m4 eats our [], so we need to use [ and ] instead.
40311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40312  if test "x$has_forbidden_chars" != x; then
40313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40315  fi
40316
40317    # Output is in $new_path
40318
40319  windows_path="$new_path"
40320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40321    unix_path=`$CYGPATH -u "$windows_path"`
40322    new_path="$unix_path"
40323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40325    new_path="$unix_path"
40326  fi
40327
40328    # remove trailing .exe if any
40329    new_path="${new_path/%.exe/}"
40330
40331    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40332    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40333  fi
40334
40335    else
40336      # We're on a unix platform. Hooray! :)
40337      # First separate the path from the arguments. This will split at the first
40338      # space.
40339      complete="$STRIP"
40340      path="${complete%% *}"
40341      tmp="$complete EOL"
40342      arguments="${tmp#* }"
40343
40344      # Cannot rely on the command "which" here since it doesn't always work.
40345      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40346      if test -z "$is_absolute_path"; then
40347        # Path to executable is not absolute. Find it.
40348        IFS_save="$IFS"
40349        IFS=:
40350        for p in $PATH; do
40351          if test -f "$p/$path" && test -x "$p/$path"; then
40352            new_path="$p/$path"
40353            break
40354          fi
40355        done
40356        IFS="$IFS_save"
40357      else
40358        # This is an absolute path, we can use it without further modifications.
40359        new_path="$path"
40360      fi
40361
40362      if test "x$new_path" = x; then
40363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40364$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40365        has_space=`$ECHO "$complete" | $GREP " "`
40366        if test "x$has_space" != x; then
40367          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40368$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40369        fi
40370        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40371      fi
40372    fi
40373
40374    # Now join together the path and the arguments once again
40375    if test "x$arguments" != xEOL; then
40376      new_complete="$new_path ${arguments% *}"
40377    else
40378      new_complete="$new_path"
40379    fi
40380
40381    if test "x$complete" != "x$new_complete"; then
40382      STRIP="$new_complete"
40383      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40384$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40385    fi
40386  fi
40387
40388
40389
40390  # Publish this variable in the help.
40391
40392
40393  if [ -z "${NM+x}" ]; then
40394    # The variable is not set by user, try to locate tool using the code snippet
40395    if test -n "$ac_tool_prefix"; then
40396  for ac_prog in nm
40397  do
40398    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40399set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40401$as_echo_n "checking for $ac_word... " >&6; }
40402if ${ac_cv_prog_NM+:} false; then :
40403  $as_echo_n "(cached) " >&6
40404else
40405  if test -n "$NM"; then
40406  ac_cv_prog_NM="$NM" # Let the user override the test.
40407else
40408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40409for as_dir in $PATH
40410do
40411  IFS=$as_save_IFS
40412  test -z "$as_dir" && as_dir=.
40413    for ac_exec_ext in '' $ac_executable_extensions; do
40414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40415    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40417    break 2
40418  fi
40419done
40420  done
40421IFS=$as_save_IFS
40422
40423fi
40424fi
40425NM=$ac_cv_prog_NM
40426if test -n "$NM"; then
40427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40428$as_echo "$NM" >&6; }
40429else
40430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40431$as_echo "no" >&6; }
40432fi
40433
40434
40435    test -n "$NM" && break
40436  done
40437fi
40438if test -z "$NM"; then
40439  ac_ct_NM=$NM
40440  for ac_prog in nm
40441do
40442  # Extract the first word of "$ac_prog", so it can be a program name with args.
40443set dummy $ac_prog; ac_word=$2
40444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40445$as_echo_n "checking for $ac_word... " >&6; }
40446if ${ac_cv_prog_ac_ct_NM+:} false; then :
40447  $as_echo_n "(cached) " >&6
40448else
40449  if test -n "$ac_ct_NM"; then
40450  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40451else
40452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40453for as_dir in $PATH
40454do
40455  IFS=$as_save_IFS
40456  test -z "$as_dir" && as_dir=.
40457    for ac_exec_ext in '' $ac_executable_extensions; do
40458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40459    ac_cv_prog_ac_ct_NM="$ac_prog"
40460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40461    break 2
40462  fi
40463done
40464  done
40465IFS=$as_save_IFS
40466
40467fi
40468fi
40469ac_ct_NM=$ac_cv_prog_ac_ct_NM
40470if test -n "$ac_ct_NM"; then
40471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40472$as_echo "$ac_ct_NM" >&6; }
40473else
40474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40475$as_echo "no" >&6; }
40476fi
40477
40478
40479  test -n "$ac_ct_NM" && break
40480done
40481
40482  if test "x$ac_ct_NM" = x; then
40483    NM=""
40484  else
40485    case $cross_compiling:$ac_tool_warned in
40486yes:)
40487{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40488$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40489ac_tool_warned=yes ;;
40490esac
40491    NM=$ac_ct_NM
40492  fi
40493fi
40494
40495  else
40496    # The variable is set, but is it from the command line or the environment?
40497
40498    # Try to remove the string !NM! from our list.
40499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40501      # If it failed, the variable was not from the command line. Ignore it,
40502      # but warn the user (except for BASH, which is always set by the calling BASH).
40503      if test "xNM" != xBASH; then
40504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40505$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40506      fi
40507      # Try to locate tool using the code snippet
40508      if test -n "$ac_tool_prefix"; then
40509  for ac_prog in nm
40510  do
40511    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40512set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40514$as_echo_n "checking for $ac_word... " >&6; }
40515if ${ac_cv_prog_NM+:} false; then :
40516  $as_echo_n "(cached) " >&6
40517else
40518  if test -n "$NM"; then
40519  ac_cv_prog_NM="$NM" # Let the user override the test.
40520else
40521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40522for as_dir in $PATH
40523do
40524  IFS=$as_save_IFS
40525  test -z "$as_dir" && as_dir=.
40526    for ac_exec_ext in '' $ac_executable_extensions; do
40527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40528    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40530    break 2
40531  fi
40532done
40533  done
40534IFS=$as_save_IFS
40535
40536fi
40537fi
40538NM=$ac_cv_prog_NM
40539if test -n "$NM"; then
40540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40541$as_echo "$NM" >&6; }
40542else
40543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40544$as_echo "no" >&6; }
40545fi
40546
40547
40548    test -n "$NM" && break
40549  done
40550fi
40551if test -z "$NM"; then
40552  ac_ct_NM=$NM
40553  for ac_prog in nm
40554do
40555  # Extract the first word of "$ac_prog", so it can be a program name with args.
40556set dummy $ac_prog; ac_word=$2
40557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40558$as_echo_n "checking for $ac_word... " >&6; }
40559if ${ac_cv_prog_ac_ct_NM+:} false; then :
40560  $as_echo_n "(cached) " >&6
40561else
40562  if test -n "$ac_ct_NM"; then
40563  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40564else
40565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40566for as_dir in $PATH
40567do
40568  IFS=$as_save_IFS
40569  test -z "$as_dir" && as_dir=.
40570    for ac_exec_ext in '' $ac_executable_extensions; do
40571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40572    ac_cv_prog_ac_ct_NM="$ac_prog"
40573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40574    break 2
40575  fi
40576done
40577  done
40578IFS=$as_save_IFS
40579
40580fi
40581fi
40582ac_ct_NM=$ac_cv_prog_ac_ct_NM
40583if test -n "$ac_ct_NM"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40585$as_echo "$ac_ct_NM" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592  test -n "$ac_ct_NM" && break
40593done
40594
40595  if test "x$ac_ct_NM" = x; then
40596    NM=""
40597  else
40598    case $cross_compiling:$ac_tool_warned in
40599yes:)
40600{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40601$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40602ac_tool_warned=yes ;;
40603esac
40604    NM=$ac_ct_NM
40605  fi
40606fi
40607
40608    else
40609      # If it succeeded, then it was overridden by the user. We will use it
40610      # for the tool.
40611
40612      # First remove it from the list of overridden variables, so we can test
40613      # for unknown variables in the end.
40614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40615
40616      # Check if we try to supply an empty value
40617      if test "x$NM" = x; then
40618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40619$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40621$as_echo_n "checking for NM... " >&6; }
40622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40623$as_echo "disabled" >&6; }
40624      else
40625        # Check if the provided tool contains a complete path.
40626        tool_specified="$NM"
40627        tool_basename="${tool_specified##*/}"
40628        if test "x$tool_basename" = "x$tool_specified"; then
40629          # A command without a complete path is provided, search $PATH.
40630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40631$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40632          # Extract the first word of "$tool_basename", so it can be a program name with args.
40633set dummy $tool_basename; ac_word=$2
40634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40635$as_echo_n "checking for $ac_word... " >&6; }
40636if ${ac_cv_path_NM+:} false; then :
40637  $as_echo_n "(cached) " >&6
40638else
40639  case $NM in
40640  [\\/]* | ?:[\\/]*)
40641  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40642  ;;
40643  *)
40644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40645for as_dir in $PATH
40646do
40647  IFS=$as_save_IFS
40648  test -z "$as_dir" && as_dir=.
40649    for ac_exec_ext in '' $ac_executable_extensions; do
40650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40651    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40653    break 2
40654  fi
40655done
40656  done
40657IFS=$as_save_IFS
40658
40659  ;;
40660esac
40661fi
40662NM=$ac_cv_path_NM
40663if test -n "$NM"; then
40664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40665$as_echo "$NM" >&6; }
40666else
40667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40668$as_echo "no" >&6; }
40669fi
40670
40671
40672          if test "x$NM" = x; then
40673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40674          fi
40675        else
40676          # Otherwise we believe it is a complete path. Use it as it is.
40677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40678$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40680$as_echo_n "checking for NM... " >&6; }
40681          if test ! -x "$tool_specified"; then
40682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40683$as_echo "not found" >&6; }
40684            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40685          fi
40686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40687$as_echo "$tool_specified" >&6; }
40688        fi
40689      fi
40690    fi
40691
40692  fi
40693
40694
40695
40696  # Only process if variable expands to non-empty
40697
40698  if test "x$NM" != x; then
40699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40700
40701  # First separate the path from the arguments. This will split at the first
40702  # space.
40703  complete="$NM"
40704  path="${complete%% *}"
40705  tmp="$complete EOL"
40706  arguments="${tmp#* }"
40707
40708  # Input might be given as Windows format, start by converting to
40709  # unix format.
40710  new_path=`$CYGPATH -u "$path"`
40711
40712  # Now try to locate executable using which
40713  new_path=`$WHICH "$new_path" 2> /dev/null`
40714  # bat and cmd files are not always considered executable in cygwin causing which
40715  # to not find them
40716  if test "x$new_path" = x \
40717      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40718      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40719    new_path=`$CYGPATH -u "$path"`
40720  fi
40721  if test "x$new_path" = x; then
40722    # Oops. Which didn't find the executable.
40723    # The splitting of arguments from the executable at a space might have been incorrect,
40724    # since paths with space are more likely in Windows. Give it another try with the whole
40725    # argument.
40726    path="$complete"
40727    arguments="EOL"
40728    new_path=`$CYGPATH -u "$path"`
40729    new_path=`$WHICH "$new_path" 2> /dev/null`
40730    # bat and cmd files are not always considered executable in cygwin causing which
40731    # to not find them
40732    if test "x$new_path" = x \
40733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40735      new_path=`$CYGPATH -u "$path"`
40736    fi
40737    if test "x$new_path" = x; then
40738      # It's still not found. Now this is an unrecoverable error.
40739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40740$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40741      has_space=`$ECHO "$complete" | $GREP " "`
40742      if test "x$has_space" != x; then
40743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40745      fi
40746      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40747    fi
40748  fi
40749
40750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40753  # "foo.exe" is OK but "foo" is an error.
40754  #
40755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40756  # It is also a way to make sure we got the proper file name for the real test later on.
40757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40758  if test "x$test_shortpath" = x; then
40759    # Short path failed, file does not exist as specified.
40760    # Try adding .exe or .cmd
40761    if test -f "${new_path}.exe"; then
40762      input_to_shortpath="${new_path}.exe"
40763    elif test -f "${new_path}.cmd"; then
40764      input_to_shortpath="${new_path}.cmd"
40765    else
40766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40767$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40770      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40771    fi
40772  else
40773    input_to_shortpath="$new_path"
40774  fi
40775
40776  # Call helper function which possibly converts this using DOS-style short mode.
40777  # If so, the updated path is stored in $new_path.
40778  new_path="$input_to_shortpath"
40779
40780  input_path="$input_to_shortpath"
40781  # Check if we need to convert this using DOS-style short mode. If the path
40782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40783  # take no chances and rewrite it.
40784  # Note: m4 eats our [], so we need to use [ and ] instead.
40785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40786  if test "x$has_forbidden_chars" != x; then
40787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40791      # Going to short mode and back again did indeed matter. Since short mode is
40792      # case insensitive, let's make it lowercase to improve readability.
40793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40794      # Now convert it back to Unix-style (cygpath)
40795      input_path=`$CYGPATH -u "$shortmode_path"`
40796      new_path="$input_path"
40797    fi
40798  fi
40799
40800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40801  if test "x$test_cygdrive_prefix" = x; then
40802    # As a simple fix, exclude /usr/bin since it's not a real path.
40803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40805      # a path prefixed by /cygdrive for fixpath to work.
40806      new_path="$CYGWIN_ROOT_PATH$input_path"
40807    fi
40808  fi
40809
40810  # remove trailing .exe if any
40811  new_path="${new_path/%.exe/}"
40812
40813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40814
40815  # First separate the path from the arguments. This will split at the first
40816  # space.
40817  complete="$NM"
40818  path="${complete%% *}"
40819  tmp="$complete EOL"
40820  arguments="${tmp#* }"
40821
40822  # Input might be given as Windows format, start by converting to
40823  # unix format.
40824  new_path="$path"
40825
40826  windows_path="$new_path"
40827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40828    unix_path=`$CYGPATH -u "$windows_path"`
40829    new_path="$unix_path"
40830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40832    new_path="$unix_path"
40833  fi
40834
40835
40836  # Now try to locate executable using which
40837  new_path=`$WHICH "$new_path" 2> /dev/null`
40838
40839  if test "x$new_path" = x; then
40840    # Oops. Which didn't find the executable.
40841    # The splitting of arguments from the executable at a space might have been incorrect,
40842    # since paths with space are more likely in Windows. Give it another try with the whole
40843    # argument.
40844    path="$complete"
40845    arguments="EOL"
40846    new_path="$path"
40847
40848  windows_path="$new_path"
40849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850    unix_path=`$CYGPATH -u "$windows_path"`
40851    new_path="$unix_path"
40852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40854    new_path="$unix_path"
40855  fi
40856
40857
40858    new_path=`$WHICH "$new_path" 2> /dev/null`
40859    # bat and cmd files are not always considered executable in MSYS causing which
40860    # to not find them
40861    if test "x$new_path" = x \
40862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40864      new_path="$path"
40865
40866  windows_path="$new_path"
40867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40868    unix_path=`$CYGPATH -u "$windows_path"`
40869    new_path="$unix_path"
40870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40872    new_path="$unix_path"
40873  fi
40874
40875    fi
40876
40877    if test "x$new_path" = x; then
40878      # It's still not found. Now this is an unrecoverable error.
40879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40880$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40881      has_space=`$ECHO "$complete" | $GREP " "`
40882      if test "x$has_space" != x; then
40883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40885      fi
40886      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40887    fi
40888  fi
40889
40890  # Now new_path has a complete unix path to the binary
40891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40892    # Keep paths in /bin as-is, but remove trailing .exe if any
40893    new_path="${new_path/%.exe/}"
40894    # Do not save /bin paths to all_fixpath_prefixes!
40895  else
40896    # Not in mixed or Windows style, start by that.
40897    new_path=`cmd //c echo $new_path`
40898
40899  input_path="$new_path"
40900  # Check if we need to convert this using DOS-style short mode. If the path
40901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40902  # take no chances and rewrite it.
40903  # Note: m4 eats our [], so we need to use [ and ] instead.
40904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40905  if test "x$has_forbidden_chars" != x; then
40906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40908  fi
40909
40910    # Output is in $new_path
40911
40912  windows_path="$new_path"
40913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40914    unix_path=`$CYGPATH -u "$windows_path"`
40915    new_path="$unix_path"
40916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40918    new_path="$unix_path"
40919  fi
40920
40921    # remove trailing .exe if any
40922    new_path="${new_path/%.exe/}"
40923
40924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40926  fi
40927
40928    else
40929      # We're on a unix platform. Hooray! :)
40930      # First separate the path from the arguments. This will split at the first
40931      # space.
40932      complete="$NM"
40933      path="${complete%% *}"
40934      tmp="$complete EOL"
40935      arguments="${tmp#* }"
40936
40937      # Cannot rely on the command "which" here since it doesn't always work.
40938      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40939      if test -z "$is_absolute_path"; then
40940        # Path to executable is not absolute. Find it.
40941        IFS_save="$IFS"
40942        IFS=:
40943        for p in $PATH; do
40944          if test -f "$p/$path" && test -x "$p/$path"; then
40945            new_path="$p/$path"
40946            break
40947          fi
40948        done
40949        IFS="$IFS_save"
40950      else
40951        # This is an absolute path, we can use it without further modifications.
40952        new_path="$path"
40953      fi
40954
40955      if test "x$new_path" = x; then
40956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40957$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40958        has_space=`$ECHO "$complete" | $GREP " "`
40959        if test "x$has_space" != x; then
40960          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40962        fi
40963        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40964      fi
40965    fi
40966
40967    # Now join together the path and the arguments once again
40968    if test "x$arguments" != xEOL; then
40969      new_complete="$new_path ${arguments% *}"
40970    else
40971      new_complete="$new_path"
40972    fi
40973
40974    if test "x$complete" != "x$new_complete"; then
40975      NM="$new_complete"
40976      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40977$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40978    fi
40979  fi
40980
40981    GNM="$NM"
40982
40983  fi
40984
40985  # objcopy is used for moving debug symbols to separate files when
40986  # full debug symbols are enabled.
40987  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40988
40989
40990  # Publish this variable in the help.
40991
40992
40993  if [ -z "${OBJCOPY+x}" ]; then
40994    # The variable is not set by user, try to locate tool using the code snippet
40995    if test -n "$ac_tool_prefix"; then
40996  for ac_prog in gobjcopy objcopy
40997  do
40998    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40999set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41001$as_echo_n "checking for $ac_word... " >&6; }
41002if ${ac_cv_prog_OBJCOPY+:} false; then :
41003  $as_echo_n "(cached) " >&6
41004else
41005  if test -n "$OBJCOPY"; then
41006  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41007else
41008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41009for as_dir in $PATH
41010do
41011  IFS=$as_save_IFS
41012  test -z "$as_dir" && as_dir=.
41013    for ac_exec_ext in '' $ac_executable_extensions; do
41014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41015    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41017    break 2
41018  fi
41019done
41020  done
41021IFS=$as_save_IFS
41022
41023fi
41024fi
41025OBJCOPY=$ac_cv_prog_OBJCOPY
41026if test -n "$OBJCOPY"; then
41027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41028$as_echo "$OBJCOPY" >&6; }
41029else
41030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41031$as_echo "no" >&6; }
41032fi
41033
41034
41035    test -n "$OBJCOPY" && break
41036  done
41037fi
41038if test -z "$OBJCOPY"; then
41039  ac_ct_OBJCOPY=$OBJCOPY
41040  for ac_prog in gobjcopy objcopy
41041do
41042  # Extract the first word of "$ac_prog", so it can be a program name with args.
41043set dummy $ac_prog; ac_word=$2
41044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41045$as_echo_n "checking for $ac_word... " >&6; }
41046if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41047  $as_echo_n "(cached) " >&6
41048else
41049  if test -n "$ac_ct_OBJCOPY"; then
41050  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41051else
41052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41053for as_dir in $PATH
41054do
41055  IFS=$as_save_IFS
41056  test -z "$as_dir" && as_dir=.
41057    for ac_exec_ext in '' $ac_executable_extensions; do
41058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41059    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41061    break 2
41062  fi
41063done
41064  done
41065IFS=$as_save_IFS
41066
41067fi
41068fi
41069ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41070if test -n "$ac_ct_OBJCOPY"; then
41071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41072$as_echo "$ac_ct_OBJCOPY" >&6; }
41073else
41074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41075$as_echo "no" >&6; }
41076fi
41077
41078
41079  test -n "$ac_ct_OBJCOPY" && break
41080done
41081
41082  if test "x$ac_ct_OBJCOPY" = x; then
41083    OBJCOPY=""
41084  else
41085    case $cross_compiling:$ac_tool_warned in
41086yes:)
41087{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41088$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41089ac_tool_warned=yes ;;
41090esac
41091    OBJCOPY=$ac_ct_OBJCOPY
41092  fi
41093fi
41094
41095  else
41096    # The variable is set, but is it from the command line or the environment?
41097
41098    # Try to remove the string !OBJCOPY! from our list.
41099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41101      # If it failed, the variable was not from the command line. Ignore it,
41102      # but warn the user (except for BASH, which is always set by the calling BASH).
41103      if test "xOBJCOPY" != xBASH; then
41104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41105$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41106      fi
41107      # Try to locate tool using the code snippet
41108      if test -n "$ac_tool_prefix"; then
41109  for ac_prog in gobjcopy objcopy
41110  do
41111    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41112set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41114$as_echo_n "checking for $ac_word... " >&6; }
41115if ${ac_cv_prog_OBJCOPY+:} false; then :
41116  $as_echo_n "(cached) " >&6
41117else
41118  if test -n "$OBJCOPY"; then
41119  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41120else
41121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41122for as_dir in $PATH
41123do
41124  IFS=$as_save_IFS
41125  test -z "$as_dir" && as_dir=.
41126    for ac_exec_ext in '' $ac_executable_extensions; do
41127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41128    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41130    break 2
41131  fi
41132done
41133  done
41134IFS=$as_save_IFS
41135
41136fi
41137fi
41138OBJCOPY=$ac_cv_prog_OBJCOPY
41139if test -n "$OBJCOPY"; then
41140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41141$as_echo "$OBJCOPY" >&6; }
41142else
41143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41144$as_echo "no" >&6; }
41145fi
41146
41147
41148    test -n "$OBJCOPY" && break
41149  done
41150fi
41151if test -z "$OBJCOPY"; then
41152  ac_ct_OBJCOPY=$OBJCOPY
41153  for ac_prog in gobjcopy objcopy
41154do
41155  # Extract the first word of "$ac_prog", so it can be a program name with args.
41156set dummy $ac_prog; ac_word=$2
41157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41158$as_echo_n "checking for $ac_word... " >&6; }
41159if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41160  $as_echo_n "(cached) " >&6
41161else
41162  if test -n "$ac_ct_OBJCOPY"; then
41163  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41164else
41165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41166for as_dir in $PATH
41167do
41168  IFS=$as_save_IFS
41169  test -z "$as_dir" && as_dir=.
41170    for ac_exec_ext in '' $ac_executable_extensions; do
41171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41172    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41174    break 2
41175  fi
41176done
41177  done
41178IFS=$as_save_IFS
41179
41180fi
41181fi
41182ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41183if test -n "$ac_ct_OBJCOPY"; then
41184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41185$as_echo "$ac_ct_OBJCOPY" >&6; }
41186else
41187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41188$as_echo "no" >&6; }
41189fi
41190
41191
41192  test -n "$ac_ct_OBJCOPY" && break
41193done
41194
41195  if test "x$ac_ct_OBJCOPY" = x; then
41196    OBJCOPY=""
41197  else
41198    case $cross_compiling:$ac_tool_warned in
41199yes:)
41200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41202ac_tool_warned=yes ;;
41203esac
41204    OBJCOPY=$ac_ct_OBJCOPY
41205  fi
41206fi
41207
41208    else
41209      # If it succeeded, then it was overridden by the user. We will use it
41210      # for the tool.
41211
41212      # First remove it from the list of overridden variables, so we can test
41213      # for unknown variables in the end.
41214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41215
41216      # Check if we try to supply an empty value
41217      if test "x$OBJCOPY" = x; then
41218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41219$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41221$as_echo_n "checking for OBJCOPY... " >&6; }
41222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41223$as_echo "disabled" >&6; }
41224      else
41225        # Check if the provided tool contains a complete path.
41226        tool_specified="$OBJCOPY"
41227        tool_basename="${tool_specified##*/}"
41228        if test "x$tool_basename" = "x$tool_specified"; then
41229          # A command without a complete path is provided, search $PATH.
41230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41231$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41232          # Extract the first word of "$tool_basename", so it can be a program name with args.
41233set dummy $tool_basename; ac_word=$2
41234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41235$as_echo_n "checking for $ac_word... " >&6; }
41236if ${ac_cv_path_OBJCOPY+:} false; then :
41237  $as_echo_n "(cached) " >&6
41238else
41239  case $OBJCOPY in
41240  [\\/]* | ?:[\\/]*)
41241  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41242  ;;
41243  *)
41244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41245for as_dir in $PATH
41246do
41247  IFS=$as_save_IFS
41248  test -z "$as_dir" && as_dir=.
41249    for ac_exec_ext in '' $ac_executable_extensions; do
41250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41251    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41253    break 2
41254  fi
41255done
41256  done
41257IFS=$as_save_IFS
41258
41259  ;;
41260esac
41261fi
41262OBJCOPY=$ac_cv_path_OBJCOPY
41263if test -n "$OBJCOPY"; then
41264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41265$as_echo "$OBJCOPY" >&6; }
41266else
41267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41268$as_echo "no" >&6; }
41269fi
41270
41271
41272          if test "x$OBJCOPY" = x; then
41273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41274          fi
41275        else
41276          # Otherwise we believe it is a complete path. Use it as it is.
41277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41278$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41280$as_echo_n "checking for OBJCOPY... " >&6; }
41281          if test ! -x "$tool_specified"; then
41282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41283$as_echo "not found" >&6; }
41284            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41285          fi
41286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41287$as_echo "$tool_specified" >&6; }
41288        fi
41289      fi
41290    fi
41291
41292  fi
41293
41294
41295    # Only call fixup if objcopy was found.
41296    if test -n "$OBJCOPY"; then
41297
41298  # Only process if variable expands to non-empty
41299
41300  if test "x$OBJCOPY" != x; then
41301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41302
41303  # First separate the path from the arguments. This will split at the first
41304  # space.
41305  complete="$OBJCOPY"
41306  path="${complete%% *}"
41307  tmp="$complete EOL"
41308  arguments="${tmp#* }"
41309
41310  # Input might be given as Windows format, start by converting to
41311  # unix format.
41312  new_path=`$CYGPATH -u "$path"`
41313
41314  # Now try to locate executable using which
41315  new_path=`$WHICH "$new_path" 2> /dev/null`
41316  # bat and cmd files are not always considered executable in cygwin causing which
41317  # to not find them
41318  if test "x$new_path" = x \
41319      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41320      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41321    new_path=`$CYGPATH -u "$path"`
41322  fi
41323  if test "x$new_path" = x; then
41324    # Oops. Which didn't find the executable.
41325    # The splitting of arguments from the executable at a space might have been incorrect,
41326    # since paths with space are more likely in Windows. Give it another try with the whole
41327    # argument.
41328    path="$complete"
41329    arguments="EOL"
41330    new_path=`$CYGPATH -u "$path"`
41331    new_path=`$WHICH "$new_path" 2> /dev/null`
41332    # bat and cmd files are not always considered executable in cygwin causing which
41333    # to not find them
41334    if test "x$new_path" = x \
41335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41337      new_path=`$CYGPATH -u "$path"`
41338    fi
41339    if test "x$new_path" = x; then
41340      # It's still not found. Now this is an unrecoverable error.
41341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41342$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41343      has_space=`$ECHO "$complete" | $GREP " "`
41344      if test "x$has_space" != x; then
41345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41347      fi
41348      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41349    fi
41350  fi
41351
41352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41355  # "foo.exe" is OK but "foo" is an error.
41356  #
41357  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41358  # It is also a way to make sure we got the proper file name for the real test later on.
41359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41360  if test "x$test_shortpath" = x; then
41361    # Short path failed, file does not exist as specified.
41362    # Try adding .exe or .cmd
41363    if test -f "${new_path}.exe"; then
41364      input_to_shortpath="${new_path}.exe"
41365    elif test -f "${new_path}.cmd"; then
41366      input_to_shortpath="${new_path}.cmd"
41367    else
41368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41369$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41370      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41371$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41372      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41373    fi
41374  else
41375    input_to_shortpath="$new_path"
41376  fi
41377
41378  # Call helper function which possibly converts this using DOS-style short mode.
41379  # If so, the updated path is stored in $new_path.
41380  new_path="$input_to_shortpath"
41381
41382  input_path="$input_to_shortpath"
41383  # Check if we need to convert this using DOS-style short mode. If the path
41384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41385  # take no chances and rewrite it.
41386  # Note: m4 eats our [], so we need to use [ and ] instead.
41387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41388  if test "x$has_forbidden_chars" != x; then
41389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41393      # Going to short mode and back again did indeed matter. Since short mode is
41394      # case insensitive, let's make it lowercase to improve readability.
41395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41396      # Now convert it back to Unix-style (cygpath)
41397      input_path=`$CYGPATH -u "$shortmode_path"`
41398      new_path="$input_path"
41399    fi
41400  fi
41401
41402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41403  if test "x$test_cygdrive_prefix" = x; then
41404    # As a simple fix, exclude /usr/bin since it's not a real path.
41405    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41407      # a path prefixed by /cygdrive for fixpath to work.
41408      new_path="$CYGWIN_ROOT_PATH$input_path"
41409    fi
41410  fi
41411
41412  # remove trailing .exe if any
41413  new_path="${new_path/%.exe/}"
41414
41415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41416
41417  # First separate the path from the arguments. This will split at the first
41418  # space.
41419  complete="$OBJCOPY"
41420  path="${complete%% *}"
41421  tmp="$complete EOL"
41422  arguments="${tmp#* }"
41423
41424  # Input might be given as Windows format, start by converting to
41425  # unix format.
41426  new_path="$path"
41427
41428  windows_path="$new_path"
41429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41430    unix_path=`$CYGPATH -u "$windows_path"`
41431    new_path="$unix_path"
41432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41434    new_path="$unix_path"
41435  fi
41436
41437
41438  # Now try to locate executable using which
41439  new_path=`$WHICH "$new_path" 2> /dev/null`
41440
41441  if test "x$new_path" = x; then
41442    # Oops. Which didn't find the executable.
41443    # The splitting of arguments from the executable at a space might have been incorrect,
41444    # since paths with space are more likely in Windows. Give it another try with the whole
41445    # argument.
41446    path="$complete"
41447    arguments="EOL"
41448    new_path="$path"
41449
41450  windows_path="$new_path"
41451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41452    unix_path=`$CYGPATH -u "$windows_path"`
41453    new_path="$unix_path"
41454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41456    new_path="$unix_path"
41457  fi
41458
41459
41460    new_path=`$WHICH "$new_path" 2> /dev/null`
41461    # bat and cmd files are not always considered executable in MSYS causing which
41462    # to not find them
41463    if test "x$new_path" = x \
41464        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41465        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41466      new_path="$path"
41467
41468  windows_path="$new_path"
41469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41470    unix_path=`$CYGPATH -u "$windows_path"`
41471    new_path="$unix_path"
41472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41474    new_path="$unix_path"
41475  fi
41476
41477    fi
41478
41479    if test "x$new_path" = x; then
41480      # It's still not found. Now this is an unrecoverable error.
41481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41482$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41483      has_space=`$ECHO "$complete" | $GREP " "`
41484      if test "x$has_space" != x; then
41485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41487      fi
41488      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41489    fi
41490  fi
41491
41492  # Now new_path has a complete unix path to the binary
41493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41494    # Keep paths in /bin as-is, but remove trailing .exe if any
41495    new_path="${new_path/%.exe/}"
41496    # Do not save /bin paths to all_fixpath_prefixes!
41497  else
41498    # Not in mixed or Windows style, start by that.
41499    new_path=`cmd //c echo $new_path`
41500
41501  input_path="$new_path"
41502  # Check if we need to convert this using DOS-style short mode. If the path
41503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41504  # take no chances and rewrite it.
41505  # Note: m4 eats our [], so we need to use [ and ] instead.
41506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41507  if test "x$has_forbidden_chars" != x; then
41508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41510  fi
41511
41512    # Output is in $new_path
41513
41514  windows_path="$new_path"
41515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41516    unix_path=`$CYGPATH -u "$windows_path"`
41517    new_path="$unix_path"
41518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41520    new_path="$unix_path"
41521  fi
41522
41523    # remove trailing .exe if any
41524    new_path="${new_path/%.exe/}"
41525
41526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41528  fi
41529
41530    else
41531      # We're on a unix platform. Hooray! :)
41532      # First separate the path from the arguments. This will split at the first
41533      # space.
41534      complete="$OBJCOPY"
41535      path="${complete%% *}"
41536      tmp="$complete EOL"
41537      arguments="${tmp#* }"
41538
41539      # Cannot rely on the command "which" here since it doesn't always work.
41540      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41541      if test -z "$is_absolute_path"; then
41542        # Path to executable is not absolute. Find it.
41543        IFS_save="$IFS"
41544        IFS=:
41545        for p in $PATH; do
41546          if test -f "$p/$path" && test -x "$p/$path"; then
41547            new_path="$p/$path"
41548            break
41549          fi
41550        done
41551        IFS="$IFS_save"
41552      else
41553        # This is an absolute path, we can use it without further modifications.
41554        new_path="$path"
41555      fi
41556
41557      if test "x$new_path" = x; then
41558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41559$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41560        has_space=`$ECHO "$complete" | $GREP " "`
41561        if test "x$has_space" != x; then
41562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41564        fi
41565        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41566      fi
41567    fi
41568
41569    # Now join together the path and the arguments once again
41570    if test "x$arguments" != xEOL; then
41571      new_complete="$new_path ${arguments% *}"
41572    else
41573      new_complete="$new_path"
41574    fi
41575
41576    if test "x$complete" != "x$new_complete"; then
41577      OBJCOPY="$new_complete"
41578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41579$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41580    fi
41581  fi
41582
41583      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41584        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41585        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41586        # - version number is last blank separate word on first line
41587        # - version number formats that have been seen:
41588        #   - <major>.<minor>
41589        #   - <major>.<minor>.<micro>
41590        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41591        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41592         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41593              -e 's/.* //' \
41594              -e '/^[01]\./b bad' \
41595              -e '/^2\./{' \
41596              -e '  s/^2\.//' \
41597              -e '  /^[0-9]$/b bad' \
41598              -e '  /^[0-9]\./b bad' \
41599              -e '  /^1[0-9]$/b bad' \
41600              -e '  /^1[0-9]\./b bad' \
41601              -e '  /^20\./b bad' \
41602              -e '  /^21\.0$/b bad' \
41603              -e '  /^21\.0\./b bad' \
41604              -e '}' \
41605              -e ':good' \
41606              -e 's/.*/VALID_VERSION/p' \
41607              -e 'q' \
41608              -e ':bad' \
41609              -e 's/.*/BAD_VERSION/p' \
41610              -e 'q'`
41611        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41612          OBJCOPY=
41613          { $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
41614$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41615          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41616$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41617          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41618$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41619          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41620$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41621          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41622$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41623        fi
41624      fi
41625    fi
41626  fi
41627
41628
41629
41630  # Publish this variable in the help.
41631
41632
41633  if [ -z "${OBJDUMP+x}" ]; then
41634    # The variable is not set by user, try to locate tool using the code snippet
41635    if test -n "$ac_tool_prefix"; then
41636  for ac_prog in gobjdump objdump
41637  do
41638    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41639set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41641$as_echo_n "checking for $ac_word... " >&6; }
41642if ${ac_cv_prog_OBJDUMP+:} false; then :
41643  $as_echo_n "(cached) " >&6
41644else
41645  if test -n "$OBJDUMP"; then
41646  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41647else
41648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41649for as_dir in $PATH
41650do
41651  IFS=$as_save_IFS
41652  test -z "$as_dir" && as_dir=.
41653    for ac_exec_ext in '' $ac_executable_extensions; do
41654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41655    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41657    break 2
41658  fi
41659done
41660  done
41661IFS=$as_save_IFS
41662
41663fi
41664fi
41665OBJDUMP=$ac_cv_prog_OBJDUMP
41666if test -n "$OBJDUMP"; then
41667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41668$as_echo "$OBJDUMP" >&6; }
41669else
41670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41671$as_echo "no" >&6; }
41672fi
41673
41674
41675    test -n "$OBJDUMP" && break
41676  done
41677fi
41678if test -z "$OBJDUMP"; then
41679  ac_ct_OBJDUMP=$OBJDUMP
41680  for ac_prog in gobjdump objdump
41681do
41682  # Extract the first word of "$ac_prog", so it can be a program name with args.
41683set dummy $ac_prog; ac_word=$2
41684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41685$as_echo_n "checking for $ac_word... " >&6; }
41686if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41687  $as_echo_n "(cached) " >&6
41688else
41689  if test -n "$ac_ct_OBJDUMP"; then
41690  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41691else
41692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41693for as_dir in $PATH
41694do
41695  IFS=$as_save_IFS
41696  test -z "$as_dir" && as_dir=.
41697    for ac_exec_ext in '' $ac_executable_extensions; do
41698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41699    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41701    break 2
41702  fi
41703done
41704  done
41705IFS=$as_save_IFS
41706
41707fi
41708fi
41709ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41710if test -n "$ac_ct_OBJDUMP"; then
41711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41712$as_echo "$ac_ct_OBJDUMP" >&6; }
41713else
41714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41715$as_echo "no" >&6; }
41716fi
41717
41718
41719  test -n "$ac_ct_OBJDUMP" && break
41720done
41721
41722  if test "x$ac_ct_OBJDUMP" = x; then
41723    OBJDUMP=""
41724  else
41725    case $cross_compiling:$ac_tool_warned in
41726yes:)
41727{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41729ac_tool_warned=yes ;;
41730esac
41731    OBJDUMP=$ac_ct_OBJDUMP
41732  fi
41733fi
41734
41735  else
41736    # The variable is set, but is it from the command line or the environment?
41737
41738    # Try to remove the string !OBJDUMP! from our list.
41739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41741      # If it failed, the variable was not from the command line. Ignore it,
41742      # but warn the user (except for BASH, which is always set by the calling BASH).
41743      if test "xOBJDUMP" != xBASH; then
41744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41745$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41746      fi
41747      # Try to locate tool using the code snippet
41748      if test -n "$ac_tool_prefix"; then
41749  for ac_prog in gobjdump objdump
41750  do
41751    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41752set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41754$as_echo_n "checking for $ac_word... " >&6; }
41755if ${ac_cv_prog_OBJDUMP+:} false; then :
41756  $as_echo_n "(cached) " >&6
41757else
41758  if test -n "$OBJDUMP"; then
41759  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41760else
41761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41762for as_dir in $PATH
41763do
41764  IFS=$as_save_IFS
41765  test -z "$as_dir" && as_dir=.
41766    for ac_exec_ext in '' $ac_executable_extensions; do
41767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41768    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41770    break 2
41771  fi
41772done
41773  done
41774IFS=$as_save_IFS
41775
41776fi
41777fi
41778OBJDUMP=$ac_cv_prog_OBJDUMP
41779if test -n "$OBJDUMP"; then
41780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41781$as_echo "$OBJDUMP" >&6; }
41782else
41783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41784$as_echo "no" >&6; }
41785fi
41786
41787
41788    test -n "$OBJDUMP" && break
41789  done
41790fi
41791if test -z "$OBJDUMP"; then
41792  ac_ct_OBJDUMP=$OBJDUMP
41793  for ac_prog in gobjdump objdump
41794do
41795  # Extract the first word of "$ac_prog", so it can be a program name with args.
41796set dummy $ac_prog; ac_word=$2
41797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41798$as_echo_n "checking for $ac_word... " >&6; }
41799if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41800  $as_echo_n "(cached) " >&6
41801else
41802  if test -n "$ac_ct_OBJDUMP"; then
41803  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41804else
41805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41806for as_dir in $PATH
41807do
41808  IFS=$as_save_IFS
41809  test -z "$as_dir" && as_dir=.
41810    for ac_exec_ext in '' $ac_executable_extensions; do
41811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41812    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41814    break 2
41815  fi
41816done
41817  done
41818IFS=$as_save_IFS
41819
41820fi
41821fi
41822ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41823if test -n "$ac_ct_OBJDUMP"; then
41824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41825$as_echo "$ac_ct_OBJDUMP" >&6; }
41826else
41827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41828$as_echo "no" >&6; }
41829fi
41830
41831
41832  test -n "$ac_ct_OBJDUMP" && break
41833done
41834
41835  if test "x$ac_ct_OBJDUMP" = x; then
41836    OBJDUMP=""
41837  else
41838    case $cross_compiling:$ac_tool_warned in
41839yes:)
41840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41842ac_tool_warned=yes ;;
41843esac
41844    OBJDUMP=$ac_ct_OBJDUMP
41845  fi
41846fi
41847
41848    else
41849      # If it succeeded, then it was overridden by the user. We will use it
41850      # for the tool.
41851
41852      # First remove it from the list of overridden variables, so we can test
41853      # for unknown variables in the end.
41854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41855
41856      # Check if we try to supply an empty value
41857      if test "x$OBJDUMP" = x; then
41858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41859$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41861$as_echo_n "checking for OBJDUMP... " >&6; }
41862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41863$as_echo "disabled" >&6; }
41864      else
41865        # Check if the provided tool contains a complete path.
41866        tool_specified="$OBJDUMP"
41867        tool_basename="${tool_specified##*/}"
41868        if test "x$tool_basename" = "x$tool_specified"; then
41869          # A command without a complete path is provided, search $PATH.
41870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41871$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41872          # Extract the first word of "$tool_basename", so it can be a program name with args.
41873set dummy $tool_basename; ac_word=$2
41874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41875$as_echo_n "checking for $ac_word... " >&6; }
41876if ${ac_cv_path_OBJDUMP+:} false; then :
41877  $as_echo_n "(cached) " >&6
41878else
41879  case $OBJDUMP in
41880  [\\/]* | ?:[\\/]*)
41881  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41882  ;;
41883  *)
41884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41885for as_dir in $PATH
41886do
41887  IFS=$as_save_IFS
41888  test -z "$as_dir" && as_dir=.
41889    for ac_exec_ext in '' $ac_executable_extensions; do
41890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41891    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41893    break 2
41894  fi
41895done
41896  done
41897IFS=$as_save_IFS
41898
41899  ;;
41900esac
41901fi
41902OBJDUMP=$ac_cv_path_OBJDUMP
41903if test -n "$OBJDUMP"; then
41904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41905$as_echo "$OBJDUMP" >&6; }
41906else
41907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41908$as_echo "no" >&6; }
41909fi
41910
41911
41912          if test "x$OBJDUMP" = x; then
41913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41914          fi
41915        else
41916          # Otherwise we believe it is a complete path. Use it as it is.
41917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41918$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41920$as_echo_n "checking for OBJDUMP... " >&6; }
41921          if test ! -x "$tool_specified"; then
41922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41923$as_echo "not found" >&6; }
41924            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41925          fi
41926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41927$as_echo "$tool_specified" >&6; }
41928        fi
41929      fi
41930    fi
41931
41932  fi
41933
41934
41935  if test "x$OBJDUMP" != x; then
41936    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41937    # bails if argument is missing.
41938
41939  # Only process if variable expands to non-empty
41940
41941  if test "x$OBJDUMP" != x; then
41942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41943
41944  # First separate the path from the arguments. This will split at the first
41945  # space.
41946  complete="$OBJDUMP"
41947  path="${complete%% *}"
41948  tmp="$complete EOL"
41949  arguments="${tmp#* }"
41950
41951  # Input might be given as Windows format, start by converting to
41952  # unix format.
41953  new_path=`$CYGPATH -u "$path"`
41954
41955  # Now try to locate executable using which
41956  new_path=`$WHICH "$new_path" 2> /dev/null`
41957  # bat and cmd files are not always considered executable in cygwin causing which
41958  # to not find them
41959  if test "x$new_path" = x \
41960      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41961      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41962    new_path=`$CYGPATH -u "$path"`
41963  fi
41964  if test "x$new_path" = x; then
41965    # Oops. Which didn't find the executable.
41966    # The splitting of arguments from the executable at a space might have been incorrect,
41967    # since paths with space are more likely in Windows. Give it another try with the whole
41968    # argument.
41969    path="$complete"
41970    arguments="EOL"
41971    new_path=`$CYGPATH -u "$path"`
41972    new_path=`$WHICH "$new_path" 2> /dev/null`
41973    # bat and cmd files are not always considered executable in cygwin causing which
41974    # to not find them
41975    if test "x$new_path" = x \
41976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41978      new_path=`$CYGPATH -u "$path"`
41979    fi
41980    if test "x$new_path" = x; then
41981      # It's still not found. Now this is an unrecoverable error.
41982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41983$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41984      has_space=`$ECHO "$complete" | $GREP " "`
41985      if test "x$has_space" != x; then
41986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41988      fi
41989      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41990    fi
41991  fi
41992
41993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41996  # "foo.exe" is OK but "foo" is an error.
41997  #
41998  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41999  # It is also a way to make sure we got the proper file name for the real test later on.
42000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42001  if test "x$test_shortpath" = x; then
42002    # Short path failed, file does not exist as specified.
42003    # Try adding .exe or .cmd
42004    if test -f "${new_path}.exe"; then
42005      input_to_shortpath="${new_path}.exe"
42006    elif test -f "${new_path}.cmd"; then
42007      input_to_shortpath="${new_path}.cmd"
42008    else
42009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42010$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42011      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42012$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42013      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42014    fi
42015  else
42016    input_to_shortpath="$new_path"
42017  fi
42018
42019  # Call helper function which possibly converts this using DOS-style short mode.
42020  # If so, the updated path is stored in $new_path.
42021  new_path="$input_to_shortpath"
42022
42023  input_path="$input_to_shortpath"
42024  # Check if we need to convert this using DOS-style short mode. If the path
42025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42026  # take no chances and rewrite it.
42027  # Note: m4 eats our [], so we need to use [ and ] instead.
42028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42029  if test "x$has_forbidden_chars" != x; then
42030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42034      # Going to short mode and back again did indeed matter. Since short mode is
42035      # case insensitive, let's make it lowercase to improve readability.
42036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42037      # Now convert it back to Unix-style (cygpath)
42038      input_path=`$CYGPATH -u "$shortmode_path"`
42039      new_path="$input_path"
42040    fi
42041  fi
42042
42043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42044  if test "x$test_cygdrive_prefix" = x; then
42045    # As a simple fix, exclude /usr/bin since it's not a real path.
42046    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42048      # a path prefixed by /cygdrive for fixpath to work.
42049      new_path="$CYGWIN_ROOT_PATH$input_path"
42050    fi
42051  fi
42052
42053  # remove trailing .exe if any
42054  new_path="${new_path/%.exe/}"
42055
42056    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42057
42058  # First separate the path from the arguments. This will split at the first
42059  # space.
42060  complete="$OBJDUMP"
42061  path="${complete%% *}"
42062  tmp="$complete EOL"
42063  arguments="${tmp#* }"
42064
42065  # Input might be given as Windows format, start by converting to
42066  # unix format.
42067  new_path="$path"
42068
42069  windows_path="$new_path"
42070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42071    unix_path=`$CYGPATH -u "$windows_path"`
42072    new_path="$unix_path"
42073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42075    new_path="$unix_path"
42076  fi
42077
42078
42079  # Now try to locate executable using which
42080  new_path=`$WHICH "$new_path" 2> /dev/null`
42081
42082  if test "x$new_path" = x; then
42083    # Oops. Which didn't find the executable.
42084    # The splitting of arguments from the executable at a space might have been incorrect,
42085    # since paths with space are more likely in Windows. Give it another try with the whole
42086    # argument.
42087    path="$complete"
42088    arguments="EOL"
42089    new_path="$path"
42090
42091  windows_path="$new_path"
42092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42093    unix_path=`$CYGPATH -u "$windows_path"`
42094    new_path="$unix_path"
42095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42097    new_path="$unix_path"
42098  fi
42099
42100
42101    new_path=`$WHICH "$new_path" 2> /dev/null`
42102    # bat and cmd files are not always considered executable in MSYS causing which
42103    # to not find them
42104    if test "x$new_path" = x \
42105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42107      new_path="$path"
42108
42109  windows_path="$new_path"
42110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42111    unix_path=`$CYGPATH -u "$windows_path"`
42112    new_path="$unix_path"
42113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42115    new_path="$unix_path"
42116  fi
42117
42118    fi
42119
42120    if test "x$new_path" = x; then
42121      # It's still not found. Now this is an unrecoverable error.
42122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42123$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42124      has_space=`$ECHO "$complete" | $GREP " "`
42125      if test "x$has_space" != x; then
42126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42128      fi
42129      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42130    fi
42131  fi
42132
42133  # Now new_path has a complete unix path to the binary
42134  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42135    # Keep paths in /bin as-is, but remove trailing .exe if any
42136    new_path="${new_path/%.exe/}"
42137    # Do not save /bin paths to all_fixpath_prefixes!
42138  else
42139    # Not in mixed or Windows style, start by that.
42140    new_path=`cmd //c echo $new_path`
42141
42142  input_path="$new_path"
42143  # Check if we need to convert this using DOS-style short mode. If the path
42144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42145  # take no chances and rewrite it.
42146  # Note: m4 eats our [], so we need to use [ and ] instead.
42147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42148  if test "x$has_forbidden_chars" != x; then
42149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42151  fi
42152
42153    # Output is in $new_path
42154
42155  windows_path="$new_path"
42156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42157    unix_path=`$CYGPATH -u "$windows_path"`
42158    new_path="$unix_path"
42159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42161    new_path="$unix_path"
42162  fi
42163
42164    # remove trailing .exe if any
42165    new_path="${new_path/%.exe/}"
42166
42167    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42168    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42169  fi
42170
42171    else
42172      # We're on a unix platform. Hooray! :)
42173      # First separate the path from the arguments. This will split at the first
42174      # space.
42175      complete="$OBJDUMP"
42176      path="${complete%% *}"
42177      tmp="$complete EOL"
42178      arguments="${tmp#* }"
42179
42180      # Cannot rely on the command "which" here since it doesn't always work.
42181      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42182      if test -z "$is_absolute_path"; then
42183        # Path to executable is not absolute. Find it.
42184        IFS_save="$IFS"
42185        IFS=:
42186        for p in $PATH; do
42187          if test -f "$p/$path" && test -x "$p/$path"; then
42188            new_path="$p/$path"
42189            break
42190          fi
42191        done
42192        IFS="$IFS_save"
42193      else
42194        # This is an absolute path, we can use it without further modifications.
42195        new_path="$path"
42196      fi
42197
42198      if test "x$new_path" = x; then
42199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42200$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42201        has_space=`$ECHO "$complete" | $GREP " "`
42202        if test "x$has_space" != x; then
42203          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42204$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42205        fi
42206        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42207      fi
42208    fi
42209
42210    # Now join together the path and the arguments once again
42211    if test "x$arguments" != xEOL; then
42212      new_complete="$new_path ${arguments% *}"
42213    else
42214      new_complete="$new_path"
42215    fi
42216
42217    if test "x$complete" != "x$new_complete"; then
42218      OBJDUMP="$new_complete"
42219      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42220$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42221    fi
42222  fi
42223
42224  fi
42225
42226
42227  # Restore old path.
42228  PATH="$OLD_PATH"
42229
42230  # Restore the flags to the user specified values.
42231  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42232  CFLAGS="$ORG_CFLAGS"
42233  CXXFLAGS="$ORG_CXXFLAGS"
42234
42235
42236# Finally do some processing after the detection phase
42237
42238  if test "x$COMPILE_TYPE" = "xcross"; then
42239    # Now we need to find a C/C++ compiler that can build executables for the
42240    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42241    # used once. Also, we need to do this without adding a tools dir to the
42242    # path, otherwise we might pick up cross-compilers which don't use standard
42243    # naming.
42244
42245    OLDPATH="$PATH"
42246
42247
42248# Check whether --with-build-devkit was given.
42249if test "${with_build_devkit+set}" = set; then :
42250  withval=$with_build_devkit;
42251fi
42252
42253    if test "x$with_build_devkit" = "xyes"; then
42254      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42255    elif test -n "$with_build_devkit"; then
42256      if test ! -d "$with_build_devkit"; then
42257        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42258      else
42259
42260  # Only process if variable expands to non-empty
42261
42262  if test "x$with_build_devkit" != x; then
42263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42264
42265  # Input might be given as Windows format, start by converting to
42266  # unix format.
42267  path="$with_build_devkit"
42268  new_path=`$CYGPATH -u "$path"`
42269
42270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42273  # "foo.exe" is OK but "foo" is an error.
42274  #
42275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42276  # It is also a way to make sure we got the proper file name for the real test later on.
42277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42278  if test "x$test_shortpath" = x; then
42279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42280$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42281    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42282  fi
42283
42284  # Call helper function which possibly converts this using DOS-style short mode.
42285  # If so, the updated path is stored in $new_path.
42286
42287  input_path="$new_path"
42288  # Check if we need to convert this using DOS-style short mode. If the path
42289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42290  # take no chances and rewrite it.
42291  # Note: m4 eats our [], so we need to use [ and ] instead.
42292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42293  if test "x$has_forbidden_chars" != x; then
42294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42298      # Going to short mode and back again did indeed matter. Since short mode is
42299      # case insensitive, let's make it lowercase to improve readability.
42300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42301      # Now convert it back to Unix-style (cygpath)
42302      input_path=`$CYGPATH -u "$shortmode_path"`
42303      new_path="$input_path"
42304    fi
42305  fi
42306
42307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42308  if test "x$test_cygdrive_prefix" = x; then
42309    # As a simple fix, exclude /usr/bin since it's not a real path.
42310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42312      # a path prefixed by /cygdrive for fixpath to work.
42313      new_path="$CYGWIN_ROOT_PATH$input_path"
42314    fi
42315  fi
42316
42317
42318  if test "x$path" != "x$new_path"; then
42319    with_build_devkit="$new_path"
42320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42321$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42322  fi
42323
42324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42325
42326  path="$with_build_devkit"
42327  has_colon=`$ECHO $path | $GREP ^.:`
42328  new_path="$path"
42329  if test "x$has_colon" = x; then
42330    # Not in mixed or Windows style, start by that.
42331    new_path=`cmd //c echo $path`
42332  fi
42333
42334
42335  input_path="$new_path"
42336  # Check if we need to convert this using DOS-style short mode. If the path
42337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42338  # take no chances and rewrite it.
42339  # Note: m4 eats our [], so we need to use [ and ] instead.
42340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42341  if test "x$has_forbidden_chars" != x; then
42342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42344  fi
42345
42346
42347  windows_path="$new_path"
42348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42349    unix_path=`$CYGPATH -u "$windows_path"`
42350    new_path="$unix_path"
42351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42353    new_path="$unix_path"
42354  fi
42355
42356  if test "x$path" != "x$new_path"; then
42357    with_build_devkit="$new_path"
42358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42359$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42360  fi
42361
42362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42364
42365    else
42366      # We're on a unix platform. Hooray! :)
42367      path="$with_build_devkit"
42368      has_space=`$ECHO "$path" | $GREP " "`
42369      if test "x$has_space" != x; then
42370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42371$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42373      fi
42374
42375      # Use eval to expand a potential ~
42376      eval path="$path"
42377      if test ! -f "$path" && test ! -d "$path"; then
42378        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42379      fi
42380
42381      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42382    fi
42383  fi
42384
42385        BUILD_DEVKIT_ROOT="$with_build_devkit"
42386        # Check for a meta data info file in the root of the devkit
42387        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42388          # Process devkit.info so that existing devkit variables are not
42389          # modified by this
42390          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42391              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42392              -e "s/\$host/\$build/g" \
42393              $BUILD_DEVKIT_ROOT/devkit.info \
42394              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42395          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42396          # This potentially sets the following:
42397          # A descriptive name of the devkit
42398
42399  if test "x$BUILD_DEVKIT_NAME" = x; then
42400    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42401  fi
42402
42403          # Corresponds to --with-extra-path
42404
42405  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42406    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42407  fi
42408
42409          # Corresponds to --with-toolchain-path
42410
42411  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42412    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42413  fi
42414
42415          # Corresponds to --with-sysroot
42416
42417  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42418    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42419  fi
42420
42421          # Skip the Window specific parts
42422        fi
42423
42424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42425$as_echo_n "checking for build platform devkit... " >&6; }
42426        if test "x$BUILD_DEVKIT_NAME" != x; then
42427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42428$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42429        else
42430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42431$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42432        fi
42433
42434        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42435
42436  if test "x$BUILD_SYSROOT" != "x"; then
42437    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42438      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42439        # Solaris Studio does not have a concept of sysroot. Instead we must
42440        # make sure the default include and lib dirs are appended to each
42441        # compile and link command line.
42442        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42443        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42444            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42445            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42446      fi
42447    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42448      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42449      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42450    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42451      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42452      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42453    fi
42454    # Propagate the sysroot args to hotspot
42455    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42456    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42457    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42458    # The global CFLAGS and LDFLAGS variables need these for configure to function
42459    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42460    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42461    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42462    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42463  fi
42464
42465  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42466    # We also need -iframework<path>/System/Library/Frameworks
42467    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42468    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42469    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42470    # set this here so it doesn't have to be peppered throughout the forest
42471    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42472    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42473  fi
42474
42475
42476
42477
42478
42479         # Fallback default of just /bin if DEVKIT_PATH is not defined
42480        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42481          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42482        fi
42483        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42484      fi
42485    fi
42486
42487    # FIXME: we should list the discovered compilers as an exclude pattern!
42488    # If we do that, we can do this detection before POST_DETECTION, and still
42489    # find the build compilers in the tools dir, if needed.
42490
42491
42492
42493  # Publish this variable in the help.
42494
42495
42496  if [ -z "${BUILD_CC+x}" ]; then
42497    # The variable is not set by user, try to locate tool using the code snippet
42498    for ac_prog in cl cc gcc
42499do
42500  # Extract the first word of "$ac_prog", so it can be a program name with args.
42501set dummy $ac_prog; ac_word=$2
42502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42503$as_echo_n "checking for $ac_word... " >&6; }
42504if ${ac_cv_path_BUILD_CC+:} false; then :
42505  $as_echo_n "(cached) " >&6
42506else
42507  case $BUILD_CC in
42508  [\\/]* | ?:[\\/]*)
42509  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42510  ;;
42511  *)
42512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42513for as_dir in $PATH
42514do
42515  IFS=$as_save_IFS
42516  test -z "$as_dir" && as_dir=.
42517    for ac_exec_ext in '' $ac_executable_extensions; do
42518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42519    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42521    break 2
42522  fi
42523done
42524  done
42525IFS=$as_save_IFS
42526
42527  ;;
42528esac
42529fi
42530BUILD_CC=$ac_cv_path_BUILD_CC
42531if test -n "$BUILD_CC"; then
42532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42533$as_echo "$BUILD_CC" >&6; }
42534else
42535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42536$as_echo "no" >&6; }
42537fi
42538
42539
42540  test -n "$BUILD_CC" && break
42541done
42542
42543  else
42544    # The variable is set, but is it from the command line or the environment?
42545
42546    # Try to remove the string !BUILD_CC! from our list.
42547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42549      # If it failed, the variable was not from the command line. Ignore it,
42550      # but warn the user (except for BASH, which is always set by the calling BASH).
42551      if test "xBUILD_CC" != xBASH; then
42552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42553$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42554      fi
42555      # Try to locate tool using the code snippet
42556      for ac_prog in cl cc gcc
42557do
42558  # Extract the first word of "$ac_prog", so it can be a program name with args.
42559set dummy $ac_prog; ac_word=$2
42560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42561$as_echo_n "checking for $ac_word... " >&6; }
42562if ${ac_cv_path_BUILD_CC+:} false; then :
42563  $as_echo_n "(cached) " >&6
42564else
42565  case $BUILD_CC in
42566  [\\/]* | ?:[\\/]*)
42567  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42568  ;;
42569  *)
42570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42571for as_dir in $PATH
42572do
42573  IFS=$as_save_IFS
42574  test -z "$as_dir" && as_dir=.
42575    for ac_exec_ext in '' $ac_executable_extensions; do
42576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42577    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42579    break 2
42580  fi
42581done
42582  done
42583IFS=$as_save_IFS
42584
42585  ;;
42586esac
42587fi
42588BUILD_CC=$ac_cv_path_BUILD_CC
42589if test -n "$BUILD_CC"; then
42590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42591$as_echo "$BUILD_CC" >&6; }
42592else
42593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42594$as_echo "no" >&6; }
42595fi
42596
42597
42598  test -n "$BUILD_CC" && break
42599done
42600
42601    else
42602      # If it succeeded, then it was overridden by the user. We will use it
42603      # for the tool.
42604
42605      # First remove it from the list of overridden variables, so we can test
42606      # for unknown variables in the end.
42607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42608
42609      # Check if we try to supply an empty value
42610      if test "x$BUILD_CC" = x; then
42611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42612$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42614$as_echo_n "checking for BUILD_CC... " >&6; }
42615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42616$as_echo "disabled" >&6; }
42617      else
42618        # Check if the provided tool contains a complete path.
42619        tool_specified="$BUILD_CC"
42620        tool_basename="${tool_specified##*/}"
42621        if test "x$tool_basename" = "x$tool_specified"; then
42622          # A command without a complete path is provided, search $PATH.
42623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42624$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42625          # Extract the first word of "$tool_basename", so it can be a program name with args.
42626set dummy $tool_basename; ac_word=$2
42627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42628$as_echo_n "checking for $ac_word... " >&6; }
42629if ${ac_cv_path_BUILD_CC+:} false; then :
42630  $as_echo_n "(cached) " >&6
42631else
42632  case $BUILD_CC in
42633  [\\/]* | ?:[\\/]*)
42634  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42635  ;;
42636  *)
42637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42638for as_dir in $PATH
42639do
42640  IFS=$as_save_IFS
42641  test -z "$as_dir" && as_dir=.
42642    for ac_exec_ext in '' $ac_executable_extensions; do
42643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42644    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42646    break 2
42647  fi
42648done
42649  done
42650IFS=$as_save_IFS
42651
42652  ;;
42653esac
42654fi
42655BUILD_CC=$ac_cv_path_BUILD_CC
42656if test -n "$BUILD_CC"; then
42657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42658$as_echo "$BUILD_CC" >&6; }
42659else
42660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42661$as_echo "no" >&6; }
42662fi
42663
42664
42665          if test "x$BUILD_CC" = x; then
42666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42667          fi
42668        else
42669          # Otherwise we believe it is a complete path. Use it as it is.
42670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42671$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42673$as_echo_n "checking for BUILD_CC... " >&6; }
42674          if test ! -x "$tool_specified"; then
42675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42676$as_echo "not found" >&6; }
42677            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42678          fi
42679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42680$as_echo "$tool_specified" >&6; }
42681        fi
42682      fi
42683    fi
42684
42685  fi
42686
42687
42688
42689  if test "x$BUILD_CC" = x; then
42690    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42691  fi
42692
42693
42694
42695  # Only process if variable expands to non-empty
42696
42697  if test "x$BUILD_CC" != x; then
42698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42699
42700  # First separate the path from the arguments. This will split at the first
42701  # space.
42702  complete="$BUILD_CC"
42703  path="${complete%% *}"
42704  tmp="$complete EOL"
42705  arguments="${tmp#* }"
42706
42707  # Input might be given as Windows format, start by converting to
42708  # unix format.
42709  new_path=`$CYGPATH -u "$path"`
42710
42711  # Now try to locate executable using which
42712  new_path=`$WHICH "$new_path" 2> /dev/null`
42713  # bat and cmd files are not always considered executable in cygwin causing which
42714  # to not find them
42715  if test "x$new_path" = x \
42716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42718    new_path=`$CYGPATH -u "$path"`
42719  fi
42720  if test "x$new_path" = x; then
42721    # Oops. Which didn't find the executable.
42722    # The splitting of arguments from the executable at a space might have been incorrect,
42723    # since paths with space are more likely in Windows. Give it another try with the whole
42724    # argument.
42725    path="$complete"
42726    arguments="EOL"
42727    new_path=`$CYGPATH -u "$path"`
42728    new_path=`$WHICH "$new_path" 2> /dev/null`
42729    # bat and cmd files are not always considered executable in cygwin causing which
42730    # to not find them
42731    if test "x$new_path" = x \
42732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42734      new_path=`$CYGPATH -u "$path"`
42735    fi
42736    if test "x$new_path" = x; then
42737      # It's still not found. Now this is an unrecoverable error.
42738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42739$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42740      has_space=`$ECHO "$complete" | $GREP " "`
42741      if test "x$has_space" != x; then
42742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42744      fi
42745      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42746    fi
42747  fi
42748
42749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42752  # "foo.exe" is OK but "foo" is an error.
42753  #
42754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42755  # It is also a way to make sure we got the proper file name for the real test later on.
42756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42757  if test "x$test_shortpath" = x; then
42758    # Short path failed, file does not exist as specified.
42759    # Try adding .exe or .cmd
42760    if test -f "${new_path}.exe"; then
42761      input_to_shortpath="${new_path}.exe"
42762    elif test -f "${new_path}.cmd"; then
42763      input_to_shortpath="${new_path}.cmd"
42764    else
42765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42766$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42769      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42770    fi
42771  else
42772    input_to_shortpath="$new_path"
42773  fi
42774
42775  # Call helper function which possibly converts this using DOS-style short mode.
42776  # If so, the updated path is stored in $new_path.
42777  new_path="$input_to_shortpath"
42778
42779  input_path="$input_to_shortpath"
42780  # Check if we need to convert this using DOS-style short mode. If the path
42781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42782  # take no chances and rewrite it.
42783  # Note: m4 eats our [], so we need to use [ and ] instead.
42784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42785  if test "x$has_forbidden_chars" != x; then
42786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42790      # Going to short mode and back again did indeed matter. Since short mode is
42791      # case insensitive, let's make it lowercase to improve readability.
42792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42793      # Now convert it back to Unix-style (cygpath)
42794      input_path=`$CYGPATH -u "$shortmode_path"`
42795      new_path="$input_path"
42796    fi
42797  fi
42798
42799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42800  if test "x$test_cygdrive_prefix" = x; then
42801    # As a simple fix, exclude /usr/bin since it's not a real path.
42802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42804      # a path prefixed by /cygdrive for fixpath to work.
42805      new_path="$CYGWIN_ROOT_PATH$input_path"
42806    fi
42807  fi
42808
42809  # remove trailing .exe if any
42810  new_path="${new_path/%.exe/}"
42811
42812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42813
42814  # First separate the path from the arguments. This will split at the first
42815  # space.
42816  complete="$BUILD_CC"
42817  path="${complete%% *}"
42818  tmp="$complete EOL"
42819  arguments="${tmp#* }"
42820
42821  # Input might be given as Windows format, start by converting to
42822  # unix format.
42823  new_path="$path"
42824
42825  windows_path="$new_path"
42826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42827    unix_path=`$CYGPATH -u "$windows_path"`
42828    new_path="$unix_path"
42829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42831    new_path="$unix_path"
42832  fi
42833
42834
42835  # Now try to locate executable using which
42836  new_path=`$WHICH "$new_path" 2> /dev/null`
42837
42838  if test "x$new_path" = x; then
42839    # Oops. Which didn't find the executable.
42840    # The splitting of arguments from the executable at a space might have been incorrect,
42841    # since paths with space are more likely in Windows. Give it another try with the whole
42842    # argument.
42843    path="$complete"
42844    arguments="EOL"
42845    new_path="$path"
42846
42847  windows_path="$new_path"
42848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42849    unix_path=`$CYGPATH -u "$windows_path"`
42850    new_path="$unix_path"
42851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42853    new_path="$unix_path"
42854  fi
42855
42856
42857    new_path=`$WHICH "$new_path" 2> /dev/null`
42858    # bat and cmd files are not always considered executable in MSYS causing which
42859    # to not find them
42860    if test "x$new_path" = x \
42861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42863      new_path="$path"
42864
42865  windows_path="$new_path"
42866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42867    unix_path=`$CYGPATH -u "$windows_path"`
42868    new_path="$unix_path"
42869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42871    new_path="$unix_path"
42872  fi
42873
42874    fi
42875
42876    if test "x$new_path" = x; then
42877      # It's still not found. Now this is an unrecoverable error.
42878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42879$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42880      has_space=`$ECHO "$complete" | $GREP " "`
42881      if test "x$has_space" != x; then
42882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42884      fi
42885      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42886    fi
42887  fi
42888
42889  # Now new_path has a complete unix path to the binary
42890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42891    # Keep paths in /bin as-is, but remove trailing .exe if any
42892    new_path="${new_path/%.exe/}"
42893    # Do not save /bin paths to all_fixpath_prefixes!
42894  else
42895    # Not in mixed or Windows style, start by that.
42896    new_path=`cmd //c echo $new_path`
42897
42898  input_path="$new_path"
42899  # Check if we need to convert this using DOS-style short mode. If the path
42900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42901  # take no chances and rewrite it.
42902  # Note: m4 eats our [], so we need to use [ and ] instead.
42903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42904  if test "x$has_forbidden_chars" != x; then
42905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42907  fi
42908
42909    # Output is in $new_path
42910
42911  windows_path="$new_path"
42912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42913    unix_path=`$CYGPATH -u "$windows_path"`
42914    new_path="$unix_path"
42915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42917    new_path="$unix_path"
42918  fi
42919
42920    # remove trailing .exe if any
42921    new_path="${new_path/%.exe/}"
42922
42923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42925  fi
42926
42927    else
42928      # We're on a unix platform. Hooray! :)
42929      # First separate the path from the arguments. This will split at the first
42930      # space.
42931      complete="$BUILD_CC"
42932      path="${complete%% *}"
42933      tmp="$complete EOL"
42934      arguments="${tmp#* }"
42935
42936      # Cannot rely on the command "which" here since it doesn't always work.
42937      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42938      if test -z "$is_absolute_path"; then
42939        # Path to executable is not absolute. Find it.
42940        IFS_save="$IFS"
42941        IFS=:
42942        for p in $PATH; do
42943          if test -f "$p/$path" && test -x "$p/$path"; then
42944            new_path="$p/$path"
42945            break
42946          fi
42947        done
42948        IFS="$IFS_save"
42949      else
42950        # This is an absolute path, we can use it without further modifications.
42951        new_path="$path"
42952      fi
42953
42954      if test "x$new_path" = x; then
42955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42956$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42957        has_space=`$ECHO "$complete" | $GREP " "`
42958        if test "x$has_space" != x; then
42959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42961        fi
42962        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42963      fi
42964    fi
42965
42966    # Now join together the path and the arguments once again
42967    if test "x$arguments" != xEOL; then
42968      new_complete="$new_path ${arguments% *}"
42969    else
42970      new_complete="$new_path"
42971    fi
42972
42973    if test "x$complete" != "x$new_complete"; then
42974      BUILD_CC="$new_complete"
42975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42976$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42977    fi
42978  fi
42979
42980
42981
42982
42983  # Publish this variable in the help.
42984
42985
42986  if [ -z "${BUILD_CXX+x}" ]; then
42987    # The variable is not set by user, try to locate tool using the code snippet
42988    for ac_prog in cl CC g++
42989do
42990  # Extract the first word of "$ac_prog", so it can be a program name with args.
42991set dummy $ac_prog; ac_word=$2
42992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42993$as_echo_n "checking for $ac_word... " >&6; }
42994if ${ac_cv_path_BUILD_CXX+:} false; then :
42995  $as_echo_n "(cached) " >&6
42996else
42997  case $BUILD_CXX in
42998  [\\/]* | ?:[\\/]*)
42999  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43000  ;;
43001  *)
43002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43003for as_dir in $PATH
43004do
43005  IFS=$as_save_IFS
43006  test -z "$as_dir" && as_dir=.
43007    for ac_exec_ext in '' $ac_executable_extensions; do
43008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43009    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43011    break 2
43012  fi
43013done
43014  done
43015IFS=$as_save_IFS
43016
43017  ;;
43018esac
43019fi
43020BUILD_CXX=$ac_cv_path_BUILD_CXX
43021if test -n "$BUILD_CXX"; then
43022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43023$as_echo "$BUILD_CXX" >&6; }
43024else
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43026$as_echo "no" >&6; }
43027fi
43028
43029
43030  test -n "$BUILD_CXX" && break
43031done
43032
43033  else
43034    # The variable is set, but is it from the command line or the environment?
43035
43036    # Try to remove the string !BUILD_CXX! from our list.
43037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43039      # If it failed, the variable was not from the command line. Ignore it,
43040      # but warn the user (except for BASH, which is always set by the calling BASH).
43041      if test "xBUILD_CXX" != xBASH; then
43042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43043$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43044      fi
43045      # Try to locate tool using the code snippet
43046      for ac_prog in cl CC g++
43047do
43048  # Extract the first word of "$ac_prog", so it can be a program name with args.
43049set dummy $ac_prog; ac_word=$2
43050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43051$as_echo_n "checking for $ac_word... " >&6; }
43052if ${ac_cv_path_BUILD_CXX+:} false; then :
43053  $as_echo_n "(cached) " >&6
43054else
43055  case $BUILD_CXX in
43056  [\\/]* | ?:[\\/]*)
43057  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43058  ;;
43059  *)
43060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43061for as_dir in $PATH
43062do
43063  IFS=$as_save_IFS
43064  test -z "$as_dir" && as_dir=.
43065    for ac_exec_ext in '' $ac_executable_extensions; do
43066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43067    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43069    break 2
43070  fi
43071done
43072  done
43073IFS=$as_save_IFS
43074
43075  ;;
43076esac
43077fi
43078BUILD_CXX=$ac_cv_path_BUILD_CXX
43079if test -n "$BUILD_CXX"; then
43080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43081$as_echo "$BUILD_CXX" >&6; }
43082else
43083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43084$as_echo "no" >&6; }
43085fi
43086
43087
43088  test -n "$BUILD_CXX" && break
43089done
43090
43091    else
43092      # If it succeeded, then it was overridden by the user. We will use it
43093      # for the tool.
43094
43095      # First remove it from the list of overridden variables, so we can test
43096      # for unknown variables in the end.
43097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43098
43099      # Check if we try to supply an empty value
43100      if test "x$BUILD_CXX" = x; then
43101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43102$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43104$as_echo_n "checking for BUILD_CXX... " >&6; }
43105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43106$as_echo "disabled" >&6; }
43107      else
43108        # Check if the provided tool contains a complete path.
43109        tool_specified="$BUILD_CXX"
43110        tool_basename="${tool_specified##*/}"
43111        if test "x$tool_basename" = "x$tool_specified"; then
43112          # A command without a complete path is provided, search $PATH.
43113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43114$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43115          # Extract the first word of "$tool_basename", so it can be a program name with args.
43116set dummy $tool_basename; ac_word=$2
43117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43118$as_echo_n "checking for $ac_word... " >&6; }
43119if ${ac_cv_path_BUILD_CXX+:} false; then :
43120  $as_echo_n "(cached) " >&6
43121else
43122  case $BUILD_CXX in
43123  [\\/]* | ?:[\\/]*)
43124  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43125  ;;
43126  *)
43127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43128for as_dir in $PATH
43129do
43130  IFS=$as_save_IFS
43131  test -z "$as_dir" && as_dir=.
43132    for ac_exec_ext in '' $ac_executable_extensions; do
43133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43134    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43136    break 2
43137  fi
43138done
43139  done
43140IFS=$as_save_IFS
43141
43142  ;;
43143esac
43144fi
43145BUILD_CXX=$ac_cv_path_BUILD_CXX
43146if test -n "$BUILD_CXX"; then
43147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43148$as_echo "$BUILD_CXX" >&6; }
43149else
43150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43151$as_echo "no" >&6; }
43152fi
43153
43154
43155          if test "x$BUILD_CXX" = x; then
43156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43157          fi
43158        else
43159          # Otherwise we believe it is a complete path. Use it as it is.
43160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43161$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43163$as_echo_n "checking for BUILD_CXX... " >&6; }
43164          if test ! -x "$tool_specified"; then
43165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43166$as_echo "not found" >&6; }
43167            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43168          fi
43169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43170$as_echo "$tool_specified" >&6; }
43171        fi
43172      fi
43173    fi
43174
43175  fi
43176
43177
43178
43179  if test "x$BUILD_CXX" = x; then
43180    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43181  fi
43182
43183
43184
43185  # Only process if variable expands to non-empty
43186
43187  if test "x$BUILD_CXX" != x; then
43188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43189
43190  # First separate the path from the arguments. This will split at the first
43191  # space.
43192  complete="$BUILD_CXX"
43193  path="${complete%% *}"
43194  tmp="$complete EOL"
43195  arguments="${tmp#* }"
43196
43197  # Input might be given as Windows format, start by converting to
43198  # unix format.
43199  new_path=`$CYGPATH -u "$path"`
43200
43201  # Now try to locate executable using which
43202  new_path=`$WHICH "$new_path" 2> /dev/null`
43203  # bat and cmd files are not always considered executable in cygwin causing which
43204  # to not find them
43205  if test "x$new_path" = x \
43206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43208    new_path=`$CYGPATH -u "$path"`
43209  fi
43210  if test "x$new_path" = x; then
43211    # Oops. Which didn't find the executable.
43212    # The splitting of arguments from the executable at a space might have been incorrect,
43213    # since paths with space are more likely in Windows. Give it another try with the whole
43214    # argument.
43215    path="$complete"
43216    arguments="EOL"
43217    new_path=`$CYGPATH -u "$path"`
43218    new_path=`$WHICH "$new_path" 2> /dev/null`
43219    # bat and cmd files are not always considered executable in cygwin causing which
43220    # to not find them
43221    if test "x$new_path" = x \
43222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43224      new_path=`$CYGPATH -u "$path"`
43225    fi
43226    if test "x$new_path" = x; then
43227      # It's still not found. Now this is an unrecoverable error.
43228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43229$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43230      has_space=`$ECHO "$complete" | $GREP " "`
43231      if test "x$has_space" != x; then
43232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43234      fi
43235      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43236    fi
43237  fi
43238
43239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43242  # "foo.exe" is OK but "foo" is an error.
43243  #
43244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43245  # It is also a way to make sure we got the proper file name for the real test later on.
43246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43247  if test "x$test_shortpath" = x; then
43248    # Short path failed, file does not exist as specified.
43249    # Try adding .exe or .cmd
43250    if test -f "${new_path}.exe"; then
43251      input_to_shortpath="${new_path}.exe"
43252    elif test -f "${new_path}.cmd"; then
43253      input_to_shortpath="${new_path}.cmd"
43254    else
43255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43256$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43259      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43260    fi
43261  else
43262    input_to_shortpath="$new_path"
43263  fi
43264
43265  # Call helper function which possibly converts this using DOS-style short mode.
43266  # If so, the updated path is stored in $new_path.
43267  new_path="$input_to_shortpath"
43268
43269  input_path="$input_to_shortpath"
43270  # Check if we need to convert this using DOS-style short mode. If the path
43271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43272  # take no chances and rewrite it.
43273  # Note: m4 eats our [], so we need to use [ and ] instead.
43274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43275  if test "x$has_forbidden_chars" != x; then
43276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43280      # Going to short mode and back again did indeed matter. Since short mode is
43281      # case insensitive, let's make it lowercase to improve readability.
43282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43283      # Now convert it back to Unix-style (cygpath)
43284      input_path=`$CYGPATH -u "$shortmode_path"`
43285      new_path="$input_path"
43286    fi
43287  fi
43288
43289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43290  if test "x$test_cygdrive_prefix" = x; then
43291    # As a simple fix, exclude /usr/bin since it's not a real path.
43292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43294      # a path prefixed by /cygdrive for fixpath to work.
43295      new_path="$CYGWIN_ROOT_PATH$input_path"
43296    fi
43297  fi
43298
43299  # remove trailing .exe if any
43300  new_path="${new_path/%.exe/}"
43301
43302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43303
43304  # First separate the path from the arguments. This will split at the first
43305  # space.
43306  complete="$BUILD_CXX"
43307  path="${complete%% *}"
43308  tmp="$complete EOL"
43309  arguments="${tmp#* }"
43310
43311  # Input might be given as Windows format, start by converting to
43312  # unix format.
43313  new_path="$path"
43314
43315  windows_path="$new_path"
43316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43317    unix_path=`$CYGPATH -u "$windows_path"`
43318    new_path="$unix_path"
43319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43321    new_path="$unix_path"
43322  fi
43323
43324
43325  # Now try to locate executable using which
43326  new_path=`$WHICH "$new_path" 2> /dev/null`
43327
43328  if test "x$new_path" = x; then
43329    # Oops. Which didn't find the executable.
43330    # The splitting of arguments from the executable at a space might have been incorrect,
43331    # since paths with space are more likely in Windows. Give it another try with the whole
43332    # argument.
43333    path="$complete"
43334    arguments="EOL"
43335    new_path="$path"
43336
43337  windows_path="$new_path"
43338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43339    unix_path=`$CYGPATH -u "$windows_path"`
43340    new_path="$unix_path"
43341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43343    new_path="$unix_path"
43344  fi
43345
43346
43347    new_path=`$WHICH "$new_path" 2> /dev/null`
43348    # bat and cmd files are not always considered executable in MSYS causing which
43349    # to not find them
43350    if test "x$new_path" = x \
43351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43353      new_path="$path"
43354
43355  windows_path="$new_path"
43356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43357    unix_path=`$CYGPATH -u "$windows_path"`
43358    new_path="$unix_path"
43359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43361    new_path="$unix_path"
43362  fi
43363
43364    fi
43365
43366    if test "x$new_path" = x; then
43367      # It's still not found. Now this is an unrecoverable error.
43368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43369$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43370      has_space=`$ECHO "$complete" | $GREP " "`
43371      if test "x$has_space" != x; then
43372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43374      fi
43375      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43376    fi
43377  fi
43378
43379  # Now new_path has a complete unix path to the binary
43380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43381    # Keep paths in /bin as-is, but remove trailing .exe if any
43382    new_path="${new_path/%.exe/}"
43383    # Do not save /bin paths to all_fixpath_prefixes!
43384  else
43385    # Not in mixed or Windows style, start by that.
43386    new_path=`cmd //c echo $new_path`
43387
43388  input_path="$new_path"
43389  # Check if we need to convert this using DOS-style short mode. If the path
43390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43391  # take no chances and rewrite it.
43392  # Note: m4 eats our [], so we need to use [ and ] instead.
43393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43394  if test "x$has_forbidden_chars" != x; then
43395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43397  fi
43398
43399    # Output is in $new_path
43400
43401  windows_path="$new_path"
43402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43403    unix_path=`$CYGPATH -u "$windows_path"`
43404    new_path="$unix_path"
43405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43407    new_path="$unix_path"
43408  fi
43409
43410    # remove trailing .exe if any
43411    new_path="${new_path/%.exe/}"
43412
43413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43415  fi
43416
43417    else
43418      # We're on a unix platform. Hooray! :)
43419      # First separate the path from the arguments. This will split at the first
43420      # space.
43421      complete="$BUILD_CXX"
43422      path="${complete%% *}"
43423      tmp="$complete EOL"
43424      arguments="${tmp#* }"
43425
43426      # Cannot rely on the command "which" here since it doesn't always work.
43427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43428      if test -z "$is_absolute_path"; then
43429        # Path to executable is not absolute. Find it.
43430        IFS_save="$IFS"
43431        IFS=:
43432        for p in $PATH; do
43433          if test -f "$p/$path" && test -x "$p/$path"; then
43434            new_path="$p/$path"
43435            break
43436          fi
43437        done
43438        IFS="$IFS_save"
43439      else
43440        # This is an absolute path, we can use it without further modifications.
43441        new_path="$path"
43442      fi
43443
43444      if test "x$new_path" = x; then
43445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43446$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43447        has_space=`$ECHO "$complete" | $GREP " "`
43448        if test "x$has_space" != x; then
43449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43451        fi
43452        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43453      fi
43454    fi
43455
43456    # Now join together the path and the arguments once again
43457    if test "x$arguments" != xEOL; then
43458      new_complete="$new_path ${arguments% *}"
43459    else
43460      new_complete="$new_path"
43461    fi
43462
43463    if test "x$complete" != "x$new_complete"; then
43464      BUILD_CXX="$new_complete"
43465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43466$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43467    fi
43468  fi
43469
43470    BUILD_LD="$BUILD_CC"
43471
43472    PATH="$OLDPATH"
43473  else
43474    # If we are not cross compiling, use the normal target compilers for
43475    # building the build platform executables.
43476    BUILD_CC="$CC"
43477    BUILD_CXX="$CXX"
43478    BUILD_LD="$LD"
43479    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
43480    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
43481  fi
43482
43483
43484
43485
43486
43487
43488
43489
43490  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43491    # For hotspot, we need these in Windows mixed path,
43492    # so rewrite them all. Need added .exe suffix.
43493    HOTSPOT_CXX="$CXX.exe"
43494    HOTSPOT_LD="$LD.exe"
43495    HOTSPOT_MT="$MT.exe"
43496    HOTSPOT_RC="$RC.exe"
43497
43498  unix_path="$HOTSPOT_CXX"
43499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43500    windows_path=`$CYGPATH -m "$unix_path"`
43501    HOTSPOT_CXX="$windows_path"
43502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43503    windows_path=`cmd //c echo $unix_path`
43504    HOTSPOT_CXX="$windows_path"
43505  fi
43506
43507
43508  unix_path="$HOTSPOT_LD"
43509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43510    windows_path=`$CYGPATH -m "$unix_path"`
43511    HOTSPOT_LD="$windows_path"
43512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43513    windows_path=`cmd //c echo $unix_path`
43514    HOTSPOT_LD="$windows_path"
43515  fi
43516
43517
43518  unix_path="$HOTSPOT_MT"
43519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43520    windows_path=`$CYGPATH -m "$unix_path"`
43521    HOTSPOT_MT="$windows_path"
43522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43523    windows_path=`cmd //c echo $unix_path`
43524    HOTSPOT_MT="$windows_path"
43525  fi
43526
43527
43528  unix_path="$HOTSPOT_RC"
43529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43530    windows_path=`$CYGPATH -m "$unix_path"`
43531    HOTSPOT_RC="$windows_path"
43532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43533    windows_path=`cmd //c echo $unix_path`
43534    HOTSPOT_RC="$windows_path"
43535  fi
43536
43537
43538
43539  else
43540    HOTSPOT_CXX="$CXX"
43541    HOTSPOT_LD="$LD"
43542  fi
43543
43544
43545
43546  if test  "x$TOOLCHAIN_TYPE" = xclang; then
43547    USE_CLANG=true
43548  fi
43549
43550
43551
43552
43553
43554  # The package path is used only on macosx?
43555  # FIXME: clean this up, and/or move it elsewhere.
43556  PACKAGE_PATH=/opt/local
43557
43558
43559  # Check for extra potential brokenness.
43560  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43561    # On Windows, double-check that we got the right compiler.
43562    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
43563    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
43564    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
43565      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
43566        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
43567      fi
43568    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43569      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43570        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43571      fi
43572    fi
43573  fi
43574
43575  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43576    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43577    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43578    # This is later checked when setting flags.
43579
43580    # "-Og" suppported for GCC 4.8 and later
43581    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43582
43583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43584$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43585  supports=yes
43586
43587  saved_cflags="$CFLAGS"
43588  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43589  ac_ext=c
43590ac_cpp='$CPP $CPPFLAGS'
43591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43593ac_compiler_gnu=$ac_cv_c_compiler_gnu
43594
43595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43596/* end confdefs.h.  */
43597int i;
43598_ACEOF
43599if ac_fn_c_try_compile "$LINENO"; then :
43600
43601else
43602  supports=no
43603fi
43604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43605  ac_ext=cpp
43606ac_cpp='$CXXCPP $CPPFLAGS'
43607ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43608ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43609ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43610
43611  CFLAGS="$saved_cflags"
43612
43613  saved_cxxflags="$CXXFLAGS"
43614  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43615  ac_ext=cpp
43616ac_cpp='$CXXCPP $CPPFLAGS'
43617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43620
43621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43622/* end confdefs.h.  */
43623int i;
43624_ACEOF
43625if ac_fn_cxx_try_compile "$LINENO"; then :
43626
43627else
43628  supports=no
43629fi
43630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43631  ac_ext=cpp
43632ac_cpp='$CXXCPP $CPPFLAGS'
43633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43636
43637  CXXFLAGS="$saved_cxxflags"
43638
43639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43640$as_echo "$supports" >&6; }
43641  if test "x$supports" = "xyes" ; then
43642    HAS_CFLAG_OPTIMIZE_DEBUG=true
43643  else
43644    HAS_CFLAG_OPTIMIZE_DEBUG=false
43645  fi
43646
43647
43648    # "-z relro" supported in GNU binutils 2.17 and later
43649    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43650
43651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43652$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43653  supports=yes
43654
43655  saved_ldflags="$LDFLAGS"
43656  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43657  ac_ext=c
43658ac_cpp='$CPP $CPPFLAGS'
43659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43661ac_compiler_gnu=$ac_cv_c_compiler_gnu
43662
43663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43664/* end confdefs.h.  */
43665
43666int
43667main ()
43668{
43669
43670  ;
43671  return 0;
43672}
43673_ACEOF
43674if ac_fn_c_try_link "$LINENO"; then :
43675
43676else
43677  supports=no
43678fi
43679rm -f core conftest.err conftest.$ac_objext \
43680    conftest$ac_exeext conftest.$ac_ext
43681  ac_ext=cpp
43682ac_cpp='$CXXCPP $CPPFLAGS'
43683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43686
43687  LDFLAGS="$saved_ldflags"
43688
43689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43690$as_echo "$supports" >&6; }
43691  if test "x$supports" = "xyes" ; then
43692    HAS_LINKER_RELRO=true
43693  else
43694    HAS_LINKER_RELRO=false
43695  fi
43696
43697
43698    # "-z now" supported in GNU binutils 2.11 and later
43699    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43700
43701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43702$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43703  supports=yes
43704
43705  saved_ldflags="$LDFLAGS"
43706  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43707  ac_ext=c
43708ac_cpp='$CPP $CPPFLAGS'
43709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43711ac_compiler_gnu=$ac_cv_c_compiler_gnu
43712
43713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43714/* end confdefs.h.  */
43715
43716int
43717main ()
43718{
43719
43720  ;
43721  return 0;
43722}
43723_ACEOF
43724if ac_fn_c_try_link "$LINENO"; then :
43725
43726else
43727  supports=no
43728fi
43729rm -f core conftest.err conftest.$ac_objext \
43730    conftest$ac_exeext conftest.$ac_ext
43731  ac_ext=cpp
43732ac_cpp='$CXXCPP $CPPFLAGS'
43733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43736
43737  LDFLAGS="$saved_ldflags"
43738
43739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43740$as_echo "$supports" >&6; }
43741  if test "x$supports" = "xyes" ; then
43742    HAS_LINKER_NOW=true
43743  else
43744    HAS_LINKER_NOW=false
43745  fi
43746
43747  fi
43748
43749  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43750  # in executable.'
43751  USING_BROKEN_SUSE_LD=no
43752  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43754$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43755    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43756    $ECHO "int main() { }" > main.c
43757    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43759$as_echo "no" >&6; }
43760      USING_BROKEN_SUSE_LD=no
43761    else
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43763$as_echo "yes" >&6; }
43764      USING_BROKEN_SUSE_LD=yes
43765    fi
43766    rm -rf version-script.map main.c a.out
43767  fi
43768
43769
43770
43771# Setup the JTReg Regression Test Harness.
43772
43773
43774# Check whether --with-jtreg was given.
43775if test "${with_jtreg+set}" = set; then :
43776  withval=$with_jtreg;
43777else
43778  with_jtreg=no
43779fi
43780
43781
43782  if test "x$with_jtreg" = xno; then
43783    # jtreg disabled
43784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43785$as_echo_n "checking for jtreg... " >&6; }
43786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43787$as_echo "no" >&6; }
43788  else
43789    if test "x$with_jtreg" != xyes; then
43790      # with path specified.
43791      JT_HOME="$with_jtreg"
43792    fi
43793
43794    if test "x$JT_HOME" != x; then
43795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43796$as_echo_n "checking for jtreg... " >&6; }
43797
43798      # use JT_HOME enviroment var.
43799
43800  # Only process if variable expands to non-empty
43801
43802  if test "x$JT_HOME" != x; then
43803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43804
43805  # Input might be given as Windows format, start by converting to
43806  # unix format.
43807  path="$JT_HOME"
43808  new_path=`$CYGPATH -u "$path"`
43809
43810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43813  # "foo.exe" is OK but "foo" is an error.
43814  #
43815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43816  # It is also a way to make sure we got the proper file name for the real test later on.
43817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43818  if test "x$test_shortpath" = x; then
43819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43820$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43821    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43822  fi
43823
43824  # Call helper function which possibly converts this using DOS-style short mode.
43825  # If so, the updated path is stored in $new_path.
43826
43827  input_path="$new_path"
43828  # Check if we need to convert this using DOS-style short mode. If the path
43829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43830  # take no chances and rewrite it.
43831  # Note: m4 eats our [], so we need to use [ and ] instead.
43832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43833  if test "x$has_forbidden_chars" != x; then
43834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43838      # Going to short mode and back again did indeed matter. Since short mode is
43839      # case insensitive, let's make it lowercase to improve readability.
43840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43841      # Now convert it back to Unix-style (cygpath)
43842      input_path=`$CYGPATH -u "$shortmode_path"`
43843      new_path="$input_path"
43844    fi
43845  fi
43846
43847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43848  if test "x$test_cygdrive_prefix" = x; then
43849    # As a simple fix, exclude /usr/bin since it's not a real path.
43850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43852      # a path prefixed by /cygdrive for fixpath to work.
43853      new_path="$CYGWIN_ROOT_PATH$input_path"
43854    fi
43855  fi
43856
43857
43858  if test "x$path" != "x$new_path"; then
43859    JT_HOME="$new_path"
43860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43861$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43862  fi
43863
43864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43865
43866  path="$JT_HOME"
43867  has_colon=`$ECHO $path | $GREP ^.:`
43868  new_path="$path"
43869  if test "x$has_colon" = x; then
43870    # Not in mixed or Windows style, start by that.
43871    new_path=`cmd //c echo $path`
43872  fi
43873
43874
43875  input_path="$new_path"
43876  # Check if we need to convert this using DOS-style short mode. If the path
43877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43878  # take no chances and rewrite it.
43879  # Note: m4 eats our [], so we need to use [ and ] instead.
43880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43881  if test "x$has_forbidden_chars" != x; then
43882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43884  fi
43885
43886
43887  windows_path="$new_path"
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889    unix_path=`$CYGPATH -u "$windows_path"`
43890    new_path="$unix_path"
43891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43893    new_path="$unix_path"
43894  fi
43895
43896  if test "x$path" != "x$new_path"; then
43897    JT_HOME="$new_path"
43898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43899$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43900  fi
43901
43902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43904
43905    else
43906      # We're on a unix platform. Hooray! :)
43907      path="$JT_HOME"
43908      has_space=`$ECHO "$path" | $GREP " "`
43909      if test "x$has_space" != x; then
43910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43911$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43913      fi
43914
43915      # Use eval to expand a potential ~
43916      eval path="$path"
43917      if test ! -f "$path" && test ! -d "$path"; then
43918        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43919      fi
43920
43921      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43922    fi
43923  fi
43924
43925
43926      # jtreg win32 script works for everybody
43927      JTREGEXE="$JT_HOME/bin/jtreg"
43928
43929      if test ! -f "$JTREGEXE"; then
43930        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43931      fi
43932
43933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43934$as_echo "$JTREGEXE" >&6; }
43935    else
43936      # try to find jtreg on path
43937
43938
43939
43940  # Publish this variable in the help.
43941
43942
43943  if [ -z "${JTREGEXE+x}" ]; then
43944    # The variable is not set by user, try to locate tool using the code snippet
43945    for ac_prog in jtreg
43946do
43947  # Extract the first word of "$ac_prog", so it can be a program name with args.
43948set dummy $ac_prog; ac_word=$2
43949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43950$as_echo_n "checking for $ac_word... " >&6; }
43951if ${ac_cv_path_JTREGEXE+:} false; then :
43952  $as_echo_n "(cached) " >&6
43953else
43954  case $JTREGEXE in
43955  [\\/]* | ?:[\\/]*)
43956  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43957  ;;
43958  *)
43959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43960for as_dir in $PATH
43961do
43962  IFS=$as_save_IFS
43963  test -z "$as_dir" && as_dir=.
43964    for ac_exec_ext in '' $ac_executable_extensions; do
43965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43966    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43968    break 2
43969  fi
43970done
43971  done
43972IFS=$as_save_IFS
43973
43974  ;;
43975esac
43976fi
43977JTREGEXE=$ac_cv_path_JTREGEXE
43978if test -n "$JTREGEXE"; then
43979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43980$as_echo "$JTREGEXE" >&6; }
43981else
43982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43983$as_echo "no" >&6; }
43984fi
43985
43986
43987  test -n "$JTREGEXE" && break
43988done
43989
43990  else
43991    # The variable is set, but is it from the command line or the environment?
43992
43993    # Try to remove the string !JTREGEXE! from our list.
43994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43996      # If it failed, the variable was not from the command line. Ignore it,
43997      # but warn the user (except for BASH, which is always set by the calling BASH).
43998      if test "xJTREGEXE" != xBASH; then
43999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
44000$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
44001      fi
44002      # Try to locate tool using the code snippet
44003      for ac_prog in jtreg
44004do
44005  # Extract the first word of "$ac_prog", so it can be a program name with args.
44006set dummy $ac_prog; ac_word=$2
44007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44008$as_echo_n "checking for $ac_word... " >&6; }
44009if ${ac_cv_path_JTREGEXE+:} false; then :
44010  $as_echo_n "(cached) " >&6
44011else
44012  case $JTREGEXE in
44013  [\\/]* | ?:[\\/]*)
44014  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
44015  ;;
44016  *)
44017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44018for as_dir in $PATH
44019do
44020  IFS=$as_save_IFS
44021  test -z "$as_dir" && as_dir=.
44022    for ac_exec_ext in '' $ac_executable_extensions; do
44023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44024    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
44025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44026    break 2
44027  fi
44028done
44029  done
44030IFS=$as_save_IFS
44031
44032  ;;
44033esac
44034fi
44035JTREGEXE=$ac_cv_path_JTREGEXE
44036if test -n "$JTREGEXE"; then
44037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
44038$as_echo "$JTREGEXE" >&6; }
44039else
44040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44041$as_echo "no" >&6; }
44042fi
44043
44044
44045  test -n "$JTREGEXE" && break
44046done
44047
44048    else
44049      # If it succeeded, then it was overridden by the user. We will use it
44050      # for the tool.
44051
44052      # First remove it from the list of overridden variables, so we can test
44053      # for unknown variables in the end.
44054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44055
44056      # Check if we try to supply an empty value
44057      if test "x$JTREGEXE" = x; then
44058        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
44059$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
44060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
44061$as_echo_n "checking for JTREGEXE... " >&6; }
44062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44063$as_echo "disabled" >&6; }
44064      else
44065        # Check if the provided tool contains a complete path.
44066        tool_specified="$JTREGEXE"
44067        tool_basename="${tool_specified##*/}"
44068        if test "x$tool_basename" = "x$tool_specified"; then
44069          # A command without a complete path is provided, search $PATH.
44070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
44071$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
44072          # Extract the first word of "$tool_basename", so it can be a program name with args.
44073set dummy $tool_basename; ac_word=$2
44074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44075$as_echo_n "checking for $ac_word... " >&6; }
44076if ${ac_cv_path_JTREGEXE+:} false; then :
44077  $as_echo_n "(cached) " >&6
44078else
44079  case $JTREGEXE in
44080  [\\/]* | ?:[\\/]*)
44081  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
44082  ;;
44083  *)
44084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44085for as_dir in $PATH
44086do
44087  IFS=$as_save_IFS
44088  test -z "$as_dir" && as_dir=.
44089    for ac_exec_ext in '' $ac_executable_extensions; do
44090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44091    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
44092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44093    break 2
44094  fi
44095done
44096  done
44097IFS=$as_save_IFS
44098
44099  ;;
44100esac
44101fi
44102JTREGEXE=$ac_cv_path_JTREGEXE
44103if test -n "$JTREGEXE"; then
44104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
44105$as_echo "$JTREGEXE" >&6; }
44106else
44107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44108$as_echo "no" >&6; }
44109fi
44110
44111
44112          if test "x$JTREGEXE" = x; then
44113            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44114          fi
44115        else
44116          # Otherwise we believe it is a complete path. Use it as it is.
44117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
44118$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
44119          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
44120$as_echo_n "checking for JTREGEXE... " >&6; }
44121          if test ! -x "$tool_specified"; then
44122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44123$as_echo "not found" >&6; }
44124            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
44125          fi
44126          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44127$as_echo "$tool_specified" >&6; }
44128        fi
44129      fi
44130    fi
44131
44132  fi
44133
44134
44135
44136  if test "x$JTREGEXE" = x; then
44137    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
44138  fi
44139
44140
44141      JT_HOME="`$DIRNAME $JTREGEXE`"
44142    fi
44143  fi
44144
44145
44146
44147
44148
44149
44150  # Option used to tell the compiler whether to create 32- or 64-bit executables
44151  if test "x$TOOLCHAIN_TYPE" = xxlc; then
44152    COMPILER_TARGET_BITS_FLAG="-q"
44153  else
44154    COMPILER_TARGET_BITS_FLAG="-m"
44155  fi
44156
44157
44158  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
44159  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44160    ARFLAGS="-r"
44161  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44162    ARFLAGS="-X64"
44163  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
44164    # lib.exe is used as AR to create static libraries.
44165    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
44166  else
44167    ARFLAGS=""
44168  fi
44169
44170
44171  ## Setup strip.
44172  # FIXME: should this really be per platform, or should it be per toolchain type?
44173  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
44174  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
44175  if test "x$OPENJDK_TARGET_OS" = xlinux; then
44176    STRIPFLAGS="-g"
44177  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
44178    STRIPFLAGS="-x"
44179  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
44180    STRIPFLAGS="-S"
44181  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44182    STRIPFLAGS="-X32_64"
44183  fi
44184
44185
44186
44187  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44188    CC_OUT_OPTION=-Fo
44189    EXE_OUT_OPTION=-out:
44190    LD_OUT_OPTION=-out:
44191    AR_OUT_OPTION=-out:
44192  else
44193    # The option used to specify the target .o,.a or .so file.
44194    # When compiling, how to specify the to be created object file.
44195    CC_OUT_OPTION='-o$(SPACE)'
44196    # When linking, how to specify the to be created executable.
44197    EXE_OUT_OPTION='-o$(SPACE)'
44198    # When linking, how to specify the to be created dynamically linkable library.
44199    LD_OUT_OPTION='-o$(SPACE)'
44200    # When archiving, how to specify the to be create static archive for object files.
44201    AR_OUT_OPTION='rcs$(SPACE)'
44202  fi
44203
44204
44205
44206
44207
44208  # On Windows, we need to set RC flags.
44209  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44210    RC_FLAGS="-nologo -l0x409"
44211    if test "x$VARIANT" = xOPT; then
44212      RC_FLAGS="$RC_FLAGS -DNDEBUG"
44213    fi
44214
44215    # The version variables used to create RC_FLAGS may be overridden
44216    # in a custom configure script, or possibly the command line.
44217    # Let those variables be expanded at make time in spec.gmk.
44218    # The \$ are escaped to the shell, and the $(...) variables
44219    # are evaluated by make.
44220    RC_FLAGS="$RC_FLAGS \
44221        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
44222        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
44223        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
44224        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
44225        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
44226        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
44227        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
44228  fi
44229
44230
44231  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44232    # silence copyright notice and other headers.
44233    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
44234  fi
44235
44236
44237# FIXME: Currently we must test this after toolchain but before flags. Fix!
44238
44239# Now we can test some aspects on the target using configure macros.
44240
44241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
44242$as_echo_n "checking for ANSI C header files... " >&6; }
44243if ${ac_cv_header_stdc+:} false; then :
44244  $as_echo_n "(cached) " >&6
44245else
44246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44247/* end confdefs.h.  */
44248#include <stdlib.h>
44249#include <stdarg.h>
44250#include <string.h>
44251#include <float.h>
44252
44253int
44254main ()
44255{
44256
44257  ;
44258  return 0;
44259}
44260_ACEOF
44261if ac_fn_cxx_try_compile "$LINENO"; then :
44262  ac_cv_header_stdc=yes
44263else
44264  ac_cv_header_stdc=no
44265fi
44266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44267
44268if test $ac_cv_header_stdc = yes; then
44269  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
44270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44271/* end confdefs.h.  */
44272#include <string.h>
44273
44274_ACEOF
44275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44276  $EGREP "memchr" >/dev/null 2>&1; then :
44277
44278else
44279  ac_cv_header_stdc=no
44280fi
44281rm -f conftest*
44282
44283fi
44284
44285if test $ac_cv_header_stdc = yes; then
44286  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
44287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44288/* end confdefs.h.  */
44289#include <stdlib.h>
44290
44291_ACEOF
44292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44293  $EGREP "free" >/dev/null 2>&1; then :
44294
44295else
44296  ac_cv_header_stdc=no
44297fi
44298rm -f conftest*
44299
44300fi
44301
44302if test $ac_cv_header_stdc = yes; then
44303  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
44304  if test "$cross_compiling" = yes; then :
44305  :
44306else
44307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44308/* end confdefs.h.  */
44309#include <ctype.h>
44310#include <stdlib.h>
44311#if ((' ' & 0x0FF) == 0x020)
44312# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
44313# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
44314#else
44315# define ISLOWER(c) \
44316		   (('a' <= (c) && (c) <= 'i') \
44317		     || ('j' <= (c) && (c) <= 'r') \
44318		     || ('s' <= (c) && (c) <= 'z'))
44319# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
44320#endif
44321
44322#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
44323int
44324main ()
44325{
44326  int i;
44327  for (i = 0; i < 256; i++)
44328    if (XOR (islower (i), ISLOWER (i))
44329	|| toupper (i) != TOUPPER (i))
44330      return 2;
44331  return 0;
44332}
44333_ACEOF
44334if ac_fn_cxx_try_run "$LINENO"; then :
44335
44336else
44337  ac_cv_header_stdc=no
44338fi
44339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44340  conftest.$ac_objext conftest.beam conftest.$ac_ext
44341fi
44342
44343fi
44344fi
44345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
44346$as_echo "$ac_cv_header_stdc" >&6; }
44347if test $ac_cv_header_stdc = yes; then
44348
44349$as_echo "#define STDC_HEADERS 1" >>confdefs.h
44350
44351fi
44352
44353# On IRIX 5.3, sys/types and inttypes.h are conflicting.
44354for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
44355		  inttypes.h stdint.h unistd.h
44356do :
44357  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44358ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
44359"
44360if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44361  cat >>confdefs.h <<_ACEOF
44362#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44363_ACEOF
44364
44365fi
44366
44367done
44368
44369
44370
44371  ###############################################################################
44372  #
44373  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
44374  # (The JVM can use 32 or 64 bit Java pointers but that decision
44375  # is made at runtime.)
44376  #
44377
44378  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
44379    # Always specify -m flag on Solaris
44380    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
44381
44382  # When we add flags to the "official" CFLAGS etc, we need to
44383  # keep track of these additions in ADDED_CFLAGS etc. These
44384  # will later be checked to make sure only controlled additions
44385  # have been made to CFLAGS etc.
44386  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44387  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44388  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44389
44390  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44391  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44392  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44393
44394  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44395  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44396  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44397
44398  elif test "x$COMPILE_TYPE" = xreduced; then
44399    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
44400      # Specify -m if running reduced on unix platforms
44401
44402  # When we add flags to the "official" CFLAGS etc, we need to
44403  # keep track of these additions in ADDED_CFLAGS etc. These
44404  # will later be checked to make sure only controlled additions
44405  # have been made to CFLAGS etc.
44406  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44407  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44408  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44409
44410  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44411  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44412  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44413
44414  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44415  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44416  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44417
44418    fi
44419  fi
44420
44421  # Make compilation sanity check
44422  for ac_header in stdio.h
44423do :
44424  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
44425if test "x$ac_cv_header_stdio_h" = xyes; then :
44426  cat >>confdefs.h <<_ACEOF
44427#define HAVE_STDIO_H 1
44428_ACEOF
44429
44430else
44431
44432    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
44433$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
44434    if test "x$COMPILE_TYPE" = xreduced; then
44435
44436  # Print a helpful message on how to acquire the necessary build dependency.
44437  # reduced is the help tag: freetype, cups, alsa etc
44438  MISSING_DEPENDENCY=reduced
44439
44440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44441    cygwin_help $MISSING_DEPENDENCY
44442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44443    msys_help $MISSING_DEPENDENCY
44444  else
44445    PKGHANDLER_COMMAND=
44446
44447    case $PKGHANDLER in
44448      apt-get)
44449        apt_help     $MISSING_DEPENDENCY ;;
44450      yum)
44451        yum_help     $MISSING_DEPENDENCY ;;
44452      port)
44453        port_help    $MISSING_DEPENDENCY ;;
44454      pkgutil)
44455        pkgutil_help $MISSING_DEPENDENCY ;;
44456      pkgadd)
44457        pkgadd_help  $MISSING_DEPENDENCY ;;
44458    esac
44459
44460    if test "x$PKGHANDLER_COMMAND" != x; then
44461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44462    fi
44463  fi
44464
44465      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44466$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44467    elif test "x$COMPILE_TYPE" = xcross; then
44468      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44469$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44470    fi
44471    as_fn_error $? "Cannot continue." "$LINENO" 5
44472
44473fi
44474
44475done
44476
44477
44478  # The cast to long int works around a bug in the HP C Compiler
44479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44481# This bug is HP SR number 8606223364.
44482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44483$as_echo_n "checking size of int *... " >&6; }
44484if ${ac_cv_sizeof_int_p+:} false; then :
44485  $as_echo_n "(cached) " >&6
44486else
44487  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44488
44489else
44490  if test "$ac_cv_type_int_p" = yes; then
44491     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44493as_fn_error 77 "cannot compute sizeof (int *)
44494See \`config.log' for more details" "$LINENO" 5; }
44495   else
44496     ac_cv_sizeof_int_p=0
44497   fi
44498fi
44499
44500fi
44501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44502$as_echo "$ac_cv_sizeof_int_p" >&6; }
44503
44504
44505
44506cat >>confdefs.h <<_ACEOF
44507#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44508_ACEOF
44509
44510
44511
44512  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
44513  if test "x$ac_cv_sizeof_int_p" = x; then
44514    # The test failed, lets stick to the assumed value.
44515    { $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
44516$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
44517  else
44518    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44519
44520    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44521      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
44522      # Let's try to implicitely set the compilers target architecture and retry the test
44523      { $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
44524$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;}
44525      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
44526$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
44527
44528  # When we add flags to the "official" CFLAGS etc, we need to
44529  # keep track of these additions in ADDED_CFLAGS etc. These
44530  # will later be checked to make sure only controlled additions
44531  # have been made to CFLAGS etc.
44532  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44533  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44534  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44535
44536  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
44537  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
44538  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
44539
44540  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
44541  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
44542  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
44543
44544
44545      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
44546      unset ac_cv_sizeof_int_p
44547      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
44548      cat >>confdefs.h <<_ACEOF
44549#undef SIZEOF_INT_P
44550_ACEOF
44551
44552      # The cast to long int works around a bug in the HP C Compiler
44553# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
44554# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
44555# This bug is HP SR number 8606223364.
44556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
44557$as_echo_n "checking size of int *... " >&6; }
44558if ${ac_cv_sizeof_int_p+:} false; then :
44559  $as_echo_n "(cached) " >&6
44560else
44561  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
44562
44563else
44564  if test "$ac_cv_type_int_p" = yes; then
44565     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
44566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
44567as_fn_error 77 "cannot compute sizeof (int *)
44568See \`config.log' for more details" "$LINENO" 5; }
44569   else
44570     ac_cv_sizeof_int_p=0
44571   fi
44572fi
44573
44574fi
44575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44576$as_echo "$ac_cv_sizeof_int_p" >&6; }
44577
44578
44579
44580cat >>confdefs.h <<_ACEOF
44581#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44582_ACEOF
44583
44584
44585
44586      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44587
44588      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44589        { $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
44590$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;}
44591        if test "x$COMPILE_TYPE" = xreduced; then
44592
44593  # Print a helpful message on how to acquire the necessary build dependency.
44594  # reduced is the help tag: freetype, cups, alsa etc
44595  MISSING_DEPENDENCY=reduced
44596
44597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44598    cygwin_help $MISSING_DEPENDENCY
44599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44600    msys_help $MISSING_DEPENDENCY
44601  else
44602    PKGHANDLER_COMMAND=
44603
44604    case $PKGHANDLER in
44605      apt-get)
44606        apt_help     $MISSING_DEPENDENCY ;;
44607      yum)
44608        yum_help     $MISSING_DEPENDENCY ;;
44609      port)
44610        port_help    $MISSING_DEPENDENCY ;;
44611      pkgutil)
44612        pkgutil_help $MISSING_DEPENDENCY ;;
44613      pkgadd)
44614        pkgadd_help  $MISSING_DEPENDENCY ;;
44615    esac
44616
44617    if test "x$PKGHANDLER_COMMAND" != x; then
44618      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44619    fi
44620  fi
44621
44622          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44623$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44624        elif test "x$COMPILE_TYPE" = xcross; then
44625          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44626$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44627        fi
44628        as_fn_error $? "Cannot continue." "$LINENO" 5
44629      fi
44630    fi
44631  fi
44632
44633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44634$as_echo_n "checking for target address size... " >&6; }
44635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44636$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44637
44638
44639  ###############################################################################
44640  #
44641  # Is the target little of big endian?
44642  #
44643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44644$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44645if ${ac_cv_c_bigendian+:} false; then :
44646  $as_echo_n "(cached) " >&6
44647else
44648  ac_cv_c_bigendian=unknown
44649    # See if we're dealing with a universal compiler.
44650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44651/* end confdefs.h.  */
44652#ifndef __APPLE_CC__
44653	       not a universal capable compiler
44654	     #endif
44655	     typedef int dummy;
44656
44657_ACEOF
44658if ac_fn_cxx_try_compile "$LINENO"; then :
44659
44660	# Check for potential -arch flags.  It is not universal unless
44661	# there are at least two -arch flags with different values.
44662	ac_arch=
44663	ac_prev=
44664	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44665	 if test -n "$ac_prev"; then
44666	   case $ac_word in
44667	     i?86 | x86_64 | ppc | ppc64)
44668	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44669		 ac_arch=$ac_word
44670	       else
44671		 ac_cv_c_bigendian=universal
44672		 break
44673	       fi
44674	       ;;
44675	   esac
44676	   ac_prev=
44677	 elif test "x$ac_word" = "x-arch"; then
44678	   ac_prev=arch
44679	 fi
44680       done
44681fi
44682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44683    if test $ac_cv_c_bigendian = unknown; then
44684      # See if sys/param.h defines the BYTE_ORDER macro.
44685      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44686/* end confdefs.h.  */
44687#include <sys/types.h>
44688	     #include <sys/param.h>
44689
44690int
44691main ()
44692{
44693#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44694		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44695		     && LITTLE_ENDIAN)
44696	      bogus endian macros
44697	     #endif
44698
44699  ;
44700  return 0;
44701}
44702_ACEOF
44703if ac_fn_cxx_try_compile "$LINENO"; then :
44704  # It does; now see whether it defined to BIG_ENDIAN or not.
44705	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44706/* end confdefs.h.  */
44707#include <sys/types.h>
44708		#include <sys/param.h>
44709
44710int
44711main ()
44712{
44713#if BYTE_ORDER != BIG_ENDIAN
44714		 not big endian
44715		#endif
44716
44717  ;
44718  return 0;
44719}
44720_ACEOF
44721if ac_fn_cxx_try_compile "$LINENO"; then :
44722  ac_cv_c_bigendian=yes
44723else
44724  ac_cv_c_bigendian=no
44725fi
44726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44727fi
44728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44729    fi
44730    if test $ac_cv_c_bigendian = unknown; then
44731      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44732      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44733/* end confdefs.h.  */
44734#include <limits.h>
44735
44736int
44737main ()
44738{
44739#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44740	      bogus endian macros
44741	     #endif
44742
44743  ;
44744  return 0;
44745}
44746_ACEOF
44747if ac_fn_cxx_try_compile "$LINENO"; then :
44748  # It does; now see whether it defined to _BIG_ENDIAN or not.
44749	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44750/* end confdefs.h.  */
44751#include <limits.h>
44752
44753int
44754main ()
44755{
44756#ifndef _BIG_ENDIAN
44757		 not big endian
44758		#endif
44759
44760  ;
44761  return 0;
44762}
44763_ACEOF
44764if ac_fn_cxx_try_compile "$LINENO"; then :
44765  ac_cv_c_bigendian=yes
44766else
44767  ac_cv_c_bigendian=no
44768fi
44769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44770fi
44771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44772    fi
44773    if test $ac_cv_c_bigendian = unknown; then
44774      # Compile a test program.
44775      if test "$cross_compiling" = yes; then :
44776  # Try to guess by grepping values from an object file.
44777	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44778/* end confdefs.h.  */
44779short int ascii_mm[] =
44780		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44781		short int ascii_ii[] =
44782		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44783		int use_ascii (int i) {
44784		  return ascii_mm[i] + ascii_ii[i];
44785		}
44786		short int ebcdic_ii[] =
44787		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44788		short int ebcdic_mm[] =
44789		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44790		int use_ebcdic (int i) {
44791		  return ebcdic_mm[i] + ebcdic_ii[i];
44792		}
44793		extern int foo;
44794
44795int
44796main ()
44797{
44798return use_ascii (foo) == use_ebcdic (foo);
44799  ;
44800  return 0;
44801}
44802_ACEOF
44803if ac_fn_cxx_try_compile "$LINENO"; then :
44804  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44805	      ac_cv_c_bigendian=yes
44806	    fi
44807	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44808	      if test "$ac_cv_c_bigendian" = unknown; then
44809		ac_cv_c_bigendian=no
44810	      else
44811		# finding both strings is unlikely to happen, but who knows?
44812		ac_cv_c_bigendian=unknown
44813	      fi
44814	    fi
44815fi
44816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44817else
44818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44819/* end confdefs.h.  */
44820$ac_includes_default
44821int
44822main ()
44823{
44824
44825	     /* Are we little or big endian?  From Harbison&Steele.  */
44826	     union
44827	     {
44828	       long int l;
44829	       char c[sizeof (long int)];
44830	     } u;
44831	     u.l = 1;
44832	     return u.c[sizeof (long int) - 1] == 1;
44833
44834  ;
44835  return 0;
44836}
44837_ACEOF
44838if ac_fn_cxx_try_run "$LINENO"; then :
44839  ac_cv_c_bigendian=no
44840else
44841  ac_cv_c_bigendian=yes
44842fi
44843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44844  conftest.$ac_objext conftest.beam conftest.$ac_ext
44845fi
44846
44847    fi
44848fi
44849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44850$as_echo "$ac_cv_c_bigendian" >&6; }
44851 case $ac_cv_c_bigendian in #(
44852   yes)
44853     ENDIAN="big";; #(
44854   no)
44855     ENDIAN="little" ;; #(
44856   universal)
44857     ENDIAN="universal_endianness"
44858     ;; #(
44859   *)
44860     ENDIAN="unknown" ;;
44861 esac
44862
44863
44864  if test "x$ENDIAN" = xuniversal_endianness; then
44865    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44866  fi
44867  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44868    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
44869  fi
44870
44871
44872# Configure flags for the tools
44873
44874  ###############################################################################
44875  #
44876  # How to compile shared libraries.
44877  #
44878
44879  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44880    PICFLAG="-fPIC"
44881    C_FLAG_REORDER=''
44882    CXX_FLAG_REORDER=''
44883
44884    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44885      # Linking is different on MacOSX
44886      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44887      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44888      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44889      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44890      SET_SHARED_LIBRARY_MAPFILE=''
44891    else
44892      # Default works for linux, might work on other platforms as well.
44893      SHARED_LIBRARY_FLAGS='-shared'
44894      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44895      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44896      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44897      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44898    fi
44899  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44900    PICFLAG=''
44901    C_FLAG_REORDER=''
44902    CXX_FLAG_REORDER=''
44903
44904    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44905      # Linking is different on MacOSX
44906      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44907      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44908      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44909      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44910      SET_SHARED_LIBRARY_MAPFILE=''
44911    else
44912      # Default works for linux, might work on other platforms as well.
44913      SHARED_LIBRARY_FLAGS='-shared'
44914      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44915      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44916      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44917      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44918    fi
44919  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44920    PICFLAG="-KPIC"
44921    C_FLAG_REORDER='-xF'
44922    CXX_FLAG_REORDER='-xF'
44923    SHARED_LIBRARY_FLAGS="-G"
44924    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44925    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44926    SET_SHARED_LIBRARY_NAME=''
44927    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44928  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44929    PICFLAG="-qpic=large"
44930    C_FLAG_REORDER=''
44931    CXX_FLAG_REORDER=''
44932    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44933    SET_EXECUTABLE_ORIGIN=""
44934    SET_SHARED_LIBRARY_ORIGIN=''
44935    SET_SHARED_LIBRARY_NAME=''
44936    SET_SHARED_LIBRARY_MAPFILE=''
44937  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44938    PICFLAG=""
44939    C_FLAG_REORDER=''
44940    CXX_FLAG_REORDER=''
44941    SHARED_LIBRARY_FLAGS="-LD"
44942    SET_EXECUTABLE_ORIGIN=''
44943    SET_SHARED_LIBRARY_ORIGIN=''
44944    SET_SHARED_LIBRARY_NAME=''
44945    SET_SHARED_LIBRARY_MAPFILE=''
44946  fi
44947
44948
44949
44950
44951
44952
44953
44954
44955  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44956    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44957    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44958    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44959  fi
44960  # The (cross) compiler is now configured, we can now test capabilities
44961  # of the target platform.
44962
44963
44964
44965  ###############################################################################
44966  #
44967  # Setup the opt flags for different compilers
44968  # and different operating systems.
44969  #
44970
44971  # FIXME: this was indirectly the old default, but just inherited.
44972  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44973  #   C_FLAG_DEPS="-MMD -MF"
44974  # fi
44975
44976  # Generate make dependency files
44977  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44978    C_FLAG_DEPS="-MMD -MF"
44979  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44980    C_FLAG_DEPS="-MMD -MF"
44981  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44982    C_FLAG_DEPS="-xMMD -xMF"
44983  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44984    C_FLAG_DEPS="-qmakedep=gcc -MF"
44985  fi
44986  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44987
44988
44989
44990  # Debug symbols
44991  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44992    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44993      # reduce from default "-g2" option to save space
44994      CFLAGS_DEBUG_SYMBOLS="-g1"
44995      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44996    else
44997      CFLAGS_DEBUG_SYMBOLS="-g"
44998      CXXFLAGS_DEBUG_SYMBOLS="-g"
44999    fi
45000  elif test "x$TOOLCHAIN_TYPE" = xclang; then
45001    CFLAGS_DEBUG_SYMBOLS="-g"
45002    CXXFLAGS_DEBUG_SYMBOLS="-g"
45003  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45004    CFLAGS_DEBUG_SYMBOLS="-g -xs"
45005    # FIXME: likely a bug, this disables debug symbols rather than enables them
45006    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
45007  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45008    CFLAGS_DEBUG_SYMBOLS="-g"
45009    CXXFLAGS_DEBUG_SYMBOLS="-g"
45010  fi
45011
45012
45013
45014  # bounds, memory and behavior checking options
45015  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45016    case $DEBUG_LEVEL in
45017    release )
45018      # no adjustment
45019      ;;
45020    fastdebug )
45021      # no adjustment
45022      ;;
45023    slowdebug )
45024      # Add runtime stack smashing and undefined behavior checks.
45025      # Not all versions of gcc support -fstack-protector
45026      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
45027
45028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
45029$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
45030  supports=yes
45031
45032  saved_cflags="$CFLAGS"
45033  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
45034  ac_ext=c
45035ac_cpp='$CPP $CPPFLAGS'
45036ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45037ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45038ac_compiler_gnu=$ac_cv_c_compiler_gnu
45039
45040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45041/* end confdefs.h.  */
45042int i;
45043_ACEOF
45044if ac_fn_c_try_compile "$LINENO"; then :
45045
45046else
45047  supports=no
45048fi
45049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45050  ac_ext=cpp
45051ac_cpp='$CXXCPP $CPPFLAGS'
45052ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45053ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45054ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45055
45056  CFLAGS="$saved_cflags"
45057
45058  saved_cxxflags="$CXXFLAGS"
45059  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
45060  ac_ext=cpp
45061ac_cpp='$CXXCPP $CPPFLAGS'
45062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45065
45066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45067/* end confdefs.h.  */
45068int i;
45069_ACEOF
45070if ac_fn_cxx_try_compile "$LINENO"; then :
45071
45072else
45073  supports=no
45074fi
45075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45076  ac_ext=cpp
45077ac_cpp='$CXXCPP $CPPFLAGS'
45078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45081
45082  CXXFLAGS="$saved_cxxflags"
45083
45084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45085$as_echo "$supports" >&6; }
45086  if test "x$supports" = "xyes" ; then
45087    :
45088  else
45089    STACK_PROTECTOR_CFLAG=""
45090  fi
45091
45092
45093      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
45094      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
45095      ;;
45096    esac
45097  fi
45098
45099  # Optimization levels
45100  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45101    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
45102
45103    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
45104      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
45105      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
45106      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
45107      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
45108      C_O_FLAG_DEBUG="-xregs=no%frameptr"
45109      C_O_FLAG_NONE="-xregs=no%frameptr"
45110      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
45111      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
45112      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
45113      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
45114      CXX_O_FLAG_NONE="-xregs=no%frameptr"
45115      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45116        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
45117        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
45118      fi
45119    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
45120      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
45121      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
45122      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
45123      C_O_FLAG_DEBUG=""
45124      C_O_FLAG_NONE=""
45125      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
45126      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
45127      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
45128      C_O_FLAG_DEBUG=""
45129      CXX_O_FLAG_NONE=""
45130    fi
45131  else
45132    # The remaining toolchains share opt flags between CC and CXX;
45133    # setup for C and duplicate afterwards.
45134    if test "x$TOOLCHAIN_TYPE" = xgcc; then
45135      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45136        # On MacOSX we optimize for size, something
45137        # we should do for all platforms?
45138        C_O_FLAG_HIGHEST="-Os"
45139        C_O_FLAG_HI="-Os"
45140        C_O_FLAG_NORM="-Os"
45141      else
45142        C_O_FLAG_HIGHEST="-O3"
45143        C_O_FLAG_HI="-O3"
45144        C_O_FLAG_NORM="-O2"
45145      fi
45146      C_O_FLAG_DEBUG="-O0"
45147      C_O_FLAG_NONE="-O0"
45148    elif test "x$TOOLCHAIN_TYPE" = xclang; then
45149      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45150        # On MacOSX we optimize for size, something
45151        # we should do for all platforms?
45152        C_O_FLAG_HIGHEST="-Os"
45153        C_O_FLAG_HI="-Os"
45154        C_O_FLAG_NORM="-Os"
45155      else
45156        C_O_FLAG_HIGHEST="-O3"
45157        C_O_FLAG_HI="-O3"
45158        C_O_FLAG_NORM="-O2"
45159      fi
45160      C_O_FLAG_DEBUG="-O0"
45161      C_O_FLAG_NONE="-O0"
45162    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45163      C_O_FLAG_HIGHEST="-O3"
45164      C_O_FLAG_HI="-O3 -qstrict"
45165      C_O_FLAG_NORM="-O2"
45166      C_O_FLAG_DEBUG="-qnoopt"
45167      C_O_FLAG_NONE="-qnoop"
45168    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45169      C_O_FLAG_HIGHEST="-O2"
45170      C_O_FLAG_HI="-O1"
45171      C_O_FLAG_NORM="-O1"
45172      C_O_FLAG_DEBUG="-Od"
45173      C_O_FLAG_NONE="-Od"
45174    fi
45175    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
45176    CXX_O_FLAG_HI="$C_O_FLAG_HI"
45177    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
45178    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
45179    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
45180  fi
45181
45182  # Adjust optimization flags according to debug level.
45183  case $DEBUG_LEVEL in
45184    release )
45185      # no adjustment
45186      ;;
45187    fastdebug )
45188      # Not quite so much optimization
45189      C_O_FLAG_HI="$C_O_FLAG_NORM"
45190      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
45191      ;;
45192    slowdebug )
45193      # Disable optimization
45194      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
45195      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
45196      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
45197      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
45198      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
45199      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
45200      ;;
45201  esac
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215  # Special extras...
45216  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45217    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
45218      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
45219      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
45220    fi
45221    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
45222    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
45223  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45224    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
45225    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
45226  fi
45227
45228  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
45229  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
45230  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
45231
45232  ###############################################################################
45233  #
45234  # Now setup the CFLAGS and LDFLAGS for the JDK build.
45235  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
45236  #
45237
45238  # Setup compiler/platform specific flags into
45239  #    CFLAGS_JDK    - C Compiler flags
45240  #    CXXFLAGS_JDK  - C++ Compiler flags
45241  #    COMMON_CCXXFLAGS_JDK - common to C and C++
45242  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45243    if test "x$OPENJDK_TARGET_CPU" = xx86; then
45244      # Force compatibility with i586 on 32 bit intel platforms.
45245      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
45246    fi
45247    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
45248        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
45249    case $OPENJDK_TARGET_CPU_ARCH in
45250      arm )
45251        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
45252        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45253        ;;
45254      ppc )
45255        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
45256        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45257        ;;
45258      * )
45259        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
45260        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
45261        ;;
45262    esac
45263  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45264    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
45265    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
45266      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
45267    fi
45268
45269    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
45270    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
45271  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45272    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
45273    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
45274  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45275    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
45276        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
45277        -DWIN32_LEAN_AND_MEAN \
45278        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
45279        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
45280        -DWIN32 -DIAL"
45281    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45282      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
45283    else
45284      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
45285    fi
45286    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
45287    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
45288    # studio.
45289    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
45290      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45291          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
45292    fi
45293  fi
45294
45295  ###############################################################################
45296
45297  # Adjust flags according to debug level.
45298  case $DEBUG_LEVEL in
45299    fastdebug | slowdebug )
45300      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
45301      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
45302      JAVAC_FLAGS="$JAVAC_FLAGS -g"
45303      ;;
45304    release )
45305      ;;
45306    * )
45307      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45308      ;;
45309  esac
45310
45311  # Setup LP64
45312  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
45313
45314  # Set some common defines. These works for all compilers, but assume
45315  # -D is universally accepted.
45316
45317  # Setup endianness
45318  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
45319    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
45320    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
45321    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
45322    #   Note: -Dmacro         is the same as    #define macro 1
45323    #         -Dmacro=        is the same as    #define macro
45324    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45325      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
45326    else
45327      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
45328    fi
45329  else
45330    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
45331    # are defined in the system?
45332    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45333      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
45334    else
45335      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
45336    fi
45337  fi
45338
45339  # Setup target OS define. Use OS target name but in upper case.
45340  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
45341  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
45342
45343  # Setup target CPU
45344  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
45345
45346  # Setup debug/release defines
45347  if test "x$DEBUG_LEVEL" = xrelease; then
45348    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
45349    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45350      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
45351    fi
45352  else
45353    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
45354  fi
45355
45356  # Set some additional per-OS defines.
45357  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45358    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
45359  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45360    # FIXME: PPC64 should not be here.
45361    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
45362  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
45363    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
45364  fi
45365
45366  # Additional macosx handling
45367  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45368    # Setting these parameters makes it an error to link to macosx APIs that are
45369    # newer than the given OS version and makes the linked binaries compatible
45370    # even if built on a newer version of the OS.
45371    # The expected format is X.Y.Z
45372    MACOSX_VERSION_MIN=10.7.0
45373
45374
45375    # The macro takes the version with no dots, ex: 1070
45376    # Let the flags variables get resolved in make for easier override on make
45377    # command line.
45378    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45379    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
45380  fi
45381
45382  # Setup some hard coded includes
45383  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
45384      -I${JDK_TOPDIR}/src/java.base/share/native/include \
45385      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
45386      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
45387
45388  # The shared libraries are compiled using the picflag.
45389  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45390  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45391
45392  # Executable flags
45393  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45394  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45395
45396
45397
45398
45399
45400
45401  # Flags for compiling test libraries
45402  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
45403  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
45404
45405  # Flags for compiling test executables
45406  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
45407  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
45408
45409
45410
45411
45412
45413
45414  # Setup LDFLAGS et al.
45415  #
45416
45417  # Now this is odd. The JDK native libraries have to link against libjvm.so
45418  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
45419  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
45420  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
45421  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
45422  # libraries will link to whatever is in memory. Yuck.
45423  #
45424  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
45425  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45426    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
45427    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
45428      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
45429    fi
45430    # TODO: make -debug optional "--disable-full-debug-symbols"
45431    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
45432  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45433    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45434    # We have previously set HAS_GNU_HASH if this is the case
45435    if test -n "$HAS_GNU_HASH"; then
45436      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
45437    fi
45438    if test "x$OPENJDK_TARGET_OS" = xlinux; then
45439      # And since we now know that the linker is gnu, then add -z defs, to forbid
45440      # undefined symbols in object files.
45441      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
45442      case $DEBUG_LEVEL in
45443        release )
45444          # tell linker to optimize libraries.
45445          # Should this be supplied to the OSS linker as well?
45446          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
45447          ;;
45448        slowdebug )
45449          if test "x$HAS_LINKER_NOW" = "xtrue"; then
45450            # do relocations at load
45451            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
45452            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
45453          fi
45454          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45455            # mark relocations read only
45456            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45457            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45458          fi
45459          ;;
45460        fastdebug )
45461          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
45462            # mark relocations read only
45463            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
45464            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
45465          fi
45466          ;;
45467        * )
45468          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
45469          ;;
45470        esac
45471    fi
45472  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45473    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
45474    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
45475  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45476    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
45477  fi
45478
45479  # Customize LDFLAGS for executables
45480
45481  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
45482
45483  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45484    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
45485      LDFLAGS_STACK_SIZE=1048576
45486    else
45487      LDFLAGS_STACK_SIZE=327680
45488    fi
45489    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
45490  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
45491    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
45492  fi
45493
45494  # Customize LDFLAGS for libs
45495  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
45496
45497  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45498    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
45499    JDKLIB_LIBS=""
45500  else
45501    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
45502        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
45503
45504    # On some platforms (mac) the linker warns about non existing -L dirs.
45505    # Add server first if available. Linking aginst client does not always produce the same results.
45506    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
45507    # Default to server for other variants.
45508    if test "x$JVM_VARIANT_SERVER" = xtrue; then
45509      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45510    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
45511      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
45512    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
45513      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
45514    else
45515      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
45516    fi
45517
45518    JDKLIB_LIBS="-ljava -ljvm"
45519    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45520      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
45521    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
45522      JDKLIB_LIBS="$JDKLIB_LIBS -liconv"
45523    fi
45524  fi
45525
45526
45527
45528
45529
45530
45531
45532  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
45533  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
45534
45535
45536
45537
45538
45539  # Some Zero and Shark settings.
45540  # ZERO_ARCHFLAG tells the compiler which mode to build for
45541  case "${OPENJDK_TARGET_CPU}" in
45542    s390)
45543      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
45544      ;;
45545    *)
45546      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45547  esac
45548
45549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
45550$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
45551  supports=yes
45552
45553  saved_cflags="$CFLAGS"
45554  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
45555  ac_ext=c
45556ac_cpp='$CPP $CPPFLAGS'
45557ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45558ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45559ac_compiler_gnu=$ac_cv_c_compiler_gnu
45560
45561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45562/* end confdefs.h.  */
45563int i;
45564_ACEOF
45565if ac_fn_c_try_compile "$LINENO"; then :
45566
45567else
45568  supports=no
45569fi
45570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45571  ac_ext=cpp
45572ac_cpp='$CXXCPP $CPPFLAGS'
45573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45576
45577  CFLAGS="$saved_cflags"
45578
45579  saved_cxxflags="$CXXFLAGS"
45580  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45581  ac_ext=cpp
45582ac_cpp='$CXXCPP $CPPFLAGS'
45583ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45584ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45585ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45586
45587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45588/* end confdefs.h.  */
45589int i;
45590_ACEOF
45591if ac_fn_cxx_try_compile "$LINENO"; then :
45592
45593else
45594  supports=no
45595fi
45596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45597  ac_ext=cpp
45598ac_cpp='$CXXCPP $CPPFLAGS'
45599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45602
45603  CXXFLAGS="$saved_cxxflags"
45604
45605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45606$as_echo "$supports" >&6; }
45607  if test "x$supports" = "xyes" ; then
45608    :
45609  else
45610    ZERO_ARCHFLAG=""
45611  fi
45612
45613
45614
45615  # Check that the compiler supports -mX (or -qX on AIX) flags
45616  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45617
45618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45619$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45620  supports=yes
45621
45622  saved_cflags="$CFLAGS"
45623  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45624  ac_ext=c
45625ac_cpp='$CPP $CPPFLAGS'
45626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45628ac_compiler_gnu=$ac_cv_c_compiler_gnu
45629
45630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45631/* end confdefs.h.  */
45632int i;
45633_ACEOF
45634if ac_fn_c_try_compile "$LINENO"; then :
45635
45636else
45637  supports=no
45638fi
45639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45640  ac_ext=cpp
45641ac_cpp='$CXXCPP $CPPFLAGS'
45642ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45643ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45644ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45645
45646  CFLAGS="$saved_cflags"
45647
45648  saved_cxxflags="$CXXFLAGS"
45649  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45650  ac_ext=cpp
45651ac_cpp='$CXXCPP $CPPFLAGS'
45652ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45653ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45654ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45655
45656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45657/* end confdefs.h.  */
45658int i;
45659_ACEOF
45660if ac_fn_cxx_try_compile "$LINENO"; then :
45661
45662else
45663  supports=no
45664fi
45665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45666  ac_ext=cpp
45667ac_cpp='$CXXCPP $CPPFLAGS'
45668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45671
45672  CXXFLAGS="$saved_cxxflags"
45673
45674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45675$as_echo "$supports" >&6; }
45676  if test "x$supports" = "xyes" ; then
45677    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45678  else
45679    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45680  fi
45681
45682
45683
45684  # Check whether --enable-warnings-as-errors was given.
45685if test "${enable_warnings_as_errors+set}" = set; then :
45686  enableval=$enable_warnings_as_errors;
45687fi
45688
45689
45690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45691$as_echo_n "checking if native warnings are errors... " >&6; }
45692  if test "x$enable_warnings_as_errors" = "xyes"; then
45693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45694$as_echo "yes (explicitely set)" >&6; }
45695    WARNINGS_AS_ERRORS=true
45696  elif test "x$enable_warnings_as_errors" = "xno"; then
45697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45698$as_echo "no" >&6; }
45699    WARNINGS_AS_ERRORS=false
45700  elif test "x$enable_warnings_as_errors" = "x"; then
45701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45702$as_echo "yes (default)" >&6; }
45703    WARNINGS_AS_ERRORS=true
45704  else
45705    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45706  fi
45707
45708
45709  case "${TOOLCHAIN_TYPE}" in
45710    microsoft)
45711      DISABLE_WARNING_PREFIX="-wd"
45712      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45713      ;;
45714    solstudio)
45715      DISABLE_WARNING_PREFIX="-erroff="
45716      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45717      ;;
45718    gcc)
45719      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45720
45721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45722$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45723  supports=yes
45724
45725  saved_cflags="$CFLAGS"
45726  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45727  ac_ext=c
45728ac_cpp='$CPP $CPPFLAGS'
45729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45731ac_compiler_gnu=$ac_cv_c_compiler_gnu
45732
45733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45734/* end confdefs.h.  */
45735int i;
45736_ACEOF
45737if ac_fn_c_try_compile "$LINENO"; then :
45738
45739else
45740  supports=no
45741fi
45742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45743  ac_ext=cpp
45744ac_cpp='$CXXCPP $CPPFLAGS'
45745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45748
45749  CFLAGS="$saved_cflags"
45750
45751  saved_cxxflags="$CXXFLAGS"
45752  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45753  ac_ext=cpp
45754ac_cpp='$CXXCPP $CPPFLAGS'
45755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45758
45759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45760/* end confdefs.h.  */
45761int i;
45762_ACEOF
45763if ac_fn_cxx_try_compile "$LINENO"; then :
45764
45765else
45766  supports=no
45767fi
45768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45769  ac_ext=cpp
45770ac_cpp='$CXXCPP $CPPFLAGS'
45771ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45772ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45773ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45774
45775  CXXFLAGS="$saved_cxxflags"
45776
45777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45778$as_echo "$supports" >&6; }
45779  if test "x$supports" = "xyes" ; then
45780    GCC_CAN_DISABLE_WARNINGS=true
45781  else
45782    GCC_CAN_DISABLE_WARNINGS=false
45783
45784  fi
45785
45786      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45787        DISABLE_WARNING_PREFIX="-Wno-"
45788      else
45789        DISABLE_WARNING_PREFIX=
45790      fi
45791      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45792      ;;
45793    clang)
45794      DISABLE_WARNING_PREFIX="-Wno-"
45795      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45796      ;;
45797  esac
45798
45799
45800
45801
45802# Setup debug symbols (need objcopy from the toolchain for that)
45803
45804  #
45805  # ENABLE_DEBUG_SYMBOLS
45806  # This must be done after the toolchain is setup, since we're looking at objcopy.
45807  #
45808  # Check whether --enable-debug-symbols was given.
45809if test "${enable_debug_symbols+set}" = set; then :
45810  enableval=$enable_debug_symbols;
45811fi
45812
45813
45814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45815$as_echo_n "checking if we should generate debug symbols... " >&6; }
45816
45817  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45818    # explicit enabling of enable-debug-symbols and can't find objcopy
45819    #   this is an error
45820    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45821  fi
45822
45823  if test "x$enable_debug_symbols" = "xyes"; then
45824    ENABLE_DEBUG_SYMBOLS=true
45825  elif test "x$enable_debug_symbols" = "xno"; then
45826    ENABLE_DEBUG_SYMBOLS=false
45827  else
45828    # Default is on if objcopy is found
45829    if test "x$OBJCOPY" != x; then
45830      ENABLE_DEBUG_SYMBOLS=true
45831    # MacOS X and Windows don't use objcopy but default is on for those OSes
45832    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45833      ENABLE_DEBUG_SYMBOLS=true
45834    else
45835      ENABLE_DEBUG_SYMBOLS=false
45836    fi
45837  fi
45838
45839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45840$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45841
45842  #
45843  # ZIP_DEBUGINFO_FILES
45844  #
45845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45846$as_echo_n "checking if we should zip debug-info files... " >&6; }
45847  # Check whether --enable-zip-debug-info was given.
45848if test "${enable_zip_debug_info+set}" = set; then :
45849  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45850else
45851  enable_zip_debug_info="yes"
45852fi
45853
45854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45855$as_echo "${enable_zip_debug_info}" >&6; }
45856
45857  if test "x${enable_zip_debug_info}" = "xno"; then
45858    ZIP_DEBUGINFO_FILES=false
45859  else
45860    ZIP_DEBUGINFO_FILES=true
45861  fi
45862
45863
45864
45865
45866
45867  # Check whether --enable-native-coverage was given.
45868if test "${enable_native_coverage+set}" = set; then :
45869  enableval=$enable_native_coverage;
45870fi
45871
45872  GCOV_ENABLED="false"
45873  if test "x$enable_native_coverage" = "xyes"; then
45874    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45876$as_echo_n "checking if native coverage is enabled... " >&6; }
45877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45878$as_echo "yes" >&6; }
45879      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45880      GCOV_LDFLAGS="-fprofile-arcs"
45881      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45882      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45883      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45884      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45885      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45886      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45887      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45888      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45889      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45890      GCOV_ENABLED="true"
45891    else
45892      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45893    fi
45894  elif test "x$enable_native_coverage" = "xno"; then
45895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45896$as_echo_n "checking if native coverage is enabled... " >&6; }
45897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45898$as_echo "no" >&6; }
45899  elif test "x$enable_native_coverage" != "x"; then
45900    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45901  fi
45902
45903
45904
45905
45906###############################################################################
45907#
45908# Check dependencies for external and internal libraries.
45909#
45910###############################################################################
45911
45912# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45913
45914  # When using cygwin or msys, we need a wrapper binary that renames
45915  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45916  # @files and rewrites these too! This wrapper binary is
45917  # called fixpath.
45918  FIXPATH=
45919  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45921$as_echo_n "checking if fixpath can be created... " >&6; }
45922    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45923    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45924    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45925    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45926      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45927      FIXPATH="$FIXPATH_BIN -c"
45928    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45929      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45930      # @ was chosen as separator to minimize risk of other tools messing around with it
45931      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45932          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45933      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45934      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45935    fi
45936    FIXPATH_SRC_W="$FIXPATH_SRC"
45937    FIXPATH_BIN_W="$FIXPATH_BIN"
45938
45939  unix_path="$FIXPATH_SRC_W"
45940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45941    windows_path=`$CYGPATH -m "$unix_path"`
45942    FIXPATH_SRC_W="$windows_path"
45943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45944    windows_path=`cmd //c echo $unix_path`
45945    FIXPATH_SRC_W="$windows_path"
45946  fi
45947
45948
45949  unix_path="$FIXPATH_BIN_W"
45950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45951    windows_path=`$CYGPATH -m "$unix_path"`
45952    FIXPATH_BIN_W="$windows_path"
45953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45954    windows_path=`cmd //c echo $unix_path`
45955    FIXPATH_BIN_W="$windows_path"
45956  fi
45957
45958    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45959    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45960    cd $FIXPATH_DIR
45961    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45962    cd $CURDIR
45963
45964    if test ! -x $FIXPATH_BIN; then
45965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45966$as_echo "no" >&6; }
45967      cat $FIXPATH_DIR/fixpath1.log
45968      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45969    fi
45970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45971$as_echo "yes" >&6; }
45972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45973$as_echo_n "checking if fixpath.exe works... " >&6; }
45974    cd $FIXPATH_DIR
45975    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45976        > $FIXPATH_DIR/fixpath2.log 2>&1
45977    cd $CURDIR
45978    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45980$as_echo "no" >&6; }
45981      cat $FIXPATH_DIR/fixpath2.log
45982      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45983    fi
45984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45985$as_echo "yes" >&6; }
45986  fi
45987
45988
45989
45990
45991
45992  # Check if X11 is needed
45993  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45994    # No X11 support on windows or macosx
45995    NEEDS_LIB_X11=false
45996  else
45997    if test "x$SUPPORT_HEADFUL" = xno; then
45998      # No X11 support if building headless-only
45999      NEEDS_LIB_X11=false
46000    else
46001      # All other instances need X11
46002      NEEDS_LIB_X11=true
46003    fi
46004  fi
46005
46006  # Check if cups is needed
46007  if test "x$OPENJDK_TARGET_OS" = xwindows; then
46008    # Windows have a separate print system
46009    NEEDS_LIB_CUPS=false
46010  else
46011    NEEDS_LIB_CUPS=true
46012  fi
46013
46014  # Check if freetype is needed
46015  if test "x$OPENJDK" = "xtrue"; then
46016    NEEDS_LIB_FREETYPE=true
46017  else
46018    NEEDS_LIB_FREETYPE=false
46019  fi
46020
46021  # Check if alsa is needed
46022  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46023    NEEDS_LIB_ALSA=true
46024  else
46025    NEEDS_LIB_ALSA=false
46026  fi
46027
46028  # Check if ffi is needed
46029  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46030    NEEDS_LIB_FFI=true
46031  else
46032    NEEDS_LIB_FFI=false
46033  fi
46034
46035
46036  # statically link libstdc++ before C++ ABI is stablized on Linux unless
46037  # dynamic build is configured on command line.
46038
46039# Check whether --with-stdc++lib was given.
46040if test "${with_stdc__lib+set}" = set; then :
46041  withval=$with_stdc__lib;
46042        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
46043                && test "x$with_stdc__lib" != xdefault; then
46044          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
46045        fi
46046
46047else
46048  with_stdc__lib=default
46049
46050fi
46051
46052
46053  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46054    # Test if -lstdc++ works.
46055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
46056$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
46057    ac_ext=cpp
46058ac_cpp='$CXXCPP $CPPFLAGS'
46059ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46060ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46061ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46062
46063    OLD_CXXFLAGS="$CXXFLAGS"
46064    CXXFLAGS="$CXXFLAGS -lstdc++"
46065    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46066/* end confdefs.h.  */
46067
46068int
46069main ()
46070{
46071return 0;
46072  ;
46073  return 0;
46074}
46075_ACEOF
46076if ac_fn_cxx_try_link "$LINENO"; then :
46077  has_dynamic_libstdcxx=yes
46078else
46079  has_dynamic_libstdcxx=no
46080fi
46081rm -f core conftest.err conftest.$ac_objext \
46082    conftest$ac_exeext conftest.$ac_ext
46083    CXXFLAGS="$OLD_CXXFLAGS"
46084    ac_ext=cpp
46085ac_cpp='$CXXCPP $CPPFLAGS'
46086ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46087ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46088ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46089
46090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
46091$as_echo "$has_dynamic_libstdcxx" >&6; }
46092
46093    # Test if stdc++ can be linked statically.
46094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
46095$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
46096    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
46097    ac_ext=cpp
46098ac_cpp='$CXXCPP $CPPFLAGS'
46099ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46100ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46101ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46102
46103    OLD_LIBS="$LIBS"
46104    OLD_CXX="$CXX"
46105    LIBS="$STATIC_STDCXX_FLAGS"
46106    CXX="$CC"
46107    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46108/* end confdefs.h.  */
46109
46110int
46111main ()
46112{
46113return 0;
46114  ;
46115  return 0;
46116}
46117_ACEOF
46118if ac_fn_cxx_try_link "$LINENO"; then :
46119  has_static_libstdcxx=yes
46120else
46121  has_static_libstdcxx=no
46122fi
46123rm -f core conftest.err conftest.$ac_objext \
46124    conftest$ac_exeext conftest.$ac_ext
46125    LIBS="$OLD_LIBS"
46126    CXX="$OLD_CXX"
46127    ac_ext=cpp
46128ac_cpp='$CXXCPP $CPPFLAGS'
46129ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46130ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46131ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46132
46133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
46134$as_echo "$has_static_libstdcxx" >&6; }
46135
46136    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
46137      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
46138    fi
46139
46140    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
46141      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
46142    fi
46143
46144    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
46145      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
46146    fi
46147
46148    # If dynamic was requested, it's available since it would fail above otherwise.
46149    # If dynamic wasn't requested, go with static unless it isn't available.
46150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
46151$as_echo_n "checking how to link with libstdc++... " >&6; }
46152    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
46153      LIBCXX="$LIBCXX -lstdc++"
46154      LDCXX="$CXX"
46155      STATIC_CXX_SETTING="STATIC_CXX=false"
46156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
46157$as_echo "dynamic" >&6; }
46158    else
46159      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
46160      LDCXX="$CC"
46161      STATIC_CXX_SETTING="STATIC_CXX=true"
46162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
46163$as_echo "static" >&6; }
46164    fi
46165  fi
46166
46167
46168  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46169  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
46170    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46171  fi
46172
46173  # TODO better (platform agnostic) test
46174  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
46175    LIBCXX="-lstdc++"
46176  fi
46177
46178
46179  # Setup Windows runtime dlls
46180  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46181
46182
46183# Check whether --with-msvcr-dll was given.
46184if test "${with_msvcr_dll+set}" = set; then :
46185  withval=$with_msvcr_dll;
46186fi
46187
46188
46189  if test "x$with_msvcr_dll" != x; then
46190    # If given explicitely by user, do not probe. If not present, fail directly.
46191
46192  DLL_NAME="$MSVCR_NAME"
46193  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
46194  METHOD="--with-msvcr-dll"
46195  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46196    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46197$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46198
46199    # Need to check if the found msvcr is correct architecture
46200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46201$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46202    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46204      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46205      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46206      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46207        CORRECT_MSVCR_ARCH="PE32 executable"
46208      else
46209        CORRECT_MSVCR_ARCH="PE32+ executable"
46210      fi
46211    else
46212      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46213        CORRECT_MSVCR_ARCH=386
46214      else
46215        CORRECT_MSVCR_ARCH=x86-64
46216      fi
46217    fi
46218    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46220$as_echo "ok" >&6; }
46221      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46222
46223  # Only process if variable expands to non-empty
46224
46225  if test "x$MSVC_DLL" != x; then
46226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46227
46228  # Input might be given as Windows format, start by converting to
46229  # unix format.
46230  path="$MSVC_DLL"
46231  new_path=`$CYGPATH -u "$path"`
46232
46233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46236  # "foo.exe" is OK but "foo" is an error.
46237  #
46238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46239  # It is also a way to make sure we got the proper file name for the real test later on.
46240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46241  if test "x$test_shortpath" = x; then
46242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46243$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46244    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46245  fi
46246
46247  # Call helper function which possibly converts this using DOS-style short mode.
46248  # If so, the updated path is stored in $new_path.
46249
46250  input_path="$new_path"
46251  # Check if we need to convert this using DOS-style short mode. If the path
46252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46253  # take no chances and rewrite it.
46254  # Note: m4 eats our [], so we need to use [ and ] instead.
46255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46256  if test "x$has_forbidden_chars" != x; then
46257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46261      # Going to short mode and back again did indeed matter. Since short mode is
46262      # case insensitive, let's make it lowercase to improve readability.
46263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46264      # Now convert it back to Unix-style (cygpath)
46265      input_path=`$CYGPATH -u "$shortmode_path"`
46266      new_path="$input_path"
46267    fi
46268  fi
46269
46270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46271  if test "x$test_cygdrive_prefix" = x; then
46272    # As a simple fix, exclude /usr/bin since it's not a real path.
46273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46275      # a path prefixed by /cygdrive for fixpath to work.
46276      new_path="$CYGWIN_ROOT_PATH$input_path"
46277    fi
46278  fi
46279
46280
46281  if test "x$path" != "x$new_path"; then
46282    MSVC_DLL="$new_path"
46283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46284$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46285  fi
46286
46287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46288
46289  path="$MSVC_DLL"
46290  has_colon=`$ECHO $path | $GREP ^.:`
46291  new_path="$path"
46292  if test "x$has_colon" = x; then
46293    # Not in mixed or Windows style, start by that.
46294    new_path=`cmd //c echo $path`
46295  fi
46296
46297
46298  input_path="$new_path"
46299  # Check if we need to convert this using DOS-style short mode. If the path
46300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46301  # take no chances and rewrite it.
46302  # Note: m4 eats our [], so we need to use [ and ] instead.
46303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46304  if test "x$has_forbidden_chars" != x; then
46305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46307  fi
46308
46309
46310  windows_path="$new_path"
46311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46312    unix_path=`$CYGPATH -u "$windows_path"`
46313    new_path="$unix_path"
46314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46316    new_path="$unix_path"
46317  fi
46318
46319  if test "x$path" != "x$new_path"; then
46320    MSVC_DLL="$new_path"
46321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46322$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46323  fi
46324
46325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46327
46328    else
46329      # We're on a unix platform. Hooray! :)
46330      path="$MSVC_DLL"
46331      has_space=`$ECHO "$path" | $GREP " "`
46332      if test "x$has_space" != x; then
46333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46334$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46336      fi
46337
46338      # Use eval to expand a potential ~
46339      eval path="$path"
46340      if test ! -f "$path" && test ! -d "$path"; then
46341        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46342      fi
46343
46344      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46345    fi
46346  fi
46347
46348      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46349$as_echo_n "checking for $DLL_NAME... " >&6; }
46350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46351$as_echo "$MSVC_DLL" >&6; }
46352    else
46353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46354$as_echo "incorrect, ignoring" >&6; }
46355      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46356$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46357    fi
46358  fi
46359
46360    if test "x$MSVC_DLL" = x; then
46361      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
46362    fi
46363    MSVCR_DLL="$MSVC_DLL"
46364  elif test "x$DEVKIT_MSVCR_DLL" != x; then
46365
46366  DLL_NAME="$MSVCR_NAME"
46367  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
46368  METHOD="devkit"
46369  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46370    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46371$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46372
46373    # Need to check if the found msvcr is correct architecture
46374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46375$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46376    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46379      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46380      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46381        CORRECT_MSVCR_ARCH="PE32 executable"
46382      else
46383        CORRECT_MSVCR_ARCH="PE32+ executable"
46384      fi
46385    else
46386      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46387        CORRECT_MSVCR_ARCH=386
46388      else
46389        CORRECT_MSVCR_ARCH=x86-64
46390      fi
46391    fi
46392    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46394$as_echo "ok" >&6; }
46395      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46396
46397  # Only process if variable expands to non-empty
46398
46399  if test "x$MSVC_DLL" != x; then
46400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46401
46402  # Input might be given as Windows format, start by converting to
46403  # unix format.
46404  path="$MSVC_DLL"
46405  new_path=`$CYGPATH -u "$path"`
46406
46407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46410  # "foo.exe" is OK but "foo" is an error.
46411  #
46412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46413  # It is also a way to make sure we got the proper file name for the real test later on.
46414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46415  if test "x$test_shortpath" = x; then
46416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46417$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46418    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46419  fi
46420
46421  # Call helper function which possibly converts this using DOS-style short mode.
46422  # If so, the updated path is stored in $new_path.
46423
46424  input_path="$new_path"
46425  # Check if we need to convert this using DOS-style short mode. If the path
46426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46427  # take no chances and rewrite it.
46428  # Note: m4 eats our [], so we need to use [ and ] instead.
46429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46430  if test "x$has_forbidden_chars" != x; then
46431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46435      # Going to short mode and back again did indeed matter. Since short mode is
46436      # case insensitive, let's make it lowercase to improve readability.
46437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46438      # Now convert it back to Unix-style (cygpath)
46439      input_path=`$CYGPATH -u "$shortmode_path"`
46440      new_path="$input_path"
46441    fi
46442  fi
46443
46444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46445  if test "x$test_cygdrive_prefix" = x; then
46446    # As a simple fix, exclude /usr/bin since it's not a real path.
46447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46449      # a path prefixed by /cygdrive for fixpath to work.
46450      new_path="$CYGWIN_ROOT_PATH$input_path"
46451    fi
46452  fi
46453
46454
46455  if test "x$path" != "x$new_path"; then
46456    MSVC_DLL="$new_path"
46457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46458$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46459  fi
46460
46461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46462
46463  path="$MSVC_DLL"
46464  has_colon=`$ECHO $path | $GREP ^.:`
46465  new_path="$path"
46466  if test "x$has_colon" = x; then
46467    # Not in mixed or Windows style, start by that.
46468    new_path=`cmd //c echo $path`
46469  fi
46470
46471
46472  input_path="$new_path"
46473  # Check if we need to convert this using DOS-style short mode. If the path
46474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46475  # take no chances and rewrite it.
46476  # Note: m4 eats our [], so we need to use [ and ] instead.
46477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46478  if test "x$has_forbidden_chars" != x; then
46479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46481  fi
46482
46483
46484  windows_path="$new_path"
46485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46486    unix_path=`$CYGPATH -u "$windows_path"`
46487    new_path="$unix_path"
46488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46490    new_path="$unix_path"
46491  fi
46492
46493  if test "x$path" != "x$new_path"; then
46494    MSVC_DLL="$new_path"
46495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46496$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46497  fi
46498
46499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46501
46502    else
46503      # We're on a unix platform. Hooray! :)
46504      path="$MSVC_DLL"
46505      has_space=`$ECHO "$path" | $GREP " "`
46506      if test "x$has_space" != x; then
46507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46508$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46510      fi
46511
46512      # Use eval to expand a potential ~
46513      eval path="$path"
46514      if test ! -f "$path" && test ! -d "$path"; then
46515        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46516      fi
46517
46518      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46519    fi
46520  fi
46521
46522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46523$as_echo_n "checking for $DLL_NAME... " >&6; }
46524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46525$as_echo "$MSVC_DLL" >&6; }
46526    else
46527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46528$as_echo "incorrect, ignoring" >&6; }
46529      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46530$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46531    fi
46532  fi
46533
46534    if test "x$MSVC_DLL" = x; then
46535      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
46536    fi
46537    MSVCR_DLL="$MSVC_DLL"
46538  else
46539
46540  DLL_NAME="${MSVCR_NAME}"
46541  MSVC_DLL=
46542
46543  if test "x$MSVC_DLL" = x; then
46544    # Probe: Using well-known location from Visual Studio 10.0
46545    if test "x$VCINSTALLDIR" != x; then
46546      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
46547
46548  windows_path="$CYGWIN_VC_INSTALL_DIR"
46549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46550    unix_path=`$CYGPATH -u "$windows_path"`
46551    CYGWIN_VC_INSTALL_DIR="$unix_path"
46552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46554    CYGWIN_VC_INSTALL_DIR="$unix_path"
46555  fi
46556
46557      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46558        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46559      else
46560        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46561      fi
46562      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46563
46564  DLL_NAME="$DLL_NAME"
46565  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46566  METHOD="well-known location in VCINSTALLDIR"
46567  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46568    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46569$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46570
46571    # Need to check if the found msvcr is correct architecture
46572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46573$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46574    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46576      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46577      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46578      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46579        CORRECT_MSVCR_ARCH="PE32 executable"
46580      else
46581        CORRECT_MSVCR_ARCH="PE32+ executable"
46582      fi
46583    else
46584      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46585        CORRECT_MSVCR_ARCH=386
46586      else
46587        CORRECT_MSVCR_ARCH=x86-64
46588      fi
46589    fi
46590    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46592$as_echo "ok" >&6; }
46593      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46594
46595  # Only process if variable expands to non-empty
46596
46597  if test "x$MSVC_DLL" != x; then
46598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46599
46600  # Input might be given as Windows format, start by converting to
46601  # unix format.
46602  path="$MSVC_DLL"
46603  new_path=`$CYGPATH -u "$path"`
46604
46605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46608  # "foo.exe" is OK but "foo" is an error.
46609  #
46610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46611  # It is also a way to make sure we got the proper file name for the real test later on.
46612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46613  if test "x$test_shortpath" = x; then
46614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46615$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46616    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46617  fi
46618
46619  # Call helper function which possibly converts this using DOS-style short mode.
46620  # If so, the updated path is stored in $new_path.
46621
46622  input_path="$new_path"
46623  # Check if we need to convert this using DOS-style short mode. If the path
46624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46625  # take no chances and rewrite it.
46626  # Note: m4 eats our [], so we need to use [ and ] instead.
46627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46628  if test "x$has_forbidden_chars" != x; then
46629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46633      # Going to short mode and back again did indeed matter. Since short mode is
46634      # case insensitive, let's make it lowercase to improve readability.
46635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46636      # Now convert it back to Unix-style (cygpath)
46637      input_path=`$CYGPATH -u "$shortmode_path"`
46638      new_path="$input_path"
46639    fi
46640  fi
46641
46642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46643  if test "x$test_cygdrive_prefix" = x; then
46644    # As a simple fix, exclude /usr/bin since it's not a real path.
46645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46647      # a path prefixed by /cygdrive for fixpath to work.
46648      new_path="$CYGWIN_ROOT_PATH$input_path"
46649    fi
46650  fi
46651
46652
46653  if test "x$path" != "x$new_path"; then
46654    MSVC_DLL="$new_path"
46655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46656$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46657  fi
46658
46659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46660
46661  path="$MSVC_DLL"
46662  has_colon=`$ECHO $path | $GREP ^.:`
46663  new_path="$path"
46664  if test "x$has_colon" = x; then
46665    # Not in mixed or Windows style, start by that.
46666    new_path=`cmd //c echo $path`
46667  fi
46668
46669
46670  input_path="$new_path"
46671  # Check if we need to convert this using DOS-style short mode. If the path
46672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46673  # take no chances and rewrite it.
46674  # Note: m4 eats our [], so we need to use [ and ] instead.
46675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46676  if test "x$has_forbidden_chars" != x; then
46677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46679  fi
46680
46681
46682  windows_path="$new_path"
46683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46684    unix_path=`$CYGPATH -u "$windows_path"`
46685    new_path="$unix_path"
46686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46688    new_path="$unix_path"
46689  fi
46690
46691  if test "x$path" != "x$new_path"; then
46692    MSVC_DLL="$new_path"
46693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46694$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46695  fi
46696
46697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46699
46700    else
46701      # We're on a unix platform. Hooray! :)
46702      path="$MSVC_DLL"
46703      has_space=`$ECHO "$path" | $GREP " "`
46704      if test "x$has_space" != x; then
46705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46706$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46707        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46708      fi
46709
46710      # Use eval to expand a potential ~
46711      eval path="$path"
46712      if test ! -f "$path" && test ! -d "$path"; then
46713        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46714      fi
46715
46716      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46717    fi
46718  fi
46719
46720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46721$as_echo_n "checking for $DLL_NAME... " >&6; }
46722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46723$as_echo "$MSVC_DLL" >&6; }
46724    else
46725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46726$as_echo "incorrect, ignoring" >&6; }
46727      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46728$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46729    fi
46730  fi
46731
46732    fi
46733  fi
46734
46735  if test "x$MSVC_DLL" = x; then
46736    # Probe: Check in the Boot JDK directory.
46737    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46738
46739  DLL_NAME="$DLL_NAME"
46740  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46741  METHOD="well-known location in Boot JDK"
46742  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46743    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46744$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46745
46746    # Need to check if the found msvcr is correct architecture
46747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46748$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46749    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46751      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46752      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46753      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46754        CORRECT_MSVCR_ARCH="PE32 executable"
46755      else
46756        CORRECT_MSVCR_ARCH="PE32+ executable"
46757      fi
46758    else
46759      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46760        CORRECT_MSVCR_ARCH=386
46761      else
46762        CORRECT_MSVCR_ARCH=x86-64
46763      fi
46764    fi
46765    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46766      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46767$as_echo "ok" >&6; }
46768      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46769
46770  # Only process if variable expands to non-empty
46771
46772  if test "x$MSVC_DLL" != x; then
46773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46774
46775  # Input might be given as Windows format, start by converting to
46776  # unix format.
46777  path="$MSVC_DLL"
46778  new_path=`$CYGPATH -u "$path"`
46779
46780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46783  # "foo.exe" is OK but "foo" is an error.
46784  #
46785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46786  # It is also a way to make sure we got the proper file name for the real test later on.
46787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46788  if test "x$test_shortpath" = x; then
46789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46790$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46791    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46792  fi
46793
46794  # Call helper function which possibly converts this using DOS-style short mode.
46795  # If so, the updated path is stored in $new_path.
46796
46797  input_path="$new_path"
46798  # Check if we need to convert this using DOS-style short mode. If the path
46799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46800  # take no chances and rewrite it.
46801  # Note: m4 eats our [], so we need to use [ and ] instead.
46802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46803  if test "x$has_forbidden_chars" != x; then
46804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46808      # Going to short mode and back again did indeed matter. Since short mode is
46809      # case insensitive, let's make it lowercase to improve readability.
46810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46811      # Now convert it back to Unix-style (cygpath)
46812      input_path=`$CYGPATH -u "$shortmode_path"`
46813      new_path="$input_path"
46814    fi
46815  fi
46816
46817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46818  if test "x$test_cygdrive_prefix" = x; then
46819    # As a simple fix, exclude /usr/bin since it's not a real path.
46820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46822      # a path prefixed by /cygdrive for fixpath to work.
46823      new_path="$CYGWIN_ROOT_PATH$input_path"
46824    fi
46825  fi
46826
46827
46828  if test "x$path" != "x$new_path"; then
46829    MSVC_DLL="$new_path"
46830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46831$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46832  fi
46833
46834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46835
46836  path="$MSVC_DLL"
46837  has_colon=`$ECHO $path | $GREP ^.:`
46838  new_path="$path"
46839  if test "x$has_colon" = x; then
46840    # Not in mixed or Windows style, start by that.
46841    new_path=`cmd //c echo $path`
46842  fi
46843
46844
46845  input_path="$new_path"
46846  # Check if we need to convert this using DOS-style short mode. If the path
46847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46848  # take no chances and rewrite it.
46849  # Note: m4 eats our [], so we need to use [ and ] instead.
46850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46851  if test "x$has_forbidden_chars" != x; then
46852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46854  fi
46855
46856
46857  windows_path="$new_path"
46858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46859    unix_path=`$CYGPATH -u "$windows_path"`
46860    new_path="$unix_path"
46861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46863    new_path="$unix_path"
46864  fi
46865
46866  if test "x$path" != "x$new_path"; then
46867    MSVC_DLL="$new_path"
46868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46869$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46870  fi
46871
46872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46874
46875    else
46876      # We're on a unix platform. Hooray! :)
46877      path="$MSVC_DLL"
46878      has_space=`$ECHO "$path" | $GREP " "`
46879      if test "x$has_space" != x; then
46880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46881$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46883      fi
46884
46885      # Use eval to expand a potential ~
46886      eval path="$path"
46887      if test ! -f "$path" && test ! -d "$path"; then
46888        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46889      fi
46890
46891      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46892    fi
46893  fi
46894
46895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46896$as_echo_n "checking for $DLL_NAME... " >&6; }
46897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46898$as_echo "$MSVC_DLL" >&6; }
46899    else
46900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46901$as_echo "incorrect, ignoring" >&6; }
46902      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46903$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46904    fi
46905  fi
46906
46907  fi
46908
46909  if test "x$MSVC_DLL" = x; then
46910    # Probe: Look in the Windows system32 directory
46911    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46912
46913  windows_path="$CYGWIN_SYSTEMROOT"
46914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46915    unix_path=`$CYGPATH -u "$windows_path"`
46916    CYGWIN_SYSTEMROOT="$unix_path"
46917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46919    CYGWIN_SYSTEMROOT="$unix_path"
46920  fi
46921
46922    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46923
46924  DLL_NAME="$DLL_NAME"
46925  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46926  METHOD="well-known location in SYSTEMROOT"
46927  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46928    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46929$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46930
46931    # Need to check if the found msvcr is correct architecture
46932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46933$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46934    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46936      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46937      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46938      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46939        CORRECT_MSVCR_ARCH="PE32 executable"
46940      else
46941        CORRECT_MSVCR_ARCH="PE32+ executable"
46942      fi
46943    else
46944      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46945        CORRECT_MSVCR_ARCH=386
46946      else
46947        CORRECT_MSVCR_ARCH=x86-64
46948      fi
46949    fi
46950    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46952$as_echo "ok" >&6; }
46953      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46954
46955  # Only process if variable expands to non-empty
46956
46957  if test "x$MSVC_DLL" != x; then
46958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46959
46960  # Input might be given as Windows format, start by converting to
46961  # unix format.
46962  path="$MSVC_DLL"
46963  new_path=`$CYGPATH -u "$path"`
46964
46965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46968  # "foo.exe" is OK but "foo" is an error.
46969  #
46970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46971  # It is also a way to make sure we got the proper file name for the real test later on.
46972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46973  if test "x$test_shortpath" = x; then
46974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46975$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46976    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46977  fi
46978
46979  # Call helper function which possibly converts this using DOS-style short mode.
46980  # If so, the updated path is stored in $new_path.
46981
46982  input_path="$new_path"
46983  # Check if we need to convert this using DOS-style short mode. If the path
46984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46985  # take no chances and rewrite it.
46986  # Note: m4 eats our [], so we need to use [ and ] instead.
46987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46988  if test "x$has_forbidden_chars" != x; then
46989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46993      # Going to short mode and back again did indeed matter. Since short mode is
46994      # case insensitive, let's make it lowercase to improve readability.
46995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46996      # Now convert it back to Unix-style (cygpath)
46997      input_path=`$CYGPATH -u "$shortmode_path"`
46998      new_path="$input_path"
46999    fi
47000  fi
47001
47002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47003  if test "x$test_cygdrive_prefix" = x; then
47004    # As a simple fix, exclude /usr/bin since it's not a real path.
47005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47007      # a path prefixed by /cygdrive for fixpath to work.
47008      new_path="$CYGWIN_ROOT_PATH$input_path"
47009    fi
47010  fi
47011
47012
47013  if test "x$path" != "x$new_path"; then
47014    MSVC_DLL="$new_path"
47015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47016$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47017  fi
47018
47019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47020
47021  path="$MSVC_DLL"
47022  has_colon=`$ECHO $path | $GREP ^.:`
47023  new_path="$path"
47024  if test "x$has_colon" = x; then
47025    # Not in mixed or Windows style, start by that.
47026    new_path=`cmd //c echo $path`
47027  fi
47028
47029
47030  input_path="$new_path"
47031  # Check if we need to convert this using DOS-style short mode. If the path
47032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47033  # take no chances and rewrite it.
47034  # Note: m4 eats our [], so we need to use [ and ] instead.
47035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47036  if test "x$has_forbidden_chars" != x; then
47037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47039  fi
47040
47041
47042  windows_path="$new_path"
47043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47044    unix_path=`$CYGPATH -u "$windows_path"`
47045    new_path="$unix_path"
47046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47048    new_path="$unix_path"
47049  fi
47050
47051  if test "x$path" != "x$new_path"; then
47052    MSVC_DLL="$new_path"
47053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47054$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47055  fi
47056
47057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47059
47060    else
47061      # We're on a unix platform. Hooray! :)
47062      path="$MSVC_DLL"
47063      has_space=`$ECHO "$path" | $GREP " "`
47064      if test "x$has_space" != x; then
47065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47066$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47067        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47068      fi
47069
47070      # Use eval to expand a potential ~
47071      eval path="$path"
47072      if test ! -f "$path" && test ! -d "$path"; then
47073        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47074      fi
47075
47076      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47077    fi
47078  fi
47079
47080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47081$as_echo_n "checking for $DLL_NAME... " >&6; }
47082      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47083$as_echo "$MSVC_DLL" >&6; }
47084    else
47085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47086$as_echo "incorrect, ignoring" >&6; }
47087      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47088$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47089    fi
47090  fi
47091
47092  fi
47093
47094  if test "x$MSVC_DLL" = x; then
47095    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47096    if test "x$VS100COMNTOOLS" != x; then
47097      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47098
47099  windows_path="$CYGWIN_VS_TOOLS_DIR"
47100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47101    unix_path=`$CYGPATH -u "$windows_path"`
47102    CYGWIN_VS_TOOLS_DIR="$unix_path"
47103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47105    CYGWIN_VS_TOOLS_DIR="$unix_path"
47106  fi
47107
47108      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47109        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47110	    | $GREP -i /x64/ | $HEAD --lines 1`
47111      else
47112        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47113	    | $GREP -i /x86/ | $HEAD --lines 1`
47114      fi
47115
47116  DLL_NAME="$DLL_NAME"
47117  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47118  METHOD="search of VS100COMNTOOLS"
47119  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47120    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47121$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47122
47123    # Need to check if the found msvcr is correct architecture
47124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47125$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47126    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47128      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47129      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47130      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47131        CORRECT_MSVCR_ARCH="PE32 executable"
47132      else
47133        CORRECT_MSVCR_ARCH="PE32+ executable"
47134      fi
47135    else
47136      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47137        CORRECT_MSVCR_ARCH=386
47138      else
47139        CORRECT_MSVCR_ARCH=x86-64
47140      fi
47141    fi
47142    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47144$as_echo "ok" >&6; }
47145      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47146
47147  # Only process if variable expands to non-empty
47148
47149  if test "x$MSVC_DLL" != x; then
47150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47151
47152  # Input might be given as Windows format, start by converting to
47153  # unix format.
47154  path="$MSVC_DLL"
47155  new_path=`$CYGPATH -u "$path"`
47156
47157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47160  # "foo.exe" is OK but "foo" is an error.
47161  #
47162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47163  # It is also a way to make sure we got the proper file name for the real test later on.
47164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47165  if test "x$test_shortpath" = x; then
47166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47167$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47168    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47169  fi
47170
47171  # Call helper function which possibly converts this using DOS-style short mode.
47172  # If so, the updated path is stored in $new_path.
47173
47174  input_path="$new_path"
47175  # Check if we need to convert this using DOS-style short mode. If the path
47176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47177  # take no chances and rewrite it.
47178  # Note: m4 eats our [], so we need to use [ and ] instead.
47179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47180  if test "x$has_forbidden_chars" != x; then
47181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47185      # Going to short mode and back again did indeed matter. Since short mode is
47186      # case insensitive, let's make it lowercase to improve readability.
47187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47188      # Now convert it back to Unix-style (cygpath)
47189      input_path=`$CYGPATH -u "$shortmode_path"`
47190      new_path="$input_path"
47191    fi
47192  fi
47193
47194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47195  if test "x$test_cygdrive_prefix" = x; then
47196    # As a simple fix, exclude /usr/bin since it's not a real path.
47197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47199      # a path prefixed by /cygdrive for fixpath to work.
47200      new_path="$CYGWIN_ROOT_PATH$input_path"
47201    fi
47202  fi
47203
47204
47205  if test "x$path" != "x$new_path"; then
47206    MSVC_DLL="$new_path"
47207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47208$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47209  fi
47210
47211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47212
47213  path="$MSVC_DLL"
47214  has_colon=`$ECHO $path | $GREP ^.:`
47215  new_path="$path"
47216  if test "x$has_colon" = x; then
47217    # Not in mixed or Windows style, start by that.
47218    new_path=`cmd //c echo $path`
47219  fi
47220
47221
47222  input_path="$new_path"
47223  # Check if we need to convert this using DOS-style short mode. If the path
47224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47225  # take no chances and rewrite it.
47226  # Note: m4 eats our [], so we need to use [ and ] instead.
47227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47228  if test "x$has_forbidden_chars" != x; then
47229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47231  fi
47232
47233
47234  windows_path="$new_path"
47235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47236    unix_path=`$CYGPATH -u "$windows_path"`
47237    new_path="$unix_path"
47238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47240    new_path="$unix_path"
47241  fi
47242
47243  if test "x$path" != "x$new_path"; then
47244    MSVC_DLL="$new_path"
47245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47246$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47247  fi
47248
47249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47251
47252    else
47253      # We're on a unix platform. Hooray! :)
47254      path="$MSVC_DLL"
47255      has_space=`$ECHO "$path" | $GREP " "`
47256      if test "x$has_space" != x; then
47257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47258$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47260      fi
47261
47262      # Use eval to expand a potential ~
47263      eval path="$path"
47264      if test ! -f "$path" && test ! -d "$path"; then
47265        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47266      fi
47267
47268      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47269    fi
47270  fi
47271
47272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47273$as_echo_n "checking for $DLL_NAME... " >&6; }
47274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47275$as_echo "$MSVC_DLL" >&6; }
47276    else
47277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47278$as_echo "incorrect, ignoring" >&6; }
47279      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47280$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47281    fi
47282  fi
47283
47284    fi
47285  fi
47286
47287  if test "x$MSVC_DLL" = x; then
47288    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47289    # (This was the original behaviour; kept since it might turn something up)
47290    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47291      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47292        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47293	    | $GREP x64 | $HEAD --lines 1`
47294      else
47295        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47296	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47297        if test "x$POSSIBLE_MSVC_DLL" = x; then
47298          # We're grasping at straws now...
47299          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
47300	      | $HEAD --lines 1`
47301        fi
47302      fi
47303
47304
47305  DLL_NAME="$DLL_NAME"
47306  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47307  METHOD="search of VCINSTALLDIR"
47308  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47310$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47311
47312    # Need to check if the found msvcr is correct architecture
47313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47314$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47315    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47317      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47318      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47320        CORRECT_MSVCR_ARCH="PE32 executable"
47321      else
47322        CORRECT_MSVCR_ARCH="PE32+ executable"
47323      fi
47324    else
47325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47326        CORRECT_MSVCR_ARCH=386
47327      else
47328        CORRECT_MSVCR_ARCH=x86-64
47329      fi
47330    fi
47331    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47333$as_echo "ok" >&6; }
47334      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47335
47336  # Only process if variable expands to non-empty
47337
47338  if test "x$MSVC_DLL" != x; then
47339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47340
47341  # Input might be given as Windows format, start by converting to
47342  # unix format.
47343  path="$MSVC_DLL"
47344  new_path=`$CYGPATH -u "$path"`
47345
47346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47349  # "foo.exe" is OK but "foo" is an error.
47350  #
47351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47352  # It is also a way to make sure we got the proper file name for the real test later on.
47353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47354  if test "x$test_shortpath" = x; then
47355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47356$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47357    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47358  fi
47359
47360  # Call helper function which possibly converts this using DOS-style short mode.
47361  # If so, the updated path is stored in $new_path.
47362
47363  input_path="$new_path"
47364  # Check if we need to convert this using DOS-style short mode. If the path
47365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47366  # take no chances and rewrite it.
47367  # Note: m4 eats our [], so we need to use [ and ] instead.
47368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47369  if test "x$has_forbidden_chars" != x; then
47370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47374      # Going to short mode and back again did indeed matter. Since short mode is
47375      # case insensitive, let's make it lowercase to improve readability.
47376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47377      # Now convert it back to Unix-style (cygpath)
47378      input_path=`$CYGPATH -u "$shortmode_path"`
47379      new_path="$input_path"
47380    fi
47381  fi
47382
47383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47384  if test "x$test_cygdrive_prefix" = x; then
47385    # As a simple fix, exclude /usr/bin since it's not a real path.
47386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47388      # a path prefixed by /cygdrive for fixpath to work.
47389      new_path="$CYGWIN_ROOT_PATH$input_path"
47390    fi
47391  fi
47392
47393
47394  if test "x$path" != "x$new_path"; then
47395    MSVC_DLL="$new_path"
47396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47398  fi
47399
47400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47401
47402  path="$MSVC_DLL"
47403  has_colon=`$ECHO $path | $GREP ^.:`
47404  new_path="$path"
47405  if test "x$has_colon" = x; then
47406    # Not in mixed or Windows style, start by that.
47407    new_path=`cmd //c echo $path`
47408  fi
47409
47410
47411  input_path="$new_path"
47412  # Check if we need to convert this using DOS-style short mode. If the path
47413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47414  # take no chances and rewrite it.
47415  # Note: m4 eats our [], so we need to use [ and ] instead.
47416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47417  if test "x$has_forbidden_chars" != x; then
47418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47420  fi
47421
47422
47423  windows_path="$new_path"
47424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47425    unix_path=`$CYGPATH -u "$windows_path"`
47426    new_path="$unix_path"
47427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47429    new_path="$unix_path"
47430  fi
47431
47432  if test "x$path" != "x$new_path"; then
47433    MSVC_DLL="$new_path"
47434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47435$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47436  fi
47437
47438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47440
47441    else
47442      # We're on a unix platform. Hooray! :)
47443      path="$MSVC_DLL"
47444      has_space=`$ECHO "$path" | $GREP " "`
47445      if test "x$has_space" != x; then
47446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47449      fi
47450
47451      # Use eval to expand a potential ~
47452      eval path="$path"
47453      if test ! -f "$path" && test ! -d "$path"; then
47454        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47455      fi
47456
47457      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47458    fi
47459  fi
47460
47461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47462$as_echo_n "checking for $DLL_NAME... " >&6; }
47463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47464$as_echo "$MSVC_DLL" >&6; }
47465    else
47466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47467$as_echo "incorrect, ignoring" >&6; }
47468      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47469$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47470    fi
47471  fi
47472
47473    fi
47474  fi
47475
47476  if test "x$MSVC_DLL" = x; then
47477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47478$as_echo_n "checking for $DLL_NAME... " >&6; }
47479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47480$as_echo "no" >&6; }
47481    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
47482  fi
47483
47484    MSVCR_DLL="$MSVC_DLL"
47485  fi
47486
47487
47488
47489# Check whether --with-msvcp-dll was given.
47490if test "${with_msvcp_dll+set}" = set; then :
47491  withval=$with_msvcp_dll;
47492fi
47493
47494
47495  if test "x$MSVCP_NAME" != "x"; then
47496    if test "x$with_msvcp_dll" != x; then
47497      # If given explicitely by user, do not probe. If not present, fail directly.
47498
47499  DLL_NAME="$MSVCP_NAME"
47500  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
47501  METHOD="--with-msvcp-dll"
47502  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47503    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47504$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47505
47506    # Need to check if the found msvcr is correct architecture
47507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47508$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47509    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47511      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47512      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47513      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47514        CORRECT_MSVCR_ARCH="PE32 executable"
47515      else
47516        CORRECT_MSVCR_ARCH="PE32+ executable"
47517      fi
47518    else
47519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47520        CORRECT_MSVCR_ARCH=386
47521      else
47522        CORRECT_MSVCR_ARCH=x86-64
47523      fi
47524    fi
47525    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47527$as_echo "ok" >&6; }
47528      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47529
47530  # Only process if variable expands to non-empty
47531
47532  if test "x$MSVC_DLL" != x; then
47533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47534
47535  # Input might be given as Windows format, start by converting to
47536  # unix format.
47537  path="$MSVC_DLL"
47538  new_path=`$CYGPATH -u "$path"`
47539
47540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47543  # "foo.exe" is OK but "foo" is an error.
47544  #
47545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47546  # It is also a way to make sure we got the proper file name for the real test later on.
47547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47548  if test "x$test_shortpath" = x; then
47549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47550$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47551    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47552  fi
47553
47554  # Call helper function which possibly converts this using DOS-style short mode.
47555  # If so, the updated path is stored in $new_path.
47556
47557  input_path="$new_path"
47558  # Check if we need to convert this using DOS-style short mode. If the path
47559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47560  # take no chances and rewrite it.
47561  # Note: m4 eats our [], so we need to use [ and ] instead.
47562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47563  if test "x$has_forbidden_chars" != x; then
47564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47568      # Going to short mode and back again did indeed matter. Since short mode is
47569      # case insensitive, let's make it lowercase to improve readability.
47570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47571      # Now convert it back to Unix-style (cygpath)
47572      input_path=`$CYGPATH -u "$shortmode_path"`
47573      new_path="$input_path"
47574    fi
47575  fi
47576
47577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47578  if test "x$test_cygdrive_prefix" = x; then
47579    # As a simple fix, exclude /usr/bin since it's not a real path.
47580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47582      # a path prefixed by /cygdrive for fixpath to work.
47583      new_path="$CYGWIN_ROOT_PATH$input_path"
47584    fi
47585  fi
47586
47587
47588  if test "x$path" != "x$new_path"; then
47589    MSVC_DLL="$new_path"
47590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47591$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47592  fi
47593
47594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47595
47596  path="$MSVC_DLL"
47597  has_colon=`$ECHO $path | $GREP ^.:`
47598  new_path="$path"
47599  if test "x$has_colon" = x; then
47600    # Not in mixed or Windows style, start by that.
47601    new_path=`cmd //c echo $path`
47602  fi
47603
47604
47605  input_path="$new_path"
47606  # Check if we need to convert this using DOS-style short mode. If the path
47607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47608  # take no chances and rewrite it.
47609  # Note: m4 eats our [], so we need to use [ and ] instead.
47610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47611  if test "x$has_forbidden_chars" != x; then
47612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47614  fi
47615
47616
47617  windows_path="$new_path"
47618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47619    unix_path=`$CYGPATH -u "$windows_path"`
47620    new_path="$unix_path"
47621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47623    new_path="$unix_path"
47624  fi
47625
47626  if test "x$path" != "x$new_path"; then
47627    MSVC_DLL="$new_path"
47628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47629$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47630  fi
47631
47632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47634
47635    else
47636      # We're on a unix platform. Hooray! :)
47637      path="$MSVC_DLL"
47638      has_space=`$ECHO "$path" | $GREP " "`
47639      if test "x$has_space" != x; then
47640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47641$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47643      fi
47644
47645      # Use eval to expand a potential ~
47646      eval path="$path"
47647      if test ! -f "$path" && test ! -d "$path"; then
47648        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47649      fi
47650
47651      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47652    fi
47653  fi
47654
47655      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47656$as_echo_n "checking for $DLL_NAME... " >&6; }
47657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47658$as_echo "$MSVC_DLL" >&6; }
47659    else
47660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47661$as_echo "incorrect, ignoring" >&6; }
47662      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47663$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47664    fi
47665  fi
47666
47667      if test "x$MSVC_DLL" = x; then
47668        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47669      fi
47670      MSVCP_DLL="$MSVC_DLL"
47671    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47672
47673  DLL_NAME="$MSVCP_NAME"
47674  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47675  METHOD="devkit"
47676  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47677    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47678$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47679
47680    # Need to check if the found msvcr is correct architecture
47681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47682$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47683    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47685      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47686      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47687      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47688        CORRECT_MSVCR_ARCH="PE32 executable"
47689      else
47690        CORRECT_MSVCR_ARCH="PE32+ executable"
47691      fi
47692    else
47693      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47694        CORRECT_MSVCR_ARCH=386
47695      else
47696        CORRECT_MSVCR_ARCH=x86-64
47697      fi
47698    fi
47699    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47701$as_echo "ok" >&6; }
47702      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47703
47704  # Only process if variable expands to non-empty
47705
47706  if test "x$MSVC_DLL" != x; then
47707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47708
47709  # Input might be given as Windows format, start by converting to
47710  # unix format.
47711  path="$MSVC_DLL"
47712  new_path=`$CYGPATH -u "$path"`
47713
47714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47717  # "foo.exe" is OK but "foo" is an error.
47718  #
47719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47720  # It is also a way to make sure we got the proper file name for the real test later on.
47721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47722  if test "x$test_shortpath" = x; then
47723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47724$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47725    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47726  fi
47727
47728  # Call helper function which possibly converts this using DOS-style short mode.
47729  # If so, the updated path is stored in $new_path.
47730
47731  input_path="$new_path"
47732  # Check if we need to convert this using DOS-style short mode. If the path
47733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47734  # take no chances and rewrite it.
47735  # Note: m4 eats our [], so we need to use [ and ] instead.
47736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47737  if test "x$has_forbidden_chars" != x; then
47738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47742      # Going to short mode and back again did indeed matter. Since short mode is
47743      # case insensitive, let's make it lowercase to improve readability.
47744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47745      # Now convert it back to Unix-style (cygpath)
47746      input_path=`$CYGPATH -u "$shortmode_path"`
47747      new_path="$input_path"
47748    fi
47749  fi
47750
47751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47752  if test "x$test_cygdrive_prefix" = x; then
47753    # As a simple fix, exclude /usr/bin since it's not a real path.
47754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47756      # a path prefixed by /cygdrive for fixpath to work.
47757      new_path="$CYGWIN_ROOT_PATH$input_path"
47758    fi
47759  fi
47760
47761
47762  if test "x$path" != "x$new_path"; then
47763    MSVC_DLL="$new_path"
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47765$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47766  fi
47767
47768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47769
47770  path="$MSVC_DLL"
47771  has_colon=`$ECHO $path | $GREP ^.:`
47772  new_path="$path"
47773  if test "x$has_colon" = x; then
47774    # Not in mixed or Windows style, start by that.
47775    new_path=`cmd //c echo $path`
47776  fi
47777
47778
47779  input_path="$new_path"
47780  # Check if we need to convert this using DOS-style short mode. If the path
47781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47782  # take no chances and rewrite it.
47783  # Note: m4 eats our [], so we need to use [ and ] instead.
47784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47785  if test "x$has_forbidden_chars" != x; then
47786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47788  fi
47789
47790
47791  windows_path="$new_path"
47792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47793    unix_path=`$CYGPATH -u "$windows_path"`
47794    new_path="$unix_path"
47795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47797    new_path="$unix_path"
47798  fi
47799
47800  if test "x$path" != "x$new_path"; then
47801    MSVC_DLL="$new_path"
47802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47803$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47804  fi
47805
47806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47808
47809    else
47810      # We're on a unix platform. Hooray! :)
47811      path="$MSVC_DLL"
47812      has_space=`$ECHO "$path" | $GREP " "`
47813      if test "x$has_space" != x; then
47814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47815$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47816        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47817      fi
47818
47819      # Use eval to expand a potential ~
47820      eval path="$path"
47821      if test ! -f "$path" && test ! -d "$path"; then
47822        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47823      fi
47824
47825      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47826    fi
47827  fi
47828
47829      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47830$as_echo_n "checking for $DLL_NAME... " >&6; }
47831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47832$as_echo "$MSVC_DLL" >&6; }
47833    else
47834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47835$as_echo "incorrect, ignoring" >&6; }
47836      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47837$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47838    fi
47839  fi
47840
47841      if test "x$MSVC_DLL" = x; then
47842        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47843      fi
47844      MSVCP_DLL="$MSVC_DLL"
47845    else
47846
47847  DLL_NAME="${MSVCP_NAME}"
47848  MSVC_DLL=
47849
47850  if test "x$MSVC_DLL" = x; then
47851    # Probe: Using well-known location from Visual Studio 10.0
47852    if test "x$VCINSTALLDIR" != x; then
47853      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47854
47855  windows_path="$CYGWIN_VC_INSTALL_DIR"
47856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47857    unix_path=`$CYGPATH -u "$windows_path"`
47858    CYGWIN_VC_INSTALL_DIR="$unix_path"
47859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47861    CYGWIN_VC_INSTALL_DIR="$unix_path"
47862  fi
47863
47864      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47865        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47866      else
47867        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47868      fi
47869      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47870
47871  DLL_NAME="$DLL_NAME"
47872  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47873  METHOD="well-known location in VCINSTALLDIR"
47874  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47875    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47876$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47877
47878    # Need to check if the found msvcr is correct architecture
47879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47880$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47881    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47882    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47883      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47884      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47886        CORRECT_MSVCR_ARCH="PE32 executable"
47887      else
47888        CORRECT_MSVCR_ARCH="PE32+ executable"
47889      fi
47890    else
47891      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47892        CORRECT_MSVCR_ARCH=386
47893      else
47894        CORRECT_MSVCR_ARCH=x86-64
47895      fi
47896    fi
47897    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47899$as_echo "ok" >&6; }
47900      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47901
47902  # Only process if variable expands to non-empty
47903
47904  if test "x$MSVC_DLL" != x; then
47905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47906
47907  # Input might be given as Windows format, start by converting to
47908  # unix format.
47909  path="$MSVC_DLL"
47910  new_path=`$CYGPATH -u "$path"`
47911
47912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47915  # "foo.exe" is OK but "foo" is an error.
47916  #
47917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47918  # It is also a way to make sure we got the proper file name for the real test later on.
47919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47920  if test "x$test_shortpath" = x; then
47921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47922$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47923    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47924  fi
47925
47926  # Call helper function which possibly converts this using DOS-style short mode.
47927  # If so, the updated path is stored in $new_path.
47928
47929  input_path="$new_path"
47930  # Check if we need to convert this using DOS-style short mode. If the path
47931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47932  # take no chances and rewrite it.
47933  # Note: m4 eats our [], so we need to use [ and ] instead.
47934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47935  if test "x$has_forbidden_chars" != x; then
47936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47940      # Going to short mode and back again did indeed matter. Since short mode is
47941      # case insensitive, let's make it lowercase to improve readability.
47942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47943      # Now convert it back to Unix-style (cygpath)
47944      input_path=`$CYGPATH -u "$shortmode_path"`
47945      new_path="$input_path"
47946    fi
47947  fi
47948
47949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47950  if test "x$test_cygdrive_prefix" = x; then
47951    # As a simple fix, exclude /usr/bin since it's not a real path.
47952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47954      # a path prefixed by /cygdrive for fixpath to work.
47955      new_path="$CYGWIN_ROOT_PATH$input_path"
47956    fi
47957  fi
47958
47959
47960  if test "x$path" != "x$new_path"; then
47961    MSVC_DLL="$new_path"
47962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47963$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47964  fi
47965
47966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47967
47968  path="$MSVC_DLL"
47969  has_colon=`$ECHO $path | $GREP ^.:`
47970  new_path="$path"
47971  if test "x$has_colon" = x; then
47972    # Not in mixed or Windows style, start by that.
47973    new_path=`cmd //c echo $path`
47974  fi
47975
47976
47977  input_path="$new_path"
47978  # Check if we need to convert this using DOS-style short mode. If the path
47979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47980  # take no chances and rewrite it.
47981  # Note: m4 eats our [], so we need to use [ and ] instead.
47982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47983  if test "x$has_forbidden_chars" != x; then
47984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47986  fi
47987
47988
47989  windows_path="$new_path"
47990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47991    unix_path=`$CYGPATH -u "$windows_path"`
47992    new_path="$unix_path"
47993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47995    new_path="$unix_path"
47996  fi
47997
47998  if test "x$path" != "x$new_path"; then
47999    MSVC_DLL="$new_path"
48000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48001$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48002  fi
48003
48004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48006
48007    else
48008      # We're on a unix platform. Hooray! :)
48009      path="$MSVC_DLL"
48010      has_space=`$ECHO "$path" | $GREP " "`
48011      if test "x$has_space" != x; then
48012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48013$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48015      fi
48016
48017      # Use eval to expand a potential ~
48018      eval path="$path"
48019      if test ! -f "$path" && test ! -d "$path"; then
48020        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48021      fi
48022
48023      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48024    fi
48025  fi
48026
48027      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48028$as_echo_n "checking for $DLL_NAME... " >&6; }
48029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48030$as_echo "$MSVC_DLL" >&6; }
48031    else
48032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48033$as_echo "incorrect, ignoring" >&6; }
48034      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48035$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48036    fi
48037  fi
48038
48039    fi
48040  fi
48041
48042  if test "x$MSVC_DLL" = x; then
48043    # Probe: Check in the Boot JDK directory.
48044    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48045
48046  DLL_NAME="$DLL_NAME"
48047  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48048  METHOD="well-known location in Boot JDK"
48049  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48051$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48052
48053    # Need to check if the found msvcr is correct architecture
48054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48055$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48056    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48058      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48059      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48061        CORRECT_MSVCR_ARCH="PE32 executable"
48062      else
48063        CORRECT_MSVCR_ARCH="PE32+ executable"
48064      fi
48065    else
48066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48067        CORRECT_MSVCR_ARCH=386
48068      else
48069        CORRECT_MSVCR_ARCH=x86-64
48070      fi
48071    fi
48072    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48074$as_echo "ok" >&6; }
48075      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48076
48077  # Only process if variable expands to non-empty
48078
48079  if test "x$MSVC_DLL" != x; then
48080    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48081
48082  # Input might be given as Windows format, start by converting to
48083  # unix format.
48084  path="$MSVC_DLL"
48085  new_path=`$CYGPATH -u "$path"`
48086
48087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48090  # "foo.exe" is OK but "foo" is an error.
48091  #
48092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48093  # It is also a way to make sure we got the proper file name for the real test later on.
48094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48095  if test "x$test_shortpath" = x; then
48096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48097$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48098    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48099  fi
48100
48101  # Call helper function which possibly converts this using DOS-style short mode.
48102  # If so, the updated path is stored in $new_path.
48103
48104  input_path="$new_path"
48105  # Check if we need to convert this using DOS-style short mode. If the path
48106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48107  # take no chances and rewrite it.
48108  # Note: m4 eats our [], so we need to use [ and ] instead.
48109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48110  if test "x$has_forbidden_chars" != x; then
48111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48115      # Going to short mode and back again did indeed matter. Since short mode is
48116      # case insensitive, let's make it lowercase to improve readability.
48117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48118      # Now convert it back to Unix-style (cygpath)
48119      input_path=`$CYGPATH -u "$shortmode_path"`
48120      new_path="$input_path"
48121    fi
48122  fi
48123
48124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48125  if test "x$test_cygdrive_prefix" = x; then
48126    # As a simple fix, exclude /usr/bin since it's not a real path.
48127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48129      # a path prefixed by /cygdrive for fixpath to work.
48130      new_path="$CYGWIN_ROOT_PATH$input_path"
48131    fi
48132  fi
48133
48134
48135  if test "x$path" != "x$new_path"; then
48136    MSVC_DLL="$new_path"
48137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48139  fi
48140
48141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48142
48143  path="$MSVC_DLL"
48144  has_colon=`$ECHO $path | $GREP ^.:`
48145  new_path="$path"
48146  if test "x$has_colon" = x; then
48147    # Not in mixed or Windows style, start by that.
48148    new_path=`cmd //c echo $path`
48149  fi
48150
48151
48152  input_path="$new_path"
48153  # Check if we need to convert this using DOS-style short mode. If the path
48154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48155  # take no chances and rewrite it.
48156  # Note: m4 eats our [], so we need to use [ and ] instead.
48157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48158  if test "x$has_forbidden_chars" != x; then
48159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48161  fi
48162
48163
48164  windows_path="$new_path"
48165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48166    unix_path=`$CYGPATH -u "$windows_path"`
48167    new_path="$unix_path"
48168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48170    new_path="$unix_path"
48171  fi
48172
48173  if test "x$path" != "x$new_path"; then
48174    MSVC_DLL="$new_path"
48175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48177  fi
48178
48179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48181
48182    else
48183      # We're on a unix platform. Hooray! :)
48184      path="$MSVC_DLL"
48185      has_space=`$ECHO "$path" | $GREP " "`
48186      if test "x$has_space" != x; then
48187        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48189        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48190      fi
48191
48192      # Use eval to expand a potential ~
48193      eval path="$path"
48194      if test ! -f "$path" && test ! -d "$path"; then
48195        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48196      fi
48197
48198      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48199    fi
48200  fi
48201
48202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48203$as_echo_n "checking for $DLL_NAME... " >&6; }
48204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48205$as_echo "$MSVC_DLL" >&6; }
48206    else
48207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48208$as_echo "incorrect, ignoring" >&6; }
48209      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48210$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48211    fi
48212  fi
48213
48214  fi
48215
48216  if test "x$MSVC_DLL" = x; then
48217    # Probe: Look in the Windows system32 directory
48218    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48219
48220  windows_path="$CYGWIN_SYSTEMROOT"
48221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48222    unix_path=`$CYGPATH -u "$windows_path"`
48223    CYGWIN_SYSTEMROOT="$unix_path"
48224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48226    CYGWIN_SYSTEMROOT="$unix_path"
48227  fi
48228
48229    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48230
48231  DLL_NAME="$DLL_NAME"
48232  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48233  METHOD="well-known location in SYSTEMROOT"
48234  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48236$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48237
48238    # Need to check if the found msvcr is correct architecture
48239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48240$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48241    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48243      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48244      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48245      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48246        CORRECT_MSVCR_ARCH="PE32 executable"
48247      else
48248        CORRECT_MSVCR_ARCH="PE32+ executable"
48249      fi
48250    else
48251      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48252        CORRECT_MSVCR_ARCH=386
48253      else
48254        CORRECT_MSVCR_ARCH=x86-64
48255      fi
48256    fi
48257    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48259$as_echo "ok" >&6; }
48260      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48261
48262  # Only process if variable expands to non-empty
48263
48264  if test "x$MSVC_DLL" != x; then
48265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48266
48267  # Input might be given as Windows format, start by converting to
48268  # unix format.
48269  path="$MSVC_DLL"
48270  new_path=`$CYGPATH -u "$path"`
48271
48272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48275  # "foo.exe" is OK but "foo" is an error.
48276  #
48277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48278  # It is also a way to make sure we got the proper file name for the real test later on.
48279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48280  if test "x$test_shortpath" = x; then
48281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48282$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48283    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48284  fi
48285
48286  # Call helper function which possibly converts this using DOS-style short mode.
48287  # If so, the updated path is stored in $new_path.
48288
48289  input_path="$new_path"
48290  # Check if we need to convert this using DOS-style short mode. If the path
48291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48292  # take no chances and rewrite it.
48293  # Note: m4 eats our [], so we need to use [ and ] instead.
48294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48295  if test "x$has_forbidden_chars" != x; then
48296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48300      # Going to short mode and back again did indeed matter. Since short mode is
48301      # case insensitive, let's make it lowercase to improve readability.
48302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48303      # Now convert it back to Unix-style (cygpath)
48304      input_path=`$CYGPATH -u "$shortmode_path"`
48305      new_path="$input_path"
48306    fi
48307  fi
48308
48309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48310  if test "x$test_cygdrive_prefix" = x; then
48311    # As a simple fix, exclude /usr/bin since it's not a real path.
48312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48314      # a path prefixed by /cygdrive for fixpath to work.
48315      new_path="$CYGWIN_ROOT_PATH$input_path"
48316    fi
48317  fi
48318
48319
48320  if test "x$path" != "x$new_path"; then
48321    MSVC_DLL="$new_path"
48322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48323$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48324  fi
48325
48326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48327
48328  path="$MSVC_DLL"
48329  has_colon=`$ECHO $path | $GREP ^.:`
48330  new_path="$path"
48331  if test "x$has_colon" = x; then
48332    # Not in mixed or Windows style, start by that.
48333    new_path=`cmd //c echo $path`
48334  fi
48335
48336
48337  input_path="$new_path"
48338  # Check if we need to convert this using DOS-style short mode. If the path
48339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48340  # take no chances and rewrite it.
48341  # Note: m4 eats our [], so we need to use [ and ] instead.
48342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48343  if test "x$has_forbidden_chars" != x; then
48344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48346  fi
48347
48348
48349  windows_path="$new_path"
48350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48351    unix_path=`$CYGPATH -u "$windows_path"`
48352    new_path="$unix_path"
48353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48355    new_path="$unix_path"
48356  fi
48357
48358  if test "x$path" != "x$new_path"; then
48359    MSVC_DLL="$new_path"
48360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48361$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48362  fi
48363
48364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48366
48367    else
48368      # We're on a unix platform. Hooray! :)
48369      path="$MSVC_DLL"
48370      has_space=`$ECHO "$path" | $GREP " "`
48371      if test "x$has_space" != x; then
48372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48373$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48375      fi
48376
48377      # Use eval to expand a potential ~
48378      eval path="$path"
48379      if test ! -f "$path" && test ! -d "$path"; then
48380        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48381      fi
48382
48383      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48384    fi
48385  fi
48386
48387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48388$as_echo_n "checking for $DLL_NAME... " >&6; }
48389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48390$as_echo "$MSVC_DLL" >&6; }
48391    else
48392      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48393$as_echo "incorrect, ignoring" >&6; }
48394      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48395$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48396    fi
48397  fi
48398
48399  fi
48400
48401  if test "x$MSVC_DLL" = x; then
48402    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48403    if test "x$VS100COMNTOOLS" != x; then
48404      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48405
48406  windows_path="$CYGWIN_VS_TOOLS_DIR"
48407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48408    unix_path=`$CYGPATH -u "$windows_path"`
48409    CYGWIN_VS_TOOLS_DIR="$unix_path"
48410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48412    CYGWIN_VS_TOOLS_DIR="$unix_path"
48413  fi
48414
48415      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48416        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48417	    | $GREP -i /x64/ | $HEAD --lines 1`
48418      else
48419        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48420	    | $GREP -i /x86/ | $HEAD --lines 1`
48421      fi
48422
48423  DLL_NAME="$DLL_NAME"
48424  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48425  METHOD="search of VS100COMNTOOLS"
48426  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48428$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48429
48430    # Need to check if the found msvcr is correct architecture
48431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48432$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48433    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48435      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48436      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48437      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48438        CORRECT_MSVCR_ARCH="PE32 executable"
48439      else
48440        CORRECT_MSVCR_ARCH="PE32+ executable"
48441      fi
48442    else
48443      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48444        CORRECT_MSVCR_ARCH=386
48445      else
48446        CORRECT_MSVCR_ARCH=x86-64
48447      fi
48448    fi
48449    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48451$as_echo "ok" >&6; }
48452      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48453
48454  # Only process if variable expands to non-empty
48455
48456  if test "x$MSVC_DLL" != x; then
48457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48458
48459  # Input might be given as Windows format, start by converting to
48460  # unix format.
48461  path="$MSVC_DLL"
48462  new_path=`$CYGPATH -u "$path"`
48463
48464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48467  # "foo.exe" is OK but "foo" is an error.
48468  #
48469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48470  # It is also a way to make sure we got the proper file name for the real test later on.
48471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48472  if test "x$test_shortpath" = x; then
48473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48474$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48475    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48476  fi
48477
48478  # Call helper function which possibly converts this using DOS-style short mode.
48479  # If so, the updated path is stored in $new_path.
48480
48481  input_path="$new_path"
48482  # Check if we need to convert this using DOS-style short mode. If the path
48483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48484  # take no chances and rewrite it.
48485  # Note: m4 eats our [], so we need to use [ and ] instead.
48486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48487  if test "x$has_forbidden_chars" != x; then
48488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48492      # Going to short mode and back again did indeed matter. Since short mode is
48493      # case insensitive, let's make it lowercase to improve readability.
48494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48495      # Now convert it back to Unix-style (cygpath)
48496      input_path=`$CYGPATH -u "$shortmode_path"`
48497      new_path="$input_path"
48498    fi
48499  fi
48500
48501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48502  if test "x$test_cygdrive_prefix" = x; then
48503    # As a simple fix, exclude /usr/bin since it's not a real path.
48504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48506      # a path prefixed by /cygdrive for fixpath to work.
48507      new_path="$CYGWIN_ROOT_PATH$input_path"
48508    fi
48509  fi
48510
48511
48512  if test "x$path" != "x$new_path"; then
48513    MSVC_DLL="$new_path"
48514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48515$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48516  fi
48517
48518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48519
48520  path="$MSVC_DLL"
48521  has_colon=`$ECHO $path | $GREP ^.:`
48522  new_path="$path"
48523  if test "x$has_colon" = x; then
48524    # Not in mixed or Windows style, start by that.
48525    new_path=`cmd //c echo $path`
48526  fi
48527
48528
48529  input_path="$new_path"
48530  # Check if we need to convert this using DOS-style short mode. If the path
48531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48532  # take no chances and rewrite it.
48533  # Note: m4 eats our [], so we need to use [ and ] instead.
48534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48535  if test "x$has_forbidden_chars" != x; then
48536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48538  fi
48539
48540
48541  windows_path="$new_path"
48542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48543    unix_path=`$CYGPATH -u "$windows_path"`
48544    new_path="$unix_path"
48545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48547    new_path="$unix_path"
48548  fi
48549
48550  if test "x$path" != "x$new_path"; then
48551    MSVC_DLL="$new_path"
48552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48553$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48554  fi
48555
48556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48558
48559    else
48560      # We're on a unix platform. Hooray! :)
48561      path="$MSVC_DLL"
48562      has_space=`$ECHO "$path" | $GREP " "`
48563      if test "x$has_space" != x; then
48564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48565$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48567      fi
48568
48569      # Use eval to expand a potential ~
48570      eval path="$path"
48571      if test ! -f "$path" && test ! -d "$path"; then
48572        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48573      fi
48574
48575      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48576    fi
48577  fi
48578
48579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48580$as_echo_n "checking for $DLL_NAME... " >&6; }
48581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48582$as_echo "$MSVC_DLL" >&6; }
48583    else
48584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48585$as_echo "incorrect, ignoring" >&6; }
48586      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48587$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48588    fi
48589  fi
48590
48591    fi
48592  fi
48593
48594  if test "x$MSVC_DLL" = x; then
48595    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48596    # (This was the original behaviour; kept since it might turn something up)
48597    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48598      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48599        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48600	    | $GREP x64 | $HEAD --lines 1`
48601      else
48602        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48603	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48604        if test "x$POSSIBLE_MSVC_DLL" = x; then
48605          # We're grasping at straws now...
48606          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48607	      | $HEAD --lines 1`
48608        fi
48609      fi
48610
48611
48612  DLL_NAME="$DLL_NAME"
48613  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48614  METHOD="search of VCINSTALLDIR"
48615  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48616    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48617$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48618
48619    # Need to check if the found msvcr is correct architecture
48620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48621$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48622    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48624      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48625      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48626      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48627        CORRECT_MSVCR_ARCH="PE32 executable"
48628      else
48629        CORRECT_MSVCR_ARCH="PE32+ executable"
48630      fi
48631    else
48632      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48633        CORRECT_MSVCR_ARCH=386
48634      else
48635        CORRECT_MSVCR_ARCH=x86-64
48636      fi
48637    fi
48638    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48640$as_echo "ok" >&6; }
48641      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48642
48643  # Only process if variable expands to non-empty
48644
48645  if test "x$MSVC_DLL" != x; then
48646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48647
48648  # Input might be given as Windows format, start by converting to
48649  # unix format.
48650  path="$MSVC_DLL"
48651  new_path=`$CYGPATH -u "$path"`
48652
48653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48656  # "foo.exe" is OK but "foo" is an error.
48657  #
48658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48659  # It is also a way to make sure we got the proper file name for the real test later on.
48660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48661  if test "x$test_shortpath" = x; then
48662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48663$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48664    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48665  fi
48666
48667  # Call helper function which possibly converts this using DOS-style short mode.
48668  # If so, the updated path is stored in $new_path.
48669
48670  input_path="$new_path"
48671  # Check if we need to convert this using DOS-style short mode. If the path
48672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48673  # take no chances and rewrite it.
48674  # Note: m4 eats our [], so we need to use [ and ] instead.
48675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48676  if test "x$has_forbidden_chars" != x; then
48677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48681      # Going to short mode and back again did indeed matter. Since short mode is
48682      # case insensitive, let's make it lowercase to improve readability.
48683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48684      # Now convert it back to Unix-style (cygpath)
48685      input_path=`$CYGPATH -u "$shortmode_path"`
48686      new_path="$input_path"
48687    fi
48688  fi
48689
48690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48691  if test "x$test_cygdrive_prefix" = x; then
48692    # As a simple fix, exclude /usr/bin since it's not a real path.
48693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48695      # a path prefixed by /cygdrive for fixpath to work.
48696      new_path="$CYGWIN_ROOT_PATH$input_path"
48697    fi
48698  fi
48699
48700
48701  if test "x$path" != "x$new_path"; then
48702    MSVC_DLL="$new_path"
48703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48704$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48705  fi
48706
48707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48708
48709  path="$MSVC_DLL"
48710  has_colon=`$ECHO $path | $GREP ^.:`
48711  new_path="$path"
48712  if test "x$has_colon" = x; then
48713    # Not in mixed or Windows style, start by that.
48714    new_path=`cmd //c echo $path`
48715  fi
48716
48717
48718  input_path="$new_path"
48719  # Check if we need to convert this using DOS-style short mode. If the path
48720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48721  # take no chances and rewrite it.
48722  # Note: m4 eats our [], so we need to use [ and ] instead.
48723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48724  if test "x$has_forbidden_chars" != x; then
48725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48727  fi
48728
48729
48730  windows_path="$new_path"
48731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48732    unix_path=`$CYGPATH -u "$windows_path"`
48733    new_path="$unix_path"
48734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48736    new_path="$unix_path"
48737  fi
48738
48739  if test "x$path" != "x$new_path"; then
48740    MSVC_DLL="$new_path"
48741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48742$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48743  fi
48744
48745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48747
48748    else
48749      # We're on a unix platform. Hooray! :)
48750      path="$MSVC_DLL"
48751      has_space=`$ECHO "$path" | $GREP " "`
48752      if test "x$has_space" != x; then
48753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48754$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48756      fi
48757
48758      # Use eval to expand a potential ~
48759      eval path="$path"
48760      if test ! -f "$path" && test ! -d "$path"; then
48761        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48762      fi
48763
48764      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48765    fi
48766  fi
48767
48768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48769$as_echo_n "checking for $DLL_NAME... " >&6; }
48770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48771$as_echo "$MSVC_DLL" >&6; }
48772    else
48773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48774$as_echo "incorrect, ignoring" >&6; }
48775      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48776$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48777    fi
48778  fi
48779
48780    fi
48781  fi
48782
48783  if test "x$MSVC_DLL" = x; then
48784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48785$as_echo_n "checking for $DLL_NAME... " >&6; }
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48787$as_echo "no" >&6; }
48788    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48789  fi
48790
48791      MSVCP_DLL="$MSVC_DLL"
48792    fi
48793
48794  fi
48795
48796  fi
48797
48798
48799  if test "x$NEEDS_LIB_X11" = xfalse; then
48800    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48801      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48802$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48803    fi
48804    X_CFLAGS=
48805    X_LIBS=
48806  else
48807
48808    if test "x${with_x}" = xno; then
48809      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48810    fi
48811
48812    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48813      # The user has specified a X11 base directory. Use it for includes and
48814      # libraries, unless explicitely overridden.
48815      if test "x$x_includes" = xNONE; then
48816        x_includes="${with_x}/include"
48817      fi
48818      if test "x$x_libraries" = xNONE; then
48819        x_libraries="${with_x}/lib"
48820      fi
48821    else
48822      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48823      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48824      # --x-libraries for the sysroot, if that seems to be correct.
48825      if test "x$SYSROOT" != "x"; then
48826        if test "x$x_includes" = xNONE; then
48827          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48828            x_includes="$SYSROOT/usr/X11R6/include"
48829          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48830            x_includes="$SYSROOT/usr/include"
48831          fi
48832        fi
48833        if test "x$x_libraries" = xNONE; then
48834          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48835            x_libraries="$SYSROOT/usr/X11R6/lib"
48836          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48837            x_libraries="$SYSROOT/usr/lib64"
48838          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48839            x_libraries="$SYSROOT/usr/lib"
48840          fi
48841        fi
48842      fi
48843    fi
48844
48845    # Now let autoconf do it's magic
48846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48847$as_echo_n "checking for X... " >&6; }
48848
48849
48850# Check whether --with-x was given.
48851if test "${with_x+set}" = set; then :
48852  withval=$with_x;
48853fi
48854
48855# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48856if test "x$with_x" = xno; then
48857  # The user explicitly disabled X.
48858  have_x=disabled
48859else
48860  case $x_includes,$x_libraries in #(
48861    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48862    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48863  $as_echo_n "(cached) " >&6
48864else
48865  # One or both of the vars are not set, and there is no cached value.
48866ac_x_includes=no ac_x_libraries=no
48867rm -f -r conftest.dir
48868if mkdir conftest.dir; then
48869  cd conftest.dir
48870  cat >Imakefile <<'_ACEOF'
48871incroot:
48872	@echo incroot='${INCROOT}'
48873usrlibdir:
48874	@echo usrlibdir='${USRLIBDIR}'
48875libdir:
48876	@echo libdir='${LIBDIR}'
48877_ACEOF
48878  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48879    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48880    for ac_var in incroot usrlibdir libdir; do
48881      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48882    done
48883    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48884    for ac_extension in a so sl dylib la dll; do
48885      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48886	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48887	ac_im_usrlibdir=$ac_im_libdir; break
48888      fi
48889    done
48890    # Screen out bogus values from the imake configuration.  They are
48891    # bogus both because they are the default anyway, and because
48892    # using them would break gcc on systems where it needs fixed includes.
48893    case $ac_im_incroot in
48894	/usr/include) ac_x_includes= ;;
48895	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48896    esac
48897    case $ac_im_usrlibdir in
48898	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48899	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48900    esac
48901  fi
48902  cd ..
48903  rm -f -r conftest.dir
48904fi
48905
48906# Standard set of common directories for X headers.
48907# Check X11 before X11Rn because it is often a symlink to the current release.
48908ac_x_header_dirs='
48909/usr/X11/include
48910/usr/X11R7/include
48911/usr/X11R6/include
48912/usr/X11R5/include
48913/usr/X11R4/include
48914
48915/usr/include/X11
48916/usr/include/X11R7
48917/usr/include/X11R6
48918/usr/include/X11R5
48919/usr/include/X11R4
48920
48921/usr/local/X11/include
48922/usr/local/X11R7/include
48923/usr/local/X11R6/include
48924/usr/local/X11R5/include
48925/usr/local/X11R4/include
48926
48927/usr/local/include/X11
48928/usr/local/include/X11R7
48929/usr/local/include/X11R6
48930/usr/local/include/X11R5
48931/usr/local/include/X11R4
48932
48933/usr/X386/include
48934/usr/x386/include
48935/usr/XFree86/include/X11
48936
48937/usr/include
48938/usr/local/include
48939/usr/unsupported/include
48940/usr/athena/include
48941/usr/local/x11r5/include
48942/usr/lpp/Xamples/include
48943
48944/usr/openwin/include
48945/usr/openwin/share/include'
48946
48947if test "$ac_x_includes" = no; then
48948  # Guess where to find include files, by looking for Xlib.h.
48949  # First, try using that file with no special directory specified.
48950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48951/* end confdefs.h.  */
48952#include <X11/Xlib.h>
48953_ACEOF
48954if ac_fn_cxx_try_cpp "$LINENO"; then :
48955  # We can compile using X headers with no special include directory.
48956ac_x_includes=
48957else
48958  for ac_dir in $ac_x_header_dirs; do
48959  if test -r "$ac_dir/X11/Xlib.h"; then
48960    ac_x_includes=$ac_dir
48961    break
48962  fi
48963done
48964fi
48965rm -f conftest.err conftest.i conftest.$ac_ext
48966fi # $ac_x_includes = no
48967
48968if test "$ac_x_libraries" = no; then
48969  # Check for the libraries.
48970  # See if we find them without any special options.
48971  # Don't add to $LIBS permanently.
48972  ac_save_LIBS=$LIBS
48973  LIBS="-lX11 $LIBS"
48974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48975/* end confdefs.h.  */
48976#include <X11/Xlib.h>
48977int
48978main ()
48979{
48980XrmInitialize ()
48981  ;
48982  return 0;
48983}
48984_ACEOF
48985if ac_fn_cxx_try_link "$LINENO"; then :
48986  LIBS=$ac_save_LIBS
48987# We can link X programs with no special library path.
48988ac_x_libraries=
48989else
48990  LIBS=$ac_save_LIBS
48991for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48992do
48993  # Don't even attempt the hair of trying to link an X program!
48994  for ac_extension in a so sl dylib la dll; do
48995    if test -r "$ac_dir/libX11.$ac_extension"; then
48996      ac_x_libraries=$ac_dir
48997      break 2
48998    fi
48999  done
49000done
49001fi
49002rm -f core conftest.err conftest.$ac_objext \
49003    conftest$ac_exeext conftest.$ac_ext
49004fi # $ac_x_libraries = no
49005
49006case $ac_x_includes,$ac_x_libraries in #(
49007  no,* | *,no | *\'*)
49008    # Didn't find X, or a directory has "'" in its name.
49009    ac_cv_have_x="have_x=no";; #(
49010  *)
49011    # Record where we found X for the cache.
49012    ac_cv_have_x="have_x=yes\
49013	ac_x_includes='$ac_x_includes'\
49014	ac_x_libraries='$ac_x_libraries'"
49015esac
49016fi
49017;; #(
49018    *) have_x=yes;;
49019  esac
49020  eval "$ac_cv_have_x"
49021fi # $with_x != no
49022
49023if test "$have_x" != yes; then
49024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
49025$as_echo "$have_x" >&6; }
49026  no_x=yes
49027else
49028  # If each of the values was on the command line, it overrides each guess.
49029  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
49030  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
49031  # Update the cache value to reflect the command line values.
49032  ac_cv_have_x="have_x=yes\
49033	ac_x_includes='$x_includes'\
49034	ac_x_libraries='$x_libraries'"
49035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
49036$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
49037fi
49038
49039    if test "$no_x" = yes; then
49040  # Not all programs may use this symbol, but it does not hurt to define it.
49041
49042$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
49043
49044  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
49045else
49046  if test -n "$x_includes"; then
49047    X_CFLAGS="$X_CFLAGS -I$x_includes"
49048  fi
49049
49050  # It would also be nice to do this for all -L options, not just this one.
49051  if test -n "$x_libraries"; then
49052    X_LIBS="$X_LIBS -L$x_libraries"
49053    # For Solaris; some versions of Sun CC require a space after -R and
49054    # others require no space.  Words are not sufficient . . . .
49055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
49056$as_echo_n "checking whether -R must be followed by a space... " >&6; }
49057    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
49058    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
49059    ac_cxx_werror_flag=yes
49060    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49061/* end confdefs.h.  */
49062
49063int
49064main ()
49065{
49066
49067  ;
49068  return 0;
49069}
49070_ACEOF
49071if ac_fn_cxx_try_link "$LINENO"; then :
49072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49073$as_echo "no" >&6; }
49074       X_LIBS="$X_LIBS -R$x_libraries"
49075else
49076  LIBS="$ac_xsave_LIBS -R $x_libraries"
49077       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49078/* end confdefs.h.  */
49079
49080int
49081main ()
49082{
49083
49084  ;
49085  return 0;
49086}
49087_ACEOF
49088if ac_fn_cxx_try_link "$LINENO"; then :
49089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49090$as_echo "yes" >&6; }
49091	  X_LIBS="$X_LIBS -R $x_libraries"
49092else
49093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
49094$as_echo "neither works" >&6; }
49095fi
49096rm -f core conftest.err conftest.$ac_objext \
49097    conftest$ac_exeext conftest.$ac_ext
49098fi
49099rm -f core conftest.err conftest.$ac_objext \
49100    conftest$ac_exeext conftest.$ac_ext
49101    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
49102    LIBS=$ac_xsave_LIBS
49103  fi
49104
49105  # Check for system-dependent libraries X programs must link with.
49106  # Do this before checking for the system-independent R6 libraries
49107  # (-lICE), since we may need -lsocket or whatever for X linking.
49108
49109  if test "$ISC" = yes; then
49110    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
49111  else
49112    # Martyn Johnson says this is needed for Ultrix, if the X
49113    # libraries were built with DECnet support.  And Karl Berry says
49114    # the Alpha needs dnet_stub (dnet does not exist).
49115    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
49116    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49117/* end confdefs.h.  */
49118
49119/* Override any GCC internal prototype to avoid an error.
49120   Use char because int might match the return type of a GCC
49121   builtin and then its argument prototype would still apply.  */
49122#ifdef __cplusplus
49123extern "C"
49124#endif
49125char XOpenDisplay ();
49126int
49127main ()
49128{
49129return XOpenDisplay ();
49130  ;
49131  return 0;
49132}
49133_ACEOF
49134if ac_fn_cxx_try_link "$LINENO"; then :
49135
49136else
49137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
49138$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
49139if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
49140  $as_echo_n "(cached) " >&6
49141else
49142  ac_check_lib_save_LIBS=$LIBS
49143LIBS="-ldnet  $LIBS"
49144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49145/* end confdefs.h.  */
49146
49147/* Override any GCC internal prototype to avoid an error.
49148   Use char because int might match the return type of a GCC
49149   builtin and then its argument prototype would still apply.  */
49150#ifdef __cplusplus
49151extern "C"
49152#endif
49153char dnet_ntoa ();
49154int
49155main ()
49156{
49157return dnet_ntoa ();
49158  ;
49159  return 0;
49160}
49161_ACEOF
49162if ac_fn_cxx_try_link "$LINENO"; then :
49163  ac_cv_lib_dnet_dnet_ntoa=yes
49164else
49165  ac_cv_lib_dnet_dnet_ntoa=no
49166fi
49167rm -f core conftest.err conftest.$ac_objext \
49168    conftest$ac_exeext conftest.$ac_ext
49169LIBS=$ac_check_lib_save_LIBS
49170fi
49171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
49172$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
49173if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
49174  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
49175fi
49176
49177    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
49178      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
49179$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
49180if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
49181  $as_echo_n "(cached) " >&6
49182else
49183  ac_check_lib_save_LIBS=$LIBS
49184LIBS="-ldnet_stub  $LIBS"
49185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49186/* end confdefs.h.  */
49187
49188/* Override any GCC internal prototype to avoid an error.
49189   Use char because int might match the return type of a GCC
49190   builtin and then its argument prototype would still apply.  */
49191#ifdef __cplusplus
49192extern "C"
49193#endif
49194char dnet_ntoa ();
49195int
49196main ()
49197{
49198return dnet_ntoa ();
49199  ;
49200  return 0;
49201}
49202_ACEOF
49203if ac_fn_cxx_try_link "$LINENO"; then :
49204  ac_cv_lib_dnet_stub_dnet_ntoa=yes
49205else
49206  ac_cv_lib_dnet_stub_dnet_ntoa=no
49207fi
49208rm -f core conftest.err conftest.$ac_objext \
49209    conftest$ac_exeext conftest.$ac_ext
49210LIBS=$ac_check_lib_save_LIBS
49211fi
49212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
49213$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
49214if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
49215  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
49216fi
49217
49218    fi
49219fi
49220rm -f core conftest.err conftest.$ac_objext \
49221    conftest$ac_exeext conftest.$ac_ext
49222    LIBS="$ac_xsave_LIBS"
49223
49224    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
49225    # to get the SysV transport functions.
49226    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
49227    # needs -lnsl.
49228    # The nsl library prevents programs from opening the X display
49229    # on Irix 5.2, according to T.E. Dickey.
49230    # The functions gethostbyname, getservbyname, and inet_addr are
49231    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
49232    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
49233if test "x$ac_cv_func_gethostbyname" = xyes; then :
49234
49235fi
49236
49237    if test $ac_cv_func_gethostbyname = no; then
49238      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
49239$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
49240if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
49241  $as_echo_n "(cached) " >&6
49242else
49243  ac_check_lib_save_LIBS=$LIBS
49244LIBS="-lnsl  $LIBS"
49245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49246/* end confdefs.h.  */
49247
49248/* Override any GCC internal prototype to avoid an error.
49249   Use char because int might match the return type of a GCC
49250   builtin and then its argument prototype would still apply.  */
49251#ifdef __cplusplus
49252extern "C"
49253#endif
49254char gethostbyname ();
49255int
49256main ()
49257{
49258return gethostbyname ();
49259  ;
49260  return 0;
49261}
49262_ACEOF
49263if ac_fn_cxx_try_link "$LINENO"; then :
49264  ac_cv_lib_nsl_gethostbyname=yes
49265else
49266  ac_cv_lib_nsl_gethostbyname=no
49267fi
49268rm -f core conftest.err conftest.$ac_objext \
49269    conftest$ac_exeext conftest.$ac_ext
49270LIBS=$ac_check_lib_save_LIBS
49271fi
49272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
49273$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
49274if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
49275  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
49276fi
49277
49278      if test $ac_cv_lib_nsl_gethostbyname = no; then
49279	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
49280$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
49281if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
49282  $as_echo_n "(cached) " >&6
49283else
49284  ac_check_lib_save_LIBS=$LIBS
49285LIBS="-lbsd  $LIBS"
49286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49287/* end confdefs.h.  */
49288
49289/* Override any GCC internal prototype to avoid an error.
49290   Use char because int might match the return type of a GCC
49291   builtin and then its argument prototype would still apply.  */
49292#ifdef __cplusplus
49293extern "C"
49294#endif
49295char gethostbyname ();
49296int
49297main ()
49298{
49299return gethostbyname ();
49300  ;
49301  return 0;
49302}
49303_ACEOF
49304if ac_fn_cxx_try_link "$LINENO"; then :
49305  ac_cv_lib_bsd_gethostbyname=yes
49306else
49307  ac_cv_lib_bsd_gethostbyname=no
49308fi
49309rm -f core conftest.err conftest.$ac_objext \
49310    conftest$ac_exeext conftest.$ac_ext
49311LIBS=$ac_check_lib_save_LIBS
49312fi
49313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
49314$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
49315if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
49316  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
49317fi
49318
49319      fi
49320    fi
49321
49322    # lieder@skyler.mavd.honeywell.com says without -lsocket,
49323    # socket/setsockopt and other routines are undefined under SCO ODT
49324    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
49325    # on later versions), says Simon Leinen: it contains gethostby*
49326    # variants that don't use the name server (or something).  -lsocket
49327    # must be given before -lnsl if both are needed.  We assume that
49328    # if connect needs -lnsl, so does gethostbyname.
49329    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
49330if test "x$ac_cv_func_connect" = xyes; then :
49331
49332fi
49333
49334    if test $ac_cv_func_connect = no; then
49335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
49336$as_echo_n "checking for connect in -lsocket... " >&6; }
49337if ${ac_cv_lib_socket_connect+:} false; then :
49338  $as_echo_n "(cached) " >&6
49339else
49340  ac_check_lib_save_LIBS=$LIBS
49341LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
49342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49343/* end confdefs.h.  */
49344
49345/* Override any GCC internal prototype to avoid an error.
49346   Use char because int might match the return type of a GCC
49347   builtin and then its argument prototype would still apply.  */
49348#ifdef __cplusplus
49349extern "C"
49350#endif
49351char connect ();
49352int
49353main ()
49354{
49355return connect ();
49356  ;
49357  return 0;
49358}
49359_ACEOF
49360if ac_fn_cxx_try_link "$LINENO"; then :
49361  ac_cv_lib_socket_connect=yes
49362else
49363  ac_cv_lib_socket_connect=no
49364fi
49365rm -f core conftest.err conftest.$ac_objext \
49366    conftest$ac_exeext conftest.$ac_ext
49367LIBS=$ac_check_lib_save_LIBS
49368fi
49369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
49370$as_echo "$ac_cv_lib_socket_connect" >&6; }
49371if test "x$ac_cv_lib_socket_connect" = xyes; then :
49372  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
49373fi
49374
49375    fi
49376
49377    # Guillermo Gomez says -lposix is necessary on A/UX.
49378    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
49379if test "x$ac_cv_func_remove" = xyes; then :
49380
49381fi
49382
49383    if test $ac_cv_func_remove = no; then
49384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
49385$as_echo_n "checking for remove in -lposix... " >&6; }
49386if ${ac_cv_lib_posix_remove+:} false; then :
49387  $as_echo_n "(cached) " >&6
49388else
49389  ac_check_lib_save_LIBS=$LIBS
49390LIBS="-lposix  $LIBS"
49391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49392/* end confdefs.h.  */
49393
49394/* Override any GCC internal prototype to avoid an error.
49395   Use char because int might match the return type of a GCC
49396   builtin and then its argument prototype would still apply.  */
49397#ifdef __cplusplus
49398extern "C"
49399#endif
49400char remove ();
49401int
49402main ()
49403{
49404return remove ();
49405  ;
49406  return 0;
49407}
49408_ACEOF
49409if ac_fn_cxx_try_link "$LINENO"; then :
49410  ac_cv_lib_posix_remove=yes
49411else
49412  ac_cv_lib_posix_remove=no
49413fi
49414rm -f core conftest.err conftest.$ac_objext \
49415    conftest$ac_exeext conftest.$ac_ext
49416LIBS=$ac_check_lib_save_LIBS
49417fi
49418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
49419$as_echo "$ac_cv_lib_posix_remove" >&6; }
49420if test "x$ac_cv_lib_posix_remove" = xyes; then :
49421  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
49422fi
49423
49424    fi
49425
49426    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
49427    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
49428if test "x$ac_cv_func_shmat" = xyes; then :
49429
49430fi
49431
49432    if test $ac_cv_func_shmat = no; then
49433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
49434$as_echo_n "checking for shmat in -lipc... " >&6; }
49435if ${ac_cv_lib_ipc_shmat+:} false; then :
49436  $as_echo_n "(cached) " >&6
49437else
49438  ac_check_lib_save_LIBS=$LIBS
49439LIBS="-lipc  $LIBS"
49440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49441/* end confdefs.h.  */
49442
49443/* Override any GCC internal prototype to avoid an error.
49444   Use char because int might match the return type of a GCC
49445   builtin and then its argument prototype would still apply.  */
49446#ifdef __cplusplus
49447extern "C"
49448#endif
49449char shmat ();
49450int
49451main ()
49452{
49453return shmat ();
49454  ;
49455  return 0;
49456}
49457_ACEOF
49458if ac_fn_cxx_try_link "$LINENO"; then :
49459  ac_cv_lib_ipc_shmat=yes
49460else
49461  ac_cv_lib_ipc_shmat=no
49462fi
49463rm -f core conftest.err conftest.$ac_objext \
49464    conftest$ac_exeext conftest.$ac_ext
49465LIBS=$ac_check_lib_save_LIBS
49466fi
49467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
49468$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
49469if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
49470  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
49471fi
49472
49473    fi
49474  fi
49475
49476  # Check for libraries that X11R6 Xt/Xaw programs need.
49477  ac_save_LDFLAGS=$LDFLAGS
49478  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
49479  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
49480  # check for ICE first), but we must link in the order -lSM -lICE or
49481  # we get undefined symbols.  So assume we have SM if we have ICE.
49482  # These have to be linked with before -lX11, unlike the other
49483  # libraries we check for below, so use a different variable.
49484  # John Interrante, Karl Berry
49485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
49486$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
49487if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
49488  $as_echo_n "(cached) " >&6
49489else
49490  ac_check_lib_save_LIBS=$LIBS
49491LIBS="-lICE $X_EXTRA_LIBS $LIBS"
49492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49493/* end confdefs.h.  */
49494
49495/* Override any GCC internal prototype to avoid an error.
49496   Use char because int might match the return type of a GCC
49497   builtin and then its argument prototype would still apply.  */
49498#ifdef __cplusplus
49499extern "C"
49500#endif
49501char IceConnectionNumber ();
49502int
49503main ()
49504{
49505return IceConnectionNumber ();
49506  ;
49507  return 0;
49508}
49509_ACEOF
49510if ac_fn_cxx_try_link "$LINENO"; then :
49511  ac_cv_lib_ICE_IceConnectionNumber=yes
49512else
49513  ac_cv_lib_ICE_IceConnectionNumber=no
49514fi
49515rm -f core conftest.err conftest.$ac_objext \
49516    conftest$ac_exeext conftest.$ac_ext
49517LIBS=$ac_check_lib_save_LIBS
49518fi
49519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
49520$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
49521if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
49522  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
49523fi
49524
49525  LDFLAGS=$ac_save_LDFLAGS
49526
49527fi
49528
49529
49530    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
49531    # this doesn't make sense so we remove it.
49532    if test "x$COMPILE_TYPE" = xcross; then
49533      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
49534    fi
49535
49536    if test "x$no_x" = xyes; then
49537
49538  # Print a helpful message on how to acquire the necessary build dependency.
49539  # x11 is the help tag: freetype, cups, alsa etc
49540  MISSING_DEPENDENCY=x11
49541
49542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49543    cygwin_help $MISSING_DEPENDENCY
49544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49545    msys_help $MISSING_DEPENDENCY
49546  else
49547    PKGHANDLER_COMMAND=
49548
49549    case $PKGHANDLER in
49550      apt-get)
49551        apt_help     $MISSING_DEPENDENCY ;;
49552      yum)
49553        yum_help     $MISSING_DEPENDENCY ;;
49554      port)
49555        port_help    $MISSING_DEPENDENCY ;;
49556      pkgutil)
49557        pkgutil_help $MISSING_DEPENDENCY ;;
49558      pkgadd)
49559        pkgadd_help  $MISSING_DEPENDENCY ;;
49560    esac
49561
49562    if test "x$PKGHANDLER_COMMAND" != x; then
49563      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49564    fi
49565  fi
49566
49567      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49568    fi
49569
49570    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49571      OPENWIN_HOME="/usr/openwin"
49572      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49573      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49574          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49575          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49576          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49577    fi
49578
49579    ac_ext=c
49580ac_cpp='$CPP $CPPFLAGS'
49581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49583ac_compiler_gnu=$ac_cv_c_compiler_gnu
49584
49585    OLD_CFLAGS="$CFLAGS"
49586    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49587
49588    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49589    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49590do :
49591  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49592ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49593          # include <X11/Xlib.h>
49594          # include <X11/Xutil.h>
49595
49596
49597"
49598if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49599  cat >>confdefs.h <<_ACEOF
49600#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49601_ACEOF
49602 X11_HEADERS_OK=yes
49603else
49604  X11_HEADERS_OK=no; break
49605fi
49606
49607done
49608
49609
49610    if test "x$X11_HEADERS_OK" = xno; then
49611
49612  # Print a helpful message on how to acquire the necessary build dependency.
49613  # x11 is the help tag: freetype, cups, alsa etc
49614  MISSING_DEPENDENCY=x11
49615
49616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49617    cygwin_help $MISSING_DEPENDENCY
49618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49619    msys_help $MISSING_DEPENDENCY
49620  else
49621    PKGHANDLER_COMMAND=
49622
49623    case $PKGHANDLER in
49624      apt-get)
49625        apt_help     $MISSING_DEPENDENCY ;;
49626      yum)
49627        yum_help     $MISSING_DEPENDENCY ;;
49628      port)
49629        port_help    $MISSING_DEPENDENCY ;;
49630      pkgutil)
49631        pkgutil_help $MISSING_DEPENDENCY ;;
49632      pkgadd)
49633        pkgadd_help  $MISSING_DEPENDENCY ;;
49634    esac
49635
49636    if test "x$PKGHANDLER_COMMAND" != x; then
49637      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49638    fi
49639  fi
49640
49641      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49642    fi
49643
49644    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49645    # defined in libawt_xawt.
49646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49647$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49648    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49649/* end confdefs.h.  */
49650#include <X11/extensions/Xrender.h>
49651int
49652main ()
49653{
49654XLinearGradient x;
49655  ;
49656  return 0;
49657}
49658_ACEOF
49659if ac_fn_c_try_compile "$LINENO"; then :
49660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49661$as_echo "yes" >&6; }
49662else
49663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49664$as_echo "no" >&6; }
49665         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49666fi
49667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49668
49669    CFLAGS="$OLD_CFLAGS"
49670    ac_ext=cpp
49671ac_cpp='$CXXCPP $CPPFLAGS'
49672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49675
49676  fi # NEEDS_LIB_X11
49677
49678
49679
49680
49681
49682
49683# Check whether --with-cups was given.
49684if test "${with_cups+set}" = set; then :
49685  withval=$with_cups;
49686fi
49687
49688
49689# Check whether --with-cups-include was given.
49690if test "${with_cups_include+set}" = set; then :
49691  withval=$with_cups_include;
49692fi
49693
49694
49695  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49696    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49697        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49698      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49699$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49700    fi
49701    CUPS_CFLAGS=
49702  else
49703    CUPS_FOUND=no
49704
49705    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49706      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49707    fi
49708
49709    if test "x${with_cups}" != x; then
49710      CUPS_CFLAGS="-I${with_cups}/include"
49711      CUPS_FOUND=yes
49712    fi
49713    if test "x${with_cups_include}" != x; then
49714      CUPS_CFLAGS="-I${with_cups_include}"
49715      CUPS_FOUND=yes
49716    fi
49717    if test "x$CUPS_FOUND" = xno; then
49718      # Are the cups headers installed in the default /usr/include location?
49719      for ac_header in cups/cups.h cups/ppd.h
49720do :
49721  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49722ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49723if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49724  cat >>confdefs.h <<_ACEOF
49725#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49726_ACEOF
49727
49728          CUPS_FOUND=yes
49729          CUPS_CFLAGS=
49730          DEFAULT_CUPS=yes
49731
49732fi
49733
49734done
49735
49736    fi
49737    if test "x$CUPS_FOUND" = xno; then
49738      # Getting nervous now? Lets poke around for standard Solaris third-party
49739      # package installation locations.
49740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49741$as_echo_n "checking for cups headers... " >&6; }
49742      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49743        # An SFW package seems to be installed!
49744        CUPS_FOUND=yes
49745        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49746      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49747        # A CSW package seems to be installed!
49748        CUPS_FOUND=yes
49749        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49750      fi
49751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49752$as_echo "$CUPS_FOUND" >&6; }
49753    fi
49754    if test "x$CUPS_FOUND" = xno; then
49755
49756  # Print a helpful message on how to acquire the necessary build dependency.
49757  # cups is the help tag: freetype, cups, alsa etc
49758  MISSING_DEPENDENCY=cups
49759
49760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49761    cygwin_help $MISSING_DEPENDENCY
49762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49763    msys_help $MISSING_DEPENDENCY
49764  else
49765    PKGHANDLER_COMMAND=
49766
49767    case $PKGHANDLER in
49768      apt-get)
49769        apt_help     $MISSING_DEPENDENCY ;;
49770      yum)
49771        yum_help     $MISSING_DEPENDENCY ;;
49772      port)
49773        port_help    $MISSING_DEPENDENCY ;;
49774      pkgutil)
49775        pkgutil_help $MISSING_DEPENDENCY ;;
49776      pkgadd)
49777        pkgadd_help  $MISSING_DEPENDENCY ;;
49778    esac
49779
49780    if test "x$PKGHANDLER_COMMAND" != x; then
49781      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49782    fi
49783  fi
49784
49785      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49786    fi
49787  fi
49788
49789
49790
49791
49792
49793# Check whether --with-freetype was given.
49794if test "${with_freetype+set}" = set; then :
49795  withval=$with_freetype;
49796fi
49797
49798
49799# Check whether --with-freetype-include was given.
49800if test "${with_freetype_include+set}" = set; then :
49801  withval=$with_freetype_include;
49802fi
49803
49804
49805# Check whether --with-freetype-lib was given.
49806if test "${with_freetype_lib+set}" = set; then :
49807  withval=$with_freetype_lib;
49808fi
49809
49810
49811# Check whether --with-freetype-src was given.
49812if test "${with_freetype_src+set}" = set; then :
49813  withval=$with_freetype_src;
49814fi
49815
49816  # Check whether --enable-freetype-bundling was given.
49817if test "${enable_freetype_bundling+set}" = set; then :
49818  enableval=$enable_freetype_bundling;
49819fi
49820
49821
49822  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49823  FREETYPE_BASE_NAME=freetype
49824  FREETYPE_CFLAGS=
49825  FREETYPE_LIBS=
49826  FREETYPE_BUNDLE_LIB_PATH=
49827
49828  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49829    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49830        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49831        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49832        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49833      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49834$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49835    fi
49836    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49837      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49838$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49839    fi
49840  else
49841    # freetype is needed to build; go get it!
49842
49843    BUNDLE_FREETYPE="$enable_freetype_bundling"
49844
49845    if  test "x$with_freetype_src" != x; then
49846      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49847        # Try to build freetype if --with-freetype-src was given on Windows
49848
49849  FREETYPE_SRC_PATH="$with_freetype_src"
49850  BUILD_FREETYPE=yes
49851
49852  # Check if the freetype sources are acessible..
49853  if ! test -d $FREETYPE_SRC_PATH; then
49854    { $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
49855$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49856    BUILD_FREETYPE=no
49857  fi
49858  # ..and contain a vc2010 project file
49859  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49860  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49861    { $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
49862$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49863    BUILD_FREETYPE=no
49864  fi
49865  # Now check if configure found a version of 'msbuild.exe'
49866  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49867    { $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
49868$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;}
49869    BUILD_FREETYPE=no
49870  fi
49871
49872  # Ready to go..
49873  if test "x$BUILD_FREETYPE" = xyes; then
49874    # msbuild requires trailing slashes for output directories
49875    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49876    freetype_lib_path_unix="$freetype_lib_path"
49877    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49878
49879  unix_path="$vcxproj_path"
49880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49881    windows_path=`$CYGPATH -m "$unix_path"`
49882    vcxproj_path="$windows_path"
49883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49884    windows_path=`cmd //c echo $unix_path`
49885    vcxproj_path="$windows_path"
49886  fi
49887
49888
49889  unix_path="$freetype_lib_path"
49890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49891    windows_path=`$CYGPATH -m "$unix_path"`
49892    freetype_lib_path="$windows_path"
49893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49894    windows_path=`cmd //c echo $unix_path`
49895    freetype_lib_path="$windows_path"
49896  fi
49897
49898
49899  unix_path="$freetype_obj_path"
49900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49901    windows_path=`$CYGPATH -m "$unix_path"`
49902    freetype_obj_path="$windows_path"
49903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49904    windows_path=`cmd //c echo $unix_path`
49905    freetype_obj_path="$windows_path"
49906  fi
49907
49908    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49909      freetype_platform=x64
49910    else
49911      freetype_platform=win32
49912    fi
49913
49914    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49915    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49916    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49917    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49918    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49919$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49920
49921    # First we try to build the freetype.dll
49922    $ECHO -e "@echo off\n"\
49923        "$MSBUILD $vcxproj_path "\
49924        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49925        "/p:Configuration=\"Release Multithreaded\" "\
49926        "/p:Platform=$freetype_platform "\
49927        "/p:ConfigurationType=DynamicLibrary "\
49928        "/p:TargetName=freetype "\
49929        "/p:OutDir=\"$freetype_lib_path\" "\
49930        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49931    cmd /c freetype.bat
49932
49933    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49934      # If that succeeds we also build freetype.lib
49935      $ECHO -e "@echo off\n"\
49936          "$MSBUILD $vcxproj_path "\
49937          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49938          "/p:Configuration=\"Release Multithreaded\" "\
49939          "/p:Platform=$freetype_platform "\
49940          "/p:ConfigurationType=StaticLibrary "\
49941          "/p:TargetName=freetype "\
49942          "/p:OutDir=\"$freetype_lib_path\" "\
49943          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49944      cmd /c freetype.bat
49945
49946      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49947        # Once we build both, lib and dll, set freetype lib and include path appropriately
49948        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49949        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49950        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49951$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49952      else
49953        BUILD_FREETYPE=no
49954      fi
49955    else
49956      BUILD_FREETYPE=no
49957    fi
49958  fi
49959
49960        if test "x$BUILD_FREETYPE" = xyes; then
49961          # Okay, we built it. Check that it works.
49962
49963  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49964  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49965  METHOD="--with-freetype-src"
49966
49967  # Let's start with an optimistic view of the world :-)
49968  FOUND_FREETYPE=yes
49969
49970  # First look for the canonical freetype main include file ft2build.h.
49971  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49972    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49973    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49974    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49975      # Fail.
49976      FOUND_FREETYPE=no
49977    fi
49978  fi
49979
49980  if test "x$FOUND_FREETYPE" = xyes; then
49981    # Include file found, let's continue the sanity check.
49982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49983$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49984
49985    # Reset to default value
49986    FREETYPE_BASE_NAME=freetype
49987    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49988    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49989      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49990          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49991        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49992        # for the .6 version explicitly.
49993        FREETYPE_BASE_NAME=freetype.6
49994        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49995        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49996$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49997      else
49998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49999$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50000        FOUND_FREETYPE=no
50001      fi
50002    else
50003      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50004        # On Windows, we will need both .lib and .dll file.
50005        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50006          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50008          FOUND_FREETYPE=no
50009        fi
50010      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50011          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50012        # Found lib in isa dir, use that instead.
50013        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50014        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50015$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50016      fi
50017    fi
50018  fi
50019
50020  if test "x$FOUND_FREETYPE" = xyes; then
50021
50022  # Only process if variable expands to non-empty
50023
50024  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50026
50027  # Input might be given as Windows format, start by converting to
50028  # unix format.
50029  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50030  new_path=`$CYGPATH -u "$path"`
50031
50032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50035  # "foo.exe" is OK but "foo" is an error.
50036  #
50037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50038  # It is also a way to make sure we got the proper file name for the real test later on.
50039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50040  if test "x$test_shortpath" = x; then
50041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50044  fi
50045
50046  # Call helper function which possibly converts this using DOS-style short mode.
50047  # If so, the updated path is stored in $new_path.
50048
50049  input_path="$new_path"
50050  # Check if we need to convert this using DOS-style short mode. If the path
50051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50052  # take no chances and rewrite it.
50053  # Note: m4 eats our [], so we need to use [ and ] instead.
50054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50055  if test "x$has_forbidden_chars" != x; then
50056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50060      # Going to short mode and back again did indeed matter. Since short mode is
50061      # case insensitive, let's make it lowercase to improve readability.
50062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50063      # Now convert it back to Unix-style (cygpath)
50064      input_path=`$CYGPATH -u "$shortmode_path"`
50065      new_path="$input_path"
50066    fi
50067  fi
50068
50069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50070  if test "x$test_cygdrive_prefix" = x; then
50071    # As a simple fix, exclude /usr/bin since it's not a real path.
50072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50074      # a path prefixed by /cygdrive for fixpath to work.
50075      new_path="$CYGWIN_ROOT_PATH$input_path"
50076    fi
50077  fi
50078
50079
50080  if test "x$path" != "x$new_path"; then
50081    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50084  fi
50085
50086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50087
50088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50089  has_colon=`$ECHO $path | $GREP ^.:`
50090  new_path="$path"
50091  if test "x$has_colon" = x; then
50092    # Not in mixed or Windows style, start by that.
50093    new_path=`cmd //c echo $path`
50094  fi
50095
50096
50097  input_path="$new_path"
50098  # Check if we need to convert this using DOS-style short mode. If the path
50099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50100  # take no chances and rewrite it.
50101  # Note: m4 eats our [], so we need to use [ and ] instead.
50102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50103  if test "x$has_forbidden_chars" != x; then
50104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50106  fi
50107
50108
50109  windows_path="$new_path"
50110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50111    unix_path=`$CYGPATH -u "$windows_path"`
50112    new_path="$unix_path"
50113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50115    new_path="$unix_path"
50116  fi
50117
50118  if test "x$path" != "x$new_path"; then
50119    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50122  fi
50123
50124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50126
50127    else
50128      # We're on a unix platform. Hooray! :)
50129      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50130      has_space=`$ECHO "$path" | $GREP " "`
50131      if test "x$has_space" != x; then
50132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50135      fi
50136
50137      # Use eval to expand a potential ~
50138      eval path="$path"
50139      if test ! -f "$path" && test ! -d "$path"; then
50140        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50141      fi
50142
50143      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50144    fi
50145  fi
50146
50147
50148  # Only process if variable expands to non-empty
50149
50150  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50152
50153  # Input might be given as Windows format, start by converting to
50154  # unix format.
50155  path="$POTENTIAL_FREETYPE_LIB_PATH"
50156  new_path=`$CYGPATH -u "$path"`
50157
50158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50161  # "foo.exe" is OK but "foo" is an error.
50162  #
50163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50164  # It is also a way to make sure we got the proper file name for the real test later on.
50165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50166  if test "x$test_shortpath" = x; then
50167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50170  fi
50171
50172  # Call helper function which possibly converts this using DOS-style short mode.
50173  # If so, the updated path is stored in $new_path.
50174
50175  input_path="$new_path"
50176  # Check if we need to convert this using DOS-style short mode. If the path
50177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50178  # take no chances and rewrite it.
50179  # Note: m4 eats our [], so we need to use [ and ] instead.
50180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50181  if test "x$has_forbidden_chars" != x; then
50182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50186      # Going to short mode and back again did indeed matter. Since short mode is
50187      # case insensitive, let's make it lowercase to improve readability.
50188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50189      # Now convert it back to Unix-style (cygpath)
50190      input_path=`$CYGPATH -u "$shortmode_path"`
50191      new_path="$input_path"
50192    fi
50193  fi
50194
50195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50196  if test "x$test_cygdrive_prefix" = x; then
50197    # As a simple fix, exclude /usr/bin since it's not a real path.
50198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50200      # a path prefixed by /cygdrive for fixpath to work.
50201      new_path="$CYGWIN_ROOT_PATH$input_path"
50202    fi
50203  fi
50204
50205
50206  if test "x$path" != "x$new_path"; then
50207    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50210  fi
50211
50212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50213
50214  path="$POTENTIAL_FREETYPE_LIB_PATH"
50215  has_colon=`$ECHO $path | $GREP ^.:`
50216  new_path="$path"
50217  if test "x$has_colon" = x; then
50218    # Not in mixed or Windows style, start by that.
50219    new_path=`cmd //c echo $path`
50220  fi
50221
50222
50223  input_path="$new_path"
50224  # Check if we need to convert this using DOS-style short mode. If the path
50225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50226  # take no chances and rewrite it.
50227  # Note: m4 eats our [], so we need to use [ and ] instead.
50228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50229  if test "x$has_forbidden_chars" != x; then
50230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50232  fi
50233
50234
50235  windows_path="$new_path"
50236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50237    unix_path=`$CYGPATH -u "$windows_path"`
50238    new_path="$unix_path"
50239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50241    new_path="$unix_path"
50242  fi
50243
50244  if test "x$path" != "x$new_path"; then
50245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50248  fi
50249
50250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50252
50253    else
50254      # We're on a unix platform. Hooray! :)
50255      path="$POTENTIAL_FREETYPE_LIB_PATH"
50256      has_space=`$ECHO "$path" | $GREP " "`
50257      if test "x$has_space" != x; then
50258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50261      fi
50262
50263      # Use eval to expand a potential ~
50264      eval path="$path"
50265      if test ! -f "$path" && test ! -d "$path"; then
50266        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50267      fi
50268
50269      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50270    fi
50271  fi
50272
50273
50274    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50276$as_echo_n "checking for freetype includes... " >&6; }
50277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50278$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50279    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50281$as_echo_n "checking for freetype libraries... " >&6; }
50282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50283$as_echo "$FREETYPE_LIB_PATH" >&6; }
50284  fi
50285
50286          if test "x$FOUND_FREETYPE" != xyes; then
50287            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
50288          fi
50289        else
50290          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
50291$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
50292          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
50293        fi
50294      else
50295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
50296$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
50297      fi
50298    fi
50299
50300    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
50301      # User has specified settings
50302
50303      if test "x$BUNDLE_FREETYPE" = x; then
50304        # If not specified, default is to bundle freetype
50305        BUNDLE_FREETYPE=yes
50306      fi
50307
50308      if test "x$with_freetype" != x; then
50309        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
50310        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
50311      fi
50312
50313      # Allow --with-freetype-lib and --with-freetype-include to override
50314      if test "x$with_freetype_include" != x; then
50315        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
50316      fi
50317      if test "x$with_freetype_lib" != x; then
50318        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
50319      fi
50320
50321      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50322        # Okay, we got it. Check that it works.
50323
50324  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50325  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50326  METHOD="--with-freetype"
50327
50328  # Let's start with an optimistic view of the world :-)
50329  FOUND_FREETYPE=yes
50330
50331  # First look for the canonical freetype main include file ft2build.h.
50332  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50333    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50334    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50335    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50336      # Fail.
50337      FOUND_FREETYPE=no
50338    fi
50339  fi
50340
50341  if test "x$FOUND_FREETYPE" = xyes; then
50342    # Include file found, let's continue the sanity check.
50343    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50344$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50345
50346    # Reset to default value
50347    FREETYPE_BASE_NAME=freetype
50348    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50349    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50350      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50351          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50352        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50353        # for the .6 version explicitly.
50354        FREETYPE_BASE_NAME=freetype.6
50355        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50356        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50357$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50358      else
50359        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50360$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50361        FOUND_FREETYPE=no
50362      fi
50363    else
50364      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50365        # On Windows, we will need both .lib and .dll file.
50366        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50367          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50368$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50369          FOUND_FREETYPE=no
50370        fi
50371      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50372          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50373        # Found lib in isa dir, use that instead.
50374        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50375        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50376$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50377      fi
50378    fi
50379  fi
50380
50381  if test "x$FOUND_FREETYPE" = xyes; then
50382
50383  # Only process if variable expands to non-empty
50384
50385  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50387
50388  # Input might be given as Windows format, start by converting to
50389  # unix format.
50390  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50391  new_path=`$CYGPATH -u "$path"`
50392
50393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50396  # "foo.exe" is OK but "foo" is an error.
50397  #
50398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50399  # It is also a way to make sure we got the proper file name for the real test later on.
50400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50401  if test "x$test_shortpath" = x; then
50402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50405  fi
50406
50407  # Call helper function which possibly converts this using DOS-style short mode.
50408  # If so, the updated path is stored in $new_path.
50409
50410  input_path="$new_path"
50411  # Check if we need to convert this using DOS-style short mode. If the path
50412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50413  # take no chances and rewrite it.
50414  # Note: m4 eats our [], so we need to use [ and ] instead.
50415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50416  if test "x$has_forbidden_chars" != x; then
50417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50421      # Going to short mode and back again did indeed matter. Since short mode is
50422      # case insensitive, let's make it lowercase to improve readability.
50423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50424      # Now convert it back to Unix-style (cygpath)
50425      input_path=`$CYGPATH -u "$shortmode_path"`
50426      new_path="$input_path"
50427    fi
50428  fi
50429
50430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50431  if test "x$test_cygdrive_prefix" = x; then
50432    # As a simple fix, exclude /usr/bin since it's not a real path.
50433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50435      # a path prefixed by /cygdrive for fixpath to work.
50436      new_path="$CYGWIN_ROOT_PATH$input_path"
50437    fi
50438  fi
50439
50440
50441  if test "x$path" != "x$new_path"; then
50442    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50445  fi
50446
50447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50448
50449  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50450  has_colon=`$ECHO $path | $GREP ^.:`
50451  new_path="$path"
50452  if test "x$has_colon" = x; then
50453    # Not in mixed or Windows style, start by that.
50454    new_path=`cmd //c echo $path`
50455  fi
50456
50457
50458  input_path="$new_path"
50459  # Check if we need to convert this using DOS-style short mode. If the path
50460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50461  # take no chances and rewrite it.
50462  # Note: m4 eats our [], so we need to use [ and ] instead.
50463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50464  if test "x$has_forbidden_chars" != x; then
50465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50467  fi
50468
50469
50470  windows_path="$new_path"
50471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50472    unix_path=`$CYGPATH -u "$windows_path"`
50473    new_path="$unix_path"
50474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50476    new_path="$unix_path"
50477  fi
50478
50479  if test "x$path" != "x$new_path"; then
50480    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50483  fi
50484
50485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50487
50488    else
50489      # We're on a unix platform. Hooray! :)
50490      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50491      has_space=`$ECHO "$path" | $GREP " "`
50492      if test "x$has_space" != x; then
50493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50496      fi
50497
50498      # Use eval to expand a potential ~
50499      eval path="$path"
50500      if test ! -f "$path" && test ! -d "$path"; then
50501        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50502      fi
50503
50504      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50505    fi
50506  fi
50507
50508
50509  # Only process if variable expands to non-empty
50510
50511  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50513
50514  # Input might be given as Windows format, start by converting to
50515  # unix format.
50516  path="$POTENTIAL_FREETYPE_LIB_PATH"
50517  new_path=`$CYGPATH -u "$path"`
50518
50519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50522  # "foo.exe" is OK but "foo" is an error.
50523  #
50524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50525  # It is also a way to make sure we got the proper file name for the real test later on.
50526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50527  if test "x$test_shortpath" = x; then
50528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50529$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50530    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50531  fi
50532
50533  # Call helper function which possibly converts this using DOS-style short mode.
50534  # If so, the updated path is stored in $new_path.
50535
50536  input_path="$new_path"
50537  # Check if we need to convert this using DOS-style short mode. If the path
50538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50539  # take no chances and rewrite it.
50540  # Note: m4 eats our [], so we need to use [ and ] instead.
50541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50542  if test "x$has_forbidden_chars" != x; then
50543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50547      # Going to short mode and back again did indeed matter. Since short mode is
50548      # case insensitive, let's make it lowercase to improve readability.
50549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50550      # Now convert it back to Unix-style (cygpath)
50551      input_path=`$CYGPATH -u "$shortmode_path"`
50552      new_path="$input_path"
50553    fi
50554  fi
50555
50556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50557  if test "x$test_cygdrive_prefix" = x; then
50558    # As a simple fix, exclude /usr/bin since it's not a real path.
50559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50561      # a path prefixed by /cygdrive for fixpath to work.
50562      new_path="$CYGWIN_ROOT_PATH$input_path"
50563    fi
50564  fi
50565
50566
50567  if test "x$path" != "x$new_path"; then
50568    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50570$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50571  fi
50572
50573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50574
50575  path="$POTENTIAL_FREETYPE_LIB_PATH"
50576  has_colon=`$ECHO $path | $GREP ^.:`
50577  new_path="$path"
50578  if test "x$has_colon" = x; then
50579    # Not in mixed or Windows style, start by that.
50580    new_path=`cmd //c echo $path`
50581  fi
50582
50583
50584  input_path="$new_path"
50585  # Check if we need to convert this using DOS-style short mode. If the path
50586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50587  # take no chances and rewrite it.
50588  # Note: m4 eats our [], so we need to use [ and ] instead.
50589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50590  if test "x$has_forbidden_chars" != x; then
50591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50593  fi
50594
50595
50596  windows_path="$new_path"
50597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50598    unix_path=`$CYGPATH -u "$windows_path"`
50599    new_path="$unix_path"
50600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50602    new_path="$unix_path"
50603  fi
50604
50605  if test "x$path" != "x$new_path"; then
50606    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50608$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50609  fi
50610
50611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50613
50614    else
50615      # We're on a unix platform. Hooray! :)
50616      path="$POTENTIAL_FREETYPE_LIB_PATH"
50617      has_space=`$ECHO "$path" | $GREP " "`
50618      if test "x$has_space" != x; then
50619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50620$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50622      fi
50623
50624      # Use eval to expand a potential ~
50625      eval path="$path"
50626      if test ! -f "$path" && test ! -d "$path"; then
50627        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50628      fi
50629
50630      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50631    fi
50632  fi
50633
50634
50635    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50637$as_echo_n "checking for freetype includes... " >&6; }
50638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50639$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50640    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50642$as_echo_n "checking for freetype libraries... " >&6; }
50643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50644$as_echo "$FREETYPE_LIB_PATH" >&6; }
50645  fi
50646
50647        if test "x$FOUND_FREETYPE" != xyes; then
50648          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50649        fi
50650      else
50651        # User specified only one of lib or include. This is an error.
50652        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50653          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50654$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50655          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50656        else
50657          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50658$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50659          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50660        fi
50661      fi
50662    else
50663      # User did not specify settings, but we need freetype. Try to locate it.
50664
50665      if test "x$BUNDLE_FREETYPE" = x; then
50666        # If not specified, default is to bundle freetype only on windows
50667        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50668          BUNDLE_FREETYPE=yes
50669        else
50670          BUNDLE_FREETYPE=no
50671        fi
50672      fi
50673
50674      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50675      if test "x$SYSROOT" = x; then
50676        if test "x$FOUND_FREETYPE" != xyes; then
50677          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50678          if test "x$PKG_CONFIG" != x; then
50679
50680pkg_failed=no
50681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50682$as_echo_n "checking for FREETYPE... " >&6; }
50683
50684if test -n "$FREETYPE_CFLAGS"; then
50685    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50686 elif test -n "$PKG_CONFIG"; then
50687    if test -n "$PKG_CONFIG" && \
50688    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50689  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50690  ac_status=$?
50691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50692  test $ac_status = 0; }; then
50693  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50694else
50695  pkg_failed=yes
50696fi
50697 else
50698    pkg_failed=untried
50699fi
50700if test -n "$FREETYPE_LIBS"; then
50701    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50702 elif test -n "$PKG_CONFIG"; then
50703    if test -n "$PKG_CONFIG" && \
50704    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50705  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50706  ac_status=$?
50707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50708  test $ac_status = 0; }; then
50709  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50710else
50711  pkg_failed=yes
50712fi
50713 else
50714    pkg_failed=untried
50715fi
50716
50717
50718
50719if test $pkg_failed = yes; then
50720
50721if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50722        _pkg_short_errors_supported=yes
50723else
50724        _pkg_short_errors_supported=no
50725fi
50726        if test $_pkg_short_errors_supported = yes; then
50727	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50728        else
50729	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50730        fi
50731	# Put the nasty error message in config.log where it belongs
50732	echo "$FREETYPE_PKG_ERRORS" >&5
50733
50734	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50735$as_echo "no" >&6; }
50736                FOUND_FREETYPE=no
50737elif test $pkg_failed = untried; then
50738	FOUND_FREETYPE=no
50739else
50740	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50741	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50743$as_echo "yes" >&6; }
50744	FOUND_FREETYPE=yes
50745fi
50746            if test "x$FOUND_FREETYPE" = xyes; then
50747              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50748              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50749              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50750              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50751                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50752              fi
50753              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50754              if test "x$BUNDLE_FREETYPE" = xyes; then
50755                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50756$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50757                FOUND_FREETYPE=no
50758              else
50759                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50760$as_echo_n "checking for freetype... " >&6; }
50761                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50762$as_echo "yes (using pkg-config)" >&6; }
50763              fi
50764            fi
50765          fi
50766        fi
50767      fi
50768
50769      if test "x$FOUND_FREETYPE" != xyes; then
50770        # Check in well-known locations
50771        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50772          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50773
50774  windows_path="$FREETYPE_BASE_DIR"
50775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50776    unix_path=`$CYGPATH -u "$windows_path"`
50777    FREETYPE_BASE_DIR="$unix_path"
50778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50780    FREETYPE_BASE_DIR="$unix_path"
50781  fi
50782
50783
50784  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50785  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50786  METHOD="well-known location"
50787
50788  # Let's start with an optimistic view of the world :-)
50789  FOUND_FREETYPE=yes
50790
50791  # First look for the canonical freetype main include file ft2build.h.
50792  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50793    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50794    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50795    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50796      # Fail.
50797      FOUND_FREETYPE=no
50798    fi
50799  fi
50800
50801  if test "x$FOUND_FREETYPE" = xyes; then
50802    # Include file found, let's continue the sanity check.
50803    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50804$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50805
50806    # Reset to default value
50807    FREETYPE_BASE_NAME=freetype
50808    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50809    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50810      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50811          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50812        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50813        # for the .6 version explicitly.
50814        FREETYPE_BASE_NAME=freetype.6
50815        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50816        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50817$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50818      else
50819        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50820$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50821        FOUND_FREETYPE=no
50822      fi
50823    else
50824      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50825        # On Windows, we will need both .lib and .dll file.
50826        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50827          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50828$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50829          FOUND_FREETYPE=no
50830        fi
50831      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50833        # Found lib in isa dir, use that instead.
50834        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50835        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50836$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50837      fi
50838    fi
50839  fi
50840
50841  if test "x$FOUND_FREETYPE" = xyes; then
50842
50843  # Only process if variable expands to non-empty
50844
50845  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50847
50848  # Input might be given as Windows format, start by converting to
50849  # unix format.
50850  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50851  new_path=`$CYGPATH -u "$path"`
50852
50853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50856  # "foo.exe" is OK but "foo" is an error.
50857  #
50858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50859  # It is also a way to make sure we got the proper file name for the real test later on.
50860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50861  if test "x$test_shortpath" = x; then
50862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50864    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50865  fi
50866
50867  # Call helper function which possibly converts this using DOS-style short mode.
50868  # If so, the updated path is stored in $new_path.
50869
50870  input_path="$new_path"
50871  # Check if we need to convert this using DOS-style short mode. If the path
50872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50873  # take no chances and rewrite it.
50874  # Note: m4 eats our [], so we need to use [ and ] instead.
50875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50876  if test "x$has_forbidden_chars" != x; then
50877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50881      # Going to short mode and back again did indeed matter. Since short mode is
50882      # case insensitive, let's make it lowercase to improve readability.
50883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50884      # Now convert it back to Unix-style (cygpath)
50885      input_path=`$CYGPATH -u "$shortmode_path"`
50886      new_path="$input_path"
50887    fi
50888  fi
50889
50890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50891  if test "x$test_cygdrive_prefix" = x; then
50892    # As a simple fix, exclude /usr/bin since it's not a real path.
50893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50895      # a path prefixed by /cygdrive for fixpath to work.
50896      new_path="$CYGWIN_ROOT_PATH$input_path"
50897    fi
50898  fi
50899
50900
50901  if test "x$path" != "x$new_path"; then
50902    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50905  fi
50906
50907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50908
50909  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50910  has_colon=`$ECHO $path | $GREP ^.:`
50911  new_path="$path"
50912  if test "x$has_colon" = x; then
50913    # Not in mixed or Windows style, start by that.
50914    new_path=`cmd //c echo $path`
50915  fi
50916
50917
50918  input_path="$new_path"
50919  # Check if we need to convert this using DOS-style short mode. If the path
50920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50921  # take no chances and rewrite it.
50922  # Note: m4 eats our [], so we need to use [ and ] instead.
50923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50924  if test "x$has_forbidden_chars" != x; then
50925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50927  fi
50928
50929
50930  windows_path="$new_path"
50931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50932    unix_path=`$CYGPATH -u "$windows_path"`
50933    new_path="$unix_path"
50934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50936    new_path="$unix_path"
50937  fi
50938
50939  if test "x$path" != "x$new_path"; then
50940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50943  fi
50944
50945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50947
50948    else
50949      # We're on a unix platform. Hooray! :)
50950      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50951      has_space=`$ECHO "$path" | $GREP " "`
50952      if test "x$has_space" != x; then
50953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50956      fi
50957
50958      # Use eval to expand a potential ~
50959      eval path="$path"
50960      if test ! -f "$path" && test ! -d "$path"; then
50961        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50962      fi
50963
50964      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50965    fi
50966  fi
50967
50968
50969  # Only process if variable expands to non-empty
50970
50971  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50973
50974  # Input might be given as Windows format, start by converting to
50975  # unix format.
50976  path="$POTENTIAL_FREETYPE_LIB_PATH"
50977  new_path=`$CYGPATH -u "$path"`
50978
50979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50982  # "foo.exe" is OK but "foo" is an error.
50983  #
50984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50985  # It is also a way to make sure we got the proper file name for the real test later on.
50986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50987  if test "x$test_shortpath" = x; then
50988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50991  fi
50992
50993  # Call helper function which possibly converts this using DOS-style short mode.
50994  # If so, the updated path is stored in $new_path.
50995
50996  input_path="$new_path"
50997  # Check if we need to convert this using DOS-style short mode. If the path
50998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50999  # take no chances and rewrite it.
51000  # Note: m4 eats our [], so we need to use [ and ] instead.
51001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51002  if test "x$has_forbidden_chars" != x; then
51003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51007      # Going to short mode and back again did indeed matter. Since short mode is
51008      # case insensitive, let's make it lowercase to improve readability.
51009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51010      # Now convert it back to Unix-style (cygpath)
51011      input_path=`$CYGPATH -u "$shortmode_path"`
51012      new_path="$input_path"
51013    fi
51014  fi
51015
51016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51017  if test "x$test_cygdrive_prefix" = x; then
51018    # As a simple fix, exclude /usr/bin since it's not a real path.
51019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51021      # a path prefixed by /cygdrive for fixpath to work.
51022      new_path="$CYGWIN_ROOT_PATH$input_path"
51023    fi
51024  fi
51025
51026
51027  if test "x$path" != "x$new_path"; then
51028    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51031  fi
51032
51033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51034
51035  path="$POTENTIAL_FREETYPE_LIB_PATH"
51036  has_colon=`$ECHO $path | $GREP ^.:`
51037  new_path="$path"
51038  if test "x$has_colon" = x; then
51039    # Not in mixed or Windows style, start by that.
51040    new_path=`cmd //c echo $path`
51041  fi
51042
51043
51044  input_path="$new_path"
51045  # Check if we need to convert this using DOS-style short mode. If the path
51046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51047  # take no chances and rewrite it.
51048  # Note: m4 eats our [], so we need to use [ and ] instead.
51049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51050  if test "x$has_forbidden_chars" != x; then
51051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51053  fi
51054
51055
51056  windows_path="$new_path"
51057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51058    unix_path=`$CYGPATH -u "$windows_path"`
51059    new_path="$unix_path"
51060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51062    new_path="$unix_path"
51063  fi
51064
51065  if test "x$path" != "x$new_path"; then
51066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51069  fi
51070
51071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51073
51074    else
51075      # We're on a unix platform. Hooray! :)
51076      path="$POTENTIAL_FREETYPE_LIB_PATH"
51077      has_space=`$ECHO "$path" | $GREP " "`
51078      if test "x$has_space" != x; then
51079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51082      fi
51083
51084      # Use eval to expand a potential ~
51085      eval path="$path"
51086      if test ! -f "$path" && test ! -d "$path"; then
51087        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51088      fi
51089
51090      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51091    fi
51092  fi
51093
51094
51095    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51097$as_echo_n "checking for freetype includes... " >&6; }
51098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51099$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51100    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51102$as_echo_n "checking for freetype libraries... " >&6; }
51103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51104$as_echo "$FREETYPE_LIB_PATH" >&6; }
51105  fi
51106
51107          if test "x$FOUND_FREETYPE" != xyes; then
51108            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
51109
51110  windows_path="$FREETYPE_BASE_DIR"
51111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51112    unix_path=`$CYGPATH -u "$windows_path"`
51113    FREETYPE_BASE_DIR="$unix_path"
51114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51116    FREETYPE_BASE_DIR="$unix_path"
51117  fi
51118
51119
51120  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51121  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51122  METHOD="well-known location"
51123
51124  # Let's start with an optimistic view of the world :-)
51125  FOUND_FREETYPE=yes
51126
51127  # First look for the canonical freetype main include file ft2build.h.
51128  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51129    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51130    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51131    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51132      # Fail.
51133      FOUND_FREETYPE=no
51134    fi
51135  fi
51136
51137  if test "x$FOUND_FREETYPE" = xyes; then
51138    # Include file found, let's continue the sanity check.
51139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51140$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51141
51142    # Reset to default value
51143    FREETYPE_BASE_NAME=freetype
51144    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51145    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51146      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51148        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51149        # for the .6 version explicitly.
51150        FREETYPE_BASE_NAME=freetype.6
51151        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51152        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51153$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51154      else
51155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51156$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51157        FOUND_FREETYPE=no
51158      fi
51159    else
51160      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51161        # On Windows, we will need both .lib and .dll file.
51162        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51163          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51164$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51165          FOUND_FREETYPE=no
51166        fi
51167      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51168          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51169        # Found lib in isa dir, use that instead.
51170        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51171        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51172$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51173      fi
51174    fi
51175  fi
51176
51177  if test "x$FOUND_FREETYPE" = xyes; then
51178
51179  # Only process if variable expands to non-empty
51180
51181  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51183
51184  # Input might be given as Windows format, start by converting to
51185  # unix format.
51186  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51187  new_path=`$CYGPATH -u "$path"`
51188
51189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51192  # "foo.exe" is OK but "foo" is an error.
51193  #
51194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51195  # It is also a way to make sure we got the proper file name for the real test later on.
51196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51197  if test "x$test_shortpath" = x; then
51198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51201  fi
51202
51203  # Call helper function which possibly converts this using DOS-style short mode.
51204  # If so, the updated path is stored in $new_path.
51205
51206  input_path="$new_path"
51207  # Check if we need to convert this using DOS-style short mode. If the path
51208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51209  # take no chances and rewrite it.
51210  # Note: m4 eats our [], so we need to use [ and ] instead.
51211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51212  if test "x$has_forbidden_chars" != x; then
51213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51217      # Going to short mode and back again did indeed matter. Since short mode is
51218      # case insensitive, let's make it lowercase to improve readability.
51219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51220      # Now convert it back to Unix-style (cygpath)
51221      input_path=`$CYGPATH -u "$shortmode_path"`
51222      new_path="$input_path"
51223    fi
51224  fi
51225
51226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51227  if test "x$test_cygdrive_prefix" = x; then
51228    # As a simple fix, exclude /usr/bin since it's not a real path.
51229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51231      # a path prefixed by /cygdrive for fixpath to work.
51232      new_path="$CYGWIN_ROOT_PATH$input_path"
51233    fi
51234  fi
51235
51236
51237  if test "x$path" != "x$new_path"; then
51238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51241  fi
51242
51243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51244
51245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51246  has_colon=`$ECHO $path | $GREP ^.:`
51247  new_path="$path"
51248  if test "x$has_colon" = x; then
51249    # Not in mixed or Windows style, start by that.
51250    new_path=`cmd //c echo $path`
51251  fi
51252
51253
51254  input_path="$new_path"
51255  # Check if we need to convert this using DOS-style short mode. If the path
51256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51257  # take no chances and rewrite it.
51258  # Note: m4 eats our [], so we need to use [ and ] instead.
51259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51260  if test "x$has_forbidden_chars" != x; then
51261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51263  fi
51264
51265
51266  windows_path="$new_path"
51267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51268    unix_path=`$CYGPATH -u "$windows_path"`
51269    new_path="$unix_path"
51270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51272    new_path="$unix_path"
51273  fi
51274
51275  if test "x$path" != "x$new_path"; then
51276    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51279  fi
51280
51281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51283
51284    else
51285      # We're on a unix platform. Hooray! :)
51286      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51287      has_space=`$ECHO "$path" | $GREP " "`
51288      if test "x$has_space" != x; then
51289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51292      fi
51293
51294      # Use eval to expand a potential ~
51295      eval path="$path"
51296      if test ! -f "$path" && test ! -d "$path"; then
51297        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51298      fi
51299
51300      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51301    fi
51302  fi
51303
51304
51305  # Only process if variable expands to non-empty
51306
51307  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51309
51310  # Input might be given as Windows format, start by converting to
51311  # unix format.
51312  path="$POTENTIAL_FREETYPE_LIB_PATH"
51313  new_path=`$CYGPATH -u "$path"`
51314
51315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51318  # "foo.exe" is OK but "foo" is an error.
51319  #
51320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51321  # It is also a way to make sure we got the proper file name for the real test later on.
51322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51323  if test "x$test_shortpath" = x; then
51324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51327  fi
51328
51329  # Call helper function which possibly converts this using DOS-style short mode.
51330  # If so, the updated path is stored in $new_path.
51331
51332  input_path="$new_path"
51333  # Check if we need to convert this using DOS-style short mode. If the path
51334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51335  # take no chances and rewrite it.
51336  # Note: m4 eats our [], so we need to use [ and ] instead.
51337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51338  if test "x$has_forbidden_chars" != x; then
51339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51343      # Going to short mode and back again did indeed matter. Since short mode is
51344      # case insensitive, let's make it lowercase to improve readability.
51345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51346      # Now convert it back to Unix-style (cygpath)
51347      input_path=`$CYGPATH -u "$shortmode_path"`
51348      new_path="$input_path"
51349    fi
51350  fi
51351
51352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51353  if test "x$test_cygdrive_prefix" = x; then
51354    # As a simple fix, exclude /usr/bin since it's not a real path.
51355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51357      # a path prefixed by /cygdrive for fixpath to work.
51358      new_path="$CYGWIN_ROOT_PATH$input_path"
51359    fi
51360  fi
51361
51362
51363  if test "x$path" != "x$new_path"; then
51364    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51367  fi
51368
51369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51370
51371  path="$POTENTIAL_FREETYPE_LIB_PATH"
51372  has_colon=`$ECHO $path | $GREP ^.:`
51373  new_path="$path"
51374  if test "x$has_colon" = x; then
51375    # Not in mixed or Windows style, start by that.
51376    new_path=`cmd //c echo $path`
51377  fi
51378
51379
51380  input_path="$new_path"
51381  # Check if we need to convert this using DOS-style short mode. If the path
51382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51383  # take no chances and rewrite it.
51384  # Note: m4 eats our [], so we need to use [ and ] instead.
51385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51386  if test "x$has_forbidden_chars" != x; then
51387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51389  fi
51390
51391
51392  windows_path="$new_path"
51393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51394    unix_path=`$CYGPATH -u "$windows_path"`
51395    new_path="$unix_path"
51396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51398    new_path="$unix_path"
51399  fi
51400
51401  if test "x$path" != "x$new_path"; then
51402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51405  fi
51406
51407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51409
51410    else
51411      # We're on a unix platform. Hooray! :)
51412      path="$POTENTIAL_FREETYPE_LIB_PATH"
51413      has_space=`$ECHO "$path" | $GREP " "`
51414      if test "x$has_space" != x; then
51415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51418      fi
51419
51420      # Use eval to expand a potential ~
51421      eval path="$path"
51422      if test ! -f "$path" && test ! -d "$path"; then
51423        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51424      fi
51425
51426      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51427    fi
51428  fi
51429
51430
51431    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51433$as_echo_n "checking for freetype includes... " >&6; }
51434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51435$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51436    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51438$as_echo_n "checking for freetype libraries... " >&6; }
51439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51440$as_echo "$FREETYPE_LIB_PATH" >&6; }
51441  fi
51442
51443          fi
51444        else
51445          FREETYPE_BASE_DIR="$SYSROOT/usr"
51446
51447  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51448  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51449  METHOD="well-known location"
51450
51451  # Let's start with an optimistic view of the world :-)
51452  FOUND_FREETYPE=yes
51453
51454  # First look for the canonical freetype main include file ft2build.h.
51455  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51456    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51457    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51458    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51459      # Fail.
51460      FOUND_FREETYPE=no
51461    fi
51462  fi
51463
51464  if test "x$FOUND_FREETYPE" = xyes; then
51465    # Include file found, let's continue the sanity check.
51466    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51467$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51468
51469    # Reset to default value
51470    FREETYPE_BASE_NAME=freetype
51471    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51472    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51473      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51475        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51476        # for the .6 version explicitly.
51477        FREETYPE_BASE_NAME=freetype.6
51478        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51479        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51480$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51481      else
51482        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51484        FOUND_FREETYPE=no
51485      fi
51486    else
51487      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51488        # On Windows, we will need both .lib and .dll file.
51489        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51490          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51492          FOUND_FREETYPE=no
51493        fi
51494      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51495          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51496        # Found lib in isa dir, use that instead.
51497        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51498        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51499$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51500      fi
51501    fi
51502  fi
51503
51504  if test "x$FOUND_FREETYPE" = xyes; then
51505
51506  # Only process if variable expands to non-empty
51507
51508  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51510
51511  # Input might be given as Windows format, start by converting to
51512  # unix format.
51513  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51514  new_path=`$CYGPATH -u "$path"`
51515
51516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51519  # "foo.exe" is OK but "foo" is an error.
51520  #
51521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51522  # It is also a way to make sure we got the proper file name for the real test later on.
51523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51524  if test "x$test_shortpath" = x; then
51525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51528  fi
51529
51530  # Call helper function which possibly converts this using DOS-style short mode.
51531  # If so, the updated path is stored in $new_path.
51532
51533  input_path="$new_path"
51534  # Check if we need to convert this using DOS-style short mode. If the path
51535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51536  # take no chances and rewrite it.
51537  # Note: m4 eats our [], so we need to use [ and ] instead.
51538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51539  if test "x$has_forbidden_chars" != x; then
51540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51544      # Going to short mode and back again did indeed matter. Since short mode is
51545      # case insensitive, let's make it lowercase to improve readability.
51546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51547      # Now convert it back to Unix-style (cygpath)
51548      input_path=`$CYGPATH -u "$shortmode_path"`
51549      new_path="$input_path"
51550    fi
51551  fi
51552
51553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51554  if test "x$test_cygdrive_prefix" = x; then
51555    # As a simple fix, exclude /usr/bin since it's not a real path.
51556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51558      # a path prefixed by /cygdrive for fixpath to work.
51559      new_path="$CYGWIN_ROOT_PATH$input_path"
51560    fi
51561  fi
51562
51563
51564  if test "x$path" != "x$new_path"; then
51565    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51568  fi
51569
51570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51571
51572  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51573  has_colon=`$ECHO $path | $GREP ^.:`
51574  new_path="$path"
51575  if test "x$has_colon" = x; then
51576    # Not in mixed or Windows style, start by that.
51577    new_path=`cmd //c echo $path`
51578  fi
51579
51580
51581  input_path="$new_path"
51582  # Check if we need to convert this using DOS-style short mode. If the path
51583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51584  # take no chances and rewrite it.
51585  # Note: m4 eats our [], so we need to use [ and ] instead.
51586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51587  if test "x$has_forbidden_chars" != x; then
51588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51590  fi
51591
51592
51593  windows_path="$new_path"
51594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51595    unix_path=`$CYGPATH -u "$windows_path"`
51596    new_path="$unix_path"
51597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51599    new_path="$unix_path"
51600  fi
51601
51602  if test "x$path" != "x$new_path"; then
51603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51606  fi
51607
51608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51610
51611    else
51612      # We're on a unix platform. Hooray! :)
51613      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51614      has_space=`$ECHO "$path" | $GREP " "`
51615      if test "x$has_space" != x; then
51616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51619      fi
51620
51621      # Use eval to expand a potential ~
51622      eval path="$path"
51623      if test ! -f "$path" && test ! -d "$path"; then
51624        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51625      fi
51626
51627      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51628    fi
51629  fi
51630
51631
51632  # Only process if variable expands to non-empty
51633
51634  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51636
51637  # Input might be given as Windows format, start by converting to
51638  # unix format.
51639  path="$POTENTIAL_FREETYPE_LIB_PATH"
51640  new_path=`$CYGPATH -u "$path"`
51641
51642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51645  # "foo.exe" is OK but "foo" is an error.
51646  #
51647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51648  # It is also a way to make sure we got the proper file name for the real test later on.
51649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51650  if test "x$test_shortpath" = x; then
51651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51654  fi
51655
51656  # Call helper function which possibly converts this using DOS-style short mode.
51657  # If so, the updated path is stored in $new_path.
51658
51659  input_path="$new_path"
51660  # Check if we need to convert this using DOS-style short mode. If the path
51661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51662  # take no chances and rewrite it.
51663  # Note: m4 eats our [], so we need to use [ and ] instead.
51664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51665  if test "x$has_forbidden_chars" != x; then
51666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51670      # Going to short mode and back again did indeed matter. Since short mode is
51671      # case insensitive, let's make it lowercase to improve readability.
51672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51673      # Now convert it back to Unix-style (cygpath)
51674      input_path=`$CYGPATH -u "$shortmode_path"`
51675      new_path="$input_path"
51676    fi
51677  fi
51678
51679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51680  if test "x$test_cygdrive_prefix" = x; then
51681    # As a simple fix, exclude /usr/bin since it's not a real path.
51682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51684      # a path prefixed by /cygdrive for fixpath to work.
51685      new_path="$CYGWIN_ROOT_PATH$input_path"
51686    fi
51687  fi
51688
51689
51690  if test "x$path" != "x$new_path"; then
51691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51694  fi
51695
51696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51697
51698  path="$POTENTIAL_FREETYPE_LIB_PATH"
51699  has_colon=`$ECHO $path | $GREP ^.:`
51700  new_path="$path"
51701  if test "x$has_colon" = x; then
51702    # Not in mixed or Windows style, start by that.
51703    new_path=`cmd //c echo $path`
51704  fi
51705
51706
51707  input_path="$new_path"
51708  # Check if we need to convert this using DOS-style short mode. If the path
51709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51710  # take no chances and rewrite it.
51711  # Note: m4 eats our [], so we need to use [ and ] instead.
51712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51713  if test "x$has_forbidden_chars" != x; then
51714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51716  fi
51717
51718
51719  windows_path="$new_path"
51720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51721    unix_path=`$CYGPATH -u "$windows_path"`
51722    new_path="$unix_path"
51723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51725    new_path="$unix_path"
51726  fi
51727
51728  if test "x$path" != "x$new_path"; then
51729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51732  fi
51733
51734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51736
51737    else
51738      # We're on a unix platform. Hooray! :)
51739      path="$POTENTIAL_FREETYPE_LIB_PATH"
51740      has_space=`$ECHO "$path" | $GREP " "`
51741      if test "x$has_space" != x; then
51742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51745      fi
51746
51747      # Use eval to expand a potential ~
51748      eval path="$path"
51749      if test ! -f "$path" && test ! -d "$path"; then
51750        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51751      fi
51752
51753      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51754    fi
51755  fi
51756
51757
51758    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51760$as_echo_n "checking for freetype includes... " >&6; }
51761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51762$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51763    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51765$as_echo_n "checking for freetype libraries... " >&6; }
51766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51767$as_echo "$FREETYPE_LIB_PATH" >&6; }
51768  fi
51769
51770
51771          if test "x$FOUND_FREETYPE" != xyes; then
51772            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51773
51774  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51775  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51776  METHOD="well-known location"
51777
51778  # Let's start with an optimistic view of the world :-)
51779  FOUND_FREETYPE=yes
51780
51781  # First look for the canonical freetype main include file ft2build.h.
51782  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51783    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51784    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51785    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51786      # Fail.
51787      FOUND_FREETYPE=no
51788    fi
51789  fi
51790
51791  if test "x$FOUND_FREETYPE" = xyes; then
51792    # Include file found, let's continue the sanity check.
51793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51794$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51795
51796    # Reset to default value
51797    FREETYPE_BASE_NAME=freetype
51798    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51799    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51800      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51801          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51802        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51803        # for the .6 version explicitly.
51804        FREETYPE_BASE_NAME=freetype.6
51805        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51806        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51807$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51808      else
51809        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51811        FOUND_FREETYPE=no
51812      fi
51813    else
51814      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51815        # On Windows, we will need both .lib and .dll file.
51816        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51817          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51819          FOUND_FREETYPE=no
51820        fi
51821      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51822          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51823        # Found lib in isa dir, use that instead.
51824        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51825        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51826$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51827      fi
51828    fi
51829  fi
51830
51831  if test "x$FOUND_FREETYPE" = xyes; then
51832
51833  # Only process if variable expands to non-empty
51834
51835  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51837
51838  # Input might be given as Windows format, start by converting to
51839  # unix format.
51840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51841  new_path=`$CYGPATH -u "$path"`
51842
51843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51846  # "foo.exe" is OK but "foo" is an error.
51847  #
51848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51849  # It is also a way to make sure we got the proper file name for the real test later on.
51850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51851  if test "x$test_shortpath" = x; then
51852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51854    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51855  fi
51856
51857  # Call helper function which possibly converts this using DOS-style short mode.
51858  # If so, the updated path is stored in $new_path.
51859
51860  input_path="$new_path"
51861  # Check if we need to convert this using DOS-style short mode. If the path
51862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51863  # take no chances and rewrite it.
51864  # Note: m4 eats our [], so we need to use [ and ] instead.
51865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51866  if test "x$has_forbidden_chars" != x; then
51867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51871      # Going to short mode and back again did indeed matter. Since short mode is
51872      # case insensitive, let's make it lowercase to improve readability.
51873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51874      # Now convert it back to Unix-style (cygpath)
51875      input_path=`$CYGPATH -u "$shortmode_path"`
51876      new_path="$input_path"
51877    fi
51878  fi
51879
51880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51881  if test "x$test_cygdrive_prefix" = x; then
51882    # As a simple fix, exclude /usr/bin since it's not a real path.
51883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51885      # a path prefixed by /cygdrive for fixpath to work.
51886      new_path="$CYGWIN_ROOT_PATH$input_path"
51887    fi
51888  fi
51889
51890
51891  if test "x$path" != "x$new_path"; then
51892    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51895  fi
51896
51897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51898
51899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51900  has_colon=`$ECHO $path | $GREP ^.:`
51901  new_path="$path"
51902  if test "x$has_colon" = x; then
51903    # Not in mixed or Windows style, start by that.
51904    new_path=`cmd //c echo $path`
51905  fi
51906
51907
51908  input_path="$new_path"
51909  # Check if we need to convert this using DOS-style short mode. If the path
51910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51911  # take no chances and rewrite it.
51912  # Note: m4 eats our [], so we need to use [ and ] instead.
51913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51914  if test "x$has_forbidden_chars" != x; then
51915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51917  fi
51918
51919
51920  windows_path="$new_path"
51921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51922    unix_path=`$CYGPATH -u "$windows_path"`
51923    new_path="$unix_path"
51924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51926    new_path="$unix_path"
51927  fi
51928
51929  if test "x$path" != "x$new_path"; then
51930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51933  fi
51934
51935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51937
51938    else
51939      # We're on a unix platform. Hooray! :)
51940      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51941      has_space=`$ECHO "$path" | $GREP " "`
51942      if test "x$has_space" != x; then
51943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51946      fi
51947
51948      # Use eval to expand a potential ~
51949      eval path="$path"
51950      if test ! -f "$path" && test ! -d "$path"; then
51951        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51952      fi
51953
51954      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51955    fi
51956  fi
51957
51958
51959  # Only process if variable expands to non-empty
51960
51961  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51963
51964  # Input might be given as Windows format, start by converting to
51965  # unix format.
51966  path="$POTENTIAL_FREETYPE_LIB_PATH"
51967  new_path=`$CYGPATH -u "$path"`
51968
51969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51972  # "foo.exe" is OK but "foo" is an error.
51973  #
51974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51975  # It is also a way to make sure we got the proper file name for the real test later on.
51976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51977  if test "x$test_shortpath" = x; then
51978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51980    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51981  fi
51982
51983  # Call helper function which possibly converts this using DOS-style short mode.
51984  # If so, the updated path is stored in $new_path.
51985
51986  input_path="$new_path"
51987  # Check if we need to convert this using DOS-style short mode. If the path
51988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51989  # take no chances and rewrite it.
51990  # Note: m4 eats our [], so we need to use [ and ] instead.
51991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51992  if test "x$has_forbidden_chars" != x; then
51993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51997      # Going to short mode and back again did indeed matter. Since short mode is
51998      # case insensitive, let's make it lowercase to improve readability.
51999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52000      # Now convert it back to Unix-style (cygpath)
52001      input_path=`$CYGPATH -u "$shortmode_path"`
52002      new_path="$input_path"
52003    fi
52004  fi
52005
52006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52007  if test "x$test_cygdrive_prefix" = x; then
52008    # As a simple fix, exclude /usr/bin since it's not a real path.
52009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52011      # a path prefixed by /cygdrive for fixpath to work.
52012      new_path="$CYGWIN_ROOT_PATH$input_path"
52013    fi
52014  fi
52015
52016
52017  if test "x$path" != "x$new_path"; then
52018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52021  fi
52022
52023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52024
52025  path="$POTENTIAL_FREETYPE_LIB_PATH"
52026  has_colon=`$ECHO $path | $GREP ^.:`
52027  new_path="$path"
52028  if test "x$has_colon" = x; then
52029    # Not in mixed or Windows style, start by that.
52030    new_path=`cmd //c echo $path`
52031  fi
52032
52033
52034  input_path="$new_path"
52035  # Check if we need to convert this using DOS-style short mode. If the path
52036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52037  # take no chances and rewrite it.
52038  # Note: m4 eats our [], so we need to use [ and ] instead.
52039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52040  if test "x$has_forbidden_chars" != x; then
52041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52043  fi
52044
52045
52046  windows_path="$new_path"
52047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52048    unix_path=`$CYGPATH -u "$windows_path"`
52049    new_path="$unix_path"
52050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52052    new_path="$unix_path"
52053  fi
52054
52055  if test "x$path" != "x$new_path"; then
52056    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52059  fi
52060
52061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52063
52064    else
52065      # We're on a unix platform. Hooray! :)
52066      path="$POTENTIAL_FREETYPE_LIB_PATH"
52067      has_space=`$ECHO "$path" | $GREP " "`
52068      if test "x$has_space" != x; then
52069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52072      fi
52073
52074      # Use eval to expand a potential ~
52075      eval path="$path"
52076      if test ! -f "$path" && test ! -d "$path"; then
52077        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52078      fi
52079
52080      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52081    fi
52082  fi
52083
52084
52085    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52087$as_echo_n "checking for freetype includes... " >&6; }
52088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52089$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52090    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52092$as_echo_n "checking for freetype libraries... " >&6; }
52093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52094$as_echo "$FREETYPE_LIB_PATH" >&6; }
52095  fi
52096
52097          fi
52098
52099          if test "x$FOUND_FREETYPE" != xyes; then
52100            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
52101
52102  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52103  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52104  METHOD="well-known location"
52105
52106  # Let's start with an optimistic view of the world :-)
52107  FOUND_FREETYPE=yes
52108
52109  # First look for the canonical freetype main include file ft2build.h.
52110  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52111    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52112    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52113    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52114      # Fail.
52115      FOUND_FREETYPE=no
52116    fi
52117  fi
52118
52119  if test "x$FOUND_FREETYPE" = xyes; then
52120    # Include file found, let's continue the sanity check.
52121    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52122$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52123
52124    # Reset to default value
52125    FREETYPE_BASE_NAME=freetype
52126    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52127    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52128      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52130        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52131        # for the .6 version explicitly.
52132        FREETYPE_BASE_NAME=freetype.6
52133        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52134        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52135$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52136      else
52137        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52139        FOUND_FREETYPE=no
52140      fi
52141    else
52142      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52143        # On Windows, we will need both .lib and .dll file.
52144        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52145          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52146$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52147          FOUND_FREETYPE=no
52148        fi
52149      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52150          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52151        # Found lib in isa dir, use that instead.
52152        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52153        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52154$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52155      fi
52156    fi
52157  fi
52158
52159  if test "x$FOUND_FREETYPE" = xyes; then
52160
52161  # Only process if variable expands to non-empty
52162
52163  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52165
52166  # Input might be given as Windows format, start by converting to
52167  # unix format.
52168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52169  new_path=`$CYGPATH -u "$path"`
52170
52171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52174  # "foo.exe" is OK but "foo" is an error.
52175  #
52176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52177  # It is also a way to make sure we got the proper file name for the real test later on.
52178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52179  if test "x$test_shortpath" = x; then
52180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52182    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52183  fi
52184
52185  # Call helper function which possibly converts this using DOS-style short mode.
52186  # If so, the updated path is stored in $new_path.
52187
52188  input_path="$new_path"
52189  # Check if we need to convert this using DOS-style short mode. If the path
52190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52191  # take no chances and rewrite it.
52192  # Note: m4 eats our [], so we need to use [ and ] instead.
52193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52194  if test "x$has_forbidden_chars" != x; then
52195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52199      # Going to short mode and back again did indeed matter. Since short mode is
52200      # case insensitive, let's make it lowercase to improve readability.
52201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52202      # Now convert it back to Unix-style (cygpath)
52203      input_path=`$CYGPATH -u "$shortmode_path"`
52204      new_path="$input_path"
52205    fi
52206  fi
52207
52208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52209  if test "x$test_cygdrive_prefix" = x; then
52210    # As a simple fix, exclude /usr/bin since it's not a real path.
52211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52213      # a path prefixed by /cygdrive for fixpath to work.
52214      new_path="$CYGWIN_ROOT_PATH$input_path"
52215    fi
52216  fi
52217
52218
52219  if test "x$path" != "x$new_path"; then
52220    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52223  fi
52224
52225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52226
52227  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52228  has_colon=`$ECHO $path | $GREP ^.:`
52229  new_path="$path"
52230  if test "x$has_colon" = x; then
52231    # Not in mixed or Windows style, start by that.
52232    new_path=`cmd //c echo $path`
52233  fi
52234
52235
52236  input_path="$new_path"
52237  # Check if we need to convert this using DOS-style short mode. If the path
52238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52239  # take no chances and rewrite it.
52240  # Note: m4 eats our [], so we need to use [ and ] instead.
52241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52242  if test "x$has_forbidden_chars" != x; then
52243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52245  fi
52246
52247
52248  windows_path="$new_path"
52249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52250    unix_path=`$CYGPATH -u "$windows_path"`
52251    new_path="$unix_path"
52252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52254    new_path="$unix_path"
52255  fi
52256
52257  if test "x$path" != "x$new_path"; then
52258    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52260$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52261  fi
52262
52263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52265
52266    else
52267      # We're on a unix platform. Hooray! :)
52268      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52269      has_space=`$ECHO "$path" | $GREP " "`
52270      if test "x$has_space" != x; then
52271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52274      fi
52275
52276      # Use eval to expand a potential ~
52277      eval path="$path"
52278      if test ! -f "$path" && test ! -d "$path"; then
52279        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52280      fi
52281
52282      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52283    fi
52284  fi
52285
52286
52287  # Only process if variable expands to non-empty
52288
52289  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52291
52292  # Input might be given as Windows format, start by converting to
52293  # unix format.
52294  path="$POTENTIAL_FREETYPE_LIB_PATH"
52295  new_path=`$CYGPATH -u "$path"`
52296
52297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52300  # "foo.exe" is OK but "foo" is an error.
52301  #
52302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52303  # It is also a way to make sure we got the proper file name for the real test later on.
52304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52305  if test "x$test_shortpath" = x; then
52306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52308    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52309  fi
52310
52311  # Call helper function which possibly converts this using DOS-style short mode.
52312  # If so, the updated path is stored in $new_path.
52313
52314  input_path="$new_path"
52315  # Check if we need to convert this using DOS-style short mode. If the path
52316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52317  # take no chances and rewrite it.
52318  # Note: m4 eats our [], so we need to use [ and ] instead.
52319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52320  if test "x$has_forbidden_chars" != x; then
52321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52325      # Going to short mode and back again did indeed matter. Since short mode is
52326      # case insensitive, let's make it lowercase to improve readability.
52327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52328      # Now convert it back to Unix-style (cygpath)
52329      input_path=`$CYGPATH -u "$shortmode_path"`
52330      new_path="$input_path"
52331    fi
52332  fi
52333
52334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52335  if test "x$test_cygdrive_prefix" = x; then
52336    # As a simple fix, exclude /usr/bin since it's not a real path.
52337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52339      # a path prefixed by /cygdrive for fixpath to work.
52340      new_path="$CYGWIN_ROOT_PATH$input_path"
52341    fi
52342  fi
52343
52344
52345  if test "x$path" != "x$new_path"; then
52346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52349  fi
52350
52351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52352
52353  path="$POTENTIAL_FREETYPE_LIB_PATH"
52354  has_colon=`$ECHO $path | $GREP ^.:`
52355  new_path="$path"
52356  if test "x$has_colon" = x; then
52357    # Not in mixed or Windows style, start by that.
52358    new_path=`cmd //c echo $path`
52359  fi
52360
52361
52362  input_path="$new_path"
52363  # Check if we need to convert this using DOS-style short mode. If the path
52364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52365  # take no chances and rewrite it.
52366  # Note: m4 eats our [], so we need to use [ and ] instead.
52367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52368  if test "x$has_forbidden_chars" != x; then
52369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52371  fi
52372
52373
52374  windows_path="$new_path"
52375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52376    unix_path=`$CYGPATH -u "$windows_path"`
52377    new_path="$unix_path"
52378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52380    new_path="$unix_path"
52381  fi
52382
52383  if test "x$path" != "x$new_path"; then
52384    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52387  fi
52388
52389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52391
52392    else
52393      # We're on a unix platform. Hooray! :)
52394      path="$POTENTIAL_FREETYPE_LIB_PATH"
52395      has_space=`$ECHO "$path" | $GREP " "`
52396      if test "x$has_space" != x; then
52397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52400      fi
52401
52402      # Use eval to expand a potential ~
52403      eval path="$path"
52404      if test ! -f "$path" && test ! -d "$path"; then
52405        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52406      fi
52407
52408      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52409    fi
52410  fi
52411
52412
52413    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52415$as_echo_n "checking for freetype includes... " >&6; }
52416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52417$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52418    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52420$as_echo_n "checking for freetype libraries... " >&6; }
52421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52422$as_echo "$FREETYPE_LIB_PATH" >&6; }
52423  fi
52424
52425          fi
52426
52427          if test "x$FOUND_FREETYPE" != xyes; then
52428            FREETYPE_BASE_DIR="$SYSROOT/usr"
52429            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52430
52431  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52432  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
52433  METHOD="well-known location"
52434
52435  # Let's start with an optimistic view of the world :-)
52436  FOUND_FREETYPE=yes
52437
52438  # First look for the canonical freetype main include file ft2build.h.
52439  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52440    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52441    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52442    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52443      # Fail.
52444      FOUND_FREETYPE=no
52445    fi
52446  fi
52447
52448  if test "x$FOUND_FREETYPE" = xyes; then
52449    # Include file found, let's continue the sanity check.
52450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52451$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52452
52453    # Reset to default value
52454    FREETYPE_BASE_NAME=freetype
52455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52457      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52459        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52460        # for the .6 version explicitly.
52461        FREETYPE_BASE_NAME=freetype.6
52462        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52463        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52464$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52465      else
52466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52468        FOUND_FREETYPE=no
52469      fi
52470    else
52471      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52472        # On Windows, we will need both .lib and .dll file.
52473        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52474          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52476          FOUND_FREETYPE=no
52477        fi
52478      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52480        # Found lib in isa dir, use that instead.
52481        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52482        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52483$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52484      fi
52485    fi
52486  fi
52487
52488  if test "x$FOUND_FREETYPE" = xyes; then
52489
52490  # Only process if variable expands to non-empty
52491
52492  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52494
52495  # Input might be given as Windows format, start by converting to
52496  # unix format.
52497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52498  new_path=`$CYGPATH -u "$path"`
52499
52500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52503  # "foo.exe" is OK but "foo" is an error.
52504  #
52505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52506  # It is also a way to make sure we got the proper file name for the real test later on.
52507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52508  if test "x$test_shortpath" = x; then
52509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52512  fi
52513
52514  # Call helper function which possibly converts this using DOS-style short mode.
52515  # If so, the updated path is stored in $new_path.
52516
52517  input_path="$new_path"
52518  # Check if we need to convert this using DOS-style short mode. If the path
52519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52520  # take no chances and rewrite it.
52521  # Note: m4 eats our [], so we need to use [ and ] instead.
52522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52523  if test "x$has_forbidden_chars" != x; then
52524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52528      # Going to short mode and back again did indeed matter. Since short mode is
52529      # case insensitive, let's make it lowercase to improve readability.
52530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52531      # Now convert it back to Unix-style (cygpath)
52532      input_path=`$CYGPATH -u "$shortmode_path"`
52533      new_path="$input_path"
52534    fi
52535  fi
52536
52537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52538  if test "x$test_cygdrive_prefix" = x; then
52539    # As a simple fix, exclude /usr/bin since it's not a real path.
52540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52542      # a path prefixed by /cygdrive for fixpath to work.
52543      new_path="$CYGWIN_ROOT_PATH$input_path"
52544    fi
52545  fi
52546
52547
52548  if test "x$path" != "x$new_path"; then
52549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52552  fi
52553
52554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52555
52556  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52557  has_colon=`$ECHO $path | $GREP ^.:`
52558  new_path="$path"
52559  if test "x$has_colon" = x; then
52560    # Not in mixed or Windows style, start by that.
52561    new_path=`cmd //c echo $path`
52562  fi
52563
52564
52565  input_path="$new_path"
52566  # Check if we need to convert this using DOS-style short mode. If the path
52567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52568  # take no chances and rewrite it.
52569  # Note: m4 eats our [], so we need to use [ and ] instead.
52570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52571  if test "x$has_forbidden_chars" != x; then
52572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52574  fi
52575
52576
52577  windows_path="$new_path"
52578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52579    unix_path=`$CYGPATH -u "$windows_path"`
52580    new_path="$unix_path"
52581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52583    new_path="$unix_path"
52584  fi
52585
52586  if test "x$path" != "x$new_path"; then
52587    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52590  fi
52591
52592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52594
52595    else
52596      # We're on a unix platform. Hooray! :)
52597      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52598      has_space=`$ECHO "$path" | $GREP " "`
52599      if test "x$has_space" != x; then
52600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52603      fi
52604
52605      # Use eval to expand a potential ~
52606      eval path="$path"
52607      if test ! -f "$path" && test ! -d "$path"; then
52608        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52609      fi
52610
52611      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52612    fi
52613  fi
52614
52615
52616  # Only process if variable expands to non-empty
52617
52618  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52620
52621  # Input might be given as Windows format, start by converting to
52622  # unix format.
52623  path="$POTENTIAL_FREETYPE_LIB_PATH"
52624  new_path=`$CYGPATH -u "$path"`
52625
52626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52629  # "foo.exe" is OK but "foo" is an error.
52630  #
52631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52632  # It is also a way to make sure we got the proper file name for the real test later on.
52633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52634  if test "x$test_shortpath" = x; then
52635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52636$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52637    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52638  fi
52639
52640  # Call helper function which possibly converts this using DOS-style short mode.
52641  # If so, the updated path is stored in $new_path.
52642
52643  input_path="$new_path"
52644  # Check if we need to convert this using DOS-style short mode. If the path
52645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52646  # take no chances and rewrite it.
52647  # Note: m4 eats our [], so we need to use [ and ] instead.
52648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52649  if test "x$has_forbidden_chars" != x; then
52650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52654      # Going to short mode and back again did indeed matter. Since short mode is
52655      # case insensitive, let's make it lowercase to improve readability.
52656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52657      # Now convert it back to Unix-style (cygpath)
52658      input_path=`$CYGPATH -u "$shortmode_path"`
52659      new_path="$input_path"
52660    fi
52661  fi
52662
52663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52664  if test "x$test_cygdrive_prefix" = x; then
52665    # As a simple fix, exclude /usr/bin since it's not a real path.
52666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52668      # a path prefixed by /cygdrive for fixpath to work.
52669      new_path="$CYGWIN_ROOT_PATH$input_path"
52670    fi
52671  fi
52672
52673
52674  if test "x$path" != "x$new_path"; then
52675    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52677$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52678  fi
52679
52680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52681
52682  path="$POTENTIAL_FREETYPE_LIB_PATH"
52683  has_colon=`$ECHO $path | $GREP ^.:`
52684  new_path="$path"
52685  if test "x$has_colon" = x; then
52686    # Not in mixed or Windows style, start by that.
52687    new_path=`cmd //c echo $path`
52688  fi
52689
52690
52691  input_path="$new_path"
52692  # Check if we need to convert this using DOS-style short mode. If the path
52693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52694  # take no chances and rewrite it.
52695  # Note: m4 eats our [], so we need to use [ and ] instead.
52696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52697  if test "x$has_forbidden_chars" != x; then
52698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52700  fi
52701
52702
52703  windows_path="$new_path"
52704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52705    unix_path=`$CYGPATH -u "$windows_path"`
52706    new_path="$unix_path"
52707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52709    new_path="$unix_path"
52710  fi
52711
52712  if test "x$path" != "x$new_path"; then
52713    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52716  fi
52717
52718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52720
52721    else
52722      # We're on a unix platform. Hooray! :)
52723      path="$POTENTIAL_FREETYPE_LIB_PATH"
52724      has_space=`$ECHO "$path" | $GREP " "`
52725      if test "x$has_space" != x; then
52726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52727$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52729      fi
52730
52731      # Use eval to expand a potential ~
52732      eval path="$path"
52733      if test ! -f "$path" && test ! -d "$path"; then
52734        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52735      fi
52736
52737      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52738    fi
52739  fi
52740
52741
52742    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52744$as_echo_n "checking for freetype includes... " >&6; }
52745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52746$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52747    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52749$as_echo_n "checking for freetype libraries... " >&6; }
52750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52751$as_echo "$FREETYPE_LIB_PATH" >&6; }
52752  fi
52753
52754            else
52755
52756  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52757  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52758  METHOD="well-known location"
52759
52760  # Let's start with an optimistic view of the world :-)
52761  FOUND_FREETYPE=yes
52762
52763  # First look for the canonical freetype main include file ft2build.h.
52764  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52765    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52766    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52767    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52768      # Fail.
52769      FOUND_FREETYPE=no
52770    fi
52771  fi
52772
52773  if test "x$FOUND_FREETYPE" = xyes; then
52774    # Include file found, let's continue the sanity check.
52775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52776$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52777
52778    # Reset to default value
52779    FREETYPE_BASE_NAME=freetype
52780    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52781    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52782      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52783          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52784        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52785        # for the .6 version explicitly.
52786        FREETYPE_BASE_NAME=freetype.6
52787        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52788        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52789$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52790      else
52791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52792$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52793        FOUND_FREETYPE=no
52794      fi
52795    else
52796      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52797        # On Windows, we will need both .lib and .dll file.
52798        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52799          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52800$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52801          FOUND_FREETYPE=no
52802        fi
52803      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52805        # Found lib in isa dir, use that instead.
52806        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52807        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52808$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52809      fi
52810    fi
52811  fi
52812
52813  if test "x$FOUND_FREETYPE" = xyes; then
52814
52815  # Only process if variable expands to non-empty
52816
52817  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52819
52820  # Input might be given as Windows format, start by converting to
52821  # unix format.
52822  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52823  new_path=`$CYGPATH -u "$path"`
52824
52825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52828  # "foo.exe" is OK but "foo" is an error.
52829  #
52830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52831  # It is also a way to make sure we got the proper file name for the real test later on.
52832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52833  if test "x$test_shortpath" = x; then
52834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52837  fi
52838
52839  # Call helper function which possibly converts this using DOS-style short mode.
52840  # If so, the updated path is stored in $new_path.
52841
52842  input_path="$new_path"
52843  # Check if we need to convert this using DOS-style short mode. If the path
52844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52845  # take no chances and rewrite it.
52846  # Note: m4 eats our [], so we need to use [ and ] instead.
52847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52848  if test "x$has_forbidden_chars" != x; then
52849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52853      # Going to short mode and back again did indeed matter. Since short mode is
52854      # case insensitive, let's make it lowercase to improve readability.
52855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52856      # Now convert it back to Unix-style (cygpath)
52857      input_path=`$CYGPATH -u "$shortmode_path"`
52858      new_path="$input_path"
52859    fi
52860  fi
52861
52862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52863  if test "x$test_cygdrive_prefix" = x; then
52864    # As a simple fix, exclude /usr/bin since it's not a real path.
52865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52867      # a path prefixed by /cygdrive for fixpath to work.
52868      new_path="$CYGWIN_ROOT_PATH$input_path"
52869    fi
52870  fi
52871
52872
52873  if test "x$path" != "x$new_path"; then
52874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52877  fi
52878
52879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52880
52881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52882  has_colon=`$ECHO $path | $GREP ^.:`
52883  new_path="$path"
52884  if test "x$has_colon" = x; then
52885    # Not in mixed or Windows style, start by that.
52886    new_path=`cmd //c echo $path`
52887  fi
52888
52889
52890  input_path="$new_path"
52891  # Check if we need to convert this using DOS-style short mode. If the path
52892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52893  # take no chances and rewrite it.
52894  # Note: m4 eats our [], so we need to use [ and ] instead.
52895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52896  if test "x$has_forbidden_chars" != x; then
52897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52899  fi
52900
52901
52902  windows_path="$new_path"
52903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52904    unix_path=`$CYGPATH -u "$windows_path"`
52905    new_path="$unix_path"
52906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52908    new_path="$unix_path"
52909  fi
52910
52911  if test "x$path" != "x$new_path"; then
52912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52915  fi
52916
52917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52919
52920    else
52921      # We're on a unix platform. Hooray! :)
52922      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52923      has_space=`$ECHO "$path" | $GREP " "`
52924      if test "x$has_space" != x; then
52925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52928      fi
52929
52930      # Use eval to expand a potential ~
52931      eval path="$path"
52932      if test ! -f "$path" && test ! -d "$path"; then
52933        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52934      fi
52935
52936      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52937    fi
52938  fi
52939
52940
52941  # Only process if variable expands to non-empty
52942
52943  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52945
52946  # Input might be given as Windows format, start by converting to
52947  # unix format.
52948  path="$POTENTIAL_FREETYPE_LIB_PATH"
52949  new_path=`$CYGPATH -u "$path"`
52950
52951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52954  # "foo.exe" is OK but "foo" is an error.
52955  #
52956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52957  # It is also a way to make sure we got the proper file name for the real test later on.
52958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52959  if test "x$test_shortpath" = x; then
52960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52961$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52962    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52963  fi
52964
52965  # Call helper function which possibly converts this using DOS-style short mode.
52966  # If so, the updated path is stored in $new_path.
52967
52968  input_path="$new_path"
52969  # Check if we need to convert this using DOS-style short mode. If the path
52970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52971  # take no chances and rewrite it.
52972  # Note: m4 eats our [], so we need to use [ and ] instead.
52973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52974  if test "x$has_forbidden_chars" != x; then
52975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52979      # Going to short mode and back again did indeed matter. Since short mode is
52980      # case insensitive, let's make it lowercase to improve readability.
52981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52982      # Now convert it back to Unix-style (cygpath)
52983      input_path=`$CYGPATH -u "$shortmode_path"`
52984      new_path="$input_path"
52985    fi
52986  fi
52987
52988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52989  if test "x$test_cygdrive_prefix" = x; then
52990    # As a simple fix, exclude /usr/bin since it's not a real path.
52991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52993      # a path prefixed by /cygdrive for fixpath to work.
52994      new_path="$CYGWIN_ROOT_PATH$input_path"
52995    fi
52996  fi
52997
52998
52999  if test "x$path" != "x$new_path"; then
53000    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53002$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53003  fi
53004
53005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53006
53007  path="$POTENTIAL_FREETYPE_LIB_PATH"
53008  has_colon=`$ECHO $path | $GREP ^.:`
53009  new_path="$path"
53010  if test "x$has_colon" = x; then
53011    # Not in mixed or Windows style, start by that.
53012    new_path=`cmd //c echo $path`
53013  fi
53014
53015
53016  input_path="$new_path"
53017  # Check if we need to convert this using DOS-style short mode. If the path
53018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53019  # take no chances and rewrite it.
53020  # Note: m4 eats our [], so we need to use [ and ] instead.
53021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53022  if test "x$has_forbidden_chars" != x; then
53023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53025  fi
53026
53027
53028  windows_path="$new_path"
53029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53030    unix_path=`$CYGPATH -u "$windows_path"`
53031    new_path="$unix_path"
53032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53034    new_path="$unix_path"
53035  fi
53036
53037  if test "x$path" != "x$new_path"; then
53038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53041  fi
53042
53043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53045
53046    else
53047      # We're on a unix platform. Hooray! :)
53048      path="$POTENTIAL_FREETYPE_LIB_PATH"
53049      has_space=`$ECHO "$path" | $GREP " "`
53050      if test "x$has_space" != x; then
53051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53052$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53054      fi
53055
53056      # Use eval to expand a potential ~
53057      eval path="$path"
53058      if test ! -f "$path" && test ! -d "$path"; then
53059        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53060      fi
53061
53062      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53063    fi
53064  fi
53065
53066
53067    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53069$as_echo_n "checking for freetype includes... " >&6; }
53070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53071$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53072    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53074$as_echo_n "checking for freetype libraries... " >&6; }
53075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53076$as_echo "$FREETYPE_LIB_PATH" >&6; }
53077  fi
53078
53079              if test "x$FOUND_FREETYPE" != xyes; then
53080
53081  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53082  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
53083  METHOD="well-known location"
53084
53085  # Let's start with an optimistic view of the world :-)
53086  FOUND_FREETYPE=yes
53087
53088  # First look for the canonical freetype main include file ft2build.h.
53089  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53090    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53091    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53092    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53093      # Fail.
53094      FOUND_FREETYPE=no
53095    fi
53096  fi
53097
53098  if test "x$FOUND_FREETYPE" = xyes; then
53099    # Include file found, let's continue the sanity check.
53100    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53101$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53102
53103    # Reset to default value
53104    FREETYPE_BASE_NAME=freetype
53105    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53106    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53107      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53108          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53109        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53110        # for the .6 version explicitly.
53111        FREETYPE_BASE_NAME=freetype.6
53112        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53113        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53114$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53115      else
53116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53117$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53118        FOUND_FREETYPE=no
53119      fi
53120    else
53121      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53122        # On Windows, we will need both .lib and .dll file.
53123        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53124          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53126          FOUND_FREETYPE=no
53127        fi
53128      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53129          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53130        # Found lib in isa dir, use that instead.
53131        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53132        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53133$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53134      fi
53135    fi
53136  fi
53137
53138  if test "x$FOUND_FREETYPE" = xyes; then
53139
53140  # Only process if variable expands to non-empty
53141
53142  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53144
53145  # Input might be given as Windows format, start by converting to
53146  # unix format.
53147  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53148  new_path=`$CYGPATH -u "$path"`
53149
53150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53153  # "foo.exe" is OK but "foo" is an error.
53154  #
53155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53156  # It is also a way to make sure we got the proper file name for the real test later on.
53157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53158  if test "x$test_shortpath" = x; then
53159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53161    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53162  fi
53163
53164  # Call helper function which possibly converts this using DOS-style short mode.
53165  # If so, the updated path is stored in $new_path.
53166
53167  input_path="$new_path"
53168  # Check if we need to convert this using DOS-style short mode. If the path
53169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53170  # take no chances and rewrite it.
53171  # Note: m4 eats our [], so we need to use [ and ] instead.
53172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53173  if test "x$has_forbidden_chars" != x; then
53174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53178      # Going to short mode and back again did indeed matter. Since short mode is
53179      # case insensitive, let's make it lowercase to improve readability.
53180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53181      # Now convert it back to Unix-style (cygpath)
53182      input_path=`$CYGPATH -u "$shortmode_path"`
53183      new_path="$input_path"
53184    fi
53185  fi
53186
53187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53188  if test "x$test_cygdrive_prefix" = x; then
53189    # As a simple fix, exclude /usr/bin since it's not a real path.
53190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53192      # a path prefixed by /cygdrive for fixpath to work.
53193      new_path="$CYGWIN_ROOT_PATH$input_path"
53194    fi
53195  fi
53196
53197
53198  if test "x$path" != "x$new_path"; then
53199    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53202  fi
53203
53204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53205
53206  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53207  has_colon=`$ECHO $path | $GREP ^.:`
53208  new_path="$path"
53209  if test "x$has_colon" = x; then
53210    # Not in mixed or Windows style, start by that.
53211    new_path=`cmd //c echo $path`
53212  fi
53213
53214
53215  input_path="$new_path"
53216  # Check if we need to convert this using DOS-style short mode. If the path
53217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53218  # take no chances and rewrite it.
53219  # Note: m4 eats our [], so we need to use [ and ] instead.
53220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53221  if test "x$has_forbidden_chars" != x; then
53222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53224  fi
53225
53226
53227  windows_path="$new_path"
53228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53229    unix_path=`$CYGPATH -u "$windows_path"`
53230    new_path="$unix_path"
53231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53233    new_path="$unix_path"
53234  fi
53235
53236  if test "x$path" != "x$new_path"; then
53237    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53240  fi
53241
53242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53244
53245    else
53246      # We're on a unix platform. Hooray! :)
53247      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53248      has_space=`$ECHO "$path" | $GREP " "`
53249      if test "x$has_space" != x; then
53250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53251$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53253      fi
53254
53255      # Use eval to expand a potential ~
53256      eval path="$path"
53257      if test ! -f "$path" && test ! -d "$path"; then
53258        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53259      fi
53260
53261      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53262    fi
53263  fi
53264
53265
53266  # Only process if variable expands to non-empty
53267
53268  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53270
53271  # Input might be given as Windows format, start by converting to
53272  # unix format.
53273  path="$POTENTIAL_FREETYPE_LIB_PATH"
53274  new_path=`$CYGPATH -u "$path"`
53275
53276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53279  # "foo.exe" is OK but "foo" is an error.
53280  #
53281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53282  # It is also a way to make sure we got the proper file name for the real test later on.
53283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53284  if test "x$test_shortpath" = x; then
53285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53287    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53288  fi
53289
53290  # Call helper function which possibly converts this using DOS-style short mode.
53291  # If so, the updated path is stored in $new_path.
53292
53293  input_path="$new_path"
53294  # Check if we need to convert this using DOS-style short mode. If the path
53295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53296  # take no chances and rewrite it.
53297  # Note: m4 eats our [], so we need to use [ and ] instead.
53298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53299  if test "x$has_forbidden_chars" != x; then
53300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53304      # Going to short mode and back again did indeed matter. Since short mode is
53305      # case insensitive, let's make it lowercase to improve readability.
53306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53307      # Now convert it back to Unix-style (cygpath)
53308      input_path=`$CYGPATH -u "$shortmode_path"`
53309      new_path="$input_path"
53310    fi
53311  fi
53312
53313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53314  if test "x$test_cygdrive_prefix" = x; then
53315    # As a simple fix, exclude /usr/bin since it's not a real path.
53316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53318      # a path prefixed by /cygdrive for fixpath to work.
53319      new_path="$CYGWIN_ROOT_PATH$input_path"
53320    fi
53321  fi
53322
53323
53324  if test "x$path" != "x$new_path"; then
53325    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53327$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53328  fi
53329
53330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53331
53332  path="$POTENTIAL_FREETYPE_LIB_PATH"
53333  has_colon=`$ECHO $path | $GREP ^.:`
53334  new_path="$path"
53335  if test "x$has_colon" = x; then
53336    # Not in mixed or Windows style, start by that.
53337    new_path=`cmd //c echo $path`
53338  fi
53339
53340
53341  input_path="$new_path"
53342  # Check if we need to convert this using DOS-style short mode. If the path
53343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53344  # take no chances and rewrite it.
53345  # Note: m4 eats our [], so we need to use [ and ] instead.
53346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53347  if test "x$has_forbidden_chars" != x; then
53348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53350  fi
53351
53352
53353  windows_path="$new_path"
53354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53355    unix_path=`$CYGPATH -u "$windows_path"`
53356    new_path="$unix_path"
53357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53359    new_path="$unix_path"
53360  fi
53361
53362  if test "x$path" != "x$new_path"; then
53363    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53366  fi
53367
53368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53370
53371    else
53372      # We're on a unix platform. Hooray! :)
53373      path="$POTENTIAL_FREETYPE_LIB_PATH"
53374      has_space=`$ECHO "$path" | $GREP " "`
53375      if test "x$has_space" != x; then
53376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53377$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53379      fi
53380
53381      # Use eval to expand a potential ~
53382      eval path="$path"
53383      if test ! -f "$path" && test ! -d "$path"; then
53384        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53385      fi
53386
53387      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53388    fi
53389  fi
53390
53391
53392    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53394$as_echo_n "checking for freetype includes... " >&6; }
53395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53396$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53397    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53399$as_echo_n "checking for freetype libraries... " >&6; }
53400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53401$as_echo "$FREETYPE_LIB_PATH" >&6; }
53402  fi
53403
53404              fi
53405            fi
53406          fi
53407        fi
53408      fi # end check in well-known locations
53409
53410      if test "x$FOUND_FREETYPE" != xyes; then
53411
53412  # Print a helpful message on how to acquire the necessary build dependency.
53413  # freetype is the help tag: freetype, cups, alsa etc
53414  MISSING_DEPENDENCY=freetype
53415
53416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53417    cygwin_help $MISSING_DEPENDENCY
53418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53419    msys_help $MISSING_DEPENDENCY
53420  else
53421    PKGHANDLER_COMMAND=
53422
53423    case $PKGHANDLER in
53424      apt-get)
53425        apt_help     $MISSING_DEPENDENCY ;;
53426      yum)
53427        yum_help     $MISSING_DEPENDENCY ;;
53428      port)
53429        port_help    $MISSING_DEPENDENCY ;;
53430      pkgutil)
53431        pkgutil_help $MISSING_DEPENDENCY ;;
53432      pkgadd)
53433        pkgadd_help  $MISSING_DEPENDENCY ;;
53434    esac
53435
53436    if test "x$PKGHANDLER_COMMAND" != x; then
53437      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53438    fi
53439  fi
53440
53441        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
53442      fi
53443    fi # end user specified settings
53444
53445    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
53446    if test "x$FREETYPE_CFLAGS" = x; then
53447
53448  # Only process if variable expands to non-empty
53449
53450  if test "x$FREETYPE_INCLUDE_PATH" != x; then
53451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53452
53453  # Input might be given as Windows format, start by converting to
53454  # unix format.
53455  path="$FREETYPE_INCLUDE_PATH"
53456  new_path=`$CYGPATH -u "$path"`
53457
53458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53461  # "foo.exe" is OK but "foo" is an error.
53462  #
53463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53464  # It is also a way to make sure we got the proper file name for the real test later on.
53465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53466  if test "x$test_shortpath" = x; then
53467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53468$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53469    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
53470  fi
53471
53472  # Call helper function which possibly converts this using DOS-style short mode.
53473  # If so, the updated path is stored in $new_path.
53474
53475  input_path="$new_path"
53476  # Check if we need to convert this using DOS-style short mode. If the path
53477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53478  # take no chances and rewrite it.
53479  # Note: m4 eats our [], so we need to use [ and ] instead.
53480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53481  if test "x$has_forbidden_chars" != x; then
53482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53486      # Going to short mode and back again did indeed matter. Since short mode is
53487      # case insensitive, let's make it lowercase to improve readability.
53488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53489      # Now convert it back to Unix-style (cygpath)
53490      input_path=`$CYGPATH -u "$shortmode_path"`
53491      new_path="$input_path"
53492    fi
53493  fi
53494
53495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53496  if test "x$test_cygdrive_prefix" = x; then
53497    # As a simple fix, exclude /usr/bin since it's not a real path.
53498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53500      # a path prefixed by /cygdrive for fixpath to work.
53501      new_path="$CYGWIN_ROOT_PATH$input_path"
53502    fi
53503  fi
53504
53505
53506  if test "x$path" != "x$new_path"; then
53507    FREETYPE_INCLUDE_PATH="$new_path"
53508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53509$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53510  fi
53511
53512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53513
53514  path="$FREETYPE_INCLUDE_PATH"
53515  has_colon=`$ECHO $path | $GREP ^.:`
53516  new_path="$path"
53517  if test "x$has_colon" = x; then
53518    # Not in mixed or Windows style, start by that.
53519    new_path=`cmd //c echo $path`
53520  fi
53521
53522
53523  input_path="$new_path"
53524  # Check if we need to convert this using DOS-style short mode. If the path
53525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53526  # take no chances and rewrite it.
53527  # Note: m4 eats our [], so we need to use [ and ] instead.
53528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53529  if test "x$has_forbidden_chars" != x; then
53530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53532  fi
53533
53534
53535  windows_path="$new_path"
53536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53537    unix_path=`$CYGPATH -u "$windows_path"`
53538    new_path="$unix_path"
53539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53541    new_path="$unix_path"
53542  fi
53543
53544  if test "x$path" != "x$new_path"; then
53545    FREETYPE_INCLUDE_PATH="$new_path"
53546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53547$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53548  fi
53549
53550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53552
53553    else
53554      # We're on a unix platform. Hooray! :)
53555      path="$FREETYPE_INCLUDE_PATH"
53556      has_space=`$ECHO "$path" | $GREP " "`
53557      if test "x$has_space" != x; then
53558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53559$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53561      fi
53562
53563      # Use eval to expand a potential ~
53564      eval path="$path"
53565      if test ! -f "$path" && test ! -d "$path"; then
53566        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53567      fi
53568
53569      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53570    fi
53571  fi
53572
53573      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53574        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53575      else
53576        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53577      fi
53578    fi
53579
53580    if test "x$FREETYPE_LIBS" = x; then
53581
53582  # Only process if variable expands to non-empty
53583
53584  if test "x$FREETYPE_LIB_PATH" != x; then
53585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53586
53587  # Input might be given as Windows format, start by converting to
53588  # unix format.
53589  path="$FREETYPE_LIB_PATH"
53590  new_path=`$CYGPATH -u "$path"`
53591
53592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53595  # "foo.exe" is OK but "foo" is an error.
53596  #
53597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53598  # It is also a way to make sure we got the proper file name for the real test later on.
53599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53600  if test "x$test_shortpath" = x; then
53601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53602$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53603    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53604  fi
53605
53606  # Call helper function which possibly converts this using DOS-style short mode.
53607  # If so, the updated path is stored in $new_path.
53608
53609  input_path="$new_path"
53610  # Check if we need to convert this using DOS-style short mode. If the path
53611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53612  # take no chances and rewrite it.
53613  # Note: m4 eats our [], so we need to use [ and ] instead.
53614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53615  if test "x$has_forbidden_chars" != x; then
53616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53620      # Going to short mode and back again did indeed matter. Since short mode is
53621      # case insensitive, let's make it lowercase to improve readability.
53622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53623      # Now convert it back to Unix-style (cygpath)
53624      input_path=`$CYGPATH -u "$shortmode_path"`
53625      new_path="$input_path"
53626    fi
53627  fi
53628
53629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53630  if test "x$test_cygdrive_prefix" = x; then
53631    # As a simple fix, exclude /usr/bin since it's not a real path.
53632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53634      # a path prefixed by /cygdrive for fixpath to work.
53635      new_path="$CYGWIN_ROOT_PATH$input_path"
53636    fi
53637  fi
53638
53639
53640  if test "x$path" != "x$new_path"; then
53641    FREETYPE_LIB_PATH="$new_path"
53642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53643$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53644  fi
53645
53646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53647
53648  path="$FREETYPE_LIB_PATH"
53649  has_colon=`$ECHO $path | $GREP ^.:`
53650  new_path="$path"
53651  if test "x$has_colon" = x; then
53652    # Not in mixed or Windows style, start by that.
53653    new_path=`cmd //c echo $path`
53654  fi
53655
53656
53657  input_path="$new_path"
53658  # Check if we need to convert this using DOS-style short mode. If the path
53659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53660  # take no chances and rewrite it.
53661  # Note: m4 eats our [], so we need to use [ and ] instead.
53662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53663  if test "x$has_forbidden_chars" != x; then
53664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53666  fi
53667
53668
53669  windows_path="$new_path"
53670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53671    unix_path=`$CYGPATH -u "$windows_path"`
53672    new_path="$unix_path"
53673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53675    new_path="$unix_path"
53676  fi
53677
53678  if test "x$path" != "x$new_path"; then
53679    FREETYPE_LIB_PATH="$new_path"
53680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53681$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53682  fi
53683
53684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53686
53687    else
53688      # We're on a unix platform. Hooray! :)
53689      path="$FREETYPE_LIB_PATH"
53690      has_space=`$ECHO "$path" | $GREP " "`
53691      if test "x$has_space" != x; then
53692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53693$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53695      fi
53696
53697      # Use eval to expand a potential ~
53698      eval path="$path"
53699      if test ! -f "$path" && test ! -d "$path"; then
53700        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53701      fi
53702
53703      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53704    fi
53705  fi
53706
53707      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53708        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53709      else
53710        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53711      fi
53712    fi
53713
53714    # Try to compile it
53715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53716$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53717    ac_ext=cpp
53718ac_cpp='$CXXCPP $CPPFLAGS'
53719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53722
53723    PREV_CXXCFLAGS="$CXXFLAGS"
53724    PREV_LIBS="$LIBS"
53725    PREV_CXX="$CXX"
53726    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53727    LIBS="$LIBS $FREETYPE_LIBS"
53728    CXX="$FIXPATH $CXX"
53729    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53730/* end confdefs.h.  */
53731
53732          #include<ft2build.h>
53733          #include FT_FREETYPE_H
53734          int main () {
53735            FT_Init_FreeType(NULL);
53736            return 0;
53737          }
53738
53739_ACEOF
53740if ac_fn_cxx_try_link "$LINENO"; then :
53741
53742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53743$as_echo "yes" >&6; }
53744
53745else
53746
53747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53748$as_echo "no" >&6; }
53749          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53750$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53751          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53752$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53753
53754
53755  # Print a helpful message on how to acquire the necessary build dependency.
53756  # freetype is the help tag: freetype, cups, alsa etc
53757  MISSING_DEPENDENCY=freetype
53758
53759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53760    cygwin_help $MISSING_DEPENDENCY
53761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53762    msys_help $MISSING_DEPENDENCY
53763  else
53764    PKGHANDLER_COMMAND=
53765
53766    case $PKGHANDLER in
53767      apt-get)
53768        apt_help     $MISSING_DEPENDENCY ;;
53769      yum)
53770        yum_help     $MISSING_DEPENDENCY ;;
53771      port)
53772        port_help    $MISSING_DEPENDENCY ;;
53773      pkgutil)
53774        pkgutil_help $MISSING_DEPENDENCY ;;
53775      pkgadd)
53776        pkgadd_help  $MISSING_DEPENDENCY ;;
53777    esac
53778
53779    if test "x$PKGHANDLER_COMMAND" != x; then
53780      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53781    fi
53782  fi
53783
53784
53785          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53786
53787
53788fi
53789rm -f core conftest.err conftest.$ac_objext \
53790    conftest$ac_exeext conftest.$ac_ext
53791    CXXCFLAGS="$PREV_CXXFLAGS"
53792    LIBS="$PREV_LIBS"
53793    CXX="$PREV_CXX"
53794    ac_ext=cpp
53795ac_cpp='$CXXCPP $CPPFLAGS'
53796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53799
53800
53801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53802$as_echo_n "checking if we should bundle freetype... " >&6; }
53803    if test "x$BUNDLE_FREETYPE" = xyes; then
53804      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53805    fi
53806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53807$as_echo "$BUNDLE_FREETYPE" >&6; }
53808
53809  fi # end freetype needed
53810
53811
53812
53813
53814
53815
53816
53817# Check whether --with-alsa was given.
53818if test "${with_alsa+set}" = set; then :
53819  withval=$with_alsa;
53820fi
53821
53822
53823# Check whether --with-alsa-include was given.
53824if test "${with_alsa_include+set}" = set; then :
53825  withval=$with_alsa_include;
53826fi
53827
53828
53829# Check whether --with-alsa-lib was given.
53830if test "${with_alsa_lib+set}" = set; then :
53831  withval=$with_alsa_lib;
53832fi
53833
53834
53835  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53836    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53837        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53838        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53839      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53840$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53841    fi
53842    ALSA_CFLAGS=
53843    ALSA_LIBS=
53844  else
53845    ALSA_FOUND=no
53846
53847    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53848      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53849    fi
53850
53851    if test "x${with_alsa}" != x; then
53852      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53853      ALSA_CFLAGS="-I${with_alsa}/include"
53854      ALSA_FOUND=yes
53855    fi
53856    if test "x${with_alsa_include}" != x; then
53857      ALSA_CFLAGS="-I${with_alsa_include}"
53858      ALSA_FOUND=yes
53859    fi
53860    if test "x${with_alsa_lib}" != x; then
53861      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53862      ALSA_FOUND=yes
53863    fi
53864    # Do not try pkg-config if we have a sysroot set.
53865    if test "x$SYSROOT" = x; then
53866      if test "x$ALSA_FOUND" = xno; then
53867
53868pkg_failed=no
53869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53870$as_echo_n "checking for ALSA... " >&6; }
53871
53872if test -n "$ALSA_CFLAGS"; then
53873    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53874 elif test -n "$PKG_CONFIG"; then
53875    if test -n "$PKG_CONFIG" && \
53876    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53877  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53878  ac_status=$?
53879  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53880  test $ac_status = 0; }; then
53881  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53882else
53883  pkg_failed=yes
53884fi
53885 else
53886    pkg_failed=untried
53887fi
53888if test -n "$ALSA_LIBS"; then
53889    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53890 elif test -n "$PKG_CONFIG"; then
53891    if test -n "$PKG_CONFIG" && \
53892    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53893  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53894  ac_status=$?
53895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53896  test $ac_status = 0; }; then
53897  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53898else
53899  pkg_failed=yes
53900fi
53901 else
53902    pkg_failed=untried
53903fi
53904
53905
53906
53907if test $pkg_failed = yes; then
53908
53909if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53910        _pkg_short_errors_supported=yes
53911else
53912        _pkg_short_errors_supported=no
53913fi
53914        if test $_pkg_short_errors_supported = yes; then
53915	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53916        else
53917	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53918        fi
53919	# Put the nasty error message in config.log where it belongs
53920	echo "$ALSA_PKG_ERRORS" >&5
53921
53922	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53923$as_echo "no" >&6; }
53924                ALSA_FOUND=no
53925elif test $pkg_failed = untried; then
53926	ALSA_FOUND=no
53927else
53928	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53929	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53931$as_echo "yes" >&6; }
53932	ALSA_FOUND=yes
53933fi
53934      fi
53935    fi
53936    if test "x$ALSA_FOUND" = xno; then
53937      for ac_header in alsa/asoundlib.h
53938do :
53939  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53940if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53941  cat >>confdefs.h <<_ACEOF
53942#define HAVE_ALSA_ASOUNDLIB_H 1
53943_ACEOF
53944
53945            ALSA_FOUND=yes
53946            ALSA_CFLAGS=-Iignoreme
53947            ALSA_LIBS=-lasound
53948            DEFAULT_ALSA=yes
53949
53950else
53951  ALSA_FOUND=no
53952
53953fi
53954
53955done
53956
53957    fi
53958    if test "x$ALSA_FOUND" = xno; then
53959
53960  # Print a helpful message on how to acquire the necessary build dependency.
53961  # alsa is the help tag: freetype, cups, alsa etc
53962  MISSING_DEPENDENCY=alsa
53963
53964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53965    cygwin_help $MISSING_DEPENDENCY
53966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53967    msys_help $MISSING_DEPENDENCY
53968  else
53969    PKGHANDLER_COMMAND=
53970
53971    case $PKGHANDLER in
53972      apt-get)
53973        apt_help     $MISSING_DEPENDENCY ;;
53974      yum)
53975        yum_help     $MISSING_DEPENDENCY ;;
53976      port)
53977        port_help    $MISSING_DEPENDENCY ;;
53978      pkgutil)
53979        pkgutil_help $MISSING_DEPENDENCY ;;
53980      pkgadd)
53981        pkgadd_help  $MISSING_DEPENDENCY ;;
53982    esac
53983
53984    if test "x$PKGHANDLER_COMMAND" != x; then
53985      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53986    fi
53987  fi
53988
53989      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53990    fi
53991  fi
53992
53993
53994
53995
53996
53997
53998# Check whether --with-libffi was given.
53999if test "${with_libffi+set}" = set; then :
54000  withval=$with_libffi;
54001fi
54002
54003
54004# Check whether --with-libffi-include was given.
54005if test "${with_libffi_include+set}" = set; then :
54006  withval=$with_libffi_include;
54007fi
54008
54009
54010# Check whether --with-libffi-lib was given.
54011if test "${with_libffi_lib+set}" = set; then :
54012  withval=$with_libffi_lib;
54013fi
54014
54015
54016  if test "x$NEEDS_LIB_FFI" = xfalse; then
54017    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
54018        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
54019        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
54020      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
54021$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
54022    fi
54023    LIBFFI_CFLAGS=
54024    LIBFFI_LIBS=
54025  else
54026    LIBFFI_FOUND=no
54027
54028    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
54029      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
54030    fi
54031
54032    if test "x${with_libffi}" != x; then
54033      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
54034      LIBFFI_CFLAGS="-I${with_libffi}/include"
54035      LIBFFI_FOUND=yes
54036    fi
54037    if test "x${with_libffi_include}" != x; then
54038      LIBFFI_CFLAGS="-I${with_libffi_include}"
54039      LIBFFI_FOUND=yes
54040    fi
54041    if test "x${with_libffi_lib}" != x; then
54042      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
54043      LIBFFI_FOUND=yes
54044    fi
54045    # Do not try pkg-config if we have a sysroot set.
54046    if test "x$SYSROOT" = x; then
54047      if test "x$LIBFFI_FOUND" = xno; then
54048        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
54049
54050pkg_failed=no
54051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
54052$as_echo_n "checking for LIBFFI... " >&6; }
54053
54054if test -n "$LIBFFI_CFLAGS"; then
54055    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
54056 elif test -n "$PKG_CONFIG"; then
54057    if test -n "$PKG_CONFIG" && \
54058    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
54059  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
54060  ac_status=$?
54061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54062  test $ac_status = 0; }; then
54063  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
54064else
54065  pkg_failed=yes
54066fi
54067 else
54068    pkg_failed=untried
54069fi
54070if test -n "$LIBFFI_LIBS"; then
54071    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
54072 elif test -n "$PKG_CONFIG"; then
54073    if test -n "$PKG_CONFIG" && \
54074    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
54075  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
54076  ac_status=$?
54077  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54078  test $ac_status = 0; }; then
54079  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
54080else
54081  pkg_failed=yes
54082fi
54083 else
54084    pkg_failed=untried
54085fi
54086
54087
54088
54089if test $pkg_failed = yes; then
54090
54091if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54092        _pkg_short_errors_supported=yes
54093else
54094        _pkg_short_errors_supported=no
54095fi
54096        if test $_pkg_short_errors_supported = yes; then
54097	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
54098        else
54099	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
54100        fi
54101	# Put the nasty error message in config.log where it belongs
54102	echo "$LIBFFI_PKG_ERRORS" >&5
54103
54104	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54105$as_echo "no" >&6; }
54106                LIBFFI_FOUND=no
54107elif test $pkg_failed = untried; then
54108	LIBFFI_FOUND=no
54109else
54110	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
54111	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
54112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54113$as_echo "yes" >&6; }
54114	LIBFFI_FOUND=yes
54115fi
54116      fi
54117    fi
54118    if test "x$LIBFFI_FOUND" = xno; then
54119      for ac_header in ffi.h
54120do :
54121  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
54122if test "x$ac_cv_header_ffi_h" = xyes; then :
54123  cat >>confdefs.h <<_ACEOF
54124#define HAVE_FFI_H 1
54125_ACEOF
54126
54127            LIBFFI_FOUND=yes
54128            LIBFFI_CFLAGS=
54129            LIBFFI_LIBS=-lffi
54130
54131else
54132  LIBFFI_FOUND=no
54133
54134fi
54135
54136done
54137
54138    fi
54139    if test "x$LIBFFI_FOUND" = xno; then
54140
54141  # Print a helpful message on how to acquire the necessary build dependency.
54142  # ffi is the help tag: freetype, cups, alsa etc
54143  MISSING_DEPENDENCY=ffi
54144
54145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54146    cygwin_help $MISSING_DEPENDENCY
54147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54148    msys_help $MISSING_DEPENDENCY
54149  else
54150    PKGHANDLER_COMMAND=
54151
54152    case $PKGHANDLER in
54153      apt-get)
54154        apt_help     $MISSING_DEPENDENCY ;;
54155      yum)
54156        yum_help     $MISSING_DEPENDENCY ;;
54157      port)
54158        port_help    $MISSING_DEPENDENCY ;;
54159      pkgutil)
54160        pkgutil_help $MISSING_DEPENDENCY ;;
54161      pkgadd)
54162        pkgadd_help  $MISSING_DEPENDENCY ;;
54163    esac
54164
54165    if test "x$PKGHANDLER_COMMAND" != x; then
54166      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54167    fi
54168  fi
54169
54170      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
54171    fi
54172
54173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
54174$as_echo_n "checking if libffi works... " >&6; }
54175    ac_ext=c
54176ac_cpp='$CPP $CPPFLAGS'
54177ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54178ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54179ac_compiler_gnu=$ac_cv_c_compiler_gnu
54180
54181    OLD_CFLAGS="$CFLAGS"
54182    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
54183    OLD_LIBS="$LIBS"
54184    LIBS="$LIBS $LIBFFI_LIBS"
54185    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54186/* end confdefs.h.  */
54187#include <ffi.h>
54188int
54189main ()
54190{
54191
54192          ffi_call(NULL, NULL, NULL, NULL);
54193          return 0;
54194
54195  ;
54196  return 0;
54197}
54198_ACEOF
54199if ac_fn_c_try_link "$LINENO"; then :
54200  LIBFFI_WORKS=yes
54201else
54202  LIBFFI_WORKS=no
54203
54204fi
54205rm -f core conftest.err conftest.$ac_objext \
54206    conftest$ac_exeext conftest.$ac_ext
54207    CFLAGS="$OLD_CFLAGS"
54208    LIBS="$OLD_LIBS"
54209    ac_ext=cpp
54210ac_cpp='$CXXCPP $CPPFLAGS'
54211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54214
54215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
54216$as_echo "$LIBFFI_WORKS" >&6; }
54217
54218    if test "x$LIBFFI_WORKS" = xno; then
54219
54220  # Print a helpful message on how to acquire the necessary build dependency.
54221  # ffi is the help tag: freetype, cups, alsa etc
54222  MISSING_DEPENDENCY=ffi
54223
54224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54225    cygwin_help $MISSING_DEPENDENCY
54226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54227    msys_help $MISSING_DEPENDENCY
54228  else
54229    PKGHANDLER_COMMAND=
54230
54231    case $PKGHANDLER in
54232      apt-get)
54233        apt_help     $MISSING_DEPENDENCY ;;
54234      yum)
54235        yum_help     $MISSING_DEPENDENCY ;;
54236      port)
54237        port_help    $MISSING_DEPENDENCY ;;
54238      pkgutil)
54239        pkgutil_help $MISSING_DEPENDENCY ;;
54240      pkgadd)
54241        pkgadd_help  $MISSING_DEPENDENCY ;;
54242    esac
54243
54244    if test "x$PKGHANDLER_COMMAND" != x; then
54245      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54246    fi
54247  fi
54248
54249      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
54250    fi
54251  fi
54252
54253
54254
54255
54256
54257  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
54258    # Extract the first word of "llvm-config", so it can be a program name with args.
54259set dummy llvm-config; ac_word=$2
54260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54261$as_echo_n "checking for $ac_word... " >&6; }
54262if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
54263  $as_echo_n "(cached) " >&6
54264else
54265  if test -n "$LLVM_CONFIG"; then
54266  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
54267else
54268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54269for as_dir in $PATH
54270do
54271  IFS=$as_save_IFS
54272  test -z "$as_dir" && as_dir=.
54273    for ac_exec_ext in '' $ac_executable_extensions; do
54274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
54275    ac_cv_prog_LLVM_CONFIG="llvm-config"
54276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
54277    break 2
54278  fi
54279done
54280  done
54281IFS=$as_save_IFS
54282
54283fi
54284fi
54285LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
54286if test -n "$LLVM_CONFIG"; then
54287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
54288$as_echo "$LLVM_CONFIG" >&6; }
54289else
54290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54291$as_echo "no" >&6; }
54292fi
54293
54294
54295
54296    if test "x$LLVM_CONFIG" != xllvm-config; then
54297      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
54298    fi
54299
54300    llvm_components="jit mcjit engine nativecodegen native"
54301    unset LLVM_CFLAGS
54302    for flag in $("$LLVM_CONFIG" --cxxflags); do
54303      if echo "${flag}" | grep -q '^-[ID]'; then
54304        if test "${flag}" != "-D_DEBUG" ; then
54305          if test "${LLVM_CFLAGS}" != "" ; then
54306            LLVM_CFLAGS="${LLVM_CFLAGS} "
54307          fi
54308          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
54309        fi
54310      fi
54311    done
54312    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
54313    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
54314
54315    unset LLVM_LDFLAGS
54316    for flag in $("${LLVM_CONFIG}" --ldflags); do
54317      if echo "${flag}" | grep -q '^-L'; then
54318        if test "${LLVM_LDFLAGS}" != ""; then
54319          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
54320        fi
54321        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
54322      fi
54323    done
54324
54325    unset LLVM_LIBS
54326    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
54327      if echo "${flag}" | grep -q '^-l'; then
54328        if test "${LLVM_LIBS}" != ""; then
54329          LLVM_LIBS="${LLVM_LIBS} "
54330        fi
54331        LLVM_LIBS="${LLVM_LIBS}${flag}"
54332      fi
54333    done
54334
54335
54336
54337
54338  fi
54339
54340
54341
54342# Check whether --with-libjpeg was given.
54343if test "${with_libjpeg+set}" = set; then :
54344  withval=$with_libjpeg;
54345fi
54346
54347
54348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
54349$as_echo_n "checking for which libjpeg to use... " >&6; }
54350  # default is bundled
54351  DEFAULT_LIBJPEG=bundled
54352  # if user didn't specify, use DEFAULT_LIBJPEG
54353  if test "x${with_libjpeg}" = "x"; then
54354    with_libjpeg=${DEFAULT_LIBJPEG}
54355  fi
54356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
54357$as_echo "${with_libjpeg}" >&6; }
54358
54359  if test "x${with_libjpeg}" = "xbundled"; then
54360    USE_EXTERNAL_LIBJPEG=false
54361  elif test "x${with_libjpeg}" = "xsystem"; then
54362    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
54363if test "x$ac_cv_header_jpeglib_h" = xyes; then :
54364
54365else
54366   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
54367fi
54368
54369
54370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
54371$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
54372if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
54373  $as_echo_n "(cached) " >&6
54374else
54375  ac_check_lib_save_LIBS=$LIBS
54376LIBS="-ljpeg  $LIBS"
54377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54378/* end confdefs.h.  */
54379
54380/* Override any GCC internal prototype to avoid an error.
54381   Use char because int might match the return type of a GCC
54382   builtin and then its argument prototype would still apply.  */
54383#ifdef __cplusplus
54384extern "C"
54385#endif
54386char jpeg_CreateDecompress ();
54387int
54388main ()
54389{
54390return jpeg_CreateDecompress ();
54391  ;
54392  return 0;
54393}
54394_ACEOF
54395if ac_fn_cxx_try_link "$LINENO"; then :
54396  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
54397else
54398  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
54399fi
54400rm -f core conftest.err conftest.$ac_objext \
54401    conftest$ac_exeext conftest.$ac_ext
54402LIBS=$ac_check_lib_save_LIBS
54403fi
54404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
54405$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
54406if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
54407  cat >>confdefs.h <<_ACEOF
54408#define HAVE_LIBJPEG 1
54409_ACEOF
54410
54411  LIBS="-ljpeg $LIBS"
54412
54413else
54414   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
54415fi
54416
54417
54418    USE_EXTERNAL_LIBJPEG=true
54419  else
54420    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
54421  fi
54422
54423
54424
54425
54426
54427# Check whether --with-giflib was given.
54428if test "${with_giflib+set}" = set; then :
54429  withval=$with_giflib;
54430fi
54431
54432
54433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
54434$as_echo_n "checking for which giflib to use... " >&6; }
54435  # default is bundled
54436  DEFAULT_GIFLIB=bundled
54437  # if user didn't specify, use DEFAULT_GIFLIB
54438  if test "x${with_giflib}" = "x"; then
54439    with_giflib=${DEFAULT_GIFLIB}
54440  fi
54441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
54442$as_echo "${with_giflib}" >&6; }
54443
54444  if test "x${with_giflib}" = "xbundled"; then
54445    USE_EXTERNAL_LIBGIF=false
54446  elif test "x${with_giflib}" = "xsystem"; then
54447    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
54448if test "x$ac_cv_header_gif_lib_h" = xyes; then :
54449
54450else
54451   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
54452fi
54453
54454
54455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
54456$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
54457if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
54458  $as_echo_n "(cached) " >&6
54459else
54460  ac_check_lib_save_LIBS=$LIBS
54461LIBS="-lgif  $LIBS"
54462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54463/* end confdefs.h.  */
54464
54465/* Override any GCC internal prototype to avoid an error.
54466   Use char because int might match the return type of a GCC
54467   builtin and then its argument prototype would still apply.  */
54468#ifdef __cplusplus
54469extern "C"
54470#endif
54471char DGifGetCode ();
54472int
54473main ()
54474{
54475return DGifGetCode ();
54476  ;
54477  return 0;
54478}
54479_ACEOF
54480if ac_fn_cxx_try_link "$LINENO"; then :
54481  ac_cv_lib_gif_DGifGetCode=yes
54482else
54483  ac_cv_lib_gif_DGifGetCode=no
54484fi
54485rm -f core conftest.err conftest.$ac_objext \
54486    conftest$ac_exeext conftest.$ac_ext
54487LIBS=$ac_check_lib_save_LIBS
54488fi
54489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
54490$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
54491if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
54492  cat >>confdefs.h <<_ACEOF
54493#define HAVE_LIBGIF 1
54494_ACEOF
54495
54496  LIBS="-lgif $LIBS"
54497
54498else
54499   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
54500fi
54501
54502
54503    USE_EXTERNAL_LIBGIF=true
54504  else
54505    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
54506  fi
54507
54508
54509
54510
54511
54512# Check whether --with-libpng was given.
54513if test "${with_libpng+set}" = set; then :
54514  withval=$with_libpng;
54515fi
54516
54517
54518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
54519$as_echo_n "checking for which libpng to use... " >&6; }
54520
54521  # default is bundled
54522  DEFAULT_LIBPNG=bundled
54523  # if user didn't specify, use DEFAULT_LIBPNG
54524  if test "x${with_libpng}" = "x"; then
54525      with_libpng=${DEFAULT_LIBPNG}
54526  fi
54527
54528  if test "x${with_libpng}" = "xbundled"; then
54529      USE_EXTERNAL_LIBPNG=false
54530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54531$as_echo "bundled" >&6; }
54532  elif test "x${with_libpng}" = "xsystem"; then
54533
54534pkg_failed=no
54535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
54536$as_echo_n "checking for PNG... " >&6; }
54537
54538if test -n "$PNG_CFLAGS"; then
54539    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
54540 elif test -n "$PKG_CONFIG"; then
54541    if test -n "$PKG_CONFIG" && \
54542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54543  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54544  ac_status=$?
54545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54546  test $ac_status = 0; }; then
54547  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
54548else
54549  pkg_failed=yes
54550fi
54551 else
54552    pkg_failed=untried
54553fi
54554if test -n "$PNG_LIBS"; then
54555    pkg_cv_PNG_LIBS="$PNG_LIBS"
54556 elif test -n "$PKG_CONFIG"; then
54557    if test -n "$PKG_CONFIG" && \
54558    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54559  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54560  ac_status=$?
54561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54562  test $ac_status = 0; }; then
54563  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54564else
54565  pkg_failed=yes
54566fi
54567 else
54568    pkg_failed=untried
54569fi
54570
54571
54572
54573if test $pkg_failed = yes; then
54574
54575if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54576        _pkg_short_errors_supported=yes
54577else
54578        _pkg_short_errors_supported=no
54579fi
54580        if test $_pkg_short_errors_supported = yes; then
54581	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54582        else
54583	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54584        fi
54585	# Put the nasty error message in config.log where it belongs
54586	echo "$PNG_PKG_ERRORS" >&5
54587
54588	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54589$as_echo "no" >&6; }
54590                 LIBPNG_FOUND=no
54591elif test $pkg_failed = untried; then
54592	 LIBPNG_FOUND=no
54593else
54594	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54595	PNG_LIBS=$pkg_cv_PNG_LIBS
54596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54597$as_echo "yes" >&6; }
54598	 LIBPNG_FOUND=yes
54599fi
54600      if test "x${LIBPNG_FOUND}" = "xyes"; then
54601          USE_EXTERNAL_LIBPNG=true
54602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54603$as_echo "system" >&6; }
54604      else
54605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54606$as_echo "system not found" >&6; }
54607          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54608      fi
54609  else
54610      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54611  fi
54612
54613
54614
54615
54616
54617# Check whether --with-zlib was given.
54618if test "${with_zlib+set}" = set; then :
54619  withval=$with_zlib;
54620fi
54621
54622
54623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54624$as_echo_n "checking for compress in -lz... " >&6; }
54625if ${ac_cv_lib_z_compress+:} false; then :
54626  $as_echo_n "(cached) " >&6
54627else
54628  ac_check_lib_save_LIBS=$LIBS
54629LIBS="-lz  $LIBS"
54630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54631/* end confdefs.h.  */
54632
54633/* Override any GCC internal prototype to avoid an error.
54634   Use char because int might match the return type of a GCC
54635   builtin and then its argument prototype would still apply.  */
54636#ifdef __cplusplus
54637extern "C"
54638#endif
54639char compress ();
54640int
54641main ()
54642{
54643return compress ();
54644  ;
54645  return 0;
54646}
54647_ACEOF
54648if ac_fn_cxx_try_link "$LINENO"; then :
54649  ac_cv_lib_z_compress=yes
54650else
54651  ac_cv_lib_z_compress=no
54652fi
54653rm -f core conftest.err conftest.$ac_objext \
54654    conftest$ac_exeext conftest.$ac_ext
54655LIBS=$ac_check_lib_save_LIBS
54656fi
54657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54658$as_echo "$ac_cv_lib_z_compress" >&6; }
54659if test "x$ac_cv_lib_z_compress" = xyes; then :
54660   ZLIB_FOUND=yes
54661else
54662   ZLIB_FOUND=no
54663fi
54664
54665
54666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54667$as_echo_n "checking for which zlib to use... " >&6; }
54668
54669  DEFAULT_ZLIB=bundled
54670  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54671    # On macosx default is system...on others default is bundled
54672    DEFAULT_ZLIB=system
54673  fi
54674
54675  if test "x${ZLIB_FOUND}" != "xyes"; then
54676    # If we don't find any system...set default to bundled
54677    DEFAULT_ZLIB=bundled
54678  fi
54679
54680  # If user didn't specify, use DEFAULT_ZLIB
54681  if test "x${with_zlib}" = "x"; then
54682    with_zlib=${DEFAULT_ZLIB}
54683  fi
54684
54685  if test "x${with_zlib}" = "xbundled"; then
54686    USE_EXTERNAL_LIBZ=false
54687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54688$as_echo "bundled" >&6; }
54689  elif test "x${with_zlib}" = "xsystem"; then
54690    if test "x${ZLIB_FOUND}" = "xyes"; then
54691      USE_EXTERNAL_LIBZ=true
54692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54693$as_echo "system" >&6; }
54694    else
54695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54696$as_echo "system not found" >&6; }
54697      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54698    fi
54699  else
54700    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54701  fi
54702
54703
54704
54705
54706
54707# Check whether --with-lcms was given.
54708if test "${with_lcms+set}" = set; then :
54709  withval=$with_lcms;
54710fi
54711
54712
54713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54714$as_echo_n "checking for which lcms to use... " >&6; }
54715
54716  DEFAULT_LCMS=bundled
54717  # If user didn't specify, use DEFAULT_LCMS
54718  if test "x${with_lcms}" = "x"; then
54719      with_lcms=${DEFAULT_LCMS}
54720  fi
54721
54722  if test "x${with_lcms}" = "xbundled"; then
54723    USE_EXTERNAL_LCMS=false
54724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54725$as_echo "bundled" >&6; }
54726  elif test "x${with_lcms}" = "xsystem"; then
54727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54728$as_echo "system" >&6; }
54729
54730pkg_failed=no
54731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54732$as_echo_n "checking for LCMS... " >&6; }
54733
54734if test -n "$LCMS_CFLAGS"; then
54735    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54736 elif test -n "$PKG_CONFIG"; then
54737    if test -n "$PKG_CONFIG" && \
54738    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54739  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54740  ac_status=$?
54741  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54742  test $ac_status = 0; }; then
54743  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54744else
54745  pkg_failed=yes
54746fi
54747 else
54748    pkg_failed=untried
54749fi
54750if test -n "$LCMS_LIBS"; then
54751    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54752 elif test -n "$PKG_CONFIG"; then
54753    if test -n "$PKG_CONFIG" && \
54754    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54755  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54756  ac_status=$?
54757  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54758  test $ac_status = 0; }; then
54759  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54760else
54761  pkg_failed=yes
54762fi
54763 else
54764    pkg_failed=untried
54765fi
54766
54767
54768
54769if test $pkg_failed = yes; then
54770
54771if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54772        _pkg_short_errors_supported=yes
54773else
54774        _pkg_short_errors_supported=no
54775fi
54776        if test $_pkg_short_errors_supported = yes; then
54777	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54778        else
54779	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54780        fi
54781	# Put the nasty error message in config.log where it belongs
54782	echo "$LCMS_PKG_ERRORS" >&5
54783
54784	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54785$as_echo "no" >&6; }
54786                LCMS_FOUND=no
54787elif test $pkg_failed = untried; then
54788	LCMS_FOUND=no
54789else
54790	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54791	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54793$as_echo "yes" >&6; }
54794	LCMS_FOUND=yes
54795fi
54796    if test "x${LCMS_FOUND}" = "xyes"; then
54797      USE_EXTERNAL_LCMS=true
54798    else
54799      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54800    fi
54801  else
54802    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54803  fi
54804
54805
54806
54807
54808
54809
54810
54811
54812
54813
54814
54815  # Setup libm (the maths library)
54816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54817$as_echo_n "checking for cos in -lm... " >&6; }
54818if ${ac_cv_lib_m_cos+:} false; then :
54819  $as_echo_n "(cached) " >&6
54820else
54821  ac_check_lib_save_LIBS=$LIBS
54822LIBS="-lm  $LIBS"
54823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54824/* end confdefs.h.  */
54825
54826/* Override any GCC internal prototype to avoid an error.
54827   Use char because int might match the return type of a GCC
54828   builtin and then its argument prototype would still apply.  */
54829#ifdef __cplusplus
54830extern "C"
54831#endif
54832char cos ();
54833int
54834main ()
54835{
54836return cos ();
54837  ;
54838  return 0;
54839}
54840_ACEOF
54841if ac_fn_cxx_try_link "$LINENO"; then :
54842  ac_cv_lib_m_cos=yes
54843else
54844  ac_cv_lib_m_cos=no
54845fi
54846rm -f core conftest.err conftest.$ac_objext \
54847    conftest$ac_exeext conftest.$ac_ext
54848LIBS=$ac_check_lib_save_LIBS
54849fi
54850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54851$as_echo "$ac_cv_lib_m_cos" >&6; }
54852if test "x$ac_cv_lib_m_cos" = xyes; then :
54853  cat >>confdefs.h <<_ACEOF
54854#define HAVE_LIBM 1
54855_ACEOF
54856
54857  LIBS="-lm $LIBS"
54858
54859else
54860
54861      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54862$as_echo "$as_me: Maths library was not found" >&6;}
54863
54864fi
54865
54866  LIBM=-lm
54867
54868
54869  # Setup libdl (for dynamic library loading)
54870  save_LIBS="$LIBS"
54871  LIBS=""
54872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54873$as_echo_n "checking for dlopen in -ldl... " >&6; }
54874if ${ac_cv_lib_dl_dlopen+:} false; then :
54875  $as_echo_n "(cached) " >&6
54876else
54877  ac_check_lib_save_LIBS=$LIBS
54878LIBS="-ldl  $LIBS"
54879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54880/* end confdefs.h.  */
54881
54882/* Override any GCC internal prototype to avoid an error.
54883   Use char because int might match the return type of a GCC
54884   builtin and then its argument prototype would still apply.  */
54885#ifdef __cplusplus
54886extern "C"
54887#endif
54888char dlopen ();
54889int
54890main ()
54891{
54892return dlopen ();
54893  ;
54894  return 0;
54895}
54896_ACEOF
54897if ac_fn_cxx_try_link "$LINENO"; then :
54898  ac_cv_lib_dl_dlopen=yes
54899else
54900  ac_cv_lib_dl_dlopen=no
54901fi
54902rm -f core conftest.err conftest.$ac_objext \
54903    conftest$ac_exeext conftest.$ac_ext
54904LIBS=$ac_check_lib_save_LIBS
54905fi
54906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54907$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54908if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54909  cat >>confdefs.h <<_ACEOF
54910#define HAVE_LIBDL 1
54911_ACEOF
54912
54913  LIBS="-ldl $LIBS"
54914
54915fi
54916
54917  LIBDL="$LIBS"
54918
54919  LIBS="$save_LIBS"
54920
54921  # Deprecated libraries, keep the flags for backwards compatibility
54922  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54923
54924
54925# Check whether --with-dxsdk was given.
54926if test "${with_dxsdk+set}" = set; then :
54927  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54928$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54929fi
54930
54931
54932
54933
54934# Check whether --with-dxsdk-lib was given.
54935if test "${with_dxsdk_lib+set}" = set; then :
54936  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54937$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54938fi
54939
54940
54941
54942
54943# Check whether --with-dxsdk-include was given.
54944if test "${with_dxsdk_include+set}" = set; then :
54945  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54946$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54947fi
54948
54949
54950  fi
54951
54952  # Control if libzip can use mmap. Available for purposes of overriding.
54953  LIBZIP_CAN_USE_MMAP=true
54954
54955
54956
54957
54958
54959
54960
54961
54962
54963
54964
54965
54966
54967
54968###############################################################################
54969#
54970# We need to do some final tweaking, when everything else is done.
54971#
54972###############################################################################
54973
54974
54975  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54976
54977
54978  # The name of the Service Agent jar.
54979  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54980  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54981    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54982  fi
54983
54984
54985
54986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54987$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54988
54989  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54990    ENABLE_INTREE_EC=yes
54991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54992$as_echo "yes" >&6; }
54993  else
54994    ENABLE_INTREE_EC=no
54995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54996$as_echo "no" >&6; }
54997  fi
54998
54999
55000
55001
55002###############################################################################
55003#
55004# Configure parts of the build that only affect the build performance,
55005# not the result.
55006#
55007###############################################################################
55008
55009
55010  # How many cores do we have on this build system?
55011
55012# Check whether --with-num-cores was given.
55013if test "${with_num_cores+set}" = set; then :
55014  withval=$with_num_cores;
55015fi
55016
55017  if test "x$with_num_cores" = x; then
55018    # The number of cores were not specified, try to probe them.
55019
55020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
55021$as_echo_n "checking for number of cores... " >&6; }
55022  NUM_CORES=1
55023  FOUND_CORES=no
55024
55025  if test -f /proc/cpuinfo; then
55026    # Looks like a Linux (or cygwin) system
55027    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
55028    FOUND_CORES=yes
55029  elif test -x /usr/sbin/psrinfo; then
55030    # Looks like a Solaris system
55031    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
55032    FOUND_CORES=yes
55033  elif test -x /usr/sbin/system_profiler; then
55034    # Looks like a MacOSX system
55035    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
55036    FOUND_CORES=yes
55037  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
55038    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
55039    FOUND_CORES=yes
55040  elif test -n "$NUMBER_OF_PROCESSORS"; then
55041    # On windows, look in the env
55042    NUM_CORES=$NUMBER_OF_PROCESSORS
55043    FOUND_CORES=yes
55044  fi
55045
55046  if test "x$FOUND_CORES" = xyes; then
55047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
55048$as_echo "$NUM_CORES" >&6; }
55049  else
55050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
55051$as_echo "could not detect number of cores, defaulting to 1" >&6; }
55052    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
55053$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
55054  fi
55055
55056  else
55057    NUM_CORES=$with_num_cores
55058  fi
55059
55060
55061
55062  # How much memory do we have on this build system?
55063
55064# Check whether --with-memory-size was given.
55065if test "${with_memory_size+set}" = set; then :
55066  withval=$with_memory_size;
55067fi
55068
55069  if test "x$with_memory_size" = x; then
55070    # The memory size was not specified, try to probe it.
55071
55072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
55073$as_echo_n "checking for memory size... " >&6; }
55074  # Default to 1024 MB
55075  MEMORY_SIZE=1024
55076  FOUND_MEM=no
55077
55078  if test -f /proc/meminfo; then
55079    # Looks like a Linux (or cygwin) system
55080    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
55081    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
55082    FOUND_MEM=yes
55083  elif test -x /usr/sbin/prtconf; then
55084    # Looks like a Solaris or AIX system
55085    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
55086    FOUND_MEM=yes
55087  elif test -x /usr/sbin/system_profiler; then
55088    # Looks like a MacOSX system
55089    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
55090    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
55091    FOUND_MEM=yes
55092  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
55093    # Windows, but without cygwin
55094    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
55095    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
55096    FOUND_MEM=yes
55097  fi
55098
55099  if test "x$FOUND_MEM" = xyes; then
55100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
55101$as_echo "$MEMORY_SIZE MB" >&6; }
55102  else
55103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
55104$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
55105    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
55106$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
55107  fi
55108
55109  else
55110    MEMORY_SIZE=$with_memory_size
55111  fi
55112
55113
55114
55115  # Provide a decent default number of parallel jobs for make depending on
55116  # number of cores, amount of memory and machine architecture.
55117
55118# Check whether --with-jobs was given.
55119if test "${with_jobs+set}" = set; then :
55120  withval=$with_jobs;
55121fi
55122
55123  if test "x$with_jobs" = x; then
55124    # Number of jobs was not specified, calculate.
55125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
55126$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
55127    # Approximate memory in GB.
55128    memory_gb=`expr $MEMORY_SIZE / 1024`
55129    # Pick the lowest of memory in gb and number of cores.
55130    if test "$memory_gb" -lt "$NUM_CORES"; then
55131      JOBS="$memory_gb"
55132    else
55133      JOBS="$NUM_CORES"
55134      # On bigger machines, leave some room for other processes to run
55135      if test "$JOBS" -gt "4"; then
55136        JOBS=`expr $JOBS '*' 90 / 100`
55137      fi
55138    fi
55139    # Cap number of jobs to 16
55140    if test "$JOBS" -gt "16"; then
55141      JOBS=16
55142    fi
55143    if test "$JOBS" -eq "0"; then
55144      JOBS=1
55145    fi
55146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
55147$as_echo "$JOBS" >&6; }
55148  else
55149    JOBS=$with_jobs
55150  fi
55151
55152
55153
55154# Setup arguments for the boot jdk (after cores and memory have been setup)
55155
55156  ##############################################################################
55157  #
55158  # Specify jvm options for anything that is run with the Boot JDK.
55159  # Not all JVM:s accept the same arguments on the command line.
55160  #
55161
55162# Check whether --with-boot-jdk-jvmargs was given.
55163if test "${with_boot_jdk_jvmargs+set}" = set; then :
55164  withval=$with_boot_jdk_jvmargs;
55165fi
55166
55167
55168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
55169$as_echo_n "checking flags for boot jdk java command ... " >&6; }
55170
55171  # Disable special log output when a debug build is used as Boot JDK...
55172
55173  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
55174  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
55175  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
55176  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55177  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55178  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55179    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
55180    JVM_ARG_OK=true
55181  else
55182    $ECHO "Arg failed:" >&5
55183    $ECHO "$OUTPUT" >&5
55184    JVM_ARG_OK=false
55185  fi
55186
55187
55188  # Apply user provided options.
55189
55190  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
55191  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
55192  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
55193  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55194  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55195  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55196    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
55197    JVM_ARG_OK=true
55198  else
55199    $ECHO "Arg failed:" >&5
55200    $ECHO "$OUTPUT" >&5
55201    JVM_ARG_OK=false
55202  fi
55203
55204
55205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
55206$as_echo "$boot_jdk_jvmargs" >&6; }
55207
55208  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
55209  JAVA_FLAGS=$boot_jdk_jvmargs
55210
55211
55212
55213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
55214$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
55215
55216  # Starting amount of heap memory.
55217
55218  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
55219  $ECHO "Command: $JAVA -Xms64M -version" >&5
55220  OUTPUT=`$JAVA -Xms64M -version 2>&1`
55221  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55222  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55223  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55224    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
55225    JVM_ARG_OK=true
55226  else
55227    $ECHO "Arg failed:" >&5
55228    $ECHO "$OUTPUT" >&5
55229    JVM_ARG_OK=false
55230  fi
55231
55232
55233  # Maximum amount of heap memory.
55234  # Maximum stack size.
55235  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
55236  if test "x$BOOT_JDK_BITS" = "x32"; then
55237    if test "$JVM_MAX_HEAP" -gt "1100"; then
55238      JVM_MAX_HEAP=1100
55239    elif test "$JVM_MAX_HEAP" -lt "512"; then
55240      JVM_MAX_HEAP=512
55241    fi
55242    STACK_SIZE=768
55243  else
55244    # Running a 64 bit JVM allows for and requires a bigger heap
55245    if test "$JVM_MAX_HEAP" -gt "1600"; then
55246      JVM_MAX_HEAP=1600
55247    elif test "$JVM_MAX_HEAP" -lt "512"; then
55248      JVM_MAX_HEAP=512
55249    fi
55250    STACK_SIZE=1536
55251  fi
55252
55253  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
55254  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
55255  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
55256  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55257  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55258  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55259    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
55260    JVM_ARG_OK=true
55261  else
55262    $ECHO "Arg failed:" >&5
55263    $ECHO "$OUTPUT" >&5
55264    JVM_ARG_OK=false
55265  fi
55266
55267
55268  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
55269  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
55270  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
55271  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55272  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55273  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55274    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
55275    JVM_ARG_OK=true
55276  else
55277    $ECHO "Arg failed:" >&5
55278    $ECHO "$OUTPUT" >&5
55279    JVM_ARG_OK=false
55280  fi
55281
55282
55283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
55284$as_echo "$boot_jdk_jvmargs_big" >&6; }
55285
55286  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
55287
55288
55289
55290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
55291$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
55292
55293  # Use serial gc for small short lived tools if possible
55294
55295  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
55296  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
55297  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
55298  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55299  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55300  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55301    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
55302    JVM_ARG_OK=true
55303  else
55304    $ECHO "Arg failed:" >&5
55305    $ECHO "$OUTPUT" >&5
55306    JVM_ARG_OK=false
55307  fi
55308
55309
55310  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
55311  $ECHO "Command: $JAVA -Xms32M -version" >&5
55312  OUTPUT=`$JAVA -Xms32M -version 2>&1`
55313  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55314  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55315  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55316    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
55317    JVM_ARG_OK=true
55318  else
55319    $ECHO "Arg failed:" >&5
55320    $ECHO "$OUTPUT" >&5
55321    JVM_ARG_OK=false
55322  fi
55323
55324
55325  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
55326  $ECHO "Command: $JAVA -Xmx512M -version" >&5
55327  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
55328  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55329  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55330  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55331    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
55332    JVM_ARG_OK=true
55333  else
55334    $ECHO "Arg failed:" >&5
55335    $ECHO "$OUTPUT" >&5
55336    JVM_ARG_OK=false
55337  fi
55338
55339
55340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
55341$as_echo "$boot_jdk_jvmargs_small" >&6; }
55342
55343  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
55344
55345
55346  JAVA_TOOL_FLAGS_SMALL=""
55347  for f in $JAVA_FLAGS_SMALL; do
55348    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
55349  done
55350
55351
55352
55353# Setup smart javac (after cores and memory have been setup)
55354
55355
55356# Check whether --with-sjavac-server-java was given.
55357if test "${with_sjavac_server_java+set}" = set; then :
55358  withval=$with_sjavac_server_java;
55359fi
55360
55361
55362  if test "x$with_sjavac_server_java" != x; then
55363    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
55364    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
55365    if test "x$FOUND_VERSION" = x; then
55366      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
55367    fi
55368  else
55369    SJAVAC_SERVER_JAVA="$JAVA"
55370  fi
55371
55372
55373  if test "$MEMORY_SIZE" -gt "3000"; then
55374
55375  $ECHO "Check if jvm arg is ok: -d64" >&5
55376  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
55377  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
55378  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55379  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55380  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55381    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
55382    JVM_ARG_OK=true
55383  else
55384    $ECHO "Arg failed:" >&5
55385    $ECHO "$OUTPUT" >&5
55386    JVM_ARG_OK=false
55387  fi
55388
55389    if test "$JVM_ARG_OK" = true; then
55390      JVM_64BIT=true
55391      JVM_ARG_OK=false
55392    fi
55393  fi
55394
55395  MX_VALUE=`expr $MEMORY_SIZE / 2`
55396  if test "$JVM_64BIT" = true; then
55397    # Set ms lower than mx since more than one instance of the server might
55398    # get launched at the same time before they figure out which instance won.
55399    MS_VALUE=512
55400    if test "$MX_VALUE" -gt "2048"; then
55401      MX_VALUE=2048
55402    fi
55403  else
55404    MS_VALUE=256
55405    if test "$MX_VALUE" -gt "1500"; then
55406      MX_VALUE=1500
55407    fi
55408  fi
55409  if test "$MX_VALUE" -lt "512"; then
55410    MX_VALUE=512
55411  fi
55412
55413  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
55414  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
55415  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
55416  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
55417  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
55418  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
55419    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
55420    JVM_ARG_OK=true
55421  else
55422    $ECHO "Arg failed:" >&5
55423    $ECHO "$OUTPUT" >&5
55424    JVM_ARG_OK=false
55425  fi
55426
55427
55428
55429  # Check whether --enable-sjavac was given.
55430if test "${enable_sjavac+set}" = set; then :
55431  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
55432else
55433  ENABLE_SJAVAC="no"
55434fi
55435
55436  if test "x$JVM_ARG_OK" = "xfalse"; then
55437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
55438$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
55439    ENABLE_SJAVAC="no"
55440  fi
55441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
55442$as_echo_n "checking whether to use sjavac... " >&6; }
55443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
55444$as_echo "$ENABLE_SJAVAC" >&6; }
55445
55446
55447  # Check whether --enable-javac-server was given.
55448if test "${enable_javac_server+set}" = set; then :
55449  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
55450else
55451  ENABLE_JAVAC_SERVER="no"
55452fi
55453
55454  if test "x$JVM_ARG_OK" = "xfalse"; then
55455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
55456$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
55457    ENABLE_JAVAC_SERVER="no"
55458  fi
55459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
55460$as_echo_n "checking whether to use javac server... " >&6; }
55461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
55462$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
55463
55464
55465
55466# Can the C/C++ compiler use precompiled headers?
55467
55468
55469  ###############################################################################
55470  #
55471  # Can the C/C++ compiler use precompiled headers?
55472  #
55473  # Check whether --enable-precompiled-headers was given.
55474if test "${enable_precompiled_headers+set}" = set; then :
55475  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
55476else
55477  ENABLE_PRECOMPH=yes
55478fi
55479
55480
55481  USE_PRECOMPILED_HEADER=1
55482  if test "x$ENABLE_PRECOMPH" = xno; then
55483    USE_PRECOMPILED_HEADER=0
55484  fi
55485
55486  if test "x$ENABLE_PRECOMPH" = xyes; then
55487    # Check that the compiler actually supports precomp headers.
55488    if test "x$TOOLCHAIN_TYPE" = xgcc; then
55489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
55490$as_echo_n "checking that precompiled headers work... " >&6; }
55491      echo "int alfa();" > conftest.h
55492      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
55493      if test ! -f conftest.hpp.gch; then
55494        USE_PRECOMPILED_HEADER=0
55495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55496$as_echo "no" >&6; }
55497      else
55498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55499$as_echo "yes" >&6; }
55500      fi
55501      rm -f conftest.h conftest.hpp.gch
55502    fi
55503  fi
55504
55505
55506
55507
55508# Setup use of ccache, if available
55509
55510  # Check whether --enable-ccache was given.
55511if test "${enable_ccache+set}" = set; then :
55512  enableval=$enable_ccache;
55513fi
55514
55515
55516  CCACHE=
55517  CCACHE_STATUS=
55518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
55519$as_echo_n "checking is ccache enabled... " >&6; }
55520  if test "x$enable_ccache" = xyes; then
55521    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
55522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55523$as_echo "yes" >&6; }
55524      OLD_PATH="$PATH"
55525      if test "x$TOOLCHAIN_PATH" != x; then
55526        PATH=$TOOLCHAIN_PATH:$PATH
55527      fi
55528
55529
55530
55531  # Publish this variable in the help.
55532
55533
55534  if [ -z "${CCACHE+x}" ]; then
55535    # The variable is not set by user, try to locate tool using the code snippet
55536    for ac_prog in ccache
55537do
55538  # Extract the first word of "$ac_prog", so it can be a program name with args.
55539set dummy $ac_prog; ac_word=$2
55540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55541$as_echo_n "checking for $ac_word... " >&6; }
55542if ${ac_cv_path_CCACHE+:} false; then :
55543  $as_echo_n "(cached) " >&6
55544else
55545  case $CCACHE in
55546  [\\/]* | ?:[\\/]*)
55547  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55548  ;;
55549  *)
55550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55551for as_dir in $PATH
55552do
55553  IFS=$as_save_IFS
55554  test -z "$as_dir" && as_dir=.
55555    for ac_exec_ext in '' $ac_executable_extensions; do
55556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55557    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55559    break 2
55560  fi
55561done
55562  done
55563IFS=$as_save_IFS
55564
55565  ;;
55566esac
55567fi
55568CCACHE=$ac_cv_path_CCACHE
55569if test -n "$CCACHE"; then
55570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55571$as_echo "$CCACHE" >&6; }
55572else
55573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55574$as_echo "no" >&6; }
55575fi
55576
55577
55578  test -n "$CCACHE" && break
55579done
55580
55581  else
55582    # The variable is set, but is it from the command line or the environment?
55583
55584    # Try to remove the string !CCACHE! from our list.
55585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55587      # If it failed, the variable was not from the command line. Ignore it,
55588      # but warn the user (except for BASH, which is always set by the calling BASH).
55589      if test "xCCACHE" != xBASH; then
55590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55591$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55592      fi
55593      # Try to locate tool using the code snippet
55594      for ac_prog in ccache
55595do
55596  # Extract the first word of "$ac_prog", so it can be a program name with args.
55597set dummy $ac_prog; ac_word=$2
55598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55599$as_echo_n "checking for $ac_word... " >&6; }
55600if ${ac_cv_path_CCACHE+:} false; then :
55601  $as_echo_n "(cached) " >&6
55602else
55603  case $CCACHE in
55604  [\\/]* | ?:[\\/]*)
55605  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55606  ;;
55607  *)
55608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55609for as_dir in $PATH
55610do
55611  IFS=$as_save_IFS
55612  test -z "$as_dir" && as_dir=.
55613    for ac_exec_ext in '' $ac_executable_extensions; do
55614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55615    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55617    break 2
55618  fi
55619done
55620  done
55621IFS=$as_save_IFS
55622
55623  ;;
55624esac
55625fi
55626CCACHE=$ac_cv_path_CCACHE
55627if test -n "$CCACHE"; then
55628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55629$as_echo "$CCACHE" >&6; }
55630else
55631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55632$as_echo "no" >&6; }
55633fi
55634
55635
55636  test -n "$CCACHE" && break
55637done
55638
55639    else
55640      # If it succeeded, then it was overridden by the user. We will use it
55641      # for the tool.
55642
55643      # First remove it from the list of overridden variables, so we can test
55644      # for unknown variables in the end.
55645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55646
55647      # Check if we try to supply an empty value
55648      if test "x$CCACHE" = x; then
55649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55650$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55652$as_echo_n "checking for CCACHE... " >&6; }
55653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55654$as_echo "disabled" >&6; }
55655      else
55656        # Check if the provided tool contains a complete path.
55657        tool_specified="$CCACHE"
55658        tool_basename="${tool_specified##*/}"
55659        if test "x$tool_basename" = "x$tool_specified"; then
55660          # A command without a complete path is provided, search $PATH.
55661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55662$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55663          # Extract the first word of "$tool_basename", so it can be a program name with args.
55664set dummy $tool_basename; ac_word=$2
55665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55666$as_echo_n "checking for $ac_word... " >&6; }
55667if ${ac_cv_path_CCACHE+:} false; then :
55668  $as_echo_n "(cached) " >&6
55669else
55670  case $CCACHE in
55671  [\\/]* | ?:[\\/]*)
55672  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55673  ;;
55674  *)
55675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55676for as_dir in $PATH
55677do
55678  IFS=$as_save_IFS
55679  test -z "$as_dir" && as_dir=.
55680    for ac_exec_ext in '' $ac_executable_extensions; do
55681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55682    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55684    break 2
55685  fi
55686done
55687  done
55688IFS=$as_save_IFS
55689
55690  ;;
55691esac
55692fi
55693CCACHE=$ac_cv_path_CCACHE
55694if test -n "$CCACHE"; then
55695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55696$as_echo "$CCACHE" >&6; }
55697else
55698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55699$as_echo "no" >&6; }
55700fi
55701
55702
55703          if test "x$CCACHE" = x; then
55704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55705          fi
55706        else
55707          # Otherwise we believe it is a complete path. Use it as it is.
55708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55709$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55711$as_echo_n "checking for CCACHE... " >&6; }
55712          if test ! -x "$tool_specified"; then
55713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55714$as_echo "not found" >&6; }
55715            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55716          fi
55717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55718$as_echo "$tool_specified" >&6; }
55719        fi
55720      fi
55721    fi
55722
55723  fi
55724
55725
55726
55727  if test "x$CCACHE" = x; then
55728    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55729  fi
55730
55731
55732      PATH="$OLD_PATH"
55733      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55734      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55735    else
55736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55737$as_echo "no" >&6; }
55738      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55739$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55740    fi
55741  elif test "x$enable_ccache" = xno; then
55742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55743$as_echo "no, explicitly disabled" >&6; }
55744    CCACHE_STATUS="Disabled"
55745  elif test "x$enable_ccache" = x; then
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55747$as_echo "no" >&6; }
55748  else
55749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55750$as_echo "unknown" >&6; }
55751    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55752  fi
55753
55754
55755
55756# Check whether --with-ccache-dir was given.
55757if test "${with_ccache_dir+set}" = set; then :
55758  withval=$with_ccache_dir;
55759fi
55760
55761
55762  if test "x$with_ccache_dir" != x; then
55763    # When using a non home ccache directory, assume the use is to share ccache files
55764    # with other users. Thus change the umask.
55765    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55766    if test "x$CCACHE" = x; then
55767      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55768$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55769    fi
55770  fi
55771
55772  if test "x$CCACHE" != x; then
55773
55774  if test "x$CCACHE" != x; then
55775    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55776      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55777          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55778      if test "x$HAS_BAD_CCACHE" != "x"; then
55779        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55780      fi
55781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55782$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55783      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55784      PUSHED_FLAGS="$CXXFLAGS"
55785      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55786      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55787/* end confdefs.h.  */
55788
55789int
55790main ()
55791{
55792
55793  ;
55794  return 0;
55795}
55796_ACEOF
55797if ac_fn_cxx_try_compile "$LINENO"; then :
55798  CC_KNOWS_CCACHE_TRICK=yes
55799else
55800  CC_KNOWS_CCACHE_TRICK=no
55801fi
55802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55803      CXXFLAGS="$PUSHED_FLAGS"
55804      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55806$as_echo "yes" >&6; }
55807        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55808
55809        CCACHE_SLOPPINESS=pch_defines,time_macros
55810      else
55811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55812$as_echo "no" >&6; }
55813        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55814      fi
55815    fi
55816
55817    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55818        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55819
55820    if test "x$SET_CCACHE_DIR" != x; then
55821      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55822      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55823    fi
55824  fi
55825
55826  fi
55827
55828
55829###############################################################################
55830#
55831# And now the finish...
55832#
55833###############################################################################
55834
55835# Check for some common pitfalls
55836
55837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55838    file_to_test="$SRC_ROOT/LICENSE"
55839    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55840      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
55841    fi
55842  fi
55843
55844
55845  # Did user specify any unknown variables?
55846
55847  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55848    # Replace the separating ! with spaces before presenting for end user.
55849    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55850    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55851$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55852  fi
55853
55854
55855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55856$as_echo_n "checking if build directory is on local disk... " >&6; }
55857
55858  # df -l lists only local disks; if the given directory is not found then
55859  # a non-zero exit code is given
55860  if test "x$DF" = x; then
55861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55862      # msys does not have df; use Windows "net use" instead.
55863      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55864      if test "x$IS_NETWORK_DISK" = x; then
55865        OUTPUT_DIR_IS_LOCAL="yes"
55866      else
55867        OUTPUT_DIR_IS_LOCAL="no"
55868      fi
55869    else
55870      # No df here, say it's local
55871      OUTPUT_DIR_IS_LOCAL="yes"
55872    fi
55873  else
55874    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55875      OUTPUT_DIR_IS_LOCAL="yes"
55876    else
55877      OUTPUT_DIR_IS_LOCAL="no"
55878    fi
55879  fi
55880
55881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55882$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55883
55884
55885
55886  # Check if the user has any old-style ALT_ variables set.
55887  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55888
55889  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55890  # Since we can't properly handle the dependencies for this, warn the user about the situation
55891  if test -e $OUTPUT_ROOT/spec.gmk; then
55892    IS_RECONFIGURE=yes
55893  else
55894    IS_RECONFIGURE=no
55895  fi
55896
55897
55898# At the end, call the custom hook. (Dummy macro if no custom sources available)
55899
55900
55901# We're messing a bit with internal autoconf variables to put the config.status
55902# in the output directory instead of the current directory.
55903CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55904
55905# Create the actual output files. Now the main work of configure is done.
55906cat >confcache <<\_ACEOF
55907# This file is a shell script that caches the results of configure
55908# tests run on this system so they can be shared between configure
55909# scripts and configure runs, see configure's option --config-cache.
55910# It is not useful on other systems.  If it contains results you don't
55911# want to keep, you may remove or edit it.
55912#
55913# config.status only pays attention to the cache file if you give it
55914# the --recheck option to rerun configure.
55915#
55916# `ac_cv_env_foo' variables (set or unset) will be overridden when
55917# loading this file, other *unset* `ac_cv_foo' will be assigned the
55918# following values.
55919
55920_ACEOF
55921
55922# The following way of writing the cache mishandles newlines in values,
55923# but we know of no workaround that is simple, portable, and efficient.
55924# So, we kill variables containing newlines.
55925# Ultrix sh set writes to stderr and can't be redirected directly,
55926# and sets the high bit in the cache file unless we assign to the vars.
55927(
55928  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55929    eval ac_val=\$$ac_var
55930    case $ac_val in #(
55931    *${as_nl}*)
55932      case $ac_var in #(
55933      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55934$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55935      esac
55936      case $ac_var in #(
55937      _ | IFS | as_nl) ;; #(
55938      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55939      *) { eval $ac_var=; unset $ac_var;} ;;
55940      esac ;;
55941    esac
55942  done
55943
55944  (set) 2>&1 |
55945    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55946    *${as_nl}ac_space=\ *)
55947      # `set' does not quote correctly, so add quotes: double-quote
55948      # substitution turns \\\\ into \\, and sed turns \\ into \.
55949      sed -n \
55950	"s/'/'\\\\''/g;
55951	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55952      ;; #(
55953    *)
55954      # `set' quotes correctly as required by POSIX, so do not add quotes.
55955      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55956      ;;
55957    esac |
55958    sort
55959) |
55960  sed '
55961     /^ac_cv_env_/b end
55962     t clear
55963     :clear
55964     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55965     t end
55966     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55967     :end' >>confcache
55968if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55969  if test -w "$cache_file"; then
55970    if test "x$cache_file" != "x/dev/null"; then
55971      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55972$as_echo "$as_me: updating cache $cache_file" >&6;}
55973      if test ! -f "$cache_file" || test -h "$cache_file"; then
55974	cat confcache >"$cache_file"
55975      else
55976        case $cache_file in #(
55977        */* | ?:*)
55978	  mv -f confcache "$cache_file"$$ &&
55979	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55980        *)
55981	  mv -f confcache "$cache_file" ;;
55982	esac
55983      fi
55984    fi
55985  else
55986    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55987$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55988  fi
55989fi
55990rm -f confcache
55991
55992test "x$prefix" = xNONE && prefix=$ac_default_prefix
55993# Let make expand exec_prefix.
55994test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55995
55996# Transform confdefs.h into DEFS.
55997# Protect against shell expansion while executing Makefile rules.
55998# Protect against Makefile macro expansion.
55999#
56000# If the first sed substitution is executed (which looks for macros that
56001# take arguments), then branch to the quote section.  Otherwise,
56002# look for a macro that doesn't take arguments.
56003ac_script='
56004:mline
56005/\\$/{
56006 N
56007 s,\\\n,,
56008 b mline
56009}
56010t clear
56011:clear
56012s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
56013t quote
56014s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
56015t quote
56016b any
56017:quote
56018s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
56019s/\[/\\&/g
56020s/\]/\\&/g
56021s/\$/$$/g
56022H
56023:any
56024${
56025	g
56026	s/^\n//
56027	s/\n/ /g
56028	p
56029}
56030'
56031DEFS=`sed -n "$ac_script" confdefs.h`
56032
56033
56034ac_libobjs=
56035ac_ltlibobjs=
56036U=
56037for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
56038  # 1. Remove the extension, and $U if already installed.
56039  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
56040  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
56041  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
56042  #    will be set to the directory where LIBOBJS objects are built.
56043  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
56044  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
56045done
56046LIBOBJS=$ac_libobjs
56047
56048LTLIBOBJS=$ac_ltlibobjs
56049
56050
56051
56052: "${CONFIG_STATUS=./config.status}"
56053ac_write_fail=0
56054ac_clean_files_save=$ac_clean_files
56055ac_clean_files="$ac_clean_files $CONFIG_STATUS"
56056{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
56057$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
56058as_write_fail=0
56059cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
56060#! $SHELL
56061# Generated by $as_me.
56062# Run this file to recreate the current configuration.
56063# Compiler output produced by configure, useful for debugging
56064# configure, is in config.log if it exists.
56065
56066debug=false
56067ac_cs_recheck=false
56068ac_cs_silent=false
56069
56070SHELL=\${CONFIG_SHELL-$SHELL}
56071export SHELL
56072_ASEOF
56073cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
56074## -------------------- ##
56075## M4sh Initialization. ##
56076## -------------------- ##
56077
56078# Be more Bourne compatible
56079DUALCASE=1; export DUALCASE # for MKS sh
56080if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
56081  emulate sh
56082  NULLCMD=:
56083  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
56084  # is contrary to our usage.  Disable this feature.
56085  alias -g '${1+"$@"}'='"$@"'
56086  setopt NO_GLOB_SUBST
56087else
56088  case `(set -o) 2>/dev/null` in #(
56089  *posix*) :
56090    set -o posix ;; #(
56091  *) :
56092     ;;
56093esac
56094fi
56095
56096
56097as_nl='
56098'
56099export as_nl
56100# Printing a long string crashes Solaris 7 /usr/bin/printf.
56101as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
56102as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
56103as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
56104# Prefer a ksh shell builtin over an external printf program on Solaris,
56105# but without wasting forks for bash or zsh.
56106if test -z "$BASH_VERSION$ZSH_VERSION" \
56107    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
56108  as_echo='print -r --'
56109  as_echo_n='print -rn --'
56110elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56111  as_echo='printf %s\n'
56112  as_echo_n='printf %s'
56113else
56114  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56115    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56116    as_echo_n='/usr/ucb/echo -n'
56117  else
56118    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56119    as_echo_n_body='eval
56120      arg=$1;
56121      case $arg in #(
56122      *"$as_nl"*)
56123	expr "X$arg" : "X\\(.*\\)$as_nl";
56124	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
56125      esac;
56126      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
56127    '
56128    export as_echo_n_body
56129    as_echo_n='sh -c $as_echo_n_body as_echo'
56130  fi
56131  export as_echo_body
56132  as_echo='sh -c $as_echo_body as_echo'
56133fi
56134
56135# The user is always right.
56136if test "${PATH_SEPARATOR+set}" != set; then
56137  PATH_SEPARATOR=:
56138  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
56139    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
56140      PATH_SEPARATOR=';'
56141  }
56142fi
56143
56144
56145# IFS
56146# We need space, tab and new line, in precisely that order.  Quoting is
56147# there to prevent editors from complaining about space-tab.
56148# (If _AS_PATH_WALK were called with IFS unset, it would disable word
56149# splitting by setting IFS to empty value.)
56150IFS=" ""	$as_nl"
56151
56152# Find who we are.  Look in the path if we contain no directory separator.
56153as_myself=
56154case $0 in #((
56155  *[\\/]* ) as_myself=$0 ;;
56156  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56157for as_dir in $PATH
56158do
56159  IFS=$as_save_IFS
56160  test -z "$as_dir" && as_dir=.
56161    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
56162  done
56163IFS=$as_save_IFS
56164
56165     ;;
56166esac
56167# We did not find ourselves, most probably we were run as `sh COMMAND'
56168# in which case we are not to be found in the path.
56169if test "x$as_myself" = x; then
56170  as_myself=$0
56171fi
56172if test ! -f "$as_myself"; then
56173  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
56174  exit 1
56175fi
56176
56177# Unset variables that we do not need and which cause bugs (e.g. in
56178# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
56179# suppresses any "Segmentation fault" message there.  '((' could
56180# trigger a bug in pdksh 5.2.14.
56181for as_var in BASH_ENV ENV MAIL MAILPATH
56182do eval test x\${$as_var+set} = xset \
56183  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
56184done
56185PS1='$ '
56186PS2='> '
56187PS4='+ '
56188
56189# NLS nuisances.
56190LC_ALL=C
56191export LC_ALL
56192LANGUAGE=C
56193export LANGUAGE
56194
56195# CDPATH.
56196(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
56197
56198
56199# as_fn_error STATUS ERROR [LINENO LOG_FD]
56200# ----------------------------------------
56201# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
56202# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
56203# script with STATUS, using 1 if that was 0.
56204as_fn_error ()
56205{
56206  as_status=$1; test $as_status -eq 0 && as_status=1
56207  if test "$4"; then
56208    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
56209    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
56210  fi
56211  $as_echo "$as_me: error: $2" >&2
56212  as_fn_exit $as_status
56213} # as_fn_error
56214
56215
56216# as_fn_set_status STATUS
56217# -----------------------
56218# Set $? to STATUS, without forking.
56219as_fn_set_status ()
56220{
56221  return $1
56222} # as_fn_set_status
56223
56224# as_fn_exit STATUS
56225# -----------------
56226# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
56227as_fn_exit ()
56228{
56229  set +e
56230  as_fn_set_status $1
56231  exit $1
56232} # as_fn_exit
56233
56234# as_fn_unset VAR
56235# ---------------
56236# Portably unset VAR.
56237as_fn_unset ()
56238{
56239  { eval $1=; unset $1;}
56240}
56241as_unset=as_fn_unset
56242# as_fn_append VAR VALUE
56243# ----------------------
56244# Append the text in VALUE to the end of the definition contained in VAR. Take
56245# advantage of any shell optimizations that allow amortized linear growth over
56246# repeated appends, instead of the typical quadratic growth present in naive
56247# implementations.
56248if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
56249  eval 'as_fn_append ()
56250  {
56251    eval $1+=\$2
56252  }'
56253else
56254  as_fn_append ()
56255  {
56256    eval $1=\$$1\$2
56257  }
56258fi # as_fn_append
56259
56260# as_fn_arith ARG...
56261# ------------------
56262# Perform arithmetic evaluation on the ARGs, and store the result in the
56263# global $as_val. Take advantage of shells that can avoid forks. The arguments
56264# must be portable across $(()) and expr.
56265if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
56266  eval 'as_fn_arith ()
56267  {
56268    as_val=$(( $* ))
56269  }'
56270else
56271  as_fn_arith ()
56272  {
56273    as_val=`expr "$@" || test $? -eq 1`
56274  }
56275fi # as_fn_arith
56276
56277
56278if expr a : '\(a\)' >/dev/null 2>&1 &&
56279   test "X`expr 00001 : '.*\(...\)'`" = X001; then
56280  as_expr=expr
56281else
56282  as_expr=false
56283fi
56284
56285if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
56286  as_basename=basename
56287else
56288  as_basename=false
56289fi
56290
56291if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
56292  as_dirname=dirname
56293else
56294  as_dirname=false
56295fi
56296
56297as_me=`$as_basename -- "$0" ||
56298$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
56299	 X"$0" : 'X\(//\)$' \| \
56300	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
56301$as_echo X/"$0" |
56302    sed '/^.*\/\([^/][^/]*\)\/*$/{
56303	    s//\1/
56304	    q
56305	  }
56306	  /^X\/\(\/\/\)$/{
56307	    s//\1/
56308	    q
56309	  }
56310	  /^X\/\(\/\).*/{
56311	    s//\1/
56312	    q
56313	  }
56314	  s/.*/./; q'`
56315
56316# Avoid depending upon Character Ranges.
56317as_cr_letters='abcdefghijklmnopqrstuvwxyz'
56318as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
56319as_cr_Letters=$as_cr_letters$as_cr_LETTERS
56320as_cr_digits='0123456789'
56321as_cr_alnum=$as_cr_Letters$as_cr_digits
56322
56323ECHO_C= ECHO_N= ECHO_T=
56324case `echo -n x` in #(((((
56325-n*)
56326  case `echo 'xy\c'` in
56327  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
56328  xy)  ECHO_C='\c';;
56329  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
56330       ECHO_T='	';;
56331  esac;;
56332*)
56333  ECHO_N='-n';;
56334esac
56335
56336rm -f conf$$ conf$$.exe conf$$.file
56337if test -d conf$$.dir; then
56338  rm -f conf$$.dir/conf$$.file
56339else
56340  rm -f conf$$.dir
56341  mkdir conf$$.dir 2>/dev/null
56342fi
56343if (echo >conf$$.file) 2>/dev/null; then
56344  if ln -s conf$$.file conf$$ 2>/dev/null; then
56345    as_ln_s='ln -s'
56346    # ... but there are two gotchas:
56347    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
56348    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
56349    # In both cases, we have to default to `cp -pR'.
56350    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
56351      as_ln_s='cp -pR'
56352  elif ln conf$$.file conf$$ 2>/dev/null; then
56353    as_ln_s=ln
56354  else
56355    as_ln_s='cp -pR'
56356  fi
56357else
56358  as_ln_s='cp -pR'
56359fi
56360rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
56361rmdir conf$$.dir 2>/dev/null
56362
56363
56364# as_fn_mkdir_p
56365# -------------
56366# Create "$as_dir" as a directory, including parents if necessary.
56367as_fn_mkdir_p ()
56368{
56369
56370  case $as_dir in #(
56371  -*) as_dir=./$as_dir;;
56372  esac
56373  test -d "$as_dir" || eval $as_mkdir_p || {
56374    as_dirs=
56375    while :; do
56376      case $as_dir in #(
56377      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
56378      *) as_qdir=$as_dir;;
56379      esac
56380      as_dirs="'$as_qdir' $as_dirs"
56381      as_dir=`$as_dirname -- "$as_dir" ||
56382$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56383	 X"$as_dir" : 'X\(//\)[^/]' \| \
56384	 X"$as_dir" : 'X\(//\)$' \| \
56385	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
56386$as_echo X"$as_dir" |
56387    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56388	    s//\1/
56389	    q
56390	  }
56391	  /^X\(\/\/\)[^/].*/{
56392	    s//\1/
56393	    q
56394	  }
56395	  /^X\(\/\/\)$/{
56396	    s//\1/
56397	    q
56398	  }
56399	  /^X\(\/\).*/{
56400	    s//\1/
56401	    q
56402	  }
56403	  s/.*/./; q'`
56404      test -d "$as_dir" && break
56405    done
56406    test -z "$as_dirs" || eval "mkdir $as_dirs"
56407  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
56408
56409
56410} # as_fn_mkdir_p
56411if mkdir -p . 2>/dev/null; then
56412  as_mkdir_p='mkdir -p "$as_dir"'
56413else
56414  test -d ./-p && rmdir ./-p
56415  as_mkdir_p=false
56416fi
56417
56418
56419# as_fn_executable_p FILE
56420# -----------------------
56421# Test if FILE is an executable regular file.
56422as_fn_executable_p ()
56423{
56424  test -f "$1" && test -x "$1"
56425} # as_fn_executable_p
56426as_test_x='test -x'
56427as_executable_p=as_fn_executable_p
56428
56429# Sed expression to map a string onto a valid CPP name.
56430as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
56431
56432# Sed expression to map a string onto a valid variable name.
56433as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
56434
56435
56436exec 6>&1
56437## ----------------------------------- ##
56438## Main body of $CONFIG_STATUS script. ##
56439## ----------------------------------- ##
56440_ASEOF
56441test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
56442
56443cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56444# Save the log message, to keep $0 and so on meaningful, and to
56445# report actual input values of CONFIG_FILES etc. instead of their
56446# values after options handling.
56447ac_log="
56448This file was extended by OpenJDK $as_me jdk9, which was
56449generated by GNU Autoconf 2.69.  Invocation command line was
56450
56451  CONFIG_FILES    = $CONFIG_FILES
56452  CONFIG_HEADERS  = $CONFIG_HEADERS
56453  CONFIG_LINKS    = $CONFIG_LINKS
56454  CONFIG_COMMANDS = $CONFIG_COMMANDS
56455  $ $0 $@
56456
56457on `(hostname || uname -n) 2>/dev/null | sed 1q`
56458"
56459
56460_ACEOF
56461
56462case $ac_config_files in *"
56463"*) set x $ac_config_files; shift; ac_config_files=$*;;
56464esac
56465
56466
56467
56468cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56469# Files that config.status was made for.
56470config_files="$ac_config_files"
56471
56472_ACEOF
56473
56474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56475ac_cs_usage="\
56476\`$as_me' instantiates files and other configuration actions
56477from templates according to the current configuration.  Unless the files
56478and actions are specified as TAGs, all are instantiated by default.
56479
56480Usage: $0 [OPTION]... [TAG]...
56481
56482  -h, --help       print this help, then exit
56483  -V, --version    print version number and configuration settings, then exit
56484      --config     print configuration, then exit
56485  -q, --quiet, --silent
56486                   do not print progress messages
56487  -d, --debug      don't remove temporary files
56488      --recheck    update $as_me by reconfiguring in the same conditions
56489      --file=FILE[:TEMPLATE]
56490                   instantiate the configuration file FILE
56491
56492Configuration files:
56493$config_files
56494
56495Report bugs to <build-dev@openjdk.java.net>.
56496OpenJDK home page: <http://openjdk.java.net>."
56497
56498_ACEOF
56499cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56500ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
56501ac_cs_version="\\
56502OpenJDK config.status jdk9
56503configured by $0, generated by GNU Autoconf 2.69,
56504  with options \\"\$ac_cs_config\\"
56505
56506Copyright (C) 2012 Free Software Foundation, Inc.
56507This config.status script is free software; the Free Software Foundation
56508gives unlimited permission to copy, distribute and modify it."
56509
56510ac_pwd='$ac_pwd'
56511srcdir='$srcdir'
56512AWK='$AWK'
56513test -n "\$AWK" || AWK=awk
56514_ACEOF
56515
56516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56517# The default lists apply if the user does not specify any file.
56518ac_need_defaults=:
56519while test $# != 0
56520do
56521  case $1 in
56522  --*=?*)
56523    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56524    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
56525    ac_shift=:
56526    ;;
56527  --*=)
56528    ac_option=`expr "X$1" : 'X\([^=]*\)='`
56529    ac_optarg=
56530    ac_shift=:
56531    ;;
56532  *)
56533    ac_option=$1
56534    ac_optarg=$2
56535    ac_shift=shift
56536    ;;
56537  esac
56538
56539  case $ac_option in
56540  # Handling of the options.
56541  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
56542    ac_cs_recheck=: ;;
56543  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
56544    $as_echo "$ac_cs_version"; exit ;;
56545  --config | --confi | --conf | --con | --co | --c )
56546    $as_echo "$ac_cs_config"; exit ;;
56547  --debug | --debu | --deb | --de | --d | -d )
56548    debug=: ;;
56549  --file | --fil | --fi | --f )
56550    $ac_shift
56551    case $ac_optarg in
56552    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
56553    '') as_fn_error $? "missing file argument" ;;
56554    esac
56555    as_fn_append CONFIG_FILES " '$ac_optarg'"
56556    ac_need_defaults=false;;
56557  --he | --h |  --help | --hel | -h )
56558    $as_echo "$ac_cs_usage"; exit ;;
56559  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56560  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56561    ac_cs_silent=: ;;
56562
56563  # This is an error.
56564  -*) as_fn_error $? "unrecognized option: \`$1'
56565Try \`$0 --help' for more information." ;;
56566
56567  *) as_fn_append ac_config_targets " $1"
56568     ac_need_defaults=false ;;
56569
56570  esac
56571  shift
56572done
56573
56574ac_configure_extra_args=
56575
56576if $ac_cs_silent; then
56577  exec 6>/dev/null
56578  ac_configure_extra_args="$ac_configure_extra_args --silent"
56579fi
56580
56581_ACEOF
56582cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56583if \$ac_cs_recheck; then
56584  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56585  shift
56586  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56587  CONFIG_SHELL='$SHELL'
56588  export CONFIG_SHELL
56589  exec "\$@"
56590fi
56591
56592_ACEOF
56593cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56594exec 5>>config.log
56595{
56596  echo
56597  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56598## Running $as_me. ##
56599_ASBOX
56600  $as_echo "$ac_log"
56601} >&5
56602
56603_ACEOF
56604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56605_ACEOF
56606
56607cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56608
56609# Handling of arguments.
56610for ac_config_target in $ac_config_targets
56611do
56612  case $ac_config_target in
56613    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56614    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56615    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56616    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56617    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56618
56619  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56620  esac
56621done
56622
56623
56624# If the user did not use the arguments to specify the items to instantiate,
56625# then the envvar interface is used.  Set only those that are not.
56626# We use the long form for the default assignment because of an extremely
56627# bizarre bug on SunOS 4.1.3.
56628if $ac_need_defaults; then
56629  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56630fi
56631
56632# Have a temporary directory for convenience.  Make it in the build tree
56633# simply because there is no reason against having it here, and in addition,
56634# creating and moving files from /tmp can sometimes cause problems.
56635# Hook for its removal unless debugging.
56636# Note that there is a small window in which the directory will not be cleaned:
56637# after its creation but before its name has been assigned to `$tmp'.
56638$debug ||
56639{
56640  tmp= ac_tmp=
56641  trap 'exit_status=$?
56642  : "${ac_tmp:=$tmp}"
56643  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56644' 0
56645  trap 'as_fn_exit 1' 1 2 13 15
56646}
56647# Create a (secure) tmp directory for tmp files.
56648
56649{
56650  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56651  test -d "$tmp"
56652}  ||
56653{
56654  tmp=./conf$$-$RANDOM
56655  (umask 077 && mkdir "$tmp")
56656} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56657ac_tmp=$tmp
56658
56659# Set up the scripts for CONFIG_FILES section.
56660# No need to generate them if there are no CONFIG_FILES.
56661# This happens for instance with `./config.status config.h'.
56662if test -n "$CONFIG_FILES"; then
56663
56664
56665ac_cr=`echo X | tr X '\015'`
56666# On cygwin, bash can eat \r inside `` if the user requested igncr.
56667# But we know of no other shell where ac_cr would be empty at this
56668# point, so we can use a bashism as a fallback.
56669if test "x$ac_cr" = x; then
56670  eval ac_cr=\$\'\\r\'
56671fi
56672ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56673if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56674  ac_cs_awk_cr='\\r'
56675else
56676  ac_cs_awk_cr=$ac_cr
56677fi
56678
56679echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56680_ACEOF
56681
56682
56683{
56684  echo "cat >conf$$subs.awk <<_ACEOF" &&
56685  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56686  echo "_ACEOF"
56687} >conf$$subs.sh ||
56688  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56689ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56690ac_delim='%!_!# '
56691for ac_last_try in false false false false false :; do
56692  . ./conf$$subs.sh ||
56693    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56694
56695  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56696  if test $ac_delim_n = $ac_delim_num; then
56697    break
56698  elif $ac_last_try; then
56699    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56700  else
56701    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56702  fi
56703done
56704rm -f conf$$subs.sh
56705
56706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56707cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56708_ACEOF
56709sed -n '
56710h
56711s/^/S["/; s/!.*/"]=/
56712p
56713g
56714s/^[^!]*!//
56715:repl
56716t repl
56717s/'"$ac_delim"'$//
56718t delim
56719:nl
56720h
56721s/\(.\{148\}\)..*/\1/
56722t more1
56723s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56724p
56725n
56726b repl
56727:more1
56728s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56729p
56730g
56731s/.\{148\}//
56732t nl
56733:delim
56734h
56735s/\(.\{148\}\)..*/\1/
56736t more2
56737s/["\\]/\\&/g; s/^/"/; s/$/"/
56738p
56739b
56740:more2
56741s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56742p
56743g
56744s/.\{148\}//
56745t delim
56746' <conf$$subs.awk | sed '
56747/^[^""]/{
56748  N
56749  s/\n//
56750}
56751' >>$CONFIG_STATUS || ac_write_fail=1
56752rm -f conf$$subs.awk
56753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56754_ACAWK
56755cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56756  for (key in S) S_is_set[key] = 1
56757  FS = ""
56758
56759}
56760{
56761  line = $ 0
56762  nfields = split(line, field, "@")
56763  substed = 0
56764  len = length(field[1])
56765  for (i = 2; i < nfields; i++) {
56766    key = field[i]
56767    keylen = length(key)
56768    if (S_is_set[key]) {
56769      value = S[key]
56770      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56771      len += length(value) + length(field[++i])
56772      substed = 1
56773    } else
56774      len += 1 + keylen
56775  }
56776
56777  print line
56778}
56779
56780_ACAWK
56781_ACEOF
56782cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56783if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56784  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56785else
56786  cat
56787fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56788  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56789_ACEOF
56790
56791# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56792# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56793# trailing colons and then remove the whole line if VPATH becomes empty
56794# (actually we leave an empty line to preserve line numbers).
56795if test "x$srcdir" = x.; then
56796  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56797h
56798s///
56799s/^/:/
56800s/[	 ]*$/:/
56801s/:\$(srcdir):/:/g
56802s/:\${srcdir}:/:/g
56803s/:@srcdir@:/:/g
56804s/^:*//
56805s/:*$//
56806x
56807s/\(=[	 ]*\).*/\1/
56808G
56809s/\n//
56810s/^[^=]*=[	 ]*$//
56811}'
56812fi
56813
56814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56815fi # test -n "$CONFIG_FILES"
56816
56817
56818eval set X "  :F $CONFIG_FILES      "
56819shift
56820for ac_tag
56821do
56822  case $ac_tag in
56823  :[FHLC]) ac_mode=$ac_tag; continue;;
56824  esac
56825  case $ac_mode$ac_tag in
56826  :[FHL]*:*);;
56827  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56828  :[FH]-) ac_tag=-:-;;
56829  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56830  esac
56831  ac_save_IFS=$IFS
56832  IFS=:
56833  set x $ac_tag
56834  IFS=$ac_save_IFS
56835  shift
56836  ac_file=$1
56837  shift
56838
56839  case $ac_mode in
56840  :L) ac_source=$1;;
56841  :[FH])
56842    ac_file_inputs=
56843    for ac_f
56844    do
56845      case $ac_f in
56846      -) ac_f="$ac_tmp/stdin";;
56847      *) # Look for the file first in the build tree, then in the source tree
56848	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56849	 # because $ac_f cannot contain `:'.
56850	 test -f "$ac_f" ||
56851	   case $ac_f in
56852	   [\\/$]*) false;;
56853	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56854	   esac ||
56855	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56856      esac
56857      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56858      as_fn_append ac_file_inputs " '$ac_f'"
56859    done
56860
56861    # Let's still pretend it is `configure' which instantiates (i.e., don't
56862    # use $as_me), people would be surprised to read:
56863    #    /* config.h.  Generated by config.status.  */
56864    configure_input='Generated from '`
56865	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56866	`' by configure.'
56867    if test x"$ac_file" != x-; then
56868      configure_input="$ac_file.  $configure_input"
56869      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56870$as_echo "$as_me: creating $ac_file" >&6;}
56871    fi
56872    # Neutralize special characters interpreted by sed in replacement strings.
56873    case $configure_input in #(
56874    *\&* | *\|* | *\\* )
56875       ac_sed_conf_input=`$as_echo "$configure_input" |
56876       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56877    *) ac_sed_conf_input=$configure_input;;
56878    esac
56879
56880    case $ac_tag in
56881    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56882      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56883    esac
56884    ;;
56885  esac
56886
56887  ac_dir=`$as_dirname -- "$ac_file" ||
56888$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56889	 X"$ac_file" : 'X\(//\)[^/]' \| \
56890	 X"$ac_file" : 'X\(//\)$' \| \
56891	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56892$as_echo X"$ac_file" |
56893    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56894	    s//\1/
56895	    q
56896	  }
56897	  /^X\(\/\/\)[^/].*/{
56898	    s//\1/
56899	    q
56900	  }
56901	  /^X\(\/\/\)$/{
56902	    s//\1/
56903	    q
56904	  }
56905	  /^X\(\/\).*/{
56906	    s//\1/
56907	    q
56908	  }
56909	  s/.*/./; q'`
56910  as_dir="$ac_dir"; as_fn_mkdir_p
56911  ac_builddir=.
56912
56913case "$ac_dir" in
56914.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56915*)
56916  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56917  # A ".." for each directory in $ac_dir_suffix.
56918  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56919  case $ac_top_builddir_sub in
56920  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56921  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56922  esac ;;
56923esac
56924ac_abs_top_builddir=$ac_pwd
56925ac_abs_builddir=$ac_pwd$ac_dir_suffix
56926# for backward compatibility:
56927ac_top_builddir=$ac_top_build_prefix
56928
56929case $srcdir in
56930  .)  # We are building in place.
56931    ac_srcdir=.
56932    ac_top_srcdir=$ac_top_builddir_sub
56933    ac_abs_top_srcdir=$ac_pwd ;;
56934  [\\/]* | ?:[\\/]* )  # Absolute name.
56935    ac_srcdir=$srcdir$ac_dir_suffix;
56936    ac_top_srcdir=$srcdir
56937    ac_abs_top_srcdir=$srcdir ;;
56938  *) # Relative name.
56939    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56940    ac_top_srcdir=$ac_top_build_prefix$srcdir
56941    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56942esac
56943ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56944
56945
56946  case $ac_mode in
56947  :F)
56948  #
56949  # CONFIG_FILE
56950  #
56951
56952_ACEOF
56953
56954cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56955# If the template does not know about datarootdir, expand it.
56956# FIXME: This hack should be removed a few years after 2.60.
56957ac_datarootdir_hack=; ac_datarootdir_seen=
56958ac_sed_dataroot='
56959/datarootdir/ {
56960  p
56961  q
56962}
56963/@datadir@/p
56964/@docdir@/p
56965/@infodir@/p
56966/@localedir@/p
56967/@mandir@/p'
56968case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56969*datarootdir*) ac_datarootdir_seen=yes;;
56970*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56971  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56972$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56973_ACEOF
56974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56975  ac_datarootdir_hack='
56976  s&@datadir@&$datadir&g
56977  s&@docdir@&$docdir&g
56978  s&@infodir@&$infodir&g
56979  s&@localedir@&$localedir&g
56980  s&@mandir@&$mandir&g
56981  s&\\\${datarootdir}&$datarootdir&g' ;;
56982esac
56983_ACEOF
56984
56985# Neutralize VPATH when `$srcdir' = `.'.
56986# Shell code in configure.ac might set extrasub.
56987# FIXME: do we really want to maintain this feature?
56988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56989ac_sed_extra="$ac_vpsub
56990$extrasub
56991_ACEOF
56992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56993:t
56994/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56995s|@configure_input@|$ac_sed_conf_input|;t t
56996s&@top_builddir@&$ac_top_builddir_sub&;t t
56997s&@top_build_prefix@&$ac_top_build_prefix&;t t
56998s&@srcdir@&$ac_srcdir&;t t
56999s&@abs_srcdir@&$ac_abs_srcdir&;t t
57000s&@top_srcdir@&$ac_top_srcdir&;t t
57001s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
57002s&@builddir@&$ac_builddir&;t t
57003s&@abs_builddir@&$ac_abs_builddir&;t t
57004s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
57005$ac_datarootdir_hack
57006"
57007eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
57008  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
57009
57010test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
57011  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
57012  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
57013      "$ac_tmp/out"`; test -z "$ac_out"; } &&
57014  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
57015which seems to be undefined.  Please make sure it is defined" >&5
57016$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
57017which seems to be undefined.  Please make sure it is defined" >&2;}
57018
57019  rm -f "$ac_tmp/stdin"
57020  case $ac_file in
57021  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
57022  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
57023  esac \
57024  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
57025 ;;
57026
57027
57028
57029  esac
57030
57031done # for ac_tag
57032
57033
57034as_fn_exit 0
57035_ACEOF
57036ac_clean_files=$ac_clean_files_save
57037
57038test $ac_write_fail = 0 ||
57039  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
57040
57041
57042# configure is writing to config.log, and then calls config.status.
57043# config.status does its own redirection, appending to config.log.
57044# Unfortunately, on DOS this fails, as config.log is still kept open
57045# by configure, so config.status won't be able to write to it; its
57046# output is simply discarded.  So we exec the FD to /dev/null,
57047# effectively closing config.log, so it can be properly (re)opened and
57048# appended to by config.status.  When coming back to configure, we
57049# need to make the FD available again.
57050if test "$no_create" != yes; then
57051  ac_cs_success=:
57052  ac_config_status_args=
57053  test "$silent" = yes &&
57054    ac_config_status_args="$ac_config_status_args --quiet"
57055  exec 5>/dev/null
57056  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
57057  exec 5>>config.log
57058  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
57059  # would make configure fail if this is the last instruction.
57060  $ac_cs_success || as_fn_exit 1
57061fi
57062if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
57063  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
57064$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
57065fi
57066
57067
57068# After AC_OUTPUT, we need to do final work
57069
57070
57071  # Try to move config.log (generated by autoconf) to the configure-support directory.
57072  if test -e ./config.log; then
57073    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
57074  fi
57075
57076  # Rotate our log file (configure.log)
57077  if test -e "$OUTPUT_ROOT/configure.log.old"; then
57078    $RM -f "$OUTPUT_ROOT/configure.log.old"
57079  fi
57080  if test -e "$OUTPUT_ROOT/configure.log"; then
57081    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
57082  fi
57083
57084  # Move configure.log from current directory to the build output root
57085  if test -e ./configure.log; then
57086    echo found it
57087    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
57088  fi
57089
57090  # Make the compare script executable
57091  $CHMOD +x $OUTPUT_ROOT/compare.sh
57092
57093
57094# Finally output some useful information to the user
57095
57096  # Finally output some useful information to the user
57097
57098  printf "\n"
57099  printf "====================================================\n"
57100  if test "x$no_create" != "xyes"; then
57101    if test "x$IS_RECONFIGURE" != "xyes"; then
57102      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
57103    else
57104      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
57105    fi
57106  else
57107    if test "x$IS_RECONFIGURE" != "xyes"; then
57108      printf "A configuration has been successfully checked but not created\n"
57109    else
57110      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
57111    fi
57112  fi
57113  if test "x$CONFIGURE_COMMAND_LINE" != x; then
57114    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
57115  else
57116    printf "using default settings.\n"
57117  fi
57118
57119  printf "\n"
57120  printf "Configuration summary:\n"
57121  printf "* Debug level:    $DEBUG_LEVEL\n"
57122  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
57123  printf "* JDK variant:    $JDK_VARIANT\n"
57124  printf "* JVM variants:   $with_jvm_variants\n"
57125  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
57126  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
57127
57128  printf "\n"
57129  printf "Tools summary:\n"
57130  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
57131    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
57132  fi
57133  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
57134  if test "x$TOOLCHAIN_VERSION" != "x"; then
57135    print_version=" $TOOLCHAIN_VERSION"
57136  fi
57137  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
57138  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
57139  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
57140
57141  printf "\n"
57142  printf "Build performance summary:\n"
57143  printf "* Cores to use:   $JOBS\n"
57144  printf "* Memory limit:   $MEMORY_SIZE MB\n"
57145  if test "x$CCACHE_STATUS" != "x"; then
57146    printf "* ccache status:  $CCACHE_STATUS\n"
57147  fi
57148  printf "\n"
57149
57150  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
57151    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
57152    printf "will result in longer build times.\n"
57153    printf "\n"
57154  fi
57155
57156  if test "x$FOUND_ALT_VARIABLES" != "x"; then
57157    printf "WARNING: You have old-style ALT_ environment variables set.\n"
57158    printf "These are not respected, and will be ignored. It is recommended\n"
57159    printf "that you clean your environment. The following variables are set:\n"
57160    printf "$FOUND_ALT_VARIABLES\n"
57161    printf "\n"
57162  fi
57163
57164  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
57165    printf "WARNING: Your build output directory is not on a local disk.\n"
57166    printf "This will severely degrade build performance!\n"
57167    printf "It is recommended that you create an output directory on a local disk,\n"
57168    printf "and run the configure script again from that directory.\n"
57169    printf "\n"
57170  fi
57171
57172  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
57173    printf "WARNING: The result of this configuration has overridden an older\n"
57174    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
57175    printf "proper build. Failure to do so might result in strange build problems.\n"
57176    printf "\n"
57177  fi
57178
57179  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
57180    printf "WARNING: The result of this configuration was not saved.\n"
57181    printf "You should run without '--no-create | -n' to create the configuration.\n"
57182    printf "\n"
57183  fi
57184
57185
57186
57187  # Locate config.log.
57188  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
57189    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
57190  elif test -e "./config.log"; then
57191    CONFIG_LOG_PATH="."
57192  fi
57193
57194  if test -e "$CONFIG_LOG_PATH/config.log"; then
57195    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
57196    if test $? -eq 0; then
57197      printf "The following warnings were produced. Repeated here for convenience:\n"
57198      # We must quote sed expression (using []) to stop m4 from eating the [].
57199      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
57200      printf "\n"
57201    fi
57202  fi
57203
57204