generated-configure.sh revision 1731:4ba17e992008
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
688HOTSPOT_SET_WARNINGS_AS_ERRORS
689WARNINGS_AS_ERRORS
690COMPILER_SUPPORTS_TARGET_BITS_FLAG
691ZERO_ARCHFLAG
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695JDKEXE_LIBS
696JDKLIB_LIBS
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708CXX_O_FLAG_NONE
709CXX_O_FLAG_DEBUG
710CXX_O_FLAG_NORM
711CXX_O_FLAG_HI
712CXX_O_FLAG_HIGHEST
713C_O_FLAG_NONE
714C_O_FLAG_DEBUG
715C_O_FLAG_NORM
716C_O_FLAG_HI
717C_O_FLAG_HIGHEST
718CXXFLAGS_DEBUG_SYMBOLS
719CFLAGS_DEBUG_SYMBOLS
720CXX_FLAG_DEPS
721C_FLAG_DEPS
722SET_SHARED_LIBRARY_MAPFILE
723SET_SHARED_LIBRARY_NAME
724SET_SHARED_LIBRARY_ORIGIN
725SET_EXECUTABLE_ORIGIN
726CXX_FLAG_REORDER
727C_FLAG_REORDER
728RC_FLAGS
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733STRIPFLAGS
734ARFLAGS
735COMPILER_TARGET_BITS_FLAG
736JT_HOME
737JTREGEXE
738USING_BROKEN_SUSE_LD
739PACKAGE_PATH
740USE_CLANG
741HOTSPOT_LD
742HOTSPOT_CXX
743HOTSPOT_RC
744HOTSPOT_MT
745BUILD_LD
746BUILD_CXX
747BUILD_CC
748BUILD_SYSROOT_LDFLAGS
749BUILD_SYSROOT_CFLAGS
750ac_ct_OBJDUMP
751OBJDUMP
752ac_ct_OBJCOPY
753OBJCOPY
754ac_ct_NM
755ac_ct_STRIP
756GNM
757NM
758STRIP
759MSBUILD
760DUMPBIN
761RC
762MT
763LIPO
764ac_ct_AR
765AR
766AS
767LDCXX
768LD
769CXXCPP
770CPP
771ac_ct_CXX
772CXXFLAGS
773CXX
774ac_ct_PROPER_COMPILER_CXX
775PROPER_COMPILER_CXX
776TOOLCHAIN_PATH_CXX
777POTENTIAL_CXX
778OBJEXT
779EXEEXT
780ac_ct_CC
781CPPFLAGS
782LDFLAGS
783CFLAGS
784CC
785ac_ct_PROPER_COMPILER_CC
786PROPER_COMPILER_CC
787TOOLCHAIN_PATH_CC
788POTENTIAL_CC
789VS_LIB
790VS_INCLUDE
791VS_PATH
792CYGWIN_LINK
793SYSROOT_LDFLAGS
794SYSROOT_CFLAGS
795LEGACY_EXTRA_LDFLAGS
796LEGACY_EXTRA_CXXFLAGS
797LEGACY_EXTRA_CFLAGS
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816BOOT_JDK_BITS
817JAVAC_FLAGS
818BOOT_JDK_SOURCETARGET
819JARSIGNER
820JAR
821JAVAH
822JAVAC
823JAVA
824BOOT_JDK
825JAVA_CHECK
826JAVAC_CHECK
827COOKED_BUILD_NUMBER
828JDK_VERSION
829COPYRIGHT_YEAR
830MACOSX_BUNDLE_ID_BASE
831MACOSX_BUNDLE_NAME_BASE
832COMPANY_NAME
833JDK_RC_PLATFORM_NAME
834PRODUCT_SUFFIX
835PRODUCT_NAME
836LAUNCHER_NAME
837MILESTONE
838JDK_BUILD_NUMBER
839JDK_UPDATE_VERSION
840JDK_MICRO_VERSION
841JDK_MINOR_VERSION
842JDK_MAJOR_VERSION
843USER_RELEASE_SUFFIX
844COMPRESS_JARS
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851OS_VERSION_MICRO
852OS_VERSION_MINOR
853OS_VERSION_MAJOR
854PKG_CONFIG
855BASH_ARGS
856SETFILE
857CODESIGN
858XATTR
859DSYMUTIL
860IS_GNU_TIME
861PATCH
862TIME
863STAT
864HG
865READELF
866OTOOL
867LDD
868ZIP
869UNZIP
870FIND_DELETE
871OUTPUT_SYNC
872OUTPUT_SYNC_SUPPORTED
873CHECK_TOOLSDIR_MAKE
874CHECK_TOOLSDIR_GMAKE
875CHECK_MAKE
876CHECK_GMAKE
877MAKE
878PKGHANDLER
879CONFIGURESUPPORT_OUTPUTDIR
880OUTPUT_ROOT
881CONF_NAME
882SPEC
883SDKROOT
884XCODEBUILD
885BUILD_VARIANT_RELEASE
886DEBUG_CLASSFILES
887FASTDEBUG
888VARIANT
889DEBUG_LEVEL
890MACOSX_UNIVERSAL
891INCLUDE_SA
892JVM_VARIANT_CORE
893JVM_VARIANT_ZEROSHARK
894JVM_VARIANT_ZERO
895JVM_VARIANT_KERNEL
896JVM_VARIANT_MINIMAL1
897JVM_VARIANT_CLIENT
898JVM_VARIANT_SERVER
899JVM_VARIANTS
900JVM_INTERPRETER
901JDK_VARIANT
902SET_OPENJDK
903CANONICAL_TOPDIR
904ORIGINAL_TOPDIR
905TOPDIR
906PATH_SEP
907ZERO_ARCHDEF
908DEFINE_CROSS_COMPILE_ARCH
909LP64
910OPENJDK_TARGET_OS_EXPORT_DIR
911OPENJDK_TARGET_CPU_JLI_CFLAGS
912OPENJDK_TARGET_CPU_OSARCH
913OPENJDK_TARGET_CPU_ISADIR
914OPENJDK_TARGET_CPU_LIBDIR
915OPENJDK_TARGET_CPU_LEGACY_LIB
916OPENJDK_TARGET_CPU_LEGACY
917REQUIRED_OS_VERSION
918REQUIRED_OS_NAME
919COMPILE_TYPE
920OPENJDK_TARGET_CPU_ENDIAN
921OPENJDK_TARGET_CPU_BITS
922OPENJDK_TARGET_CPU_ARCH
923OPENJDK_TARGET_CPU
924OPENJDK_TARGET_OS_ENV
925OPENJDK_TARGET_OS_TYPE
926OPENJDK_TARGET_OS
927OPENJDK_BUILD_CPU_ENDIAN
928OPENJDK_BUILD_CPU_BITS
929OPENJDK_BUILD_CPU_ARCH
930OPENJDK_BUILD_CPU
931OPENJDK_BUILD_OS_ENV
932OPENJDK_BUILD_OS_TYPE
933OPENJDK_BUILD_OS
934OPENJDK_BUILD_AUTOCONF_NAME
935OPENJDK_TARGET_AUTOCONF_NAME
936target_os
937target_vendor
938target_cpu
939target
940host_os
941host_vendor
942host_cpu
943host
944build_os
945build_vendor
946build_cpu
947build
948NICE
949CPIO
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RMDIR
971RM
972PRINTF
973NAWK
974MV
975MKTEMP
976MKDIR
977LS
978LN
979HEAD
980FIND
981FILE
982EXPR
983ECHO
984DIRNAME
985DIFF
986DATE
987CUT
988CP
989COMM
990CMP
991CHMOD
992CAT
993BASH
994BASENAME
995DATE_WHEN_CONFIGURED
996ORIGINAL_PATH
997CONFIGURE_COMMAND_LINE
998target_alias
999host_alias
1000build_alias
1001LIBS
1002ECHO_T
1003ECHO_N
1004ECHO_C
1005DEFS
1006mandir
1007localedir
1008libdir
1009psdir
1010pdfdir
1011dvidir
1012htmldir
1013infodir
1014docdir
1015oldincludedir
1016includedir
1017localstatedir
1018sharedstatedir
1019sysconfdir
1020datadir
1021datarootdir
1022libexecdir
1023sbindir
1024bindir
1025program_transform_name
1026prefix
1027exec_prefix
1028PACKAGE_URL
1029PACKAGE_BUGREPORT
1030PACKAGE_STRING
1031PACKAGE_VERSION
1032PACKAGE_TARNAME
1033PACKAGE_NAME
1034PATH_SEPARATOR
1035SHELL'
1036ac_subst_files=''
1037ac_user_opts='
1038enable_option_checking
1039with_target_bits
1040enable_openjdk_only
1041with_custom_make_dir
1042with_jdk_variant
1043with_jvm_interpreter
1044with_jvm_variants
1045enable_debug
1046with_debug_level
1047with_devkit
1048with_sys_root
1049with_sysroot
1050with_tools_dir
1051with_toolchain_path
1052with_extra_path
1053with_sdk_name
1054with_conf_name
1055with_output_sync
1056enable_headful
1057enable_hotspot_test_in_build
1058with_cacerts_file
1059enable_unlimited_crypto
1060with_milestone
1061with_update_version
1062with_user_release_suffix
1063with_build_number
1064with_copyright_year
1065with_boot_jdk
1066with_add_source_root
1067with_override_source_root
1068with_adds_and_overrides
1069with_override_langtools
1070with_override_corba
1071with_override_jaxp
1072with_override_jaxws
1073with_override_hotspot
1074with_override_nashorn
1075with_override_jdk
1076with_import_hotspot
1077with_toolchain_type
1078with_extra_cflags
1079with_extra_cxxflags
1080with_extra_ldflags
1081with_toolchain_version
1082with_build_devkit
1083with_jtreg
1084enable_warnings_as_errors
1085enable_debug_symbols
1086enable_zip_debug_info
1087enable_native_coverage
1088with_stdc__lib
1089with_msvcr_dll
1090with_msvcp_dll
1091with_x
1092with_cups
1093with_cups_include
1094with_freetype
1095with_freetype_include
1096with_freetype_lib
1097with_freetype_src
1098enable_freetype_bundling
1099with_alsa
1100with_alsa_include
1101with_alsa_lib
1102with_libffi
1103with_libffi_include
1104with_libffi_lib
1105with_libjpeg
1106with_giflib
1107with_libpng
1108with_zlib
1109with_lcms
1110with_dxsdk
1111with_dxsdk_lib
1112with_dxsdk_include
1113with_num_cores
1114with_memory_size
1115with_jobs
1116with_boot_jdk_jvmargs
1117with_sjavac_server_java
1118enable_sjavac
1119enable_javac_server
1120enable_precompiled_headers
1121enable_ccache
1122with_ccache_dir
1123'
1124      ac_precious_vars='build_alias
1125host_alias
1126target_alias
1127BASENAME
1128BASH
1129CAT
1130CHMOD
1131CMP
1132COMM
1133CP
1134CUT
1135DATE
1136DIFF
1137DIRNAME
1138ECHO
1139EXPR
1140FILE
1141FIND
1142HEAD
1143LN
1144LS
1145MKDIR
1146MKTEMP
1147MV
1148NAWK
1149PRINTF
1150RM
1151RMDIR
1152SH
1153SORT
1154TAIL
1155TAR
1156TEE
1157TOUCH
1158TR
1159UNAME
1160UNIQ
1161WC
1162WHICH
1163XARGS
1164AWK
1165GREP
1166EGREP
1167FGREP
1168SED
1169CYGPATH
1170READLINK
1171DF
1172CPIO
1173NICE
1174MAKE
1175UNZIP
1176ZIP
1177LDD
1178OTOOL
1179READELF
1180HG
1181STAT
1182TIME
1183PATCH
1184DSYMUTIL
1185XATTR
1186CODESIGN
1187SETFILE
1188PKG_CONFIG
1189JAVA
1190JAVAC
1191JAVAH
1192JAR
1193JARSIGNER
1194CC
1195CFLAGS
1196LDFLAGS
1197LIBS
1198CPPFLAGS
1199CXX
1200CXXFLAGS
1201CCC
1202CPP
1203CXXCPP
1204AS
1205AR
1206LIPO
1207STRIP
1208NM
1209GNM
1210OBJCOPY
1211OBJDUMP
1212BUILD_CC
1213BUILD_CXX
1214JTREGEXE
1215XMKMF
1216FREETYPE_CFLAGS
1217FREETYPE_LIBS
1218ALSA_CFLAGS
1219ALSA_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222PNG_CFLAGS
1223PNG_LIBS
1224LCMS_CFLAGS
1225LCMS_LIBS
1226CCACHE'
1227
1228
1229# Initialize some variables set by options.
1230ac_init_help=
1231ac_init_version=false
1232ac_unrecognized_opts=
1233ac_unrecognized_sep=
1234# The variables have the same names as the options, with
1235# dashes changed to underlines.
1236cache_file=/dev/null
1237exec_prefix=NONE
1238no_create=
1239no_recursion=
1240prefix=NONE
1241program_prefix=NONE
1242program_suffix=NONE
1243program_transform_name=s,x,x,
1244silent=
1245site=
1246srcdir=
1247verbose=
1248x_includes=NONE
1249x_libraries=NONE
1250
1251# Installation directory options.
1252# These are left unexpanded so users can "make install exec_prefix=/foo"
1253# and all the variables that are supposed to be based on exec_prefix
1254# by default will actually change.
1255# Use braces instead of parens because sh, perl, etc. also accept them.
1256# (The list follows the same order as the GNU Coding Standards.)
1257bindir='${exec_prefix}/bin'
1258sbindir='${exec_prefix}/sbin'
1259libexecdir='${exec_prefix}/libexec'
1260datarootdir='${prefix}/share'
1261datadir='${datarootdir}'
1262sysconfdir='${prefix}/etc'
1263sharedstatedir='${prefix}/com'
1264localstatedir='${prefix}/var'
1265includedir='${prefix}/include'
1266oldincludedir='/usr/include'
1267docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1268infodir='${datarootdir}/info'
1269htmldir='${docdir}'
1270dvidir='${docdir}'
1271pdfdir='${docdir}'
1272psdir='${docdir}'
1273libdir='${exec_prefix}/lib'
1274localedir='${datarootdir}/locale'
1275mandir='${datarootdir}/man'
1276
1277ac_prev=
1278ac_dashdash=
1279for ac_option
1280do
1281  # If the previous option needs an argument, assign it.
1282  if test -n "$ac_prev"; then
1283    eval $ac_prev=\$ac_option
1284    ac_prev=
1285    continue
1286  fi
1287
1288  case $ac_option in
1289  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1290  *=)   ac_optarg= ;;
1291  *)    ac_optarg=yes ;;
1292  esac
1293
1294  # Accept the important Cygnus configure options, so we can diagnose typos.
1295
1296  case $ac_dashdash$ac_option in
1297  --)
1298    ac_dashdash=yes ;;
1299
1300  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1301    ac_prev=bindir ;;
1302  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1303    bindir=$ac_optarg ;;
1304
1305  -build | --build | --buil | --bui | --bu)
1306    ac_prev=build_alias ;;
1307  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1308    build_alias=$ac_optarg ;;
1309
1310  -cache-file | --cache-file | --cache-fil | --cache-fi \
1311  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1312    ac_prev=cache_file ;;
1313  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1314  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1315    cache_file=$ac_optarg ;;
1316
1317  --config-cache | -C)
1318    cache_file=config.cache ;;
1319
1320  -datadir | --datadir | --datadi | --datad)
1321    ac_prev=datadir ;;
1322  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1323    datadir=$ac_optarg ;;
1324
1325  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1326  | --dataroo | --dataro | --datar)
1327    ac_prev=datarootdir ;;
1328  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1329  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1330    datarootdir=$ac_optarg ;;
1331
1332  -disable-* | --disable-*)
1333    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1334    # Reject names that are not valid shell variable names.
1335    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1336      as_fn_error $? "invalid feature name: $ac_useropt"
1337    ac_useropt_orig=$ac_useropt
1338    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1339    case $ac_user_opts in
1340      *"
1341"enable_$ac_useropt"
1342"*) ;;
1343      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1344	 ac_unrecognized_sep=', ';;
1345    esac
1346    eval enable_$ac_useropt=no ;;
1347
1348  -docdir | --docdir | --docdi | --doc | --do)
1349    ac_prev=docdir ;;
1350  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1351    docdir=$ac_optarg ;;
1352
1353  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1354    ac_prev=dvidir ;;
1355  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1356    dvidir=$ac_optarg ;;
1357
1358  -enable-* | --enable-*)
1359    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1360    # Reject names that are not valid shell variable names.
1361    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1362      as_fn_error $? "invalid feature name: $ac_useropt"
1363    ac_useropt_orig=$ac_useropt
1364    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1365    case $ac_user_opts in
1366      *"
1367"enable_$ac_useropt"
1368"*) ;;
1369      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1370	 ac_unrecognized_sep=', ';;
1371    esac
1372    eval enable_$ac_useropt=\$ac_optarg ;;
1373
1374  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1375  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1376  | --exec | --exe | --ex)
1377    ac_prev=exec_prefix ;;
1378  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1379  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1380  | --exec=* | --exe=* | --ex=*)
1381    exec_prefix=$ac_optarg ;;
1382
1383  -gas | --gas | --ga | --g)
1384    # Obsolete; use --with-gas.
1385    with_gas=yes ;;
1386
1387  -help | --help | --hel | --he | -h)
1388    ac_init_help=long ;;
1389  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1390    ac_init_help=recursive ;;
1391  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1392    ac_init_help=short ;;
1393
1394  -host | --host | --hos | --ho)
1395    ac_prev=host_alias ;;
1396  -host=* | --host=* | --hos=* | --ho=*)
1397    host_alias=$ac_optarg ;;
1398
1399  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1400    ac_prev=htmldir ;;
1401  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1402  | --ht=*)
1403    htmldir=$ac_optarg ;;
1404
1405  -includedir | --includedir | --includedi | --included | --include \
1406  | --includ | --inclu | --incl | --inc)
1407    ac_prev=includedir ;;
1408  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1409  | --includ=* | --inclu=* | --incl=* | --inc=*)
1410    includedir=$ac_optarg ;;
1411
1412  -infodir | --infodir | --infodi | --infod | --info | --inf)
1413    ac_prev=infodir ;;
1414  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1415    infodir=$ac_optarg ;;
1416
1417  -libdir | --libdir | --libdi | --libd)
1418    ac_prev=libdir ;;
1419  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1420    libdir=$ac_optarg ;;
1421
1422  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1423  | --libexe | --libex | --libe)
1424    ac_prev=libexecdir ;;
1425  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1426  | --libexe=* | --libex=* | --libe=*)
1427    libexecdir=$ac_optarg ;;
1428
1429  -localedir | --localedir | --localedi | --localed | --locale)
1430    ac_prev=localedir ;;
1431  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1432    localedir=$ac_optarg ;;
1433
1434  -localstatedir | --localstatedir | --localstatedi | --localstated \
1435  | --localstate | --localstat | --localsta | --localst | --locals)
1436    ac_prev=localstatedir ;;
1437  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1438  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1439    localstatedir=$ac_optarg ;;
1440
1441  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1442    ac_prev=mandir ;;
1443  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1444    mandir=$ac_optarg ;;
1445
1446  -nfp | --nfp | --nf)
1447    # Obsolete; use --without-fp.
1448    with_fp=no ;;
1449
1450  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1451  | --no-cr | --no-c | -n)
1452    no_create=yes ;;
1453
1454  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1455  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1456    no_recursion=yes ;;
1457
1458  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1459  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1460  | --oldin | --oldi | --old | --ol | --o)
1461    ac_prev=oldincludedir ;;
1462  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1463  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1464  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1465    oldincludedir=$ac_optarg ;;
1466
1467  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1468    ac_prev=prefix ;;
1469  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1470    prefix=$ac_optarg ;;
1471
1472  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1473  | --program-pre | --program-pr | --program-p)
1474    ac_prev=program_prefix ;;
1475  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1476  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1477    program_prefix=$ac_optarg ;;
1478
1479  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1480  | --program-suf | --program-su | --program-s)
1481    ac_prev=program_suffix ;;
1482  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1483  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1484    program_suffix=$ac_optarg ;;
1485
1486  -program-transform-name | --program-transform-name \
1487  | --program-transform-nam | --program-transform-na \
1488  | --program-transform-n | --program-transform- \
1489  | --program-transform | --program-transfor \
1490  | --program-transfo | --program-transf \
1491  | --program-trans | --program-tran \
1492  | --progr-tra | --program-tr | --program-t)
1493    ac_prev=program_transform_name ;;
1494  -program-transform-name=* | --program-transform-name=* \
1495  | --program-transform-nam=* | --program-transform-na=* \
1496  | --program-transform-n=* | --program-transform-=* \
1497  | --program-transform=* | --program-transfor=* \
1498  | --program-transfo=* | --program-transf=* \
1499  | --program-trans=* | --program-tran=* \
1500  | --progr-tra=* | --program-tr=* | --program-t=*)
1501    program_transform_name=$ac_optarg ;;
1502
1503  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1504    ac_prev=pdfdir ;;
1505  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1506    pdfdir=$ac_optarg ;;
1507
1508  -psdir | --psdir | --psdi | --psd | --ps)
1509    ac_prev=psdir ;;
1510  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1511    psdir=$ac_optarg ;;
1512
1513  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514  | -silent | --silent | --silen | --sile | --sil)
1515    silent=yes ;;
1516
1517  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1518    ac_prev=sbindir ;;
1519  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1520  | --sbi=* | --sb=*)
1521    sbindir=$ac_optarg ;;
1522
1523  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1524  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1525  | --sharedst | --shareds | --shared | --share | --shar \
1526  | --sha | --sh)
1527    ac_prev=sharedstatedir ;;
1528  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1529  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1530  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1531  | --sha=* | --sh=*)
1532    sharedstatedir=$ac_optarg ;;
1533
1534  -site | --site | --sit)
1535    ac_prev=site ;;
1536  -site=* | --site=* | --sit=*)
1537    site=$ac_optarg ;;
1538
1539  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1540    ac_prev=srcdir ;;
1541  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1542    srcdir=$ac_optarg ;;
1543
1544  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1545  | --syscon | --sysco | --sysc | --sys | --sy)
1546    ac_prev=sysconfdir ;;
1547  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1548  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1549    sysconfdir=$ac_optarg ;;
1550
1551  -target | --target | --targe | --targ | --tar | --ta | --t)
1552    ac_prev=target_alias ;;
1553  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1554    target_alias=$ac_optarg ;;
1555
1556  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1557    verbose=yes ;;
1558
1559  -version | --version | --versio | --versi | --vers | -V)
1560    ac_init_version=: ;;
1561
1562  -with-* | --with-*)
1563    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1564    # Reject names that are not valid shell variable names.
1565    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1566      as_fn_error $? "invalid package name: $ac_useropt"
1567    ac_useropt_orig=$ac_useropt
1568    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1569    case $ac_user_opts in
1570      *"
1571"with_$ac_useropt"
1572"*) ;;
1573      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1574	 ac_unrecognized_sep=', ';;
1575    esac
1576    eval with_$ac_useropt=\$ac_optarg ;;
1577
1578  -without-* | --without-*)
1579    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1580    # Reject names that are not valid shell variable names.
1581    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1582      as_fn_error $? "invalid package name: $ac_useropt"
1583    ac_useropt_orig=$ac_useropt
1584    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1585    case $ac_user_opts in
1586      *"
1587"with_$ac_useropt"
1588"*) ;;
1589      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1590	 ac_unrecognized_sep=', ';;
1591    esac
1592    eval with_$ac_useropt=no ;;
1593
1594  --x)
1595    # Obsolete; use --with-x.
1596    with_x=yes ;;
1597
1598  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1599  | --x-incl | --x-inc | --x-in | --x-i)
1600    ac_prev=x_includes ;;
1601  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1602  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1603    x_includes=$ac_optarg ;;
1604
1605  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1606  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1607    ac_prev=x_libraries ;;
1608  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1609  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1610    x_libraries=$ac_optarg ;;
1611
1612  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1613Try \`$0 --help' for more information"
1614    ;;
1615
1616  *=*)
1617    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1618    # Reject names that are not valid shell variable names.
1619    case $ac_envvar in #(
1620      '' | [0-9]* | *[!_$as_cr_alnum]* )
1621      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1622    esac
1623    eval $ac_envvar=\$ac_optarg
1624    export $ac_envvar ;;
1625
1626  *)
1627    # FIXME: should be removed in autoconf 3.0.
1628    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1629    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1630      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1631    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1632    ;;
1633
1634  esac
1635done
1636
1637if test -n "$ac_prev"; then
1638  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1639  as_fn_error $? "missing argument to $ac_option"
1640fi
1641
1642if test -n "$ac_unrecognized_opts"; then
1643  case $enable_option_checking in
1644    no) ;;
1645    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1646    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1647  esac
1648fi
1649
1650# Check all directory arguments for consistency.
1651for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1652		datadir sysconfdir sharedstatedir localstatedir includedir \
1653		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1654		libdir localedir mandir
1655do
1656  eval ac_val=\$$ac_var
1657  # Remove trailing slashes.
1658  case $ac_val in
1659    */ )
1660      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1661      eval $ac_var=\$ac_val;;
1662  esac
1663  # Be sure to have absolute directory names.
1664  case $ac_val in
1665    [\\/$]* | ?:[\\/]* )  continue;;
1666    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1667  esac
1668  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1669done
1670
1671# There might be people who depend on the old broken behavior: `$host'
1672# used to hold the argument of --host etc.
1673# FIXME: To remove some day.
1674build=$build_alias
1675host=$host_alias
1676target=$target_alias
1677
1678# FIXME: To remove some day.
1679if test "x$host_alias" != x; then
1680  if test "x$build_alias" = x; then
1681    cross_compiling=maybe
1682  elif test "x$build_alias" != "x$host_alias"; then
1683    cross_compiling=yes
1684  fi
1685fi
1686
1687ac_tool_prefix=
1688test -n "$host_alias" && ac_tool_prefix=$host_alias-
1689
1690test "$silent" = yes && exec 6>/dev/null
1691
1692
1693ac_pwd=`pwd` && test -n "$ac_pwd" &&
1694ac_ls_di=`ls -di .` &&
1695ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1696  as_fn_error $? "working directory cannot be determined"
1697test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1698  as_fn_error $? "pwd does not report name of working directory"
1699
1700
1701# Find the source files, if location was not specified.
1702if test -z "$srcdir"; then
1703  ac_srcdir_defaulted=yes
1704  # Try the directory containing this script, then the parent directory.
1705  ac_confdir=`$as_dirname -- "$as_myself" ||
1706$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1707	 X"$as_myself" : 'X\(//\)[^/]' \| \
1708	 X"$as_myself" : 'X\(//\)$' \| \
1709	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1710$as_echo X"$as_myself" |
1711    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)[^/].*/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\/\)$/{
1720	    s//\1/
1721	    q
1722	  }
1723	  /^X\(\/\).*/{
1724	    s//\1/
1725	    q
1726	  }
1727	  s/.*/./; q'`
1728  srcdir=$ac_confdir
1729  if test ! -r "$srcdir/$ac_unique_file"; then
1730    srcdir=..
1731  fi
1732else
1733  ac_srcdir_defaulted=no
1734fi
1735if test ! -r "$srcdir/$ac_unique_file"; then
1736  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1737  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1738fi
1739ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1740ac_abs_confdir=`(
1741	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1742	pwd)`
1743# When building in place, set srcdir=.
1744if test "$ac_abs_confdir" = "$ac_pwd"; then
1745  srcdir=.
1746fi
1747# Remove unnecessary trailing slashes from srcdir.
1748# Double slashes in file names in object file debugging info
1749# mess up M-x gdb in Emacs.
1750case $srcdir in
1751*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1752esac
1753for ac_var in $ac_precious_vars; do
1754  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_env_${ac_var}_value=\$${ac_var}
1756  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1757  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1758done
1759
1760#
1761# Report the --help message.
1762#
1763if test "$ac_init_help" = "long"; then
1764  # Omit some internal or obsolete options to make the list less imposing.
1765  # This message is too long to be a string in the A/UX 3.1 sh.
1766  cat <<_ACEOF
1767\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1768
1769Usage: $0 [OPTION]... [VAR=VALUE]...
1770
1771To assign environment variables (e.g., CC, CFLAGS...), specify them as
1772VAR=VALUE.  See below for descriptions of some of the useful variables.
1773
1774Defaults for the options are specified in brackets.
1775
1776Configuration:
1777  -h, --help              display this help and exit
1778      --help=short        display options specific to this package
1779      --help=recursive    display the short help of all the included packages
1780  -V, --version           display version information and exit
1781  -q, --quiet, --silent   do not print \`checking ...' messages
1782      --cache-file=FILE   cache test results in FILE [disabled]
1783  -C, --config-cache      alias for \`--cache-file=config.cache'
1784  -n, --no-create         do not create output files
1785      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1786
1787Installation directories:
1788  --prefix=PREFIX         install architecture-independent files in PREFIX
1789                          [$ac_default_prefix]
1790  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1791                          [PREFIX]
1792
1793By default, \`make install' will install all the files in
1794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1796for instance \`--prefix=\$HOME'.
1797
1798For better control, use the options below.
1799
1800Fine tuning of the installation directories:
1801  --bindir=DIR            user executables [EPREFIX/bin]
1802  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1803  --libexecdir=DIR        program executables [EPREFIX/libexec]
1804  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1805  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1806  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1807  --libdir=DIR            object code libraries [EPREFIX/lib]
1808  --includedir=DIR        C header files [PREFIX/include]
1809  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1810  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1811  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1812  --infodir=DIR           info documentation [DATAROOTDIR/info]
1813  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1814  --mandir=DIR            man documentation [DATAROOTDIR/man]
1815  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1816  --htmldir=DIR           html documentation [DOCDIR]
1817  --dvidir=DIR            dvi documentation [DOCDIR]
1818  --pdfdir=DIR            pdf documentation [DOCDIR]
1819  --psdir=DIR             ps documentation [DOCDIR]
1820_ACEOF
1821
1822  cat <<\_ACEOF
1823
1824X features:
1825  --x-includes=DIR    X include files are in DIR
1826  --x-libraries=DIR   X library files are in DIR
1827
1828System types:
1829  --build=BUILD     configure for building on BUILD [guessed]
1830  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1831  --target=TARGET   configure for building compilers for TARGET [HOST]
1832_ACEOF
1833fi
1834
1835if test -n "$ac_init_help"; then
1836  case $ac_init_help in
1837     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1838   esac
1839  cat <<\_ACEOF
1840
1841Optional Features:
1842  --disable-option-checking  ignore unrecognized --enable/--with options
1843  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1844  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1845  --enable-openjdk-only   suppress building custom source even if present
1846                          [disabled]
1847  --enable-debug          set the debug level to fastdebug (shorthand for
1848                          --with-debug-level=fastdebug) [disabled]
1849  --disable-headful       disable building headful support (graphical UI
1850                          support) [enabled]
1851  --enable-hotspot-test-in-build
1852                          run the Queens test after Hotspot build [disabled]
1853  --enable-unlimited-crypto
1854                          Enable unlimited crypto policy [disabled]
1855  --disable-warnings-as-errors
1856                          do not consider native warnings to be an error
1857                          [enabled]
1858  --disable-debug-symbols disable generation of debug symbols [enabled]
1859  --disable-zip-debug-info
1860                          disable zipping of debug-info files [enabled]
1861  --enable-native-coverage
1862                          enable native compilation with code coverage
1863                          data[disabled]
1864  --disable-freetype-bundling
1865                          disable bundling of the freetype library with the
1866                          build result [enabled on Windows or when using
1867                          --with-freetype, disabled otherwise]
1868  --enable-sjavac         use sjavac to do fast incremental compiles
1869                          [disabled]
1870  --enable-javac-server   use only the server part of sjavac for faster javac
1871                          compiles [disabled]
1872  --disable-precompiled-headers
1873                          disable using precompiled headers when compiling C++
1874                          [enabled]
1875  --enable-ccache         enable using ccache to speed up recompilations
1876                          [disabled]
1877
1878Optional Packages:
1879  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1880  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1881  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1882                          support it), e.g. --with-target-bits=32 [guessed]
1883  --with-custom-make-dir  Deprecated. Option is kept for backwards
1884                          compatibility and is ignored
1885  --with-jdk-variant      JDK variant to build (normal) [normal]
1886  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1887  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1888                          client, minimal1, kernel, zero, zeroshark, core)
1889                          [server]
1890  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1891                          optimized (HotSpot build only)) [release]
1892  --with-devkit           use this devkit for compilers, tools and resources
1893  --with-sys-root         alias for --with-sysroot for backwards compatability
1894  --with-sysroot          use this directory as sysroot
1895  --with-tools-dir        alias for --with-toolchain-path for backwards
1896                          compatibility
1897  --with-toolchain-path   prepend these directories when searching for
1898                          toolchain binaries (compilers etc)
1899  --with-extra-path       prepend these directories to the default path
1900  --with-sdk-name         use the platform SDK of the given name. [macosx]
1901  --with-conf-name        use this as the name of the configuration [generated
1902                          from important configuration options]
1903  --with-output-sync      set make output sync type if supported by make.
1904                          [recurse]
1905  --with-cacerts-file     specify alternative cacerts file
1906  --with-milestone        Set milestone value for build [internal]
1907  --with-update-version   Set update version value for build [b00]
1908  --with-user-release-suffix
1909                          Add a custom string to the version string if build
1910                          number is not set.[username_builddateb00]
1911  --with-build-number     Set build number value for build [b00]
1912  --with-copyright-year   Set copyright year value for build [current year]
1913  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1914  --with-add-source-root  Deprecated. Option is kept for backwards
1915                          compatibility and is ignored
1916  --with-override-source-root
1917                          Deprecated. Option is kept for backwards
1918                          compatibility and is ignored
1919  --with-adds-and-overrides
1920                          Deprecated. Option is kept for backwards
1921                          compatibility and is ignored
1922  --with-override-langtools
1923                          Deprecated. Option is kept for backwards
1924                          compatibility and is ignored
1925  --with-override-corba   Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-override-jaxp    Deprecated. Option is kept for backwards
1928                          compatibility and is ignored
1929  --with-override-jaxws   Deprecated. Option is kept for backwards
1930                          compatibility and is ignored
1931  --with-override-hotspot Deprecated. Option is kept for backwards
1932                          compatibility and is ignored
1933  --with-override-nashorn Deprecated. Option is kept for backwards
1934                          compatibility and is ignored
1935  --with-override-jdk     Deprecated. Option is kept for backwards
1936                          compatibility and is ignored
1937  --with-import-hotspot   import hotspot binaries from this jdk image or
1938                          hotspot build dist dir instead of building from
1939                          source
1940  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1941                          to show possible values [platform dependent]
1942  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1943  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1944  --with-extra-ldflags    extra flags to be used when linking jdk
1945  --with-toolchain-version
1946                          the version of the toolchain to look for, use
1947                          '--help' to show possible values [platform
1948                          dependent]
1949  --with-build-devkit     Devkit to use for the build platform toolchain
1950  --with-jtreg            Regression Test Harness [probed]
1951  --with-stdc++lib=<static>,<dynamic>,<default>
1952                          force linking of the C++ runtime on Linux to either
1953                          static or dynamic, default is static with dynamic as
1954                          fallback
1955  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1956                          (Windows only) [probed]
1957  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1958                          (Windows only) [probed]
1959  --with-x                use the X Window System
1960  --with-cups             specify prefix directory for the cups package
1961                          (expecting the headers under PATH/include)
1962  --with-cups-include     specify directory for the cups include files
1963  --with-freetype         specify prefix directory for the freetype package
1964                          (expecting the libraries under PATH/lib and the
1965                          headers under PATH/include)
1966  --with-freetype-include specify directory for the freetype include files
1967  --with-freetype-lib     specify directory for the freetype library
1968  --with-freetype-src     specify directory with freetype sources to
1969                          automatically build the library (experimental,
1970                          Windows-only)
1971  --with-alsa             specify prefix directory for the alsa package
1972                          (expecting the libraries under PATH/lib and the
1973                          headers under PATH/include)
1974  --with-alsa-include     specify directory for the alsa include files
1975  --with-alsa-lib         specify directory for the alsa library
1976  --with-libffi           specify prefix directory for the libffi package
1977                          (expecting the libraries under PATH/lib and the
1978                          headers under PATH/include)
1979  --with-libffi-include   specify directory for the libffi include files
1980  --with-libffi-lib       specify directory for the libffi library
1981  --with-libjpeg          use libjpeg from build system or OpenJDK source
1982                          (system, bundled) [bundled]
1983  --with-giflib           use giflib from build system or OpenJDK source
1984                          (system, bundled) [bundled]
1985  --with-libpng           use libpng from build system or OpenJDK source
1986                          (system, bundled) [bundled]
1987  --with-zlib             use zlib from build system or OpenJDK source
1988                          (system, bundled) [bundled]
1989  --with-lcms             use lcms2 from build system or OpenJDK source
1990                          (system, bundled) [bundled]
1991  --with-dxsdk            Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-dxsdk-include    Deprecated. Option is kept for backwards
1996                          compatibility and is ignored
1997  --with-num-cores        number of cores in the build system, e.g.
1998                          --with-num-cores=8 [probed]
1999  --with-memory-size      memory (in MB) available in the build system, e.g.
2000                          --with-memory-size=1024 [probed]
2001  --with-jobs             number of parallel jobs to let make run [calculated
2002                          based on cores and memory]
2003  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2004                          invocations of boot JDK, overriding the default
2005                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2006                          -enableassertions"
2007  --with-sjavac-server-java
2008                          use this java binary for running the sjavac
2009                          background server [Boot JDK java]
2010  --with-ccache-dir       where to store ccache files [~/.ccache]
2011
2012Some influential environment variables:
2013  BASENAME    Override default value for BASENAME
2014  BASH        Override default value for BASH
2015  CAT         Override default value for CAT
2016  CHMOD       Override default value for CHMOD
2017  CMP         Override default value for CMP
2018  COMM        Override default value for COMM
2019  CP          Override default value for CP
2020  CUT         Override default value for CUT
2021  DATE        Override default value for DATE
2022  DIFF        Override default value for DIFF
2023  DIRNAME     Override default value for DIRNAME
2024  ECHO        Override default value for ECHO
2025  EXPR        Override default value for EXPR
2026  FILE        Override default value for FILE
2027  FIND        Override default value for FIND
2028  HEAD        Override default value for HEAD
2029  LN          Override default value for LN
2030  LS          Override default value for LS
2031  MKDIR       Override default value for MKDIR
2032  MKTEMP      Override default value for MKTEMP
2033  MV          Override default value for MV
2034  NAWK        Override default value for NAWK
2035  PRINTF      Override default value for PRINTF
2036  RM          Override default value for RM
2037  RMDIR       Override default value for RMDIR
2038  SH          Override default value for SH
2039  SORT        Override default value for SORT
2040  TAIL        Override default value for TAIL
2041  TAR         Override default value for TAR
2042  TEE         Override default value for TEE
2043  TOUCH       Override default value for TOUCH
2044  TR          Override default value for TR
2045  UNAME       Override default value for UNAME
2046  UNIQ        Override default value for UNIQ
2047  WC          Override default value for WC
2048  WHICH       Override default value for WHICH
2049  XARGS       Override default value for XARGS
2050  AWK         Override default value for AWK
2051  GREP        Override default value for GREP
2052  EGREP       Override default value for EGREP
2053  FGREP       Override default value for FGREP
2054  SED         Override default value for SED
2055  CYGPATH     Override default value for CYGPATH
2056  READLINK    Override default value for READLINK
2057  DF          Override default value for DF
2058  CPIO        Override default value for CPIO
2059  NICE        Override default value for NICE
2060  MAKE        Override default value for MAKE
2061  UNZIP       Override default value for UNZIP
2062  ZIP         Override default value for ZIP
2063  LDD         Override default value for LDD
2064  OTOOL       Override default value for OTOOL
2065  READELF     Override default value for READELF
2066  HG          Override default value for HG
2067  STAT        Override default value for STAT
2068  TIME        Override default value for TIME
2069  PATCH       Override default value for PATCH
2070  DSYMUTIL    Override default value for DSYMUTIL
2071  XATTR       Override default value for XATTR
2072  CODESIGN    Override default value for CODESIGN
2073  SETFILE     Override default value for SETFILE
2074  PKG_CONFIG  path to pkg-config utility
2075  JAVA        Override default value for JAVA
2076  JAVAC       Override default value for JAVAC
2077  JAVAH       Override default value for JAVAH
2078  JAR         Override default value for JAR
2079  JARSIGNER   Override default value for JARSIGNER
2080  CC          C compiler command
2081  CFLAGS      C compiler flags
2082  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2083              nonstandard directory <lib dir>
2084  LIBS        libraries to pass to the linker, e.g. -l<library>
2085  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2086              you have headers in a nonstandard directory <include dir>
2087  CXX         C++ compiler command
2088  CXXFLAGS    C++ compiler flags
2089  CPP         C preprocessor
2090  CXXCPP      C++ preprocessor
2091  AS          Override default value for AS
2092  AR          Override default value for AR
2093  LIPO        Override default value for LIPO
2094  STRIP       Override default value for STRIP
2095  NM          Override default value for NM
2096  GNM         Override default value for GNM
2097  OBJCOPY     Override default value for OBJCOPY
2098  OBJDUMP     Override default value for OBJDUMP
2099  BUILD_CC    Override default value for BUILD_CC
2100  BUILD_CXX   Override default value for BUILD_CXX
2101  JTREGEXE    Override default value for JTREGEXE
2102  XMKMF       Path to xmkmf, Makefile generator for X Window System
2103  FREETYPE_CFLAGS
2104              C compiler flags for FREETYPE, overriding pkg-config
2105  FREETYPE_LIBS
2106              linker flags for FREETYPE, overriding pkg-config
2107  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2108  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2109  LIBFFI_CFLAGS
2110              C compiler flags for LIBFFI, overriding pkg-config
2111  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2112  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2113  PNG_LIBS    linker flags for PNG, overriding pkg-config
2114  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2115  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2116  CCACHE      Override default value for CCACHE
2117
2118Use these variables to override the choices made by `configure' or to help
2119it to find libraries and programs with nonstandard names/locations.
2120
2121Report bugs to <build-dev@openjdk.java.net>.
2122OpenJDK home page: <http://openjdk.java.net>.
2123_ACEOF
2124ac_status=$?
2125fi
2126
2127if test "$ac_init_help" = "recursive"; then
2128  # If there are subdirs, report their specific --help.
2129  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2130    test -d "$ac_dir" ||
2131      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2132      continue
2133    ac_builddir=.
2134
2135case "$ac_dir" in
2136.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137*)
2138  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2139  # A ".." for each directory in $ac_dir_suffix.
2140  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2141  case $ac_top_builddir_sub in
2142  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2143  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2144  esac ;;
2145esac
2146ac_abs_top_builddir=$ac_pwd
2147ac_abs_builddir=$ac_pwd$ac_dir_suffix
2148# for backward compatibility:
2149ac_top_builddir=$ac_top_build_prefix
2150
2151case $srcdir in
2152  .)  # We are building in place.
2153    ac_srcdir=.
2154    ac_top_srcdir=$ac_top_builddir_sub
2155    ac_abs_top_srcdir=$ac_pwd ;;
2156  [\\/]* | ?:[\\/]* )  # Absolute name.
2157    ac_srcdir=$srcdir$ac_dir_suffix;
2158    ac_top_srcdir=$srcdir
2159    ac_abs_top_srcdir=$srcdir ;;
2160  *) # Relative name.
2161    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2162    ac_top_srcdir=$ac_top_build_prefix$srcdir
2163    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2164esac
2165ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2166
2167    cd "$ac_dir" || { ac_status=$?; continue; }
2168    # Check for guested configure.
2169    if test -f "$ac_srcdir/configure.gnu"; then
2170      echo &&
2171      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2172    elif test -f "$ac_srcdir/configure"; then
2173      echo &&
2174      $SHELL "$ac_srcdir/configure" --help=recursive
2175    else
2176      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2177    fi || ac_status=$?
2178    cd "$ac_pwd" || { ac_status=$?; break; }
2179  done
2180fi
2181
2182test -n "$ac_init_help" && exit $ac_status
2183if $ac_init_version; then
2184  cat <<\_ACEOF
2185OpenJDK configure jdk9
2186generated by GNU Autoconf 2.69
2187
2188Copyright (C) 2012 Free Software Foundation, Inc.
2189This configure script is free software; the Free Software Foundation
2190gives unlimited permission to copy, distribute and modify it.
2191_ACEOF
2192  exit
2193fi
2194
2195## ------------------------ ##
2196## Autoconf initialization. ##
2197## ------------------------ ##
2198
2199# ac_fn_c_try_compile LINENO
2200# --------------------------
2201# Try to compile conftest.$ac_ext, and return whether this succeeded.
2202ac_fn_c_try_compile ()
2203{
2204  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205  rm -f conftest.$ac_objext
2206  if { { ac_try="$ac_compile"
2207case "(($ac_try" in
2208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209  *) ac_try_echo=$ac_try;;
2210esac
2211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212$as_echo "$ac_try_echo"; } >&5
2213  (eval "$ac_compile") 2>conftest.err
2214  ac_status=$?
2215  if test -s conftest.err; then
2216    grep -v '^ *+' conftest.err >conftest.er1
2217    cat conftest.er1 >&5
2218    mv -f conftest.er1 conftest.err
2219  fi
2220  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2221  test $ac_status = 0; } && {
2222	 test -z "$ac_c_werror_flag" ||
2223	 test ! -s conftest.err
2224       } && test -s conftest.$ac_objext; then :
2225  ac_retval=0
2226else
2227  $as_echo "$as_me: failed program was:" >&5
2228sed 's/^/| /' conftest.$ac_ext >&5
2229
2230	ac_retval=1
2231fi
2232  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233  as_fn_set_status $ac_retval
2234
2235} # ac_fn_c_try_compile
2236
2237# ac_fn_cxx_try_compile LINENO
2238# ----------------------------
2239# Try to compile conftest.$ac_ext, and return whether this succeeded.
2240ac_fn_cxx_try_compile ()
2241{
2242  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243  rm -f conftest.$ac_objext
2244  if { { ac_try="$ac_compile"
2245case "(($ac_try" in
2246  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2247  *) ac_try_echo=$ac_try;;
2248esac
2249eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2250$as_echo "$ac_try_echo"; } >&5
2251  (eval "$ac_compile") 2>conftest.err
2252  ac_status=$?
2253  if test -s conftest.err; then
2254    grep -v '^ *+' conftest.err >conftest.er1
2255    cat conftest.er1 >&5
2256    mv -f conftest.er1 conftest.err
2257  fi
2258  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2259  test $ac_status = 0; } && {
2260	 test -z "$ac_cxx_werror_flag" ||
2261	 test ! -s conftest.err
2262       } && test -s conftest.$ac_objext; then :
2263  ac_retval=0
2264else
2265  $as_echo "$as_me: failed program was:" >&5
2266sed 's/^/| /' conftest.$ac_ext >&5
2267
2268	ac_retval=1
2269fi
2270  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2271  as_fn_set_status $ac_retval
2272
2273} # ac_fn_cxx_try_compile
2274
2275# ac_fn_c_try_cpp LINENO
2276# ----------------------
2277# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2278ac_fn_c_try_cpp ()
2279{
2280  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281  if { { ac_try="$ac_cpp conftest.$ac_ext"
2282case "(($ac_try" in
2283  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2284  *) ac_try_echo=$ac_try;;
2285esac
2286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2287$as_echo "$ac_try_echo"; } >&5
2288  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2289  ac_status=$?
2290  if test -s conftest.err; then
2291    grep -v '^ *+' conftest.err >conftest.er1
2292    cat conftest.er1 >&5
2293    mv -f conftest.er1 conftest.err
2294  fi
2295  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2296  test $ac_status = 0; } > conftest.i && {
2297	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2298	 test ! -s conftest.err
2299       }; then :
2300  ac_retval=0
2301else
2302  $as_echo "$as_me: failed program was:" >&5
2303sed 's/^/| /' conftest.$ac_ext >&5
2304
2305    ac_retval=1
2306fi
2307  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2308  as_fn_set_status $ac_retval
2309
2310} # ac_fn_c_try_cpp
2311
2312# ac_fn_cxx_try_cpp LINENO
2313# ------------------------
2314# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2315ac_fn_cxx_try_cpp ()
2316{
2317  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318  if { { ac_try="$ac_cpp conftest.$ac_ext"
2319case "(($ac_try" in
2320  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2321  *) ac_try_echo=$ac_try;;
2322esac
2323eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2324$as_echo "$ac_try_echo"; } >&5
2325  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2326  ac_status=$?
2327  if test -s conftest.err; then
2328    grep -v '^ *+' conftest.err >conftest.er1
2329    cat conftest.er1 >&5
2330    mv -f conftest.er1 conftest.err
2331  fi
2332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2333  test $ac_status = 0; } > conftest.i && {
2334	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2335	 test ! -s conftest.err
2336       }; then :
2337  ac_retval=0
2338else
2339  $as_echo "$as_me: failed program was:" >&5
2340sed 's/^/| /' conftest.$ac_ext >&5
2341
2342    ac_retval=1
2343fi
2344  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345  as_fn_set_status $ac_retval
2346
2347} # ac_fn_cxx_try_cpp
2348
2349# ac_fn_c_try_link LINENO
2350# -----------------------
2351# Try to link conftest.$ac_ext, and return whether this succeeded.
2352ac_fn_c_try_link ()
2353{
2354  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355  rm -f conftest.$ac_objext conftest$ac_exeext
2356  if { { ac_try="$ac_link"
2357case "(($ac_try" in
2358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2359  *) ac_try_echo=$ac_try;;
2360esac
2361eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2362$as_echo "$ac_try_echo"; } >&5
2363  (eval "$ac_link") 2>conftest.err
2364  ac_status=$?
2365  if test -s conftest.err; then
2366    grep -v '^ *+' conftest.err >conftest.er1
2367    cat conftest.er1 >&5
2368    mv -f conftest.er1 conftest.err
2369  fi
2370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2371  test $ac_status = 0; } && {
2372	 test -z "$ac_c_werror_flag" ||
2373	 test ! -s conftest.err
2374       } && test -s conftest$ac_exeext && {
2375	 test "$cross_compiling" = yes ||
2376	 test -x conftest$ac_exeext
2377       }; then :
2378  ac_retval=0
2379else
2380  $as_echo "$as_me: failed program was:" >&5
2381sed 's/^/| /' conftest.$ac_ext >&5
2382
2383	ac_retval=1
2384fi
2385  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2386  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2387  # interfere with the next link command; also delete a directory that is
2388  # left behind by Apple's compiler.  We do this before executing the actions.
2389  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2390  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2391  as_fn_set_status $ac_retval
2392
2393} # ac_fn_c_try_link
2394
2395# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2396# ---------------------------------------------------------
2397# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2398# the include files in INCLUDES and setting the cache variable VAR
2399# accordingly.
2400ac_fn_cxx_check_header_mongrel ()
2401{
2402  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403  if eval \${$3+:} false; then :
2404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2405$as_echo_n "checking for $2... " >&6; }
2406if eval \${$3+:} false; then :
2407  $as_echo_n "(cached) " >&6
2408fi
2409eval ac_res=\$$3
2410	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
2412else
2413  # Is the header compilable?
2414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2415$as_echo_n "checking $2 usability... " >&6; }
2416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417/* end confdefs.h.  */
2418$4
2419#include <$2>
2420_ACEOF
2421if ac_fn_cxx_try_compile "$LINENO"; then :
2422  ac_header_compiler=yes
2423else
2424  ac_header_compiler=no
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2428$as_echo "$ac_header_compiler" >&6; }
2429
2430# Is the header present?
2431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2432$as_echo_n "checking $2 presence... " >&6; }
2433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434/* end confdefs.h.  */
2435#include <$2>
2436_ACEOF
2437if ac_fn_cxx_try_cpp "$LINENO"; then :
2438  ac_header_preproc=yes
2439else
2440  ac_header_preproc=no
2441fi
2442rm -f conftest.err conftest.i conftest.$ac_ext
2443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2444$as_echo "$ac_header_preproc" >&6; }
2445
2446# So?  What about this header?
2447case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2448  yes:no: )
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2450$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2452$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2453    ;;
2454  no:yes:* )
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2456$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2458$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2460$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2462$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2464$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2465( $as_echo "## ----------------------------------------- ##
2466## Report this to build-dev@openjdk.java.net ##
2467## ----------------------------------------- ##"
2468     ) | sed "s/^/$as_me: WARNING:     /" >&2
2469    ;;
2470esac
2471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2472$as_echo_n "checking for $2... " >&6; }
2473if eval \${$3+:} false; then :
2474  $as_echo_n "(cached) " >&6
2475else
2476  eval "$3=\$ac_header_compiler"
2477fi
2478eval ac_res=\$$3
2479	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2480$as_echo "$ac_res" >&6; }
2481fi
2482  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483
2484} # ac_fn_cxx_check_header_mongrel
2485
2486# ac_fn_cxx_try_run LINENO
2487# ------------------------
2488# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2489# that executables *can* be run.
2490ac_fn_cxx_try_run ()
2491{
2492  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493  if { { ac_try="$ac_link"
2494case "(($ac_try" in
2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496  *) ac_try_echo=$ac_try;;
2497esac
2498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499$as_echo "$ac_try_echo"; } >&5
2500  (eval "$ac_link") 2>&5
2501  ac_status=$?
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2504  { { case "(($ac_try" in
2505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506  *) ac_try_echo=$ac_try;;
2507esac
2508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509$as_echo "$ac_try_echo"; } >&5
2510  (eval "$ac_try") 2>&5
2511  ac_status=$?
2512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2513  test $ac_status = 0; }; }; then :
2514  ac_retval=0
2515else
2516  $as_echo "$as_me: program exited with status $ac_status" >&5
2517       $as_echo "$as_me: failed program was:" >&5
2518sed 's/^/| /' conftest.$ac_ext >&5
2519
2520       ac_retval=$ac_status
2521fi
2522  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2523  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524  as_fn_set_status $ac_retval
2525
2526} # ac_fn_cxx_try_run
2527
2528# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2529# ---------------------------------------------------------
2530# Tests whether HEADER exists and can be compiled using the include files in
2531# INCLUDES, setting the cache variable VAR accordingly.
2532ac_fn_cxx_check_header_compile ()
2533{
2534  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2536$as_echo_n "checking for $2... " >&6; }
2537if eval \${$3+:} false; then :
2538  $as_echo_n "(cached) " >&6
2539else
2540  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541/* end confdefs.h.  */
2542$4
2543#include <$2>
2544_ACEOF
2545if ac_fn_cxx_try_compile "$LINENO"; then :
2546  eval "$3=yes"
2547else
2548  eval "$3=no"
2549fi
2550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2551fi
2552eval ac_res=\$$3
2553	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2554$as_echo "$ac_res" >&6; }
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_compile
2558
2559# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2560# ----------------------------------------------
2561# Tries to find the compile-time value of EXPR in a program that includes
2562# INCLUDES, setting VAR accordingly. Returns whether the value could be
2563# computed
2564ac_fn_cxx_compute_int ()
2565{
2566  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567  if test "$cross_compiling" = yes; then
2568    # Depending upon the size, compute the lo and hi bounds.
2569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572int
2573main ()
2574{
2575static int test_array [1 - 2 * !(($2) >= 0)];
2576test_array [0] = 0;
2577return test_array [0];
2578
2579  ;
2580  return 0;
2581}
2582_ACEOF
2583if ac_fn_cxx_try_compile "$LINENO"; then :
2584  ac_lo=0 ac_mid=0
2585  while :; do
2586    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587/* end confdefs.h.  */
2588$4
2589int
2590main ()
2591{
2592static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2593test_array [0] = 0;
2594return test_array [0];
2595
2596  ;
2597  return 0;
2598}
2599_ACEOF
2600if ac_fn_cxx_try_compile "$LINENO"; then :
2601  ac_hi=$ac_mid; break
2602else
2603  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2604			if test $ac_lo -le $ac_mid; then
2605			  ac_lo= ac_hi=
2606			  break
2607			fi
2608			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611  done
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616int
2617main ()
2618{
2619static int test_array [1 - 2 * !(($2) < 0)];
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=-1 ac_mid=-1
2629  while :; do
2630    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* end confdefs.h.  */
2632$4
2633int
2634main ()
2635{
2636static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2637test_array [0] = 0;
2638return test_array [0];
2639
2640  ;
2641  return 0;
2642}
2643_ACEOF
2644if ac_fn_cxx_try_compile "$LINENO"; then :
2645  ac_lo=$ac_mid; break
2646else
2647  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2648			if test $ac_mid -le $ac_hi; then
2649			  ac_lo= ac_hi=
2650			  break
2651			fi
2652			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2653fi
2654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2655  done
2656else
2657  ac_lo= ac_hi=
2658fi
2659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2660fi
2661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662# Binary search between lo and hi bounds.
2663while test "x$ac_lo" != "x$ac_hi"; do
2664  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2666/* end confdefs.h.  */
2667$4
2668int
2669main ()
2670{
2671static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2672test_array [0] = 0;
2673return test_array [0];
2674
2675  ;
2676  return 0;
2677}
2678_ACEOF
2679if ac_fn_cxx_try_compile "$LINENO"; then :
2680  ac_hi=$ac_mid
2681else
2682  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2683fi
2684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2685done
2686case $ac_lo in #((
2687?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2688'') ac_retval=1 ;;
2689esac
2690  else
2691    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h.  */
2693$4
2694static long int longval () { return $2; }
2695static unsigned long int ulongval () { return $2; }
2696#include <stdio.h>
2697#include <stdlib.h>
2698int
2699main ()
2700{
2701
2702  FILE *f = fopen ("conftest.val", "w");
2703  if (! f)
2704    return 1;
2705  if (($2) < 0)
2706    {
2707      long int i = longval ();
2708      if (i != ($2))
2709	return 1;
2710      fprintf (f, "%ld", i);
2711    }
2712  else
2713    {
2714      unsigned long int i = ulongval ();
2715      if (i != ($2))
2716	return 1;
2717      fprintf (f, "%lu", i);
2718    }
2719  /* Do not output a trailing newline, as this causes \r\n confusion
2720     on some platforms.  */
2721  return ferror (f) || fclose (f) != 0;
2722
2723  ;
2724  return 0;
2725}
2726_ACEOF
2727if ac_fn_cxx_try_run "$LINENO"; then :
2728  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2729else
2730  ac_retval=1
2731fi
2732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2733  conftest.$ac_objext conftest.beam conftest.$ac_ext
2734rm -f conftest.val
2735
2736  fi
2737  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738  as_fn_set_status $ac_retval
2739
2740} # ac_fn_cxx_compute_int
2741
2742# ac_fn_cxx_try_link LINENO
2743# -------------------------
2744# Try to link conftest.$ac_ext, and return whether this succeeded.
2745ac_fn_cxx_try_link ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  rm -f conftest.$ac_objext conftest$ac_exeext
2749  if { { ac_try="$ac_link"
2750case "(($ac_try" in
2751  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752  *) ac_try_echo=$ac_try;;
2753esac
2754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2755$as_echo "$ac_try_echo"; } >&5
2756  (eval "$ac_link") 2>conftest.err
2757  ac_status=$?
2758  if test -s conftest.err; then
2759    grep -v '^ *+' conftest.err >conftest.er1
2760    cat conftest.er1 >&5
2761    mv -f conftest.er1 conftest.err
2762  fi
2763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2764  test $ac_status = 0; } && {
2765	 test -z "$ac_cxx_werror_flag" ||
2766	 test ! -s conftest.err
2767       } && test -s conftest$ac_exeext && {
2768	 test "$cross_compiling" = yes ||
2769	 test -x conftest$ac_exeext
2770       }; then :
2771  ac_retval=0
2772else
2773  $as_echo "$as_me: failed program was:" >&5
2774sed 's/^/| /' conftest.$ac_ext >&5
2775
2776	ac_retval=1
2777fi
2778  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2779  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2780  # interfere with the next link command; also delete a directory that is
2781  # left behind by Apple's compiler.  We do this before executing the actions.
2782  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2783  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2784  as_fn_set_status $ac_retval
2785
2786} # ac_fn_cxx_try_link
2787
2788# ac_fn_cxx_check_func LINENO FUNC VAR
2789# ------------------------------------
2790# Tests whether FUNC exists, setting the cache variable VAR accordingly
2791ac_fn_cxx_check_func ()
2792{
2793  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2795$as_echo_n "checking for $2... " >&6; }
2796if eval \${$3+:} false; then :
2797  $as_echo_n "(cached) " >&6
2798else
2799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2802   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2803#define $2 innocuous_$2
2804
2805/* System header to define __stub macros and hopefully few prototypes,
2806    which can conflict with char $2 (); below.
2807    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2808    <limits.h> exists even on freestanding compilers.  */
2809
2810#ifdef __STDC__
2811# include <limits.h>
2812#else
2813# include <assert.h>
2814#endif
2815
2816#undef $2
2817
2818/* Override any GCC internal prototype to avoid an error.
2819   Use char because int might match the return type of a GCC
2820   builtin and then its argument prototype would still apply.  */
2821#ifdef __cplusplus
2822extern "C"
2823#endif
2824char $2 ();
2825/* The GNU C library defines this for functions which it implements
2826    to always fail with ENOSYS.  Some functions are actually named
2827    something starting with __ and the normal name is an alias.  */
2828#if defined __stub_$2 || defined __stub___$2
2829choke me
2830#endif
2831
2832int
2833main ()
2834{
2835return $2 ();
2836  ;
2837  return 0;
2838}
2839_ACEOF
2840if ac_fn_cxx_try_link "$LINENO"; then :
2841  eval "$3=yes"
2842else
2843  eval "$3=no"
2844fi
2845rm -f core conftest.err conftest.$ac_objext \
2846    conftest$ac_exeext conftest.$ac_ext
2847fi
2848eval ac_res=\$$3
2849	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2850$as_echo "$ac_res" >&6; }
2851  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2852
2853} # ac_fn_cxx_check_func
2854
2855# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2856# -------------------------------------------------------
2857# Tests whether HEADER exists and can be compiled using the include files in
2858# INCLUDES, setting the cache variable VAR accordingly.
2859ac_fn_c_check_header_compile ()
2860{
2861  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2863$as_echo_n "checking for $2... " >&6; }
2864if eval \${$3+:} false; then :
2865  $as_echo_n "(cached) " >&6
2866else
2867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868/* end confdefs.h.  */
2869$4
2870#include <$2>
2871_ACEOF
2872if ac_fn_c_try_compile "$LINENO"; then :
2873  eval "$3=yes"
2874else
2875  eval "$3=no"
2876fi
2877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2878fi
2879eval ac_res=\$$3
2880	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2881$as_echo "$ac_res" >&6; }
2882  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2883
2884} # ac_fn_c_check_header_compile
2885cat >config.log <<_ACEOF
2886This file contains any messages produced by compilers while
2887running configure, to aid debugging if configure makes a mistake.
2888
2889It was created by OpenJDK $as_me jdk9, which was
2890generated by GNU Autoconf 2.69.  Invocation command line was
2891
2892  $ $0 $@
2893
2894_ACEOF
2895exec 5>>config.log
2896{
2897cat <<_ASUNAME
2898## --------- ##
2899## Platform. ##
2900## --------- ##
2901
2902hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2903uname -m = `(uname -m) 2>/dev/null || echo unknown`
2904uname -r = `(uname -r) 2>/dev/null || echo unknown`
2905uname -s = `(uname -s) 2>/dev/null || echo unknown`
2906uname -v = `(uname -v) 2>/dev/null || echo unknown`
2907
2908/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2909/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2910
2911/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2912/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2913/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2914/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2915/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2916/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2917/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2918
2919_ASUNAME
2920
2921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2922for as_dir in $PATH
2923do
2924  IFS=$as_save_IFS
2925  test -z "$as_dir" && as_dir=.
2926    $as_echo "PATH: $as_dir"
2927  done
2928IFS=$as_save_IFS
2929
2930} >&5
2931
2932cat >&5 <<_ACEOF
2933
2934
2935## ----------- ##
2936## Core tests. ##
2937## ----------- ##
2938
2939_ACEOF
2940
2941
2942# Keep a trace of the command line.
2943# Strip out --no-create and --no-recursion so they do not pile up.
2944# Strip out --silent because we don't want to record it for future runs.
2945# Also quote any args containing shell meta-characters.
2946# Make two passes to allow for proper duplicate-argument suppression.
2947ac_configure_args=
2948ac_configure_args0=
2949ac_configure_args1=
2950ac_must_keep_next=false
2951for ac_pass in 1 2
2952do
2953  for ac_arg
2954  do
2955    case $ac_arg in
2956    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2957    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2958    | -silent | --silent | --silen | --sile | --sil)
2959      continue ;;
2960    *\'*)
2961      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2962    esac
2963    case $ac_pass in
2964    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2965    2)
2966      as_fn_append ac_configure_args1 " '$ac_arg'"
2967      if test $ac_must_keep_next = true; then
2968	ac_must_keep_next=false # Got value, back to normal.
2969      else
2970	case $ac_arg in
2971	  *=* | --config-cache | -C | -disable-* | --disable-* \
2972	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2973	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2974	  | -with-* | --with-* | -without-* | --without-* | --x)
2975	    case "$ac_configure_args0 " in
2976	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2977	    esac
2978	    ;;
2979	  -* ) ac_must_keep_next=true ;;
2980	esac
2981      fi
2982      as_fn_append ac_configure_args " '$ac_arg'"
2983      ;;
2984    esac
2985  done
2986done
2987{ ac_configure_args0=; unset ac_configure_args0;}
2988{ ac_configure_args1=; unset ac_configure_args1;}
2989
2990# When interrupted or exit'd, cleanup temporary files, and complete
2991# config.log.  We remove comments because anyway the quotes in there
2992# would cause problems or look ugly.
2993# WARNING: Use '\'' to represent an apostrophe within the trap.
2994# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2995trap 'exit_status=$?
2996  # Save into config.log some information that might help in debugging.
2997  {
2998    echo
2999
3000    $as_echo "## ---------------- ##
3001## Cache variables. ##
3002## ---------------- ##"
3003    echo
3004    # The following way of writing the cache mishandles newlines in values,
3005(
3006  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3007    eval ac_val=\$$ac_var
3008    case $ac_val in #(
3009    *${as_nl}*)
3010      case $ac_var in #(
3011      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3012$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3013      esac
3014      case $ac_var in #(
3015      _ | IFS | as_nl) ;; #(
3016      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3017      *) { eval $ac_var=; unset $ac_var;} ;;
3018      esac ;;
3019    esac
3020  done
3021  (set) 2>&1 |
3022    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3023    *${as_nl}ac_space=\ *)
3024      sed -n \
3025	"s/'\''/'\''\\\\'\'''\''/g;
3026	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3027      ;; #(
3028    *)
3029      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3030      ;;
3031    esac |
3032    sort
3033)
3034    echo
3035
3036    $as_echo "## ----------------- ##
3037## Output variables. ##
3038## ----------------- ##"
3039    echo
3040    for ac_var in $ac_subst_vars
3041    do
3042      eval ac_val=\$$ac_var
3043      case $ac_val in
3044      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3045      esac
3046      $as_echo "$ac_var='\''$ac_val'\''"
3047    done | sort
3048    echo
3049
3050    if test -n "$ac_subst_files"; then
3051      $as_echo "## ------------------- ##
3052## File substitutions. ##
3053## ------------------- ##"
3054      echo
3055      for ac_var in $ac_subst_files
3056      do
3057	eval ac_val=\$$ac_var
3058	case $ac_val in
3059	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060	esac
3061	$as_echo "$ac_var='\''$ac_val'\''"
3062      done | sort
3063      echo
3064    fi
3065
3066    if test -s confdefs.h; then
3067      $as_echo "## ----------- ##
3068## confdefs.h. ##
3069## ----------- ##"
3070      echo
3071      cat confdefs.h
3072      echo
3073    fi
3074    test "$ac_signal" != 0 &&
3075      $as_echo "$as_me: caught signal $ac_signal"
3076    $as_echo "$as_me: exit $exit_status"
3077  } >&5
3078  rm -f core *.core core.conftest.* &&
3079    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3080    exit $exit_status
3081' 0
3082for ac_signal in 1 2 13 15; do
3083  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3084done
3085ac_signal=0
3086
3087# confdefs.h avoids OS command line length limits that DEFS can exceed.
3088rm -f -r conftest* confdefs.h
3089
3090$as_echo "/* confdefs.h */" > confdefs.h
3091
3092# Predefined preprocessor variables.
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_NAME "$PACKAGE_NAME"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_VERSION "$PACKAGE_VERSION"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_STRING "$PACKAGE_STRING"
3108_ACEOF
3109
3110cat >>confdefs.h <<_ACEOF
3111#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3112_ACEOF
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_URL "$PACKAGE_URL"
3116_ACEOF
3117
3118
3119# Let the site file select an alternate cache file if it wants to.
3120# Prefer an explicitly selected file to automatically selected ones.
3121ac_site_file1=NONE
3122ac_site_file2=NONE
3123if test -n "$CONFIG_SITE"; then
3124  # We do not want a PATH search for config.site.
3125  case $CONFIG_SITE in #((
3126    -*)  ac_site_file1=./$CONFIG_SITE;;
3127    */*) ac_site_file1=$CONFIG_SITE;;
3128    *)   ac_site_file1=./$CONFIG_SITE;;
3129  esac
3130elif test "x$prefix" != xNONE; then
3131  ac_site_file1=$prefix/share/config.site
3132  ac_site_file2=$prefix/etc/config.site
3133else
3134  ac_site_file1=$ac_default_prefix/share/config.site
3135  ac_site_file2=$ac_default_prefix/etc/config.site
3136fi
3137for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3138do
3139  test "x$ac_site_file" = xNONE && continue
3140  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3141    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3142$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3143    sed 's/^/| /' "$ac_site_file" >&5
3144    . "$ac_site_file" \
3145      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3147as_fn_error $? "failed to load site script $ac_site_file
3148See \`config.log' for more details" "$LINENO" 5; }
3149  fi
3150done
3151
3152if test -r "$cache_file"; then
3153  # Some versions of bash will fail to source /dev/null (special files
3154  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3155  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3156    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3157$as_echo "$as_me: loading cache $cache_file" >&6;}
3158    case $cache_file in
3159      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3160      *)                      . "./$cache_file";;
3161    esac
3162  fi
3163else
3164  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3165$as_echo "$as_me: creating cache $cache_file" >&6;}
3166  >$cache_file
3167fi
3168
3169# Check that the precious variables saved in the cache have kept the same
3170# value.
3171ac_cache_corrupted=false
3172for ac_var in $ac_precious_vars; do
3173  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3174  eval ac_new_set=\$ac_env_${ac_var}_set
3175  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3176  eval ac_new_val=\$ac_env_${ac_var}_value
3177  case $ac_old_set,$ac_new_set in
3178    set,)
3179      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3180$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3181      ac_cache_corrupted=: ;;
3182    ,set)
3183      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3184$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3185      ac_cache_corrupted=: ;;
3186    ,);;
3187    *)
3188      if test "x$ac_old_val" != "x$ac_new_val"; then
3189	# differences in whitespace do not lead to failure.
3190	ac_old_val_w=`echo x $ac_old_val`
3191	ac_new_val_w=`echo x $ac_new_val`
3192	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3193	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3194$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3195	  ac_cache_corrupted=:
3196	else
3197	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3198$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3199	  eval $ac_var=\$ac_old_val
3200	fi
3201	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3202$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3203	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3204$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3205      fi;;
3206  esac
3207  # Pass precious variables to config.status.
3208  if test "$ac_new_set" = set; then
3209    case $ac_new_val in
3210    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3211    *) ac_arg=$ac_var=$ac_new_val ;;
3212    esac
3213    case " $ac_configure_args " in
3214      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3215      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3216    esac
3217  fi
3218done
3219if $ac_cache_corrupted; then
3220  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3222  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3223$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3224  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3225fi
3226## -------------------- ##
3227## Main body of script. ##
3228## -------------------- ##
3229
3230ac_ext=c
3231ac_cpp='$CPP $CPPFLAGS'
3232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234ac_compiler_gnu=$ac_cv_c_compiler_gnu
3235
3236
3237
3238ac_aux_dir=
3239for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3240  if test -f "$ac_dir/install-sh"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/install-sh -c"
3243    break
3244  elif test -f "$ac_dir/install.sh"; then
3245    ac_aux_dir=$ac_dir
3246    ac_install_sh="$ac_aux_dir/install.sh -c"
3247    break
3248  elif test -f "$ac_dir/shtool"; then
3249    ac_aux_dir=$ac_dir
3250    ac_install_sh="$ac_aux_dir/shtool install -c"
3251    break
3252  fi
3253done
3254if test -z "$ac_aux_dir"; then
3255  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
3256fi
3257
3258# These three variables are undocumented and unsupported,
3259# and are intended to be withdrawn in a future Autoconf release.
3260# They can cause serious problems if a builder's source tree is in a directory
3261# whose full name contains unusual characters.
3262ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3263ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3264ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3265
3266
3267# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3268
3269#
3270# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3271# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3272#
3273# This code is free software; you can redistribute it and/or modify it
3274# under the terms of the GNU General Public License version 2 only, as
3275# published by the Free Software Foundation.  Oracle designates this
3276# particular file as subject to the "Classpath" exception as provided
3277# by Oracle in the LICENSE file that accompanied this code.
3278#
3279# This code is distributed in the hope that it will be useful, but WITHOUT
3280# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3281# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3282# version 2 for more details (a copy is included in the LICENSE file that
3283# accompanied this code).
3284#
3285# You should have received a copy of the GNU General Public License version
3286# 2 along with this work; if not, write to the Free Software Foundation,
3287# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3288#
3289# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3290# or visit www.oracle.com if you need additional information or have any
3291# questions.
3292#
3293
3294#
3295# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3296#
3297# This program is free software; you can redistribute it and/or modify
3298# it under the terms of the GNU General Public License as published by
3299# the Free Software Foundation; either version 2 of the License, or
3300# (at your option) any later version.
3301#
3302# This program is distributed in the hope that it will be useful, but
3303# WITHOUT ANY WARRANTY; without even the implied warranty of
3304# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3305# General Public License for more details.
3306#
3307# You should have received a copy of the GNU General Public License
3308# along with this program; if not, write to the Free Software
3309# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3310#
3311# As a special exception to the GNU General Public License, if you
3312# distribute this file as part of a program that contains a
3313# configuration script generated by Autoconf, you may include it under
3314# the same distribution terms that you use for the rest of that program.
3315
3316# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3317# ----------------------------------
3318# PKG_PROG_PKG_CONFIG
3319
3320# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3321#
3322# Check to see whether a particular set of modules exists.  Similar
3323# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3324#
3325#
3326# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3327# this or PKG_CHECK_MODULES is called, or make sure to call
3328# PKG_CHECK_EXISTS manually
3329# --------------------------------------------------------------
3330
3331
3332
3333# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3334# ---------------------------------------------
3335# _PKG_CONFIG
3336
3337# _PKG_SHORT_ERRORS_SUPPORTED
3338# -----------------------------
3339# _PKG_SHORT_ERRORS_SUPPORTED
3340
3341
3342# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3343# [ACTION-IF-NOT-FOUND])
3344#
3345#
3346# Note that if there is a possibility the first call to
3347# PKG_CHECK_MODULES might not happen, you should be sure to include an
3348# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3349#
3350#
3351# --------------------------------------------------------------
3352# PKG_CHECK_MODULES
3353
3354
3355# Include these first...
3356#
3357# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3358# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3359#
3360# This code is free software; you can redistribute it and/or modify it
3361# under the terms of the GNU General Public License version 2 only, as
3362# published by the Free Software Foundation.  Oracle designates this
3363# particular file as subject to the "Classpath" exception as provided
3364# by Oracle in the LICENSE file that accompanied this code.
3365#
3366# This code is distributed in the hope that it will be useful, but WITHOUT
3367# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3368# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3369# version 2 for more details (a copy is included in the LICENSE file that
3370# accompanied this code).
3371#
3372# You should have received a copy of the GNU General Public License version
3373# 2 along with this work; if not, write to the Free Software Foundation,
3374# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3375#
3376# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3377# or visit www.oracle.com if you need additional information or have any
3378# questions.
3379#
3380
3381# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3382# If so, then append $1 to $2 \
3383# Also set JVM_ARG_OK to true/false depending on outcome.
3384
3385
3386# Appends a string to a path variable, only adding the : when needed.
3387
3388
3389# Prepends a string to a path variable, only adding the : when needed.
3390
3391
3392# This will make sure the given variable points to a full and proper
3393# path. This means:
3394# 1) There will be no spaces in the path. On unix platforms,
3395#    spaces in the path will result in an error. On Windows,
3396#    the path will be rewritten using short-style to be space-free.
3397# 2) The path will be absolute, and it will be in unix-style (on
3398#     cygwin).
3399# $1: The name of the variable to fix
3400
3401
3402# This will make sure the given variable points to a executable
3403# with a full and proper path. This means:
3404# 1) There will be no spaces in the path. On unix platforms,
3405#    spaces in the path will result in an error. On Windows,
3406#    the path will be rewritten using short-style to be space-free.
3407# 2) The path will be absolute, and it will be in unix-style (on
3408#     cygwin).
3409# Any arguments given to the executable is preserved.
3410# If the input variable does not have a directory specification, then
3411# it need to be in the PATH.
3412# $1: The name of the variable to fix
3413
3414
3415
3416
3417# Register a --with argument but mark it as deprecated
3418# $1: The name of the with argument to deprecate, not including --with-
3419
3420
3421# Register a --enable argument but mark it as deprecated
3422# $1: The name of the with argument to deprecate, not including --enable-
3423# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3424
3425
3426
3427
3428# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3429# $1: variable to check
3430
3431
3432# Check that there are no unprocessed overridden variables left.
3433# If so, they are an incorrect argument and we will exit with an error.
3434
3435
3436# Setup a tool for the given variable. If correctly specified by the user,
3437# use that value, otherwise search for the tool using the supplied code snippet.
3438# $1: variable to set
3439# $2: code snippet to call to look for the tool
3440# $3: code snippet to call if variable was used to find tool
3441
3442
3443# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3444# $1: variable to set
3445# $2: executable name (or list of names) to look for
3446
3447
3448# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3449# $1: variable to set
3450# $2: executable name (or list of names) to look for
3451
3452
3453# Like BASIC_PATH_PROGS but fails if no tool was found.
3454# $1: variable to set
3455# $2: executable name (or list of names) to look for
3456
3457
3458# Like BASIC_SETUP_TOOL but fails if no tool was found.
3459# $1: variable to set
3460# $2: autoconf macro to call to look for the special tool
3461
3462
3463# Setup the most fundamental tools that relies on not much else to set up,
3464# but is used by much of the early bootstrap code.
3465
3466
3467# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3468
3469
3470# Evaluates platform specific overrides for devkit variables.
3471# $1: Name of variable
3472
3473
3474
3475
3476
3477
3478#%%% Simple tools %%%
3479
3480# Check if we have found a usable version of make
3481# $1: the path to a potential make binary (or empty)
3482# $2: the description on how we found this
3483
3484
3485
3486
3487# Goes looking for a usable version of GNU make.
3488
3489
3490
3491
3492
3493
3494# Check if build directory is on local disk. If not possible to determine,
3495# we prefer to claim it's local.
3496# Argument 1: directory to test
3497# Argument 2: what to do if it is on local disk
3498# Argument 3: what to do otherwise (remote disk or failure)
3499
3500
3501# Check that source files have basic read permissions set. This might
3502# not be the case in cygwin in certain conditions.
3503
3504
3505
3506
3507# Check for support for specific options in bash
3508
3509
3510# Code to run after AC_OUTPUT
3511
3512
3513#
3514# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3515# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3516#
3517# This code is free software; you can redistribute it and/or modify it
3518# under the terms of the GNU General Public License version 2 only, as
3519# published by the Free Software Foundation.  Oracle designates this
3520# particular file as subject to the "Classpath" exception as provided
3521# by Oracle in the LICENSE file that accompanied this code.
3522#
3523# This code is distributed in the hope that it will be useful, but WITHOUT
3524# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3525# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3526# version 2 for more details (a copy is included in the LICENSE file that
3527# accompanied this code).
3528#
3529# You should have received a copy of the GNU General Public License version
3530# 2 along with this work; if not, write to the Free Software Foundation,
3531# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3532#
3533# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3534# or visit www.oracle.com if you need additional information or have any
3535# questions.
3536#
3537
3538
3539
3540
3541
3542# Helper function which possibly converts a path using DOS-style short mode.
3543# If so, the updated path is stored in $new_path.
3544# $1: The path to check
3545
3546
3547# Helper function which possibly converts a path using DOS-style short mode.
3548# If so, the updated path is stored in $new_path.
3549# $1: The path to check
3550
3551
3552# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3553# and could probably be heavily simplified. However, all changes in this
3554# area tend to need lot of testing in different scenarios, and in lack of
3555# proper unit testing, cleaning this up has not been deemed worth the effort
3556# at the moment.
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3567
3568
3569
3570
3571# ... then the rest
3572#
3573# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3574# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3575#
3576# This code is free software; you can redistribute it and/or modify it
3577# under the terms of the GNU General Public License version 2 only, as
3578# published by the Free Software Foundation.  Oracle designates this
3579# particular file as subject to the "Classpath" exception as provided
3580# by Oracle in the LICENSE file that accompanied this code.
3581#
3582# This code is distributed in the hope that it will be useful, but WITHOUT
3583# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3584# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3585# version 2 for more details (a copy is included in the LICENSE file that
3586# accompanied this code).
3587#
3588# You should have received a copy of the GNU General Public License version
3589# 2 along with this work; if not, write to the Free Software Foundation,
3590# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3591#
3592# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3593# or visit www.oracle.com if you need additional information or have any
3594# questions.
3595#
3596
3597########################################################################
3598# This file handles detection of the Boot JDK. The Boot JDK detection
3599# process has been developed as a response to solve a complex real-world
3600# problem. Initially, it was simple, but it has grown as platform after
3601# platform, idiosyncracy after idiosyncracy has been supported.
3602#
3603# The basic idea is this:
3604# 1) You need an acceptable *) JDK to use as a Boot JDK
3605# 2) There are several ways to locate a JDK, that are mostly platform
3606#    dependent **)
3607# 3) You can have multiple JDKs installed
3608# 4) If possible, configure should try to dig out an acceptable JDK
3609#    automatically, without having to resort to command-line options
3610#
3611# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3612#     javac) and not a JRE, etc.
3613#
3614# **) On Windows we typically use a well-known path.
3615#     On MacOSX we typically use the tool java_home.
3616#     On Linux we typically find javac in the $PATH, and then follow a
3617#     chain of symlinks that often ends up in a real JDK.
3618#
3619# This leads to the code where we check in different ways to locate a
3620# JDK, and if one is found, check if it is acceptable. If not, we print
3621# our reasons for rejecting it (useful when debugging non-working
3622# configure situations) and continue checking the next one.
3623########################################################################
3624
3625# Execute the check given as argument, and verify the result
3626# If the Boot JDK was previously found, do nothing
3627# $1 A command line (typically autoconf macro) to execute
3628
3629
3630# Test: Is bootjdk explicitely set by command line arguments?
3631
3632
3633# Test: Is $JAVA_HOME set?
3634
3635
3636# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3637
3638
3639# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3640# $1: Argument to the java_home binary (optional)
3641
3642
3643# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3644
3645
3646# Look for a jdk in the given path. If there are multiple, try to select the newest.
3647# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3648# $1 = Path to directory containing jdk installations.
3649# $2 = String to append to the found JDK directory to get the proper JDK home
3650
3651
3652# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3653# environmental variable as base for where to look.
3654# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3655
3656
3657# Test: Is there a JDK installed in default, well-known locations?
3658
3659
3660# Check that a command-line tool in the Boot JDK is correct
3661# $1 = name of variable to assign
3662# $2 = name of binary
3663
3664
3665###############################################################################
3666#
3667# We need a Boot JDK to bootstrap the build.
3668#
3669
3670
3671
3672
3673
3674#
3675# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3676# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3677#
3678# This code is free software; you can redistribute it and/or modify it
3679# under the terms of the GNU General Public License version 2 only, as
3680# published by the Free Software Foundation.  Oracle designates this
3681# particular file as subject to the "Classpath" exception as provided
3682# by Oracle in the LICENSE file that accompanied this code.
3683#
3684# This code is distributed in the hope that it will be useful, but WITHOUT
3685# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3686# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3687# version 2 for more details (a copy is included in the LICENSE file that
3688# accompanied this code).
3689#
3690# You should have received a copy of the GNU General Public License version
3691# 2 along with this work; if not, write to the Free Software Foundation,
3692# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3693#
3694# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3695# or visit www.oracle.com if you need additional information or have any
3696# questions.
3697#
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718#
3719# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3720# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3721#
3722# This code is free software; you can redistribute it and/or modify it
3723# under the terms of the GNU General Public License version 2 only, as
3724# published by the Free Software Foundation.  Oracle designates this
3725# particular file as subject to the "Classpath" exception as provided
3726# by Oracle in the LICENSE file that accompanied this code.
3727#
3728# This code is distributed in the hope that it will be useful, but WITHOUT
3729# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3730# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3731# version 2 for more details (a copy is included in the LICENSE file that
3732# accompanied this code).
3733#
3734# You should have received a copy of the GNU General Public License version
3735# 2 along with this work; if not, write to the Free Software Foundation,
3736# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3737#
3738# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3739# or visit www.oracle.com if you need additional information or have any
3740# questions.
3741#
3742
3743# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3744# corresponding configure arguments instead
3745
3746
3747# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3748# that configure can use them while detecting compilers.
3749# TOOLCHAIN_TYPE is available here.
3750# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3751
3752
3753
3754
3755
3756
3757# Documentation on common flags used for solstudio in HIGHEST.
3758#
3759# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3760#          done with care, there are some assumptions below that need to
3761#          be understood about the use of pointers, and IEEE behavior.
3762#
3763# -fns: Use non-standard floating point mode (not IEEE 754)
3764# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3765# -fsingle: Use single precision floating point with 'float'
3766# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3767#   (Source with excessing pointer casting and data access with mixed
3768#    pointer types are not recommended)
3769# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3770#   (If you expect perfect errno behavior, do not use this)
3771# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3772# -xrestrict: Pointer parameters to functions do not overlap
3773#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3774#    If you pass in multiple pointers to the same data, do not use this)
3775# -xlibmil: Inline some library routines
3776#   (If you expect perfect errno behavior, do not use this)
3777# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3778#   (If you expect perfect errno behavior, do not use this)
3779#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3780
3781    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3782    # Bug?
3783    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3784    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3785    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3786    #fi
3787
3788
3789
3790
3791
3792# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3793#                                   [RUN-IF-FALSE])
3794# ------------------------------------------------------------
3795# Check that the c and c++ compilers support an argument
3796
3797
3798# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3799#                                    [RUN-IF-FALSE])
3800# ------------------------------------------------------------
3801# Check that the linker support an argument
3802
3803
3804
3805
3806#
3807# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831
3832
3833
3834
3835cygwin_help() {
3836  case $1 in
3837    unzip)
3838      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3839      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3840      ;;
3841    zip)
3842      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3843      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3844      ;;
3845    make)
3846      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3847      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3848      ;;
3849    freetype)
3850      HELP_MSG="
3851The freetype library can now be build during the configure process.
3852Download the freetype sources and unpack them into an arbitrary directory:
3853
3854wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3855tar -xzf freetype-2.5.3.tar.gz
3856
3857Then run configure with '--with-freetype-src=<freetype_src>'. This will
3858automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3859builds or into '<freetype_src>/lib32' for 32-bit builds.
3860Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3861and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3862      ;;
3863  esac
3864}
3865
3866msys_help() {
3867  PKGHANDLER_COMMAND=""
3868}
3869
3870apt_help() {
3871  case $1 in
3872    reduced)
3873      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3874    devkit)
3875      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3876    openjdk)
3877      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3878    alsa)
3879      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3880    cups)
3881      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3882    freetype)
3883      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3884    ffi)
3885      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3886    x11)
3887      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3888    ccache)
3889      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3890  esac
3891}
3892
3893yum_help() {
3894  case $1 in
3895    devkit)
3896      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3897    openjdk)
3898      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3899    alsa)
3900      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3901    cups)
3902      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3903    freetype)
3904      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3905    x11)
3906      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3907    ccache)
3908      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3909  esac
3910}
3911
3912port_help() {
3913  PKGHANDLER_COMMAND=""
3914}
3915
3916pkgutil_help() {
3917  PKGHANDLER_COMMAND=""
3918}
3919
3920pkgadd_help() {
3921  PKGHANDLER_COMMAND=""
3922}
3923
3924# This function will check if we're called from the "configure" wrapper while
3925# printing --help. If so, we will print out additional information that can
3926# only be extracted within the autoconf script, and then exit. This must be
3927# called at the very beginning in configure.ac.
3928
3929
3930
3931
3932
3933
3934#
3935# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3936# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3937#
3938# This code is free software; you can redistribute it and/or modify it
3939# under the terms of the GNU General Public License version 2 only, as
3940# published by the Free Software Foundation.  Oracle designates this
3941# particular file as subject to the "Classpath" exception as provided
3942# by Oracle in the LICENSE file that accompanied this code.
3943#
3944# This code is distributed in the hope that it will be useful, but WITHOUT
3945# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3946# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3947# version 2 for more details (a copy is included in the LICENSE file that
3948# accompanied this code).
3949#
3950# You should have received a copy of the GNU General Public License version
3951# 2 along with this work; if not, write to the Free Software Foundation,
3952# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3953#
3954# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3955# or visit www.oracle.com if you need additional information or have any
3956# questions.
3957#
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968###############################################################################
3969#
3970# Should we build only OpenJDK even if closed sources are present?
3971#
3972
3973
3974
3975
3976###############################################################################
3977#
3978# Setup version numbers
3979#
3980
3981
3982
3983
3984
3985
3986################################################################################
3987#
3988# Gcov coverage data for hotspot
3989#
3990
3991
3992#
3993# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3994# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3995#
3996# This code is free software; you can redistribute it and/or modify it
3997# under the terms of the GNU General Public License version 2 only, as
3998# published by the Free Software Foundation.  Oracle designates this
3999# particular file as subject to the "Classpath" exception as provided
4000# by Oracle in the LICENSE file that accompanied this code.
4001#
4002# This code is distributed in the hope that it will be useful, but WITHOUT
4003# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4004# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4005# version 2 for more details (a copy is included in the LICENSE file that
4006# accompanied this code).
4007#
4008# You should have received a copy of the GNU General Public License version
4009# 2 along with this work; if not, write to the Free Software Foundation,
4010# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4011#
4012# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4013# or visit www.oracle.com if you need additional information or have any
4014# questions.
4015#
4016
4017# Major library component reside in separate files.
4018#
4019# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4020# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4021#
4022# This code is free software; you can redistribute it and/or modify it
4023# under the terms of the GNU General Public License version 2 only, as
4024# published by the Free Software Foundation.  Oracle designates this
4025# particular file as subject to the "Classpath" exception as provided
4026# by Oracle in the LICENSE file that accompanied this code.
4027#
4028# This code is distributed in the hope that it will be useful, but WITHOUT
4029# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4030# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4031# version 2 for more details (a copy is included in the LICENSE file that
4032# accompanied this code).
4033#
4034# You should have received a copy of the GNU General Public License version
4035# 2 along with this work; if not, write to the Free Software Foundation,
4036# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4037#
4038# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4039# or visit www.oracle.com if you need additional information or have any
4040# questions.
4041#
4042
4043################################################################################
4044# Setup alsa (Advanced Linux Sound Architecture)
4045################################################################################
4046
4047
4048#
4049# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4050# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4051#
4052# This code is free software; you can redistribute it and/or modify it
4053# under the terms of the GNU General Public License version 2 only, as
4054# published by the Free Software Foundation.  Oracle designates this
4055# particular file as subject to the "Classpath" exception as provided
4056# by Oracle in the LICENSE file that accompanied this code.
4057#
4058# This code is distributed in the hope that it will be useful, but WITHOUT
4059# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4060# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4061# version 2 for more details (a copy is included in the LICENSE file that
4062# accompanied this code).
4063#
4064# You should have received a copy of the GNU General Public License version
4065# 2 along with this work; if not, write to the Free Software Foundation,
4066# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4067#
4068# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4069# or visit www.oracle.com if you need additional information or have any
4070# questions.
4071#
4072
4073################################################################################
4074# Setup bundled libraries.
4075#
4076# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4077# OpenJDK repository. Default is to use these libraries as bundled, but they
4078# might be replaced by en external version by the user.
4079################################################################################
4080
4081
4082################################################################################
4083# Setup libjpeg
4084################################################################################
4085
4086
4087################################################################################
4088# Setup giflib
4089################################################################################
4090
4091
4092################################################################################
4093# Setup libpng
4094################################################################################
4095
4096
4097################################################################################
4098# Setup zlib
4099################################################################################
4100
4101
4102################################################################################
4103# Setup lcms (Little CMS)
4104################################################################################
4105
4106
4107#
4108# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4109# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4110#
4111# This code is free software; you can redistribute it and/or modify it
4112# under the terms of the GNU General Public License version 2 only, as
4113# published by the Free Software Foundation.  Oracle designates this
4114# particular file as subject to the "Classpath" exception as provided
4115# by Oracle in the LICENSE file that accompanied this code.
4116#
4117# This code is distributed in the hope that it will be useful, but WITHOUT
4118# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4119# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4120# version 2 for more details (a copy is included in the LICENSE file that
4121# accompanied this code).
4122#
4123# You should have received a copy of the GNU General Public License version
4124# 2 along with this work; if not, write to the Free Software Foundation,
4125# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4126#
4127# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4128# or visit www.oracle.com if you need additional information or have any
4129# questions.
4130#
4131
4132################################################################################
4133# Setup cups (Common Unix Printing System)
4134################################################################################
4135
4136
4137#
4138# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4139# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4140#
4141# This code is free software; you can redistribute it and/or modify it
4142# under the terms of the GNU General Public License version 2 only, as
4143# published by the Free Software Foundation.  Oracle designates this
4144# particular file as subject to the "Classpath" exception as provided
4145# by Oracle in the LICENSE file that accompanied this code.
4146#
4147# This code is distributed in the hope that it will be useful, but WITHOUT
4148# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4149# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4150# version 2 for more details (a copy is included in the LICENSE file that
4151# accompanied this code).
4152#
4153# You should have received a copy of the GNU General Public License version
4154# 2 along with this work; if not, write to the Free Software Foundation,
4155# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4156#
4157# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4158# or visit www.oracle.com if you need additional information or have any
4159# questions.
4160#
4161
4162################################################################################
4163# Setup libffi (Foreign Function Interface)
4164################################################################################
4165
4166
4167#
4168# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4169# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4170#
4171# This code is free software; you can redistribute it and/or modify it
4172# under the terms of the GNU General Public License version 2 only, as
4173# published by the Free Software Foundation.  Oracle designates this
4174# particular file as subject to the "Classpath" exception as provided
4175# by Oracle in the LICENSE file that accompanied this code.
4176#
4177# This code is distributed in the hope that it will be useful, but WITHOUT
4178# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4179# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4180# version 2 for more details (a copy is included in the LICENSE file that
4181# accompanied this code).
4182#
4183# You should have received a copy of the GNU General Public License version
4184# 2 along with this work; if not, write to the Free Software Foundation,
4185# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4186#
4187# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4188# or visit www.oracle.com if you need additional information or have any
4189# questions.
4190#
4191
4192################################################################################
4193# Build the freetype lib from source
4194################################################################################
4195
4196
4197################################################################################
4198# Check if a potential freeype library match is correct and usable
4199################################################################################
4200
4201
4202################################################################################
4203# Setup freetype (The FreeType2 font rendering library)
4204################################################################################
4205
4206
4207#
4208# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4209# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4210#
4211# This code is free software; you can redistribute it and/or modify it
4212# under the terms of the GNU General Public License version 2 only, as
4213# published by the Free Software Foundation.  Oracle designates this
4214# particular file as subject to the "Classpath" exception as provided
4215# by Oracle in the LICENSE file that accompanied this code.
4216#
4217# This code is distributed in the hope that it will be useful, but WITHOUT
4218# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4219# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4220# version 2 for more details (a copy is included in the LICENSE file that
4221# accompanied this code).
4222#
4223# You should have received a copy of the GNU General Public License version
4224# 2 along with this work; if not, write to the Free Software Foundation,
4225# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4226#
4227# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4228# or visit www.oracle.com if you need additional information or have any
4229# questions.
4230#
4231
4232################################################################################
4233# Setup the standard C/C++ runtime libraries.
4234#
4235# Most importantly, determine if stdc++ should be linked statically or
4236# dynamically.
4237################################################################################
4238
4239
4240#
4241# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4242# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4243#
4244# This code is free software; you can redistribute it and/or modify it
4245# under the terms of the GNU General Public License version 2 only, as
4246# published by the Free Software Foundation.  Oracle designates this
4247# particular file as subject to the "Classpath" exception as provided
4248# by Oracle in the LICENSE file that accompanied this code.
4249#
4250# This code is distributed in the hope that it will be useful, but WITHOUT
4251# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4252# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4253# version 2 for more details (a copy is included in the LICENSE file that
4254# accompanied this code).
4255#
4256# You should have received a copy of the GNU General Public License version
4257# 2 along with this work; if not, write to the Free Software Foundation,
4258# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4259#
4260# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4261# or visit www.oracle.com if you need additional information or have any
4262# questions.
4263#
4264
4265################################################################################
4266# Setup X11 Windows system
4267################################################################################
4268
4269
4270
4271################################################################################
4272# Determine which libraries are needed for this configuration
4273################################################################################
4274
4275
4276################################################################################
4277# Parse library options, and setup needed libraries
4278################################################################################
4279
4280
4281################################################################################
4282# Setup llvm (Low-Level VM)
4283################################################################################
4284
4285
4286################################################################################
4287# Setup various libraries, typically small system libraries
4288################################################################################
4289
4290
4291#
4292# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4294#
4295# This code is free software; you can redistribute it and/or modify it
4296# under the terms of the GNU General Public License version 2 only, as
4297# published by the Free Software Foundation.  Oracle designates this
4298# particular file as subject to the "Classpath" exception as provided
4299# by Oracle in the LICENSE file that accompanied this code.
4300#
4301# This code is distributed in the hope that it will be useful, but WITHOUT
4302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4304# version 2 for more details (a copy is included in the LICENSE file that
4305# accompanied this code).
4306#
4307# You should have received a copy of the GNU General Public License version
4308# 2 along with this work; if not, write to the Free Software Foundation,
4309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4310#
4311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4312# or visit www.oracle.com if you need additional information or have any
4313# questions.
4314#
4315
4316# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4317# Converts autoconf style CPU name to OpenJDK style, into
4318# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4319
4320
4321# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4322# Converts autoconf style OS name to OpenJDK style, into
4323# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4324
4325
4326# Expects $host_os $host_cpu $build_os and $build_cpu
4327# and $with_target_bits to have been setup!
4328#
4329# Translate the standard triplet(quadruplet) definition
4330# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4331# OPENJDK_BUILD_OS, etc.
4332
4333
4334# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4335# accordingly. Must be done after setting up build and target system, but before
4336# doing anything else with these values.
4337
4338
4339# Setup the legacy variables, for controlling the old makefiles.
4340#
4341
4342
4343
4344
4345#%%% Build and target systems %%%
4346
4347
4348
4349
4350# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4351# Add -mX to various FLAGS variables.
4352
4353
4354
4355
4356
4357
4358#
4359# Copyright (c) 2011, 2015, 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
4384
4385
4386
4387
4388
4389#
4390# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4391# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4392#
4393# This code is free software; you can redistribute it and/or modify it
4394# under the terms of the GNU General Public License version 2 only, as
4395# published by the Free Software Foundation.  Oracle designates this
4396# particular file as subject to the "Classpath" exception as provided
4397# by Oracle in the LICENSE file that accompanied this code.
4398#
4399# This code is distributed in the hope that it will be useful, but WITHOUT
4400# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4401# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4402# version 2 for more details (a copy is included in the LICENSE file that
4403# accompanied this code).
4404#
4405# You should have received a copy of the GNU General Public License version
4406# 2 along with this work; if not, write to the Free Software Foundation,
4407# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4408#
4409# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4410# or visit www.oracle.com if you need additional information or have any
4411# questions.
4412#
4413
4414########################################################################
4415# This file is responsible for detecting, verifying and setting up the
4416# toolchain, i.e. the compiler, linker and related utilities. It will setup
4417# proper paths to the binaries, but it will not setup any flags.
4418#
4419# The binaries used is determined by the toolchain type, which is the family of
4420# compilers and related tools that are used.
4421########################################################################
4422
4423
4424# All valid toolchains, regardless of platform (used by help.m4)
4425VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4426
4427# These toolchains are valid on different platforms
4428VALID_TOOLCHAINS_linux="gcc clang"
4429VALID_TOOLCHAINS_solaris="solstudio"
4430VALID_TOOLCHAINS_macosx="gcc clang"
4431VALID_TOOLCHAINS_aix="xlc"
4432VALID_TOOLCHAINS_windows="microsoft"
4433
4434# Toolchain descriptions
4435TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4436TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4437TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4438TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4439TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4440
4441# Setup a number of variables describing how native output files are
4442# named on this platform/toolchain.
4443
4444
4445# Determine which toolchain type to use, and make sure it is valid for this
4446# platform. Setup various information about the selected toolchain.
4447
4448
4449# Before we start detecting the toolchain executables, we might need some
4450# special setup, e.g. additional paths etc.
4451
4452
4453# Restore path, etc
4454
4455
4456# Check if a compiler is of the toolchain type we expect, and save the version
4457# information from it. If the compiler does not match the expected type,
4458# this function will abort using AC_MSG_ERROR. If it matches, the version will
4459# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4460# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4461#
4462# $1 = compiler to test (CC or CXX)
4463# $2 = human readable name of compiler (C or C++)
4464
4465
4466# Try to locate the given C or C++ compiler in the path, or otherwise.
4467#
4468# $1 = compiler to test (CC or CXX)
4469# $2 = human readable name of compiler (C or C++)
4470# $3 = list of compiler names to search for
4471
4472
4473# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4474# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4475# archiver (AR). Verify that the compilers are correct according to the
4476# toolchain type.
4477
4478
4479# Setup additional tools that is considered a part of the toolchain, but not the
4480# core part. Many of these are highly platform-specific and do not exist,
4481# and/or are not needed on all platforms.
4482
4483
4484# Setup the build tools (i.e, the compiler and linker used to build programs
4485# that should be run on the build platform, not the target platform, as a build
4486# helper). Since the non-cross-compile case uses the normal, target compilers
4487# for this, we can only do this after these have been setup.
4488
4489
4490# Setup legacy variables that are still needed as alternative ways to refer to
4491# parts of the toolchain.
4492
4493
4494# Do some additional checks on the detected tools.
4495
4496
4497# Setup the JTReg Regression Test Harness.
4498
4499
4500#
4501# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4502# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503#
4504# This code is free software; you can redistribute it and/or modify it
4505# under the terms of the GNU General Public License version 2 only, as
4506# published by the Free Software Foundation.  Oracle designates this
4507# particular file as subject to the "Classpath" exception as provided
4508# by Oracle in the LICENSE file that accompanied this code.
4509#
4510# This code is distributed in the hope that it will be useful, but WITHOUT
4511# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513# version 2 for more details (a copy is included in the LICENSE file that
4514# accompanied this code).
4515#
4516# You should have received a copy of the GNU General Public License version
4517# 2 along with this work; if not, write to the Free Software Foundation,
4518# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519#
4520# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521# or visit www.oracle.com if you need additional information or have any
4522# questions.
4523#
4524
4525################################################################################
4526# The order of these defines the priority by which we try to find them.
4527VALID_VS_VERSIONS="2013 2012 2010"
4528
4529VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4530VS_VERSION_INTERNAL_2010=100
4531VS_MSVCR_2010=msvcr100.dll
4532# We don't use msvcp on Visual Studio 2010
4533#VS_MSVCP_2010=msvcp100.dll
4534VS_ENVVAR_2010="VS100COMNTOOLS"
4535VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4536VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4537VS_VS_PLATFORM_NAME_2010="v100"
4538VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4539
4540VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4541VS_VERSION_INTERNAL_2012=110
4542VS_MSVCR_2012=msvcr110.dll
4543VS_MSVCP_2012=msvcp110.dll
4544VS_ENVVAR_2012="VS110COMNTOOLS"
4545VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4546VS_SDK_INSTALLDIR_2012=
4547VS_VS_PLATFORM_NAME_2012="v110"
4548VS_SDK_PLATFORM_NAME_2012=
4549
4550VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4551VS_VERSION_INTERNAL_2013=120
4552VS_MSVCR_2013=msvcr120.dll
4553VS_MSVCP_2013=msvcp120.dll
4554VS_ENVVAR_2013="VS120COMNTOOLS"
4555VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4556VS_SDK_INSTALLDIR_2013=
4557VS_VS_PLATFORM_NAME_2013="v120"
4558VS_SDK_PLATFORM_NAME_2013=
4559
4560################################################################################
4561
4562
4563
4564################################################################################
4565
4566
4567
4568################################################################################
4569# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4570# build environment and assigns it to VS_ENV_CMD
4571
4572
4573################################################################################
4574
4575
4576
4577################################################################################
4578# Check if the VS env variables were setup prior to running configure.
4579# If not, then find vcvarsall.bat and run it automatically, and integrate
4580# the set env variables into the spec file.
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595# This line needs to be here, verbatim, after all includes and the dummy hook
4596# definitions. It is replaced with custom functionality when building
4597# custom sources.
4598#CUSTOM_AUTOCONF_INCLUDE
4599
4600# Do not change or remove the following line, it is needed for consistency checks:
4601DATE_WHEN_GENERATED=1446741156
4602
4603###############################################################################
4604#
4605# Initialization / Boot-strapping
4606#
4607# The bootstrapping process needs to solve the "chicken or the egg" problem,
4608# thus it jumps back and forth, each time gaining something needed later on.
4609#
4610###############################################################################
4611
4612# If we are requested to print additional help, do that and then exit.
4613# This must be the very first call.
4614
4615  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4616    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4617    $PRINTF "Which are valid to use depends on the build platform.\n"
4618    for toolchain in $VALID_TOOLCHAINS_all; do
4619      # Use indirect variable referencing
4620      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4621      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4622      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4623    done
4624
4625    # And now exit directly
4626    exit 0
4627  fi
4628
4629
4630# Basic initialization that must happen first of all in the normal process.
4631
4632  # Save the original command line. This is passed to us by the wrapper configure script.
4633
4634  # Save the path variable before it gets changed
4635  ORIGINAL_PATH="$PATH"
4636
4637  DATE_WHEN_CONFIGURED=`LANG=C date`
4638
4639  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4640$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4641  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4642$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4643
4644
4645  # Start with tools that do not need have cross compilation support
4646  # and can be expected to be found in the default PATH. These tools are
4647  # used by configure.
4648
4649  # First are all the simple required tools.
4650
4651
4652
4653  # Publish this variable in the help.
4654
4655
4656  if [ -z "${BASENAME+x}" ]; then
4657    # The variable is not set by user, try to locate tool using the code snippet
4658    for ac_prog in basename
4659do
4660  # Extract the first word of "$ac_prog", so it can be a program name with args.
4661set dummy $ac_prog; ac_word=$2
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
4664if ${ac_cv_path_BASENAME+:} false; then :
4665  $as_echo_n "(cached) " >&6
4666else
4667  case $BASENAME in
4668  [\\/]* | ?:[\\/]*)
4669  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4670  ;;
4671  *)
4672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in $PATH
4674do
4675  IFS=$as_save_IFS
4676  test -z "$as_dir" && as_dir=.
4677    for ac_exec_ext in '' $ac_executable_extensions; do
4678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4679    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681    break 2
4682  fi
4683done
4684  done
4685IFS=$as_save_IFS
4686
4687  ;;
4688esac
4689fi
4690BASENAME=$ac_cv_path_BASENAME
4691if test -n "$BASENAME"; then
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4693$as_echo "$BASENAME" >&6; }
4694else
4695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699
4700  test -n "$BASENAME" && break
4701done
4702
4703  else
4704    # The variable is set, but is it from the command line or the environment?
4705
4706    # Try to remove the string !BASENAME! from our list.
4707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4709      # If it failed, the variable was not from the command line. Ignore it,
4710      # but warn the user (except for BASH, which is always set by the calling BASH).
4711      if test "xBASENAME" != xBASH; then
4712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4713$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4714      fi
4715      # Try to locate tool using the code snippet
4716      for ac_prog in basename
4717do
4718  # Extract the first word of "$ac_prog", so it can be a program name with args.
4719set dummy $ac_prog; ac_word=$2
4720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4721$as_echo_n "checking for $ac_word... " >&6; }
4722if ${ac_cv_path_BASENAME+:} false; then :
4723  $as_echo_n "(cached) " >&6
4724else
4725  case $BASENAME in
4726  [\\/]* | ?:[\\/]*)
4727  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4728  ;;
4729  *)
4730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4731for as_dir in $PATH
4732do
4733  IFS=$as_save_IFS
4734  test -z "$as_dir" && as_dir=.
4735    for ac_exec_ext in '' $ac_executable_extensions; do
4736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4737    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4739    break 2
4740  fi
4741done
4742  done
4743IFS=$as_save_IFS
4744
4745  ;;
4746esac
4747fi
4748BASENAME=$ac_cv_path_BASENAME
4749if test -n "$BASENAME"; then
4750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4751$as_echo "$BASENAME" >&6; }
4752else
4753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4754$as_echo "no" >&6; }
4755fi
4756
4757
4758  test -n "$BASENAME" && break
4759done
4760
4761    else
4762      # If it succeeded, then it was overridden by the user. We will use it
4763      # for the tool.
4764
4765      # First remove it from the list of overridden variables, so we can test
4766      # for unknown variables in the end.
4767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4768
4769      # Check if we try to supply an empty value
4770      if test "x$BASENAME" = x; then
4771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4772$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4774$as_echo_n "checking for BASENAME... " >&6; }
4775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4776$as_echo "disabled" >&6; }
4777      else
4778        # Check if the provided tool contains a complete path.
4779        tool_specified="$BASENAME"
4780        tool_basename="${tool_specified##*/}"
4781        if test "x$tool_basename" = "x$tool_specified"; then
4782          # A command without a complete path is provided, search $PATH.
4783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4784$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4785          # Extract the first word of "$tool_basename", so it can be a program name with args.
4786set dummy $tool_basename; ac_word=$2
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788$as_echo_n "checking for $ac_word... " >&6; }
4789if ${ac_cv_path_BASENAME+:} false; then :
4790  $as_echo_n "(cached) " >&6
4791else
4792  case $BASENAME in
4793  [\\/]* | ?:[\\/]*)
4794  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4795  ;;
4796  *)
4797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798for as_dir in $PATH
4799do
4800  IFS=$as_save_IFS
4801  test -z "$as_dir" && as_dir=.
4802    for ac_exec_ext in '' $ac_executable_extensions; do
4803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4804    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4806    break 2
4807  fi
4808done
4809  done
4810IFS=$as_save_IFS
4811
4812  ;;
4813esac
4814fi
4815BASENAME=$ac_cv_path_BASENAME
4816if test -n "$BASENAME"; then
4817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4818$as_echo "$BASENAME" >&6; }
4819else
4820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821$as_echo "no" >&6; }
4822fi
4823
4824
4825          if test "x$BASENAME" = x; then
4826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4827          fi
4828        else
4829          # Otherwise we believe it is a complete path. Use it as it is.
4830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4831$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4833$as_echo_n "checking for BASENAME... " >&6; }
4834          if test ! -x "$tool_specified"; then
4835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4836$as_echo "not found" >&6; }
4837            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4838          fi
4839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4840$as_echo "$tool_specified" >&6; }
4841        fi
4842      fi
4843    fi
4844
4845  fi
4846
4847
4848
4849  if test "x$BASENAME" = x; then
4850    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4851  fi
4852
4853
4854
4855
4856
4857  # Publish this variable in the help.
4858
4859
4860  if [ -z "${BASH+x}" ]; then
4861    # The variable is not set by user, try to locate tool using the code snippet
4862    for ac_prog in bash
4863do
4864  # Extract the first word of "$ac_prog", so it can be a program name with args.
4865set dummy $ac_prog; ac_word=$2
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4867$as_echo_n "checking for $ac_word... " >&6; }
4868if ${ac_cv_path_BASH+:} false; then :
4869  $as_echo_n "(cached) " >&6
4870else
4871  case $BASH in
4872  [\\/]* | ?:[\\/]*)
4873  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4874  ;;
4875  *)
4876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in $PATH
4878do
4879  IFS=$as_save_IFS
4880  test -z "$as_dir" && as_dir=.
4881    for ac_exec_ext in '' $ac_executable_extensions; do
4882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4883    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885    break 2
4886  fi
4887done
4888  done
4889IFS=$as_save_IFS
4890
4891  ;;
4892esac
4893fi
4894BASH=$ac_cv_path_BASH
4895if test -n "$BASH"; then
4896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4897$as_echo "$BASH" >&6; }
4898else
4899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
4903
4904  test -n "$BASH" && break
4905done
4906
4907  else
4908    # The variable is set, but is it from the command line or the environment?
4909
4910    # Try to remove the string !BASH! from our list.
4911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4913      # If it failed, the variable was not from the command line. Ignore it,
4914      # but warn the user (except for BASH, which is always set by the calling BASH).
4915      if test "xBASH" != xBASH; then
4916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4917$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4918      fi
4919      # Try to locate tool using the code snippet
4920      for ac_prog in bash
4921do
4922  # Extract the first word of "$ac_prog", so it can be a program name with args.
4923set dummy $ac_prog; ac_word=$2
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4925$as_echo_n "checking for $ac_word... " >&6; }
4926if ${ac_cv_path_BASH+:} false; then :
4927  $as_echo_n "(cached) " >&6
4928else
4929  case $BASH in
4930  [\\/]* | ?:[\\/]*)
4931  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4932  ;;
4933  *)
4934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935for as_dir in $PATH
4936do
4937  IFS=$as_save_IFS
4938  test -z "$as_dir" && as_dir=.
4939    for ac_exec_ext in '' $ac_executable_extensions; do
4940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4941    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4943    break 2
4944  fi
4945done
4946  done
4947IFS=$as_save_IFS
4948
4949  ;;
4950esac
4951fi
4952BASH=$ac_cv_path_BASH
4953if test -n "$BASH"; then
4954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4955$as_echo "$BASH" >&6; }
4956else
4957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958$as_echo "no" >&6; }
4959fi
4960
4961
4962  test -n "$BASH" && break
4963done
4964
4965    else
4966      # If it succeeded, then it was overridden by the user. We will use it
4967      # for the tool.
4968
4969      # First remove it from the list of overridden variables, so we can test
4970      # for unknown variables in the end.
4971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4972
4973      # Check if we try to supply an empty value
4974      if test "x$BASH" = x; then
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
4976$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
4977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4978$as_echo_n "checking for BASH... " >&6; }
4979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4980$as_echo "disabled" >&6; }
4981      else
4982        # Check if the provided tool contains a complete path.
4983        tool_specified="$BASH"
4984        tool_basename="${tool_specified##*/}"
4985        if test "x$tool_basename" = "x$tool_specified"; then
4986          # A command without a complete path is provided, search $PATH.
4987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4988$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4989          # Extract the first word of "$tool_basename", so it can be a program name with args.
4990set dummy $tool_basename; ac_word=$2
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if ${ac_cv_path_BASH+:} false; then :
4994  $as_echo_n "(cached) " >&6
4995else
4996  case $BASH in
4997  [\\/]* | ?:[\\/]*)
4998  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4999  ;;
5000  *)
5001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in $PATH
5003do
5004  IFS=$as_save_IFS
5005  test -z "$as_dir" && as_dir=.
5006    for ac_exec_ext in '' $ac_executable_extensions; do
5007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5008    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5010    break 2
5011  fi
5012done
5013  done
5014IFS=$as_save_IFS
5015
5016  ;;
5017esac
5018fi
5019BASH=$ac_cv_path_BASH
5020if test -n "$BASH"; then
5021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5022$as_echo "$BASH" >&6; }
5023else
5024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5025$as_echo "no" >&6; }
5026fi
5027
5028
5029          if test "x$BASH" = x; then
5030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5031          fi
5032        else
5033          # Otherwise we believe it is a complete path. Use it as it is.
5034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5035$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5037$as_echo_n "checking for BASH... " >&6; }
5038          if test ! -x "$tool_specified"; then
5039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5040$as_echo "not found" >&6; }
5041            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5042          fi
5043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5044$as_echo "$tool_specified" >&6; }
5045        fi
5046      fi
5047    fi
5048
5049  fi
5050
5051
5052
5053  if test "x$BASH" = x; then
5054    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5055  fi
5056
5057
5058
5059
5060
5061  # Publish this variable in the help.
5062
5063
5064  if [ -z "${CAT+x}" ]; then
5065    # The variable is not set by user, try to locate tool using the code snippet
5066    for ac_prog in cat
5067do
5068  # Extract the first word of "$ac_prog", so it can be a program name with args.
5069set dummy $ac_prog; ac_word=$2
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
5072if ${ac_cv_path_CAT+:} false; then :
5073  $as_echo_n "(cached) " >&6
5074else
5075  case $CAT in
5076  [\\/]* | ?:[\\/]*)
5077  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5078  ;;
5079  *)
5080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083  IFS=$as_save_IFS
5084  test -z "$as_dir" && as_dir=.
5085    for ac_exec_ext in '' $ac_executable_extensions; do
5086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5087    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089    break 2
5090  fi
5091done
5092  done
5093IFS=$as_save_IFS
5094
5095  ;;
5096esac
5097fi
5098CAT=$ac_cv_path_CAT
5099if test -n "$CAT"; then
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5101$as_echo "$CAT" >&6; }
5102else
5103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
5105fi
5106
5107
5108  test -n "$CAT" && break
5109done
5110
5111  else
5112    # The variable is set, but is it from the command line or the environment?
5113
5114    # Try to remove the string !CAT! from our list.
5115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5117      # If it failed, the variable was not from the command line. Ignore it,
5118      # but warn the user (except for BASH, which is always set by the calling BASH).
5119      if test "xCAT" != xBASH; then
5120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5121$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5122      fi
5123      # Try to locate tool using the code snippet
5124      for ac_prog in cat
5125do
5126  # Extract the first word of "$ac_prog", so it can be a program name with args.
5127set dummy $ac_prog; ac_word=$2
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5129$as_echo_n "checking for $ac_word... " >&6; }
5130if ${ac_cv_path_CAT+:} false; then :
5131  $as_echo_n "(cached) " >&6
5132else
5133  case $CAT in
5134  [\\/]* | ?:[\\/]*)
5135  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5136  ;;
5137  *)
5138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141  IFS=$as_save_IFS
5142  test -z "$as_dir" && as_dir=.
5143    for ac_exec_ext in '' $ac_executable_extensions; do
5144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5145    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5147    break 2
5148  fi
5149done
5150  done
5151IFS=$as_save_IFS
5152
5153  ;;
5154esac
5155fi
5156CAT=$ac_cv_path_CAT
5157if test -n "$CAT"; then
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5159$as_echo "$CAT" >&6; }
5160else
5161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5162$as_echo "no" >&6; }
5163fi
5164
5165
5166  test -n "$CAT" && break
5167done
5168
5169    else
5170      # If it succeeded, then it was overridden by the user. We will use it
5171      # for the tool.
5172
5173      # First remove it from the list of overridden variables, so we can test
5174      # for unknown variables in the end.
5175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5176
5177      # Check if we try to supply an empty value
5178      if test "x$CAT" = x; then
5179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5180$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5182$as_echo_n "checking for CAT... " >&6; }
5183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5184$as_echo "disabled" >&6; }
5185      else
5186        # Check if the provided tool contains a complete path.
5187        tool_specified="$CAT"
5188        tool_basename="${tool_specified##*/}"
5189        if test "x$tool_basename" = "x$tool_specified"; then
5190          # A command without a complete path is provided, search $PATH.
5191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5192$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5193          # Extract the first word of "$tool_basename", so it can be a program name with args.
5194set dummy $tool_basename; ac_word=$2
5195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5196$as_echo_n "checking for $ac_word... " >&6; }
5197if ${ac_cv_path_CAT+:} false; then :
5198  $as_echo_n "(cached) " >&6
5199else
5200  case $CAT in
5201  [\\/]* | ?:[\\/]*)
5202  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5203  ;;
5204  *)
5205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5206for as_dir in $PATH
5207do
5208  IFS=$as_save_IFS
5209  test -z "$as_dir" && as_dir=.
5210    for ac_exec_ext in '' $ac_executable_extensions; do
5211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5212    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5214    break 2
5215  fi
5216done
5217  done
5218IFS=$as_save_IFS
5219
5220  ;;
5221esac
5222fi
5223CAT=$ac_cv_path_CAT
5224if test -n "$CAT"; then
5225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5226$as_echo "$CAT" >&6; }
5227else
5228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5229$as_echo "no" >&6; }
5230fi
5231
5232
5233          if test "x$CAT" = x; then
5234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5235          fi
5236        else
5237          # Otherwise we believe it is a complete path. Use it as it is.
5238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5239$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5241$as_echo_n "checking for CAT... " >&6; }
5242          if test ! -x "$tool_specified"; then
5243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5244$as_echo "not found" >&6; }
5245            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5246          fi
5247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5248$as_echo "$tool_specified" >&6; }
5249        fi
5250      fi
5251    fi
5252
5253  fi
5254
5255
5256
5257  if test "x$CAT" = x; then
5258    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5259  fi
5260
5261
5262
5263
5264
5265  # Publish this variable in the help.
5266
5267
5268  if [ -z "${CHMOD+x}" ]; then
5269    # The variable is not set by user, try to locate tool using the code snippet
5270    for ac_prog in chmod
5271do
5272  # Extract the first word of "$ac_prog", so it can be a program name with args.
5273set dummy $ac_prog; ac_word=$2
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275$as_echo_n "checking for $ac_word... " >&6; }
5276if ${ac_cv_path_CHMOD+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  case $CHMOD in
5280  [\\/]* | ?:[\\/]*)
5281  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5282  ;;
5283  *)
5284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299  ;;
5300esac
5301fi
5302CHMOD=$ac_cv_path_CHMOD
5303if test -n "$CHMOD"; then
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5305$as_echo "$CHMOD" >&6; }
5306else
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
5309fi
5310
5311
5312  test -n "$CHMOD" && break
5313done
5314
5315  else
5316    # The variable is set, but is it from the command line or the environment?
5317
5318    # Try to remove the string !CHMOD! from our list.
5319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5321      # If it failed, the variable was not from the command line. Ignore it,
5322      # but warn the user (except for BASH, which is always set by the calling BASH).
5323      if test "xCHMOD" != xBASH; then
5324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5325$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5326      fi
5327      # Try to locate tool using the code snippet
5328      for ac_prog in chmod
5329do
5330  # Extract the first word of "$ac_prog", so it can be a program name with args.
5331set dummy $ac_prog; ac_word=$2
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333$as_echo_n "checking for $ac_word... " >&6; }
5334if ${ac_cv_path_CHMOD+:} false; then :
5335  $as_echo_n "(cached) " >&6
5336else
5337  case $CHMOD in
5338  [\\/]* | ?:[\\/]*)
5339  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5340  ;;
5341  *)
5342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343for as_dir in $PATH
5344do
5345  IFS=$as_save_IFS
5346  test -z "$as_dir" && as_dir=.
5347    for ac_exec_ext in '' $ac_executable_extensions; do
5348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351    break 2
5352  fi
5353done
5354  done
5355IFS=$as_save_IFS
5356
5357  ;;
5358esac
5359fi
5360CHMOD=$ac_cv_path_CHMOD
5361if test -n "$CHMOD"; then
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5363$as_echo "$CHMOD" >&6; }
5364else
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369
5370  test -n "$CHMOD" && break
5371done
5372
5373    else
5374      # If it succeeded, then it was overridden by the user. We will use it
5375      # for the tool.
5376
5377      # First remove it from the list of overridden variables, so we can test
5378      # for unknown variables in the end.
5379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5380
5381      # Check if we try to supply an empty value
5382      if test "x$CHMOD" = x; then
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5384$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5386$as_echo_n "checking for CHMOD... " >&6; }
5387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5388$as_echo "disabled" >&6; }
5389      else
5390        # Check if the provided tool contains a complete path.
5391        tool_specified="$CHMOD"
5392        tool_basename="${tool_specified##*/}"
5393        if test "x$tool_basename" = "x$tool_specified"; then
5394          # A command without a complete path is provided, search $PATH.
5395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5396$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5397          # Extract the first word of "$tool_basename", so it can be a program name with args.
5398set dummy $tool_basename; ac_word=$2
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400$as_echo_n "checking for $ac_word... " >&6; }
5401if ${ac_cv_path_CHMOD+:} false; then :
5402  $as_echo_n "(cached) " >&6
5403else
5404  case $CHMOD in
5405  [\\/]* | ?:[\\/]*)
5406  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5407  ;;
5408  *)
5409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410for as_dir in $PATH
5411do
5412  IFS=$as_save_IFS
5413  test -z "$as_dir" && as_dir=.
5414    for ac_exec_ext in '' $ac_executable_extensions; do
5415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5416    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418    break 2
5419  fi
5420done
5421  done
5422IFS=$as_save_IFS
5423
5424  ;;
5425esac
5426fi
5427CHMOD=$ac_cv_path_CHMOD
5428if test -n "$CHMOD"; then
5429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5430$as_echo "$CHMOD" >&6; }
5431else
5432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433$as_echo "no" >&6; }
5434fi
5435
5436
5437          if test "x$CHMOD" = x; then
5438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5439          fi
5440        else
5441          # Otherwise we believe it is a complete path. Use it as it is.
5442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5443$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5445$as_echo_n "checking for CHMOD... " >&6; }
5446          if test ! -x "$tool_specified"; then
5447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5448$as_echo "not found" >&6; }
5449            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5450          fi
5451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5452$as_echo "$tool_specified" >&6; }
5453        fi
5454      fi
5455    fi
5456
5457  fi
5458
5459
5460
5461  if test "x$CHMOD" = x; then
5462    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5463  fi
5464
5465
5466
5467
5468
5469  # Publish this variable in the help.
5470
5471
5472  if [ -z "${CMP+x}" ]; then
5473    # The variable is not set by user, try to locate tool using the code snippet
5474    for ac_prog in cmp
5475do
5476  # Extract the first word of "$ac_prog", so it can be a program name with args.
5477set dummy $ac_prog; ac_word=$2
5478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5479$as_echo_n "checking for $ac_word... " >&6; }
5480if ${ac_cv_path_CMP+:} false; then :
5481  $as_echo_n "(cached) " >&6
5482else
5483  case $CMP in
5484  [\\/]* | ?:[\\/]*)
5485  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5486  ;;
5487  *)
5488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5489for as_dir in $PATH
5490do
5491  IFS=$as_save_IFS
5492  test -z "$as_dir" && as_dir=.
5493    for ac_exec_ext in '' $ac_executable_extensions; do
5494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5495    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5497    break 2
5498  fi
5499done
5500  done
5501IFS=$as_save_IFS
5502
5503  ;;
5504esac
5505fi
5506CMP=$ac_cv_path_CMP
5507if test -n "$CMP"; then
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5509$as_echo "$CMP" >&6; }
5510else
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512$as_echo "no" >&6; }
5513fi
5514
5515
5516  test -n "$CMP" && break
5517done
5518
5519  else
5520    # The variable is set, but is it from the command line or the environment?
5521
5522    # Try to remove the string !CMP! from our list.
5523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5525      # If it failed, the variable was not from the command line. Ignore it,
5526      # but warn the user (except for BASH, which is always set by the calling BASH).
5527      if test "xCMP" != xBASH; then
5528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5529$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5530      fi
5531      # Try to locate tool using the code snippet
5532      for ac_prog in cmp
5533do
5534  # Extract the first word of "$ac_prog", so it can be a program name with args.
5535set dummy $ac_prog; ac_word=$2
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5537$as_echo_n "checking for $ac_word... " >&6; }
5538if ${ac_cv_path_CMP+:} false; then :
5539  $as_echo_n "(cached) " >&6
5540else
5541  case $CMP in
5542  [\\/]* | ?:[\\/]*)
5543  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5544  ;;
5545  *)
5546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5547for as_dir in $PATH
5548do
5549  IFS=$as_save_IFS
5550  test -z "$as_dir" && as_dir=.
5551    for ac_exec_ext in '' $ac_executable_extensions; do
5552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5553    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5555    break 2
5556  fi
5557done
5558  done
5559IFS=$as_save_IFS
5560
5561  ;;
5562esac
5563fi
5564CMP=$ac_cv_path_CMP
5565if test -n "$CMP"; then
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5567$as_echo "$CMP" >&6; }
5568else
5569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5570$as_echo "no" >&6; }
5571fi
5572
5573
5574  test -n "$CMP" && break
5575done
5576
5577    else
5578      # If it succeeded, then it was overridden by the user. We will use it
5579      # for the tool.
5580
5581      # First remove it from the list of overridden variables, so we can test
5582      # for unknown variables in the end.
5583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5584
5585      # Check if we try to supply an empty value
5586      if test "x$CMP" = x; then
5587        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5588$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5590$as_echo_n "checking for CMP... " >&6; }
5591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5592$as_echo "disabled" >&6; }
5593      else
5594        # Check if the provided tool contains a complete path.
5595        tool_specified="$CMP"
5596        tool_basename="${tool_specified##*/}"
5597        if test "x$tool_basename" = "x$tool_specified"; then
5598          # A command without a complete path is provided, search $PATH.
5599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5600$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5601          # Extract the first word of "$tool_basename", so it can be a program name with args.
5602set dummy $tool_basename; ac_word=$2
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5604$as_echo_n "checking for $ac_word... " >&6; }
5605if ${ac_cv_path_CMP+:} false; then :
5606  $as_echo_n "(cached) " >&6
5607else
5608  case $CMP in
5609  [\\/]* | ?:[\\/]*)
5610  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5611  ;;
5612  *)
5613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5614for as_dir in $PATH
5615do
5616  IFS=$as_save_IFS
5617  test -z "$as_dir" && as_dir=.
5618    for ac_exec_ext in '' $ac_executable_extensions; do
5619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5620    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5622    break 2
5623  fi
5624done
5625  done
5626IFS=$as_save_IFS
5627
5628  ;;
5629esac
5630fi
5631CMP=$ac_cv_path_CMP
5632if test -n "$CMP"; then
5633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5634$as_echo "$CMP" >&6; }
5635else
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5637$as_echo "no" >&6; }
5638fi
5639
5640
5641          if test "x$CMP" = x; then
5642            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5643          fi
5644        else
5645          # Otherwise we believe it is a complete path. Use it as it is.
5646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5647$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5649$as_echo_n "checking for CMP... " >&6; }
5650          if test ! -x "$tool_specified"; then
5651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5652$as_echo "not found" >&6; }
5653            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5654          fi
5655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5656$as_echo "$tool_specified" >&6; }
5657        fi
5658      fi
5659    fi
5660
5661  fi
5662
5663
5664
5665  if test "x$CMP" = x; then
5666    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5667  fi
5668
5669
5670
5671
5672
5673  # Publish this variable in the help.
5674
5675
5676  if [ -z "${COMM+x}" ]; then
5677    # The variable is not set by user, try to locate tool using the code snippet
5678    for ac_prog in comm
5679do
5680  # Extract the first word of "$ac_prog", so it can be a program name with args.
5681set dummy $ac_prog; ac_word=$2
5682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5683$as_echo_n "checking for $ac_word... " >&6; }
5684if ${ac_cv_path_COMM+:} false; then :
5685  $as_echo_n "(cached) " >&6
5686else
5687  case $COMM in
5688  [\\/]* | ?:[\\/]*)
5689  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5690  ;;
5691  *)
5692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5693for as_dir in $PATH
5694do
5695  IFS=$as_save_IFS
5696  test -z "$as_dir" && as_dir=.
5697    for ac_exec_ext in '' $ac_executable_extensions; do
5698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5699    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5701    break 2
5702  fi
5703done
5704  done
5705IFS=$as_save_IFS
5706
5707  ;;
5708esac
5709fi
5710COMM=$ac_cv_path_COMM
5711if test -n "$COMM"; then
5712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5713$as_echo "$COMM" >&6; }
5714else
5715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5716$as_echo "no" >&6; }
5717fi
5718
5719
5720  test -n "$COMM" && break
5721done
5722
5723  else
5724    # The variable is set, but is it from the command line or the environment?
5725
5726    # Try to remove the string !COMM! from our list.
5727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5729      # If it failed, the variable was not from the command line. Ignore it,
5730      # but warn the user (except for BASH, which is always set by the calling BASH).
5731      if test "xCOMM" != xBASH; then
5732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5733$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5734      fi
5735      # Try to locate tool using the code snippet
5736      for ac_prog in comm
5737do
5738  # Extract the first word of "$ac_prog", so it can be a program name with args.
5739set dummy $ac_prog; ac_word=$2
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
5742if ${ac_cv_path_COMM+:} false; then :
5743  $as_echo_n "(cached) " >&6
5744else
5745  case $COMM in
5746  [\\/]* | ?:[\\/]*)
5747  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5748  ;;
5749  *)
5750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751for as_dir in $PATH
5752do
5753  IFS=$as_save_IFS
5754  test -z "$as_dir" && as_dir=.
5755    for ac_exec_ext in '' $ac_executable_extensions; do
5756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5757    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5759    break 2
5760  fi
5761done
5762  done
5763IFS=$as_save_IFS
5764
5765  ;;
5766esac
5767fi
5768COMM=$ac_cv_path_COMM
5769if test -n "$COMM"; then
5770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5771$as_echo "$COMM" >&6; }
5772else
5773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774$as_echo "no" >&6; }
5775fi
5776
5777
5778  test -n "$COMM" && break
5779done
5780
5781    else
5782      # If it succeeded, then it was overridden by the user. We will use it
5783      # for the tool.
5784
5785      # First remove it from the list of overridden variables, so we can test
5786      # for unknown variables in the end.
5787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5788
5789      # Check if we try to supply an empty value
5790      if test "x$COMM" = x; then
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5792$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5794$as_echo_n "checking for COMM... " >&6; }
5795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5796$as_echo "disabled" >&6; }
5797      else
5798        # Check if the provided tool contains a complete path.
5799        tool_specified="$COMM"
5800        tool_basename="${tool_specified##*/}"
5801        if test "x$tool_basename" = "x$tool_specified"; then
5802          # A command without a complete path is provided, search $PATH.
5803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5804$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5805          # Extract the first word of "$tool_basename", so it can be a program name with args.
5806set dummy $tool_basename; ac_word=$2
5807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5808$as_echo_n "checking for $ac_word... " >&6; }
5809if ${ac_cv_path_COMM+:} false; then :
5810  $as_echo_n "(cached) " >&6
5811else
5812  case $COMM in
5813  [\\/]* | ?:[\\/]*)
5814  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5815  ;;
5816  *)
5817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5818for as_dir in $PATH
5819do
5820  IFS=$as_save_IFS
5821  test -z "$as_dir" && as_dir=.
5822    for ac_exec_ext in '' $ac_executable_extensions; do
5823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5824    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5826    break 2
5827  fi
5828done
5829  done
5830IFS=$as_save_IFS
5831
5832  ;;
5833esac
5834fi
5835COMM=$ac_cv_path_COMM
5836if test -n "$COMM"; then
5837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5838$as_echo "$COMM" >&6; }
5839else
5840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5841$as_echo "no" >&6; }
5842fi
5843
5844
5845          if test "x$COMM" = x; then
5846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5847          fi
5848        else
5849          # Otherwise we believe it is a complete path. Use it as it is.
5850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5851$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5853$as_echo_n "checking for COMM... " >&6; }
5854          if test ! -x "$tool_specified"; then
5855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5856$as_echo "not found" >&6; }
5857            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5858          fi
5859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5860$as_echo "$tool_specified" >&6; }
5861        fi
5862      fi
5863    fi
5864
5865  fi
5866
5867
5868
5869  if test "x$COMM" = x; then
5870    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5871  fi
5872
5873
5874
5875
5876
5877  # Publish this variable in the help.
5878
5879
5880  if [ -z "${CP+x}" ]; then
5881    # The variable is not set by user, try to locate tool using the code snippet
5882    for ac_prog in cp
5883do
5884  # Extract the first word of "$ac_prog", so it can be a program name with args.
5885set dummy $ac_prog; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if ${ac_cv_path_CP+:} false; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $CP in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5903    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914CP=$ac_cv_path_CP
5915if test -n "$CP"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5917$as_echo "$CP" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924  test -n "$CP" && break
5925done
5926
5927  else
5928    # The variable is set, but is it from the command line or the environment?
5929
5930    # Try to remove the string !CP! from our list.
5931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5933      # If it failed, the variable was not from the command line. Ignore it,
5934      # but warn the user (except for BASH, which is always set by the calling BASH).
5935      if test "xCP" != xBASH; then
5936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5937$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5938      fi
5939      # Try to locate tool using the code snippet
5940      for ac_prog in cp
5941do
5942  # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_path_CP+:} false; then :
5947  $as_echo_n "(cached) " >&6
5948else
5949  case $CP in
5950  [\\/]* | ?:[\\/]*)
5951  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5952  ;;
5953  *)
5954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH
5956do
5957  IFS=$as_save_IFS
5958  test -z "$as_dir" && as_dir=.
5959    for ac_exec_ext in '' $ac_executable_extensions; do
5960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5961    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5963    break 2
5964  fi
5965done
5966  done
5967IFS=$as_save_IFS
5968
5969  ;;
5970esac
5971fi
5972CP=$ac_cv_path_CP
5973if test -n "$CP"; then
5974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5975$as_echo "$CP" >&6; }
5976else
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
5979fi
5980
5981
5982  test -n "$CP" && break
5983done
5984
5985    else
5986      # If it succeeded, then it was overridden by the user. We will use it
5987      # for the tool.
5988
5989      # First remove it from the list of overridden variables, so we can test
5990      # for unknown variables in the end.
5991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5992
5993      # Check if we try to supply an empty value
5994      if test "x$CP" = x; then
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
5996$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
5997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5998$as_echo_n "checking for CP... " >&6; }
5999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6000$as_echo "disabled" >&6; }
6001      else
6002        # Check if the provided tool contains a complete path.
6003        tool_specified="$CP"
6004        tool_basename="${tool_specified##*/}"
6005        if test "x$tool_basename" = "x$tool_specified"; then
6006          # A command without a complete path is provided, search $PATH.
6007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6008$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6009          # Extract the first word of "$tool_basename", so it can be a program name with args.
6010set dummy $tool_basename; ac_word=$2
6011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6012$as_echo_n "checking for $ac_word... " >&6; }
6013if ${ac_cv_path_CP+:} false; then :
6014  $as_echo_n "(cached) " >&6
6015else
6016  case $CP in
6017  [\\/]* | ?:[\\/]*)
6018  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6019  ;;
6020  *)
6021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024  IFS=$as_save_IFS
6025  test -z "$as_dir" && as_dir=.
6026    for ac_exec_ext in '' $ac_executable_extensions; do
6027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6028    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6030    break 2
6031  fi
6032done
6033  done
6034IFS=$as_save_IFS
6035
6036  ;;
6037esac
6038fi
6039CP=$ac_cv_path_CP
6040if test -n "$CP"; then
6041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6042$as_echo "$CP" >&6; }
6043else
6044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6045$as_echo "no" >&6; }
6046fi
6047
6048
6049          if test "x$CP" = x; then
6050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6051          fi
6052        else
6053          # Otherwise we believe it is a complete path. Use it as it is.
6054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6055$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6057$as_echo_n "checking for CP... " >&6; }
6058          if test ! -x "$tool_specified"; then
6059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6060$as_echo "not found" >&6; }
6061            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6062          fi
6063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6064$as_echo "$tool_specified" >&6; }
6065        fi
6066      fi
6067    fi
6068
6069  fi
6070
6071
6072
6073  if test "x$CP" = x; then
6074    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6075  fi
6076
6077
6078
6079
6080
6081  # Publish this variable in the help.
6082
6083
6084  if [ -z "${CUT+x}" ]; then
6085    # The variable is not set by user, try to locate tool using the code snippet
6086    for ac_prog in cut
6087do
6088  # Extract the first word of "$ac_prog", so it can be a program name with args.
6089set dummy $ac_prog; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_path_CUT+:} false; then :
6093  $as_echo_n "(cached) " >&6
6094else
6095  case $CUT in
6096  [\\/]* | ?:[\\/]*)
6097  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6098  ;;
6099  *)
6100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103  IFS=$as_save_IFS
6104  test -z "$as_dir" && as_dir=.
6105    for ac_exec_ext in '' $ac_executable_extensions; do
6106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6107    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109    break 2
6110  fi
6111done
6112  done
6113IFS=$as_save_IFS
6114
6115  ;;
6116esac
6117fi
6118CUT=$ac_cv_path_CUT
6119if test -n "$CUT"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6121$as_echo "$CUT" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128  test -n "$CUT" && break
6129done
6130
6131  else
6132    # The variable is set, but is it from the command line or the environment?
6133
6134    # Try to remove the string !CUT! from our list.
6135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6137      # If it failed, the variable was not from the command line. Ignore it,
6138      # but warn the user (except for BASH, which is always set by the calling BASH).
6139      if test "xCUT" != xBASH; then
6140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6141$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6142      fi
6143      # Try to locate tool using the code snippet
6144      for ac_prog in cut
6145do
6146  # Extract the first word of "$ac_prog", so it can be a program name with args.
6147set dummy $ac_prog; ac_word=$2
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6149$as_echo_n "checking for $ac_word... " >&6; }
6150if ${ac_cv_path_CUT+:} false; then :
6151  $as_echo_n "(cached) " >&6
6152else
6153  case $CUT in
6154  [\\/]* | ?:[\\/]*)
6155  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6156  ;;
6157  *)
6158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161  IFS=$as_save_IFS
6162  test -z "$as_dir" && as_dir=.
6163    for ac_exec_ext in '' $ac_executable_extensions; do
6164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6165    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6167    break 2
6168  fi
6169done
6170  done
6171IFS=$as_save_IFS
6172
6173  ;;
6174esac
6175fi
6176CUT=$ac_cv_path_CUT
6177if test -n "$CUT"; then
6178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6179$as_echo "$CUT" >&6; }
6180else
6181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6182$as_echo "no" >&6; }
6183fi
6184
6185
6186  test -n "$CUT" && break
6187done
6188
6189    else
6190      # If it succeeded, then it was overridden by the user. We will use it
6191      # for the tool.
6192
6193      # First remove it from the list of overridden variables, so we can test
6194      # for unknown variables in the end.
6195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6196
6197      # Check if we try to supply an empty value
6198      if test "x$CUT" = x; then
6199        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6200$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6202$as_echo_n "checking for CUT... " >&6; }
6203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6204$as_echo "disabled" >&6; }
6205      else
6206        # Check if the provided tool contains a complete path.
6207        tool_specified="$CUT"
6208        tool_basename="${tool_specified##*/}"
6209        if test "x$tool_basename" = "x$tool_specified"; then
6210          # A command without a complete path is provided, search $PATH.
6211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6212$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6213          # Extract the first word of "$tool_basename", so it can be a program name with args.
6214set dummy $tool_basename; ac_word=$2
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6216$as_echo_n "checking for $ac_word... " >&6; }
6217if ${ac_cv_path_CUT+:} false; then :
6218  $as_echo_n "(cached) " >&6
6219else
6220  case $CUT in
6221  [\\/]* | ?:[\\/]*)
6222  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6223  ;;
6224  *)
6225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6226for as_dir in $PATH
6227do
6228  IFS=$as_save_IFS
6229  test -z "$as_dir" && as_dir=.
6230    for ac_exec_ext in '' $ac_executable_extensions; do
6231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6232    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6234    break 2
6235  fi
6236done
6237  done
6238IFS=$as_save_IFS
6239
6240  ;;
6241esac
6242fi
6243CUT=$ac_cv_path_CUT
6244if test -n "$CUT"; then
6245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6246$as_echo "$CUT" >&6; }
6247else
6248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249$as_echo "no" >&6; }
6250fi
6251
6252
6253          if test "x$CUT" = x; then
6254            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6255          fi
6256        else
6257          # Otherwise we believe it is a complete path. Use it as it is.
6258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6259$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6260          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6261$as_echo_n "checking for CUT... " >&6; }
6262          if test ! -x "$tool_specified"; then
6263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6264$as_echo "not found" >&6; }
6265            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6266          fi
6267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6268$as_echo "$tool_specified" >&6; }
6269        fi
6270      fi
6271    fi
6272
6273  fi
6274
6275
6276
6277  if test "x$CUT" = x; then
6278    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6279  fi
6280
6281
6282
6283
6284
6285  # Publish this variable in the help.
6286
6287
6288  if [ -z "${DATE+x}" ]; then
6289    # The variable is not set by user, try to locate tool using the code snippet
6290    for ac_prog in date
6291do
6292  # Extract the first word of "$ac_prog", so it can be a program name with args.
6293set dummy $ac_prog; ac_word=$2
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295$as_echo_n "checking for $ac_word... " >&6; }
6296if ${ac_cv_path_DATE+:} false; then :
6297  $as_echo_n "(cached) " >&6
6298else
6299  case $DATE in
6300  [\\/]* | ?:[\\/]*)
6301  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6302  ;;
6303  *)
6304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305for as_dir in $PATH
6306do
6307  IFS=$as_save_IFS
6308  test -z "$as_dir" && as_dir=.
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313    break 2
6314  fi
6315done
6316  done
6317IFS=$as_save_IFS
6318
6319  ;;
6320esac
6321fi
6322DATE=$ac_cv_path_DATE
6323if test -n "$DATE"; then
6324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6325$as_echo "$DATE" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330
6331
6332  test -n "$DATE" && break
6333done
6334
6335  else
6336    # The variable is set, but is it from the command line or the environment?
6337
6338    # Try to remove the string !DATE! from our list.
6339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6341      # If it failed, the variable was not from the command line. Ignore it,
6342      # but warn the user (except for BASH, which is always set by the calling BASH).
6343      if test "xDATE" != xBASH; then
6344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6345$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6346      fi
6347      # Try to locate tool using the code snippet
6348      for ac_prog in date
6349do
6350  # Extract the first word of "$ac_prog", so it can be a program name with args.
6351set dummy $ac_prog; ac_word=$2
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353$as_echo_n "checking for $ac_word... " >&6; }
6354if ${ac_cv_path_DATE+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  case $DATE in
6358  [\\/]* | ?:[\\/]*)
6359  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6360  ;;
6361  *)
6362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365  IFS=$as_save_IFS
6366  test -z "$as_dir" && as_dir=.
6367    for ac_exec_ext in '' $ac_executable_extensions; do
6368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371    break 2
6372  fi
6373done
6374  done
6375IFS=$as_save_IFS
6376
6377  ;;
6378esac
6379fi
6380DATE=$ac_cv_path_DATE
6381if test -n "$DATE"; then
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6383$as_echo "$DATE" >&6; }
6384else
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
6389
6390  test -n "$DATE" && break
6391done
6392
6393    else
6394      # If it succeeded, then it was overridden by the user. We will use it
6395      # for the tool.
6396
6397      # First remove it from the list of overridden variables, so we can test
6398      # for unknown variables in the end.
6399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6400
6401      # Check if we try to supply an empty value
6402      if test "x$DATE" = x; then
6403        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6404$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6406$as_echo_n "checking for DATE... " >&6; }
6407        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6408$as_echo "disabled" >&6; }
6409      else
6410        # Check if the provided tool contains a complete path.
6411        tool_specified="$DATE"
6412        tool_basename="${tool_specified##*/}"
6413        if test "x$tool_basename" = "x$tool_specified"; then
6414          # A command without a complete path is provided, search $PATH.
6415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6416$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6417          # Extract the first word of "$tool_basename", so it can be a program name with args.
6418set dummy $tool_basename; ac_word=$2
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420$as_echo_n "checking for $ac_word... " >&6; }
6421if ${ac_cv_path_DATE+:} false; then :
6422  $as_echo_n "(cached) " >&6
6423else
6424  case $DATE in
6425  [\\/]* | ?:[\\/]*)
6426  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6427  ;;
6428  *)
6429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432  IFS=$as_save_IFS
6433  test -z "$as_dir" && as_dir=.
6434    for ac_exec_ext in '' $ac_executable_extensions; do
6435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6436    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438    break 2
6439  fi
6440done
6441  done
6442IFS=$as_save_IFS
6443
6444  ;;
6445esac
6446fi
6447DATE=$ac_cv_path_DATE
6448if test -n "$DATE"; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6450$as_echo "$DATE" >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453$as_echo "no" >&6; }
6454fi
6455
6456
6457          if test "x$DATE" = x; then
6458            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6459          fi
6460        else
6461          # Otherwise we believe it is a complete path. Use it as it is.
6462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6463$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6464          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6465$as_echo_n "checking for DATE... " >&6; }
6466          if test ! -x "$tool_specified"; then
6467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6468$as_echo "not found" >&6; }
6469            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6470          fi
6471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6472$as_echo "$tool_specified" >&6; }
6473        fi
6474      fi
6475    fi
6476
6477  fi
6478
6479
6480
6481  if test "x$DATE" = x; then
6482    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6483  fi
6484
6485
6486
6487
6488
6489  # Publish this variable in the help.
6490
6491
6492  if [ -z "${DIFF+x}" ]; then
6493    # The variable is not set by user, try to locate tool using the code snippet
6494    for ac_prog in gdiff diff
6495do
6496  # Extract the first word of "$ac_prog", so it can be a program name with args.
6497set dummy $ac_prog; ac_word=$2
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6499$as_echo_n "checking for $ac_word... " >&6; }
6500if ${ac_cv_path_DIFF+:} false; then :
6501  $as_echo_n "(cached) " >&6
6502else
6503  case $DIFF in
6504  [\\/]* | ?:[\\/]*)
6505  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6506  ;;
6507  *)
6508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6509for as_dir in $PATH
6510do
6511  IFS=$as_save_IFS
6512  test -z "$as_dir" && as_dir=.
6513    for ac_exec_ext in '' $ac_executable_extensions; do
6514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6515    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6517    break 2
6518  fi
6519done
6520  done
6521IFS=$as_save_IFS
6522
6523  ;;
6524esac
6525fi
6526DIFF=$ac_cv_path_DIFF
6527if test -n "$DIFF"; then
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6529$as_echo "$DIFF" >&6; }
6530else
6531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; }
6533fi
6534
6535
6536  test -n "$DIFF" && break
6537done
6538
6539  else
6540    # The variable is set, but is it from the command line or the environment?
6541
6542    # Try to remove the string !DIFF! from our list.
6543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6545      # If it failed, the variable was not from the command line. Ignore it,
6546      # but warn the user (except for BASH, which is always set by the calling BASH).
6547      if test "xDIFF" != xBASH; then
6548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6549$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6550      fi
6551      # Try to locate tool using the code snippet
6552      for ac_prog in gdiff diff
6553do
6554  # Extract the first word of "$ac_prog", so it can be a program name with args.
6555set dummy $ac_prog; ac_word=$2
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6557$as_echo_n "checking for $ac_word... " >&6; }
6558if ${ac_cv_path_DIFF+:} false; then :
6559  $as_echo_n "(cached) " >&6
6560else
6561  case $DIFF in
6562  [\\/]* | ?:[\\/]*)
6563  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6564  ;;
6565  *)
6566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6567for as_dir in $PATH
6568do
6569  IFS=$as_save_IFS
6570  test -z "$as_dir" && as_dir=.
6571    for ac_exec_ext in '' $ac_executable_extensions; do
6572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6573    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6575    break 2
6576  fi
6577done
6578  done
6579IFS=$as_save_IFS
6580
6581  ;;
6582esac
6583fi
6584DIFF=$ac_cv_path_DIFF
6585if test -n "$DIFF"; then
6586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6587$as_echo "$DIFF" >&6; }
6588else
6589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6590$as_echo "no" >&6; }
6591fi
6592
6593
6594  test -n "$DIFF" && break
6595done
6596
6597    else
6598      # If it succeeded, then it was overridden by the user. We will use it
6599      # for the tool.
6600
6601      # First remove it from the list of overridden variables, so we can test
6602      # for unknown variables in the end.
6603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6604
6605      # Check if we try to supply an empty value
6606      if test "x$DIFF" = x; then
6607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6608$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6610$as_echo_n "checking for DIFF... " >&6; }
6611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6612$as_echo "disabled" >&6; }
6613      else
6614        # Check if the provided tool contains a complete path.
6615        tool_specified="$DIFF"
6616        tool_basename="${tool_specified##*/}"
6617        if test "x$tool_basename" = "x$tool_specified"; then
6618          # A command without a complete path is provided, search $PATH.
6619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6620$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6621          # Extract the first word of "$tool_basename", so it can be a program name with args.
6622set dummy $tool_basename; ac_word=$2
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6624$as_echo_n "checking for $ac_word... " >&6; }
6625if ${ac_cv_path_DIFF+:} false; then :
6626  $as_echo_n "(cached) " >&6
6627else
6628  case $DIFF in
6629  [\\/]* | ?:[\\/]*)
6630  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6631  ;;
6632  *)
6633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6634for as_dir in $PATH
6635do
6636  IFS=$as_save_IFS
6637  test -z "$as_dir" && as_dir=.
6638    for ac_exec_ext in '' $ac_executable_extensions; do
6639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6640    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6642    break 2
6643  fi
6644done
6645  done
6646IFS=$as_save_IFS
6647
6648  ;;
6649esac
6650fi
6651DIFF=$ac_cv_path_DIFF
6652if test -n "$DIFF"; then
6653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6654$as_echo "$DIFF" >&6; }
6655else
6656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657$as_echo "no" >&6; }
6658fi
6659
6660
6661          if test "x$DIFF" = x; then
6662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6663          fi
6664        else
6665          # Otherwise we believe it is a complete path. Use it as it is.
6666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6667$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6669$as_echo_n "checking for DIFF... " >&6; }
6670          if test ! -x "$tool_specified"; then
6671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6672$as_echo "not found" >&6; }
6673            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6674          fi
6675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6676$as_echo "$tool_specified" >&6; }
6677        fi
6678      fi
6679    fi
6680
6681  fi
6682
6683
6684
6685  if test "x$DIFF" = x; then
6686    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6687  fi
6688
6689
6690
6691
6692
6693  # Publish this variable in the help.
6694
6695
6696  if [ -z "${DIRNAME+x}" ]; then
6697    # The variable is not set by user, try to locate tool using the code snippet
6698    for ac_prog in dirname
6699do
6700  # Extract the first word of "$ac_prog", so it can be a program name with args.
6701set dummy $ac_prog; ac_word=$2
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6703$as_echo_n "checking for $ac_word... " >&6; }
6704if ${ac_cv_path_DIRNAME+:} false; then :
6705  $as_echo_n "(cached) " >&6
6706else
6707  case $DIRNAME in
6708  [\\/]* | ?:[\\/]*)
6709  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6710  ;;
6711  *)
6712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6713for as_dir in $PATH
6714do
6715  IFS=$as_save_IFS
6716  test -z "$as_dir" && as_dir=.
6717    for ac_exec_ext in '' $ac_executable_extensions; do
6718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6719    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6721    break 2
6722  fi
6723done
6724  done
6725IFS=$as_save_IFS
6726
6727  ;;
6728esac
6729fi
6730DIRNAME=$ac_cv_path_DIRNAME
6731if test -n "$DIRNAME"; then
6732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6733$as_echo "$DIRNAME" >&6; }
6734else
6735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6736$as_echo "no" >&6; }
6737fi
6738
6739
6740  test -n "$DIRNAME" && break
6741done
6742
6743  else
6744    # The variable is set, but is it from the command line or the environment?
6745
6746    # Try to remove the string !DIRNAME! from our list.
6747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6749      # If it failed, the variable was not from the command line. Ignore it,
6750      # but warn the user (except for BASH, which is always set by the calling BASH).
6751      if test "xDIRNAME" != xBASH; then
6752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6753$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6754      fi
6755      # Try to locate tool using the code snippet
6756      for ac_prog in dirname
6757do
6758  # Extract the first word of "$ac_prog", so it can be a program name with args.
6759set dummy $ac_prog; ac_word=$2
6760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6761$as_echo_n "checking for $ac_word... " >&6; }
6762if ${ac_cv_path_DIRNAME+:} false; then :
6763  $as_echo_n "(cached) " >&6
6764else
6765  case $DIRNAME in
6766  [\\/]* | ?:[\\/]*)
6767  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6768  ;;
6769  *)
6770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6771for as_dir in $PATH
6772do
6773  IFS=$as_save_IFS
6774  test -z "$as_dir" && as_dir=.
6775    for ac_exec_ext in '' $ac_executable_extensions; do
6776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6777    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6779    break 2
6780  fi
6781done
6782  done
6783IFS=$as_save_IFS
6784
6785  ;;
6786esac
6787fi
6788DIRNAME=$ac_cv_path_DIRNAME
6789if test -n "$DIRNAME"; then
6790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6791$as_echo "$DIRNAME" >&6; }
6792else
6793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794$as_echo "no" >&6; }
6795fi
6796
6797
6798  test -n "$DIRNAME" && break
6799done
6800
6801    else
6802      # If it succeeded, then it was overridden by the user. We will use it
6803      # for the tool.
6804
6805      # First remove it from the list of overridden variables, so we can test
6806      # for unknown variables in the end.
6807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6808
6809      # Check if we try to supply an empty value
6810      if test "x$DIRNAME" = x; then
6811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6812$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6814$as_echo_n "checking for DIRNAME... " >&6; }
6815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6816$as_echo "disabled" >&6; }
6817      else
6818        # Check if the provided tool contains a complete path.
6819        tool_specified="$DIRNAME"
6820        tool_basename="${tool_specified##*/}"
6821        if test "x$tool_basename" = "x$tool_specified"; then
6822          # A command without a complete path is provided, search $PATH.
6823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6824$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6825          # Extract the first word of "$tool_basename", so it can be a program name with args.
6826set dummy $tool_basename; ac_word=$2
6827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6828$as_echo_n "checking for $ac_word... " >&6; }
6829if ${ac_cv_path_DIRNAME+:} false; then :
6830  $as_echo_n "(cached) " >&6
6831else
6832  case $DIRNAME in
6833  [\\/]* | ?:[\\/]*)
6834  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6835  ;;
6836  *)
6837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6838for as_dir in $PATH
6839do
6840  IFS=$as_save_IFS
6841  test -z "$as_dir" && as_dir=.
6842    for ac_exec_ext in '' $ac_executable_extensions; do
6843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6844    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6846    break 2
6847  fi
6848done
6849  done
6850IFS=$as_save_IFS
6851
6852  ;;
6853esac
6854fi
6855DIRNAME=$ac_cv_path_DIRNAME
6856if test -n "$DIRNAME"; then
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6858$as_echo "$DIRNAME" >&6; }
6859else
6860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6861$as_echo "no" >&6; }
6862fi
6863
6864
6865          if test "x$DIRNAME" = x; then
6866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6867          fi
6868        else
6869          # Otherwise we believe it is a complete path. Use it as it is.
6870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6871$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6873$as_echo_n "checking for DIRNAME... " >&6; }
6874          if test ! -x "$tool_specified"; then
6875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6876$as_echo "not found" >&6; }
6877            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6878          fi
6879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6880$as_echo "$tool_specified" >&6; }
6881        fi
6882      fi
6883    fi
6884
6885  fi
6886
6887
6888
6889  if test "x$DIRNAME" = x; then
6890    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6891  fi
6892
6893
6894
6895
6896
6897  # Publish this variable in the help.
6898
6899
6900  if [ -z "${ECHO+x}" ]; then
6901    # The variable is not set by user, try to locate tool using the code snippet
6902    for ac_prog in echo
6903do
6904  # Extract the first word of "$ac_prog", so it can be a program name with args.
6905set dummy $ac_prog; ac_word=$2
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6907$as_echo_n "checking for $ac_word... " >&6; }
6908if ${ac_cv_path_ECHO+:} false; then :
6909  $as_echo_n "(cached) " >&6
6910else
6911  case $ECHO in
6912  [\\/]* | ?:[\\/]*)
6913  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6914  ;;
6915  *)
6916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6917for as_dir in $PATH
6918do
6919  IFS=$as_save_IFS
6920  test -z "$as_dir" && as_dir=.
6921    for ac_exec_ext in '' $ac_executable_extensions; do
6922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6923    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6925    break 2
6926  fi
6927done
6928  done
6929IFS=$as_save_IFS
6930
6931  ;;
6932esac
6933fi
6934ECHO=$ac_cv_path_ECHO
6935if test -n "$ECHO"; then
6936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6937$as_echo "$ECHO" >&6; }
6938else
6939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6940$as_echo "no" >&6; }
6941fi
6942
6943
6944  test -n "$ECHO" && break
6945done
6946
6947  else
6948    # The variable is set, but is it from the command line or the environment?
6949
6950    # Try to remove the string !ECHO! from our list.
6951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6953      # If it failed, the variable was not from the command line. Ignore it,
6954      # but warn the user (except for BASH, which is always set by the calling BASH).
6955      if test "xECHO" != xBASH; then
6956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6957$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6958      fi
6959      # Try to locate tool using the code snippet
6960      for ac_prog in echo
6961do
6962  # Extract the first word of "$ac_prog", so it can be a program name with args.
6963set dummy $ac_prog; ac_word=$2
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6965$as_echo_n "checking for $ac_word... " >&6; }
6966if ${ac_cv_path_ECHO+:} false; then :
6967  $as_echo_n "(cached) " >&6
6968else
6969  case $ECHO in
6970  [\\/]* | ?:[\\/]*)
6971  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6972  ;;
6973  *)
6974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6975for as_dir in $PATH
6976do
6977  IFS=$as_save_IFS
6978  test -z "$as_dir" && as_dir=.
6979    for ac_exec_ext in '' $ac_executable_extensions; do
6980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6981    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6983    break 2
6984  fi
6985done
6986  done
6987IFS=$as_save_IFS
6988
6989  ;;
6990esac
6991fi
6992ECHO=$ac_cv_path_ECHO
6993if test -n "$ECHO"; then
6994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6995$as_echo "$ECHO" >&6; }
6996else
6997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6998$as_echo "no" >&6; }
6999fi
7000
7001
7002  test -n "$ECHO" && break
7003done
7004
7005    else
7006      # If it succeeded, then it was overridden by the user. We will use it
7007      # for the tool.
7008
7009      # First remove it from the list of overridden variables, so we can test
7010      # for unknown variables in the end.
7011      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7012
7013      # Check if we try to supply an empty value
7014      if test "x$ECHO" = x; then
7015        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7016$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7018$as_echo_n "checking for ECHO... " >&6; }
7019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7020$as_echo "disabled" >&6; }
7021      else
7022        # Check if the provided tool contains a complete path.
7023        tool_specified="$ECHO"
7024        tool_basename="${tool_specified##*/}"
7025        if test "x$tool_basename" = "x$tool_specified"; then
7026          # A command without a complete path is provided, search $PATH.
7027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7028$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7029          # Extract the first word of "$tool_basename", so it can be a program name with args.
7030set dummy $tool_basename; ac_word=$2
7031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7032$as_echo_n "checking for $ac_word... " >&6; }
7033if ${ac_cv_path_ECHO+:} false; then :
7034  $as_echo_n "(cached) " >&6
7035else
7036  case $ECHO in
7037  [\\/]* | ?:[\\/]*)
7038  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7039  ;;
7040  *)
7041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7042for as_dir in $PATH
7043do
7044  IFS=$as_save_IFS
7045  test -z "$as_dir" && as_dir=.
7046    for ac_exec_ext in '' $ac_executable_extensions; do
7047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7048    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7050    break 2
7051  fi
7052done
7053  done
7054IFS=$as_save_IFS
7055
7056  ;;
7057esac
7058fi
7059ECHO=$ac_cv_path_ECHO
7060if test -n "$ECHO"; then
7061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7062$as_echo "$ECHO" >&6; }
7063else
7064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7065$as_echo "no" >&6; }
7066fi
7067
7068
7069          if test "x$ECHO" = x; then
7070            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7071          fi
7072        else
7073          # Otherwise we believe it is a complete path. Use it as it is.
7074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7075$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7076          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7077$as_echo_n "checking for ECHO... " >&6; }
7078          if test ! -x "$tool_specified"; then
7079            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7080$as_echo "not found" >&6; }
7081            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7082          fi
7083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7084$as_echo "$tool_specified" >&6; }
7085        fi
7086      fi
7087    fi
7088
7089  fi
7090
7091
7092
7093  if test "x$ECHO" = x; then
7094    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7095  fi
7096
7097
7098
7099
7100
7101  # Publish this variable in the help.
7102
7103
7104  if [ -z "${EXPR+x}" ]; then
7105    # The variable is not set by user, try to locate tool using the code snippet
7106    for ac_prog in expr
7107do
7108  # Extract the first word of "$ac_prog", so it can be a program name with args.
7109set dummy $ac_prog; ac_word=$2
7110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111$as_echo_n "checking for $ac_word... " >&6; }
7112if ${ac_cv_path_EXPR+:} false; then :
7113  $as_echo_n "(cached) " >&6
7114else
7115  case $EXPR in
7116  [\\/]* | ?:[\\/]*)
7117  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7118  ;;
7119  *)
7120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7121for as_dir in $PATH
7122do
7123  IFS=$as_save_IFS
7124  test -z "$as_dir" && as_dir=.
7125    for ac_exec_ext in '' $ac_executable_extensions; do
7126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7127    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7129    break 2
7130  fi
7131done
7132  done
7133IFS=$as_save_IFS
7134
7135  ;;
7136esac
7137fi
7138EXPR=$ac_cv_path_EXPR
7139if test -n "$EXPR"; then
7140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7141$as_echo "$EXPR" >&6; }
7142else
7143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144$as_echo "no" >&6; }
7145fi
7146
7147
7148  test -n "$EXPR" && break
7149done
7150
7151  else
7152    # The variable is set, but is it from the command line or the environment?
7153
7154    # Try to remove the string !EXPR! from our list.
7155    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7156    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7157      # If it failed, the variable was not from the command line. Ignore it,
7158      # but warn the user (except for BASH, which is always set by the calling BASH).
7159      if test "xEXPR" != xBASH; then
7160        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7161$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7162      fi
7163      # Try to locate tool using the code snippet
7164      for ac_prog in expr
7165do
7166  # Extract the first word of "$ac_prog", so it can be a program name with args.
7167set dummy $ac_prog; ac_word=$2
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7169$as_echo_n "checking for $ac_word... " >&6; }
7170if ${ac_cv_path_EXPR+:} false; then :
7171  $as_echo_n "(cached) " >&6
7172else
7173  case $EXPR in
7174  [\\/]* | ?:[\\/]*)
7175  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7176  ;;
7177  *)
7178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7179for as_dir in $PATH
7180do
7181  IFS=$as_save_IFS
7182  test -z "$as_dir" && as_dir=.
7183    for ac_exec_ext in '' $ac_executable_extensions; do
7184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7185    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7187    break 2
7188  fi
7189done
7190  done
7191IFS=$as_save_IFS
7192
7193  ;;
7194esac
7195fi
7196EXPR=$ac_cv_path_EXPR
7197if test -n "$EXPR"; then
7198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7199$as_echo "$EXPR" >&6; }
7200else
7201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7202$as_echo "no" >&6; }
7203fi
7204
7205
7206  test -n "$EXPR" && break
7207done
7208
7209    else
7210      # If it succeeded, then it was overridden by the user. We will use it
7211      # for the tool.
7212
7213      # First remove it from the list of overridden variables, so we can test
7214      # for unknown variables in the end.
7215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7216
7217      # Check if we try to supply an empty value
7218      if test "x$EXPR" = x; then
7219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7220$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7222$as_echo_n "checking for EXPR... " >&6; }
7223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7224$as_echo "disabled" >&6; }
7225      else
7226        # Check if the provided tool contains a complete path.
7227        tool_specified="$EXPR"
7228        tool_basename="${tool_specified##*/}"
7229        if test "x$tool_basename" = "x$tool_specified"; then
7230          # A command without a complete path is provided, search $PATH.
7231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7232$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7233          # Extract the first word of "$tool_basename", so it can be a program name with args.
7234set dummy $tool_basename; ac_word=$2
7235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7236$as_echo_n "checking for $ac_word... " >&6; }
7237if ${ac_cv_path_EXPR+:} false; then :
7238  $as_echo_n "(cached) " >&6
7239else
7240  case $EXPR in
7241  [\\/]* | ?:[\\/]*)
7242  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7243  ;;
7244  *)
7245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7246for as_dir in $PATH
7247do
7248  IFS=$as_save_IFS
7249  test -z "$as_dir" && as_dir=.
7250    for ac_exec_ext in '' $ac_executable_extensions; do
7251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7252    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7254    break 2
7255  fi
7256done
7257  done
7258IFS=$as_save_IFS
7259
7260  ;;
7261esac
7262fi
7263EXPR=$ac_cv_path_EXPR
7264if test -n "$EXPR"; then
7265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7266$as_echo "$EXPR" >&6; }
7267else
7268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7269$as_echo "no" >&6; }
7270fi
7271
7272
7273          if test "x$EXPR" = x; then
7274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7275          fi
7276        else
7277          # Otherwise we believe it is a complete path. Use it as it is.
7278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7279$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7281$as_echo_n "checking for EXPR... " >&6; }
7282          if test ! -x "$tool_specified"; then
7283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7284$as_echo "not found" >&6; }
7285            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7286          fi
7287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7288$as_echo "$tool_specified" >&6; }
7289        fi
7290      fi
7291    fi
7292
7293  fi
7294
7295
7296
7297  if test "x$EXPR" = x; then
7298    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7299  fi
7300
7301
7302
7303
7304
7305  # Publish this variable in the help.
7306
7307
7308  if [ -z "${FILE+x}" ]; then
7309    # The variable is not set by user, try to locate tool using the code snippet
7310    for ac_prog in file
7311do
7312  # Extract the first word of "$ac_prog", so it can be a program name with args.
7313set dummy $ac_prog; ac_word=$2
7314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7315$as_echo_n "checking for $ac_word... " >&6; }
7316if ${ac_cv_path_FILE+:} false; then :
7317  $as_echo_n "(cached) " >&6
7318else
7319  case $FILE in
7320  [\\/]* | ?:[\\/]*)
7321  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7322  ;;
7323  *)
7324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7325for as_dir in $PATH
7326do
7327  IFS=$as_save_IFS
7328  test -z "$as_dir" && as_dir=.
7329    for ac_exec_ext in '' $ac_executable_extensions; do
7330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7331    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7333    break 2
7334  fi
7335done
7336  done
7337IFS=$as_save_IFS
7338
7339  ;;
7340esac
7341fi
7342FILE=$ac_cv_path_FILE
7343if test -n "$FILE"; then
7344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7345$as_echo "$FILE" >&6; }
7346else
7347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7348$as_echo "no" >&6; }
7349fi
7350
7351
7352  test -n "$FILE" && break
7353done
7354
7355  else
7356    # The variable is set, but is it from the command line or the environment?
7357
7358    # Try to remove the string !FILE! from our list.
7359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7361      # If it failed, the variable was not from the command line. Ignore it,
7362      # but warn the user (except for BASH, which is always set by the calling BASH).
7363      if test "xFILE" != xBASH; then
7364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7365$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7366      fi
7367      # Try to locate tool using the code snippet
7368      for ac_prog in file
7369do
7370  # Extract the first word of "$ac_prog", so it can be a program name with args.
7371set dummy $ac_prog; ac_word=$2
7372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7373$as_echo_n "checking for $ac_word... " >&6; }
7374if ${ac_cv_path_FILE+:} false; then :
7375  $as_echo_n "(cached) " >&6
7376else
7377  case $FILE in
7378  [\\/]* | ?:[\\/]*)
7379  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7380  ;;
7381  *)
7382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7383for as_dir in $PATH
7384do
7385  IFS=$as_save_IFS
7386  test -z "$as_dir" && as_dir=.
7387    for ac_exec_ext in '' $ac_executable_extensions; do
7388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7389    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7391    break 2
7392  fi
7393done
7394  done
7395IFS=$as_save_IFS
7396
7397  ;;
7398esac
7399fi
7400FILE=$ac_cv_path_FILE
7401if test -n "$FILE"; then
7402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7403$as_echo "$FILE" >&6; }
7404else
7405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406$as_echo "no" >&6; }
7407fi
7408
7409
7410  test -n "$FILE" && break
7411done
7412
7413    else
7414      # If it succeeded, then it was overridden by the user. We will use it
7415      # for the tool.
7416
7417      # First remove it from the list of overridden variables, so we can test
7418      # for unknown variables in the end.
7419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7420
7421      # Check if we try to supply an empty value
7422      if test "x$FILE" = x; then
7423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7424$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7426$as_echo_n "checking for FILE... " >&6; }
7427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7428$as_echo "disabled" >&6; }
7429      else
7430        # Check if the provided tool contains a complete path.
7431        tool_specified="$FILE"
7432        tool_basename="${tool_specified##*/}"
7433        if test "x$tool_basename" = "x$tool_specified"; then
7434          # A command without a complete path is provided, search $PATH.
7435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7436$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7437          # Extract the first word of "$tool_basename", so it can be a program name with args.
7438set dummy $tool_basename; ac_word=$2
7439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7440$as_echo_n "checking for $ac_word... " >&6; }
7441if ${ac_cv_path_FILE+:} false; then :
7442  $as_echo_n "(cached) " >&6
7443else
7444  case $FILE in
7445  [\\/]* | ?:[\\/]*)
7446  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7447  ;;
7448  *)
7449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452  IFS=$as_save_IFS
7453  test -z "$as_dir" && as_dir=.
7454    for ac_exec_ext in '' $ac_executable_extensions; do
7455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7458    break 2
7459  fi
7460done
7461  done
7462IFS=$as_save_IFS
7463
7464  ;;
7465esac
7466fi
7467FILE=$ac_cv_path_FILE
7468if test -n "$FILE"; then
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7470$as_echo "$FILE" >&6; }
7471else
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
7474fi
7475
7476
7477          if test "x$FILE" = x; then
7478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7479          fi
7480        else
7481          # Otherwise we believe it is a complete path. Use it as it is.
7482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7483$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7485$as_echo_n "checking for FILE... " >&6; }
7486          if test ! -x "$tool_specified"; then
7487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7488$as_echo "not found" >&6; }
7489            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7490          fi
7491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7492$as_echo "$tool_specified" >&6; }
7493        fi
7494      fi
7495    fi
7496
7497  fi
7498
7499
7500
7501  if test "x$FILE" = x; then
7502    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7503  fi
7504
7505
7506
7507
7508
7509  # Publish this variable in the help.
7510
7511
7512  if [ -z "${FIND+x}" ]; then
7513    # The variable is not set by user, try to locate tool using the code snippet
7514    for ac_prog in find
7515do
7516  # Extract the first word of "$ac_prog", so it can be a program name with args.
7517set dummy $ac_prog; ac_word=$2
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519$as_echo_n "checking for $ac_word... " >&6; }
7520if ${ac_cv_path_FIND+:} false; then :
7521  $as_echo_n "(cached) " >&6
7522else
7523  case $FIND in
7524  [\\/]* | ?:[\\/]*)
7525  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7526  ;;
7527  *)
7528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7529for as_dir in $PATH
7530do
7531  IFS=$as_save_IFS
7532  test -z "$as_dir" && as_dir=.
7533    for ac_exec_ext in '' $ac_executable_extensions; do
7534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7535    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7537    break 2
7538  fi
7539done
7540  done
7541IFS=$as_save_IFS
7542
7543  ;;
7544esac
7545fi
7546FIND=$ac_cv_path_FIND
7547if test -n "$FIND"; then
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7549$as_echo "$FIND" >&6; }
7550else
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552$as_echo "no" >&6; }
7553fi
7554
7555
7556  test -n "$FIND" && break
7557done
7558
7559  else
7560    # The variable is set, but is it from the command line or the environment?
7561
7562    # Try to remove the string !FIND! from our list.
7563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7565      # If it failed, the variable was not from the command line. Ignore it,
7566      # but warn the user (except for BASH, which is always set by the calling BASH).
7567      if test "xFIND" != xBASH; then
7568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7569$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7570      fi
7571      # Try to locate tool using the code snippet
7572      for ac_prog in find
7573do
7574  # Extract the first word of "$ac_prog", so it can be a program name with args.
7575set dummy $ac_prog; ac_word=$2
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if ${ac_cv_path_FIND+:} false; then :
7579  $as_echo_n "(cached) " >&6
7580else
7581  case $FIND in
7582  [\\/]* | ?:[\\/]*)
7583  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7584  ;;
7585  *)
7586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589  IFS=$as_save_IFS
7590  test -z "$as_dir" && as_dir=.
7591    for ac_exec_ext in '' $ac_executable_extensions; do
7592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595    break 2
7596  fi
7597done
7598  done
7599IFS=$as_save_IFS
7600
7601  ;;
7602esac
7603fi
7604FIND=$ac_cv_path_FIND
7605if test -n "$FIND"; then
7606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7607$as_echo "$FIND" >&6; }
7608else
7609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610$as_echo "no" >&6; }
7611fi
7612
7613
7614  test -n "$FIND" && break
7615done
7616
7617    else
7618      # If it succeeded, then it was overridden by the user. We will use it
7619      # for the tool.
7620
7621      # First remove it from the list of overridden variables, so we can test
7622      # for unknown variables in the end.
7623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7624
7625      # Check if we try to supply an empty value
7626      if test "x$FIND" = x; then
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7628$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7630$as_echo_n "checking for FIND... " >&6; }
7631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7632$as_echo "disabled" >&6; }
7633      else
7634        # Check if the provided tool contains a complete path.
7635        tool_specified="$FIND"
7636        tool_basename="${tool_specified##*/}"
7637        if test "x$tool_basename" = "x$tool_specified"; then
7638          # A command without a complete path is provided, search $PATH.
7639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7640$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7641          # Extract the first word of "$tool_basename", so it can be a program name with args.
7642set dummy $tool_basename; ac_word=$2
7643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7644$as_echo_n "checking for $ac_word... " >&6; }
7645if ${ac_cv_path_FIND+:} false; then :
7646  $as_echo_n "(cached) " >&6
7647else
7648  case $FIND in
7649  [\\/]* | ?:[\\/]*)
7650  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7651  ;;
7652  *)
7653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7654for as_dir in $PATH
7655do
7656  IFS=$as_save_IFS
7657  test -z "$as_dir" && as_dir=.
7658    for ac_exec_ext in '' $ac_executable_extensions; do
7659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7660    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7662    break 2
7663  fi
7664done
7665  done
7666IFS=$as_save_IFS
7667
7668  ;;
7669esac
7670fi
7671FIND=$ac_cv_path_FIND
7672if test -n "$FIND"; then
7673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7674$as_echo "$FIND" >&6; }
7675else
7676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7677$as_echo "no" >&6; }
7678fi
7679
7680
7681          if test "x$FIND" = x; then
7682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7683          fi
7684        else
7685          # Otherwise we believe it is a complete path. Use it as it is.
7686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7687$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7689$as_echo_n "checking for FIND... " >&6; }
7690          if test ! -x "$tool_specified"; then
7691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7692$as_echo "not found" >&6; }
7693            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7694          fi
7695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7696$as_echo "$tool_specified" >&6; }
7697        fi
7698      fi
7699    fi
7700
7701  fi
7702
7703
7704
7705  if test "x$FIND" = x; then
7706    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7707  fi
7708
7709
7710
7711
7712
7713  # Publish this variable in the help.
7714
7715
7716  if [ -z "${HEAD+x}" ]; then
7717    # The variable is not set by user, try to locate tool using the code snippet
7718    for ac_prog in head
7719do
7720  # Extract the first word of "$ac_prog", so it can be a program name with args.
7721set dummy $ac_prog; ac_word=$2
7722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7723$as_echo_n "checking for $ac_word... " >&6; }
7724if ${ac_cv_path_HEAD+:} false; then :
7725  $as_echo_n "(cached) " >&6
7726else
7727  case $HEAD in
7728  [\\/]* | ?:[\\/]*)
7729  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7730  ;;
7731  *)
7732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7733for as_dir in $PATH
7734do
7735  IFS=$as_save_IFS
7736  test -z "$as_dir" && as_dir=.
7737    for ac_exec_ext in '' $ac_executable_extensions; do
7738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7739    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7741    break 2
7742  fi
7743done
7744  done
7745IFS=$as_save_IFS
7746
7747  ;;
7748esac
7749fi
7750HEAD=$ac_cv_path_HEAD
7751if test -n "$HEAD"; then
7752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7753$as_echo "$HEAD" >&6; }
7754else
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7756$as_echo "no" >&6; }
7757fi
7758
7759
7760  test -n "$HEAD" && break
7761done
7762
7763  else
7764    # The variable is set, but is it from the command line or the environment?
7765
7766    # Try to remove the string !HEAD! from our list.
7767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7769      # If it failed, the variable was not from the command line. Ignore it,
7770      # but warn the user (except for BASH, which is always set by the calling BASH).
7771      if test "xHEAD" != xBASH; then
7772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7773$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7774      fi
7775      # Try to locate tool using the code snippet
7776      for ac_prog in head
7777do
7778  # Extract the first word of "$ac_prog", so it can be a program name with args.
7779set dummy $ac_prog; ac_word=$2
7780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7781$as_echo_n "checking for $ac_word... " >&6; }
7782if ${ac_cv_path_HEAD+:} false; then :
7783  $as_echo_n "(cached) " >&6
7784else
7785  case $HEAD in
7786  [\\/]* | ?:[\\/]*)
7787  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7788  ;;
7789  *)
7790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791for as_dir in $PATH
7792do
7793  IFS=$as_save_IFS
7794  test -z "$as_dir" && as_dir=.
7795    for ac_exec_ext in '' $ac_executable_extensions; do
7796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799    break 2
7800  fi
7801done
7802  done
7803IFS=$as_save_IFS
7804
7805  ;;
7806esac
7807fi
7808HEAD=$ac_cv_path_HEAD
7809if test -n "$HEAD"; then
7810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7811$as_echo "$HEAD" >&6; }
7812else
7813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7814$as_echo "no" >&6; }
7815fi
7816
7817
7818  test -n "$HEAD" && break
7819done
7820
7821    else
7822      # If it succeeded, then it was overridden by the user. We will use it
7823      # for the tool.
7824
7825      # First remove it from the list of overridden variables, so we can test
7826      # for unknown variables in the end.
7827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7828
7829      # Check if we try to supply an empty value
7830      if test "x$HEAD" = x; then
7831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7832$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7834$as_echo_n "checking for HEAD... " >&6; }
7835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7836$as_echo "disabled" >&6; }
7837      else
7838        # Check if the provided tool contains a complete path.
7839        tool_specified="$HEAD"
7840        tool_basename="${tool_specified##*/}"
7841        if test "x$tool_basename" = "x$tool_specified"; then
7842          # A command without a complete path is provided, search $PATH.
7843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7844$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7845          # Extract the first word of "$tool_basename", so it can be a program name with args.
7846set dummy $tool_basename; ac_word=$2
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7848$as_echo_n "checking for $ac_word... " >&6; }
7849if ${ac_cv_path_HEAD+:} false; then :
7850  $as_echo_n "(cached) " >&6
7851else
7852  case $HEAD in
7853  [\\/]* | ?:[\\/]*)
7854  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7855  ;;
7856  *)
7857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7858for as_dir in $PATH
7859do
7860  IFS=$as_save_IFS
7861  test -z "$as_dir" && as_dir=.
7862    for ac_exec_ext in '' $ac_executable_extensions; do
7863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7864    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7866    break 2
7867  fi
7868done
7869  done
7870IFS=$as_save_IFS
7871
7872  ;;
7873esac
7874fi
7875HEAD=$ac_cv_path_HEAD
7876if test -n "$HEAD"; then
7877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7878$as_echo "$HEAD" >&6; }
7879else
7880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881$as_echo "no" >&6; }
7882fi
7883
7884
7885          if test "x$HEAD" = x; then
7886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7887          fi
7888        else
7889          # Otherwise we believe it is a complete path. Use it as it is.
7890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7891$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7893$as_echo_n "checking for HEAD... " >&6; }
7894          if test ! -x "$tool_specified"; then
7895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7896$as_echo "not found" >&6; }
7897            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7898          fi
7899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7900$as_echo "$tool_specified" >&6; }
7901        fi
7902      fi
7903    fi
7904
7905  fi
7906
7907
7908
7909  if test "x$HEAD" = x; then
7910    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7911  fi
7912
7913
7914
7915
7916
7917  # Publish this variable in the help.
7918
7919
7920  if [ -z "${LN+x}" ]; then
7921    # The variable is not set by user, try to locate tool using the code snippet
7922    for ac_prog in ln
7923do
7924  # Extract the first word of "$ac_prog", so it can be a program name with args.
7925set dummy $ac_prog; ac_word=$2
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7927$as_echo_n "checking for $ac_word... " >&6; }
7928if ${ac_cv_path_LN+:} false; then :
7929  $as_echo_n "(cached) " >&6
7930else
7931  case $LN in
7932  [\\/]* | ?:[\\/]*)
7933  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7934  ;;
7935  *)
7936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7937for as_dir in $PATH
7938do
7939  IFS=$as_save_IFS
7940  test -z "$as_dir" && as_dir=.
7941    for ac_exec_ext in '' $ac_executable_extensions; do
7942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7943    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7945    break 2
7946  fi
7947done
7948  done
7949IFS=$as_save_IFS
7950
7951  ;;
7952esac
7953fi
7954LN=$ac_cv_path_LN
7955if test -n "$LN"; then
7956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7957$as_echo "$LN" >&6; }
7958else
7959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7960$as_echo "no" >&6; }
7961fi
7962
7963
7964  test -n "$LN" && break
7965done
7966
7967  else
7968    # The variable is set, but is it from the command line or the environment?
7969
7970    # Try to remove the string !LN! from our list.
7971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7973      # If it failed, the variable was not from the command line. Ignore it,
7974      # but warn the user (except for BASH, which is always set by the calling BASH).
7975      if test "xLN" != xBASH; then
7976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7977$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7978      fi
7979      # Try to locate tool using the code snippet
7980      for ac_prog in ln
7981do
7982  # Extract the first word of "$ac_prog", so it can be a program name with args.
7983set dummy $ac_prog; ac_word=$2
7984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7985$as_echo_n "checking for $ac_word... " >&6; }
7986if ${ac_cv_path_LN+:} false; then :
7987  $as_echo_n "(cached) " >&6
7988else
7989  case $LN in
7990  [\\/]* | ?:[\\/]*)
7991  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7992  ;;
7993  *)
7994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7995for as_dir in $PATH
7996do
7997  IFS=$as_save_IFS
7998  test -z "$as_dir" && as_dir=.
7999    for ac_exec_ext in '' $ac_executable_extensions; do
8000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8001    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8003    break 2
8004  fi
8005done
8006  done
8007IFS=$as_save_IFS
8008
8009  ;;
8010esac
8011fi
8012LN=$ac_cv_path_LN
8013if test -n "$LN"; then
8014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8015$as_echo "$LN" >&6; }
8016else
8017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8018$as_echo "no" >&6; }
8019fi
8020
8021
8022  test -n "$LN" && break
8023done
8024
8025    else
8026      # If it succeeded, then it was overridden by the user. We will use it
8027      # for the tool.
8028
8029      # First remove it from the list of overridden variables, so we can test
8030      # for unknown variables in the end.
8031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8032
8033      # Check if we try to supply an empty value
8034      if test "x$LN" = x; then
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8036$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8038$as_echo_n "checking for LN... " >&6; }
8039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8040$as_echo "disabled" >&6; }
8041      else
8042        # Check if the provided tool contains a complete path.
8043        tool_specified="$LN"
8044        tool_basename="${tool_specified##*/}"
8045        if test "x$tool_basename" = "x$tool_specified"; then
8046          # A command without a complete path is provided, search $PATH.
8047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8048$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8049          # Extract the first word of "$tool_basename", so it can be a program name with args.
8050set dummy $tool_basename; ac_word=$2
8051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8052$as_echo_n "checking for $ac_word... " >&6; }
8053if ${ac_cv_path_LN+:} false; then :
8054  $as_echo_n "(cached) " >&6
8055else
8056  case $LN in
8057  [\\/]* | ?:[\\/]*)
8058  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8059  ;;
8060  *)
8061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8062for as_dir in $PATH
8063do
8064  IFS=$as_save_IFS
8065  test -z "$as_dir" && as_dir=.
8066    for ac_exec_ext in '' $ac_executable_extensions; do
8067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8068    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8070    break 2
8071  fi
8072done
8073  done
8074IFS=$as_save_IFS
8075
8076  ;;
8077esac
8078fi
8079LN=$ac_cv_path_LN
8080if test -n "$LN"; then
8081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8082$as_echo "$LN" >&6; }
8083else
8084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8085$as_echo "no" >&6; }
8086fi
8087
8088
8089          if test "x$LN" = x; then
8090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8091          fi
8092        else
8093          # Otherwise we believe it is a complete path. Use it as it is.
8094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8095$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8097$as_echo_n "checking for LN... " >&6; }
8098          if test ! -x "$tool_specified"; then
8099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8100$as_echo "not found" >&6; }
8101            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8102          fi
8103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8104$as_echo "$tool_specified" >&6; }
8105        fi
8106      fi
8107    fi
8108
8109  fi
8110
8111
8112
8113  if test "x$LN" = x; then
8114    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8115  fi
8116
8117
8118
8119
8120
8121  # Publish this variable in the help.
8122
8123
8124  if [ -z "${LS+x}" ]; then
8125    # The variable is not set by user, try to locate tool using the code snippet
8126    for ac_prog in ls
8127do
8128  # Extract the first word of "$ac_prog", so it can be a program name with args.
8129set dummy $ac_prog; ac_word=$2
8130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8131$as_echo_n "checking for $ac_word... " >&6; }
8132if ${ac_cv_path_LS+:} false; then :
8133  $as_echo_n "(cached) " >&6
8134else
8135  case $LS in
8136  [\\/]* | ?:[\\/]*)
8137  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8138  ;;
8139  *)
8140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8141for as_dir in $PATH
8142do
8143  IFS=$as_save_IFS
8144  test -z "$as_dir" && as_dir=.
8145    for ac_exec_ext in '' $ac_executable_extensions; do
8146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8147    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8149    break 2
8150  fi
8151done
8152  done
8153IFS=$as_save_IFS
8154
8155  ;;
8156esac
8157fi
8158LS=$ac_cv_path_LS
8159if test -n "$LS"; then
8160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8161$as_echo "$LS" >&6; }
8162else
8163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8164$as_echo "no" >&6; }
8165fi
8166
8167
8168  test -n "$LS" && break
8169done
8170
8171  else
8172    # The variable is set, but is it from the command line or the environment?
8173
8174    # Try to remove the string !LS! from our list.
8175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8177      # If it failed, the variable was not from the command line. Ignore it,
8178      # but warn the user (except for BASH, which is always set by the calling BASH).
8179      if test "xLS" != xBASH; then
8180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8181$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8182      fi
8183      # Try to locate tool using the code snippet
8184      for ac_prog in ls
8185do
8186  # Extract the first word of "$ac_prog", so it can be a program name with args.
8187set dummy $ac_prog; ac_word=$2
8188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8189$as_echo_n "checking for $ac_word... " >&6; }
8190if ${ac_cv_path_LS+:} false; then :
8191  $as_echo_n "(cached) " >&6
8192else
8193  case $LS in
8194  [\\/]* | ?:[\\/]*)
8195  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8196  ;;
8197  *)
8198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8199for as_dir in $PATH
8200do
8201  IFS=$as_save_IFS
8202  test -z "$as_dir" && as_dir=.
8203    for ac_exec_ext in '' $ac_executable_extensions; do
8204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8205    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8207    break 2
8208  fi
8209done
8210  done
8211IFS=$as_save_IFS
8212
8213  ;;
8214esac
8215fi
8216LS=$ac_cv_path_LS
8217if test -n "$LS"; then
8218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8219$as_echo "$LS" >&6; }
8220else
8221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222$as_echo "no" >&6; }
8223fi
8224
8225
8226  test -n "$LS" && break
8227done
8228
8229    else
8230      # If it succeeded, then it was overridden by the user. We will use it
8231      # for the tool.
8232
8233      # First remove it from the list of overridden variables, so we can test
8234      # for unknown variables in the end.
8235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8236
8237      # Check if we try to supply an empty value
8238      if test "x$LS" = x; then
8239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8240$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8242$as_echo_n "checking for LS... " >&6; }
8243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8244$as_echo "disabled" >&6; }
8245      else
8246        # Check if the provided tool contains a complete path.
8247        tool_specified="$LS"
8248        tool_basename="${tool_specified##*/}"
8249        if test "x$tool_basename" = "x$tool_specified"; then
8250          # A command without a complete path is provided, search $PATH.
8251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8252$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8253          # Extract the first word of "$tool_basename", so it can be a program name with args.
8254set dummy $tool_basename; ac_word=$2
8255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8256$as_echo_n "checking for $ac_word... " >&6; }
8257if ${ac_cv_path_LS+:} false; then :
8258  $as_echo_n "(cached) " >&6
8259else
8260  case $LS in
8261  [\\/]* | ?:[\\/]*)
8262  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8263  ;;
8264  *)
8265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8266for as_dir in $PATH
8267do
8268  IFS=$as_save_IFS
8269  test -z "$as_dir" && as_dir=.
8270    for ac_exec_ext in '' $ac_executable_extensions; do
8271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8272    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8274    break 2
8275  fi
8276done
8277  done
8278IFS=$as_save_IFS
8279
8280  ;;
8281esac
8282fi
8283LS=$ac_cv_path_LS
8284if test -n "$LS"; then
8285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8286$as_echo "$LS" >&6; }
8287else
8288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8289$as_echo "no" >&6; }
8290fi
8291
8292
8293          if test "x$LS" = x; then
8294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8295          fi
8296        else
8297          # Otherwise we believe it is a complete path. Use it as it is.
8298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8299$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8301$as_echo_n "checking for LS... " >&6; }
8302          if test ! -x "$tool_specified"; then
8303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8304$as_echo "not found" >&6; }
8305            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8306          fi
8307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8308$as_echo "$tool_specified" >&6; }
8309        fi
8310      fi
8311    fi
8312
8313  fi
8314
8315
8316
8317  if test "x$LS" = x; then
8318    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8319  fi
8320
8321
8322
8323
8324
8325  # Publish this variable in the help.
8326
8327
8328  if [ -z "${MKDIR+x}" ]; then
8329    # The variable is not set by user, try to locate tool using the code snippet
8330    for ac_prog in mkdir
8331do
8332  # Extract the first word of "$ac_prog", so it can be a program name with args.
8333set dummy $ac_prog; ac_word=$2
8334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8335$as_echo_n "checking for $ac_word... " >&6; }
8336if ${ac_cv_path_MKDIR+:} false; then :
8337  $as_echo_n "(cached) " >&6
8338else
8339  case $MKDIR in
8340  [\\/]* | ?:[\\/]*)
8341  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8342  ;;
8343  *)
8344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8345for as_dir in $PATH
8346do
8347  IFS=$as_save_IFS
8348  test -z "$as_dir" && as_dir=.
8349    for ac_exec_ext in '' $ac_executable_extensions; do
8350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8351    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8353    break 2
8354  fi
8355done
8356  done
8357IFS=$as_save_IFS
8358
8359  ;;
8360esac
8361fi
8362MKDIR=$ac_cv_path_MKDIR
8363if test -n "$MKDIR"; then
8364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8365$as_echo "$MKDIR" >&6; }
8366else
8367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8368$as_echo "no" >&6; }
8369fi
8370
8371
8372  test -n "$MKDIR" && break
8373done
8374
8375  else
8376    # The variable is set, but is it from the command line or the environment?
8377
8378    # Try to remove the string !MKDIR! from our list.
8379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8381      # If it failed, the variable was not from the command line. Ignore it,
8382      # but warn the user (except for BASH, which is always set by the calling BASH).
8383      if test "xMKDIR" != xBASH; then
8384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8385$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8386      fi
8387      # Try to locate tool using the code snippet
8388      for ac_prog in mkdir
8389do
8390  # Extract the first word of "$ac_prog", so it can be a program name with args.
8391set dummy $ac_prog; ac_word=$2
8392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8393$as_echo_n "checking for $ac_word... " >&6; }
8394if ${ac_cv_path_MKDIR+:} false; then :
8395  $as_echo_n "(cached) " >&6
8396else
8397  case $MKDIR in
8398  [\\/]* | ?:[\\/]*)
8399  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8400  ;;
8401  *)
8402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8403for as_dir in $PATH
8404do
8405  IFS=$as_save_IFS
8406  test -z "$as_dir" && as_dir=.
8407    for ac_exec_ext in '' $ac_executable_extensions; do
8408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8409    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8411    break 2
8412  fi
8413done
8414  done
8415IFS=$as_save_IFS
8416
8417  ;;
8418esac
8419fi
8420MKDIR=$ac_cv_path_MKDIR
8421if test -n "$MKDIR"; then
8422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8423$as_echo "$MKDIR" >&6; }
8424else
8425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8426$as_echo "no" >&6; }
8427fi
8428
8429
8430  test -n "$MKDIR" && break
8431done
8432
8433    else
8434      # If it succeeded, then it was overridden by the user. We will use it
8435      # for the tool.
8436
8437      # First remove it from the list of overridden variables, so we can test
8438      # for unknown variables in the end.
8439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8440
8441      # Check if we try to supply an empty value
8442      if test "x$MKDIR" = x; then
8443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8444$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8446$as_echo_n "checking for MKDIR... " >&6; }
8447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8448$as_echo "disabled" >&6; }
8449      else
8450        # Check if the provided tool contains a complete path.
8451        tool_specified="$MKDIR"
8452        tool_basename="${tool_specified##*/}"
8453        if test "x$tool_basename" = "x$tool_specified"; then
8454          # A command without a complete path is provided, search $PATH.
8455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8456$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8457          # Extract the first word of "$tool_basename", so it can be a program name with args.
8458set dummy $tool_basename; ac_word=$2
8459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8460$as_echo_n "checking for $ac_word... " >&6; }
8461if ${ac_cv_path_MKDIR+:} false; then :
8462  $as_echo_n "(cached) " >&6
8463else
8464  case $MKDIR in
8465  [\\/]* | ?:[\\/]*)
8466  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8467  ;;
8468  *)
8469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8470for as_dir in $PATH
8471do
8472  IFS=$as_save_IFS
8473  test -z "$as_dir" && as_dir=.
8474    for ac_exec_ext in '' $ac_executable_extensions; do
8475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8476    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8478    break 2
8479  fi
8480done
8481  done
8482IFS=$as_save_IFS
8483
8484  ;;
8485esac
8486fi
8487MKDIR=$ac_cv_path_MKDIR
8488if test -n "$MKDIR"; then
8489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8490$as_echo "$MKDIR" >&6; }
8491else
8492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8493$as_echo "no" >&6; }
8494fi
8495
8496
8497          if test "x$MKDIR" = x; then
8498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8499          fi
8500        else
8501          # Otherwise we believe it is a complete path. Use it as it is.
8502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8503$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8505$as_echo_n "checking for MKDIR... " >&6; }
8506          if test ! -x "$tool_specified"; then
8507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8508$as_echo "not found" >&6; }
8509            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8510          fi
8511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8512$as_echo "$tool_specified" >&6; }
8513        fi
8514      fi
8515    fi
8516
8517  fi
8518
8519
8520
8521  if test "x$MKDIR" = x; then
8522    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8523  fi
8524
8525
8526
8527
8528
8529  # Publish this variable in the help.
8530
8531
8532  if [ -z "${MKTEMP+x}" ]; then
8533    # The variable is not set by user, try to locate tool using the code snippet
8534    for ac_prog in mktemp
8535do
8536  # Extract the first word of "$ac_prog", so it can be a program name with args.
8537set dummy $ac_prog; ac_word=$2
8538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8539$as_echo_n "checking for $ac_word... " >&6; }
8540if ${ac_cv_path_MKTEMP+:} false; then :
8541  $as_echo_n "(cached) " >&6
8542else
8543  case $MKTEMP in
8544  [\\/]* | ?:[\\/]*)
8545  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8546  ;;
8547  *)
8548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8549for as_dir in $PATH
8550do
8551  IFS=$as_save_IFS
8552  test -z "$as_dir" && as_dir=.
8553    for ac_exec_ext in '' $ac_executable_extensions; do
8554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8555    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8557    break 2
8558  fi
8559done
8560  done
8561IFS=$as_save_IFS
8562
8563  ;;
8564esac
8565fi
8566MKTEMP=$ac_cv_path_MKTEMP
8567if test -n "$MKTEMP"; then
8568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8569$as_echo "$MKTEMP" >&6; }
8570else
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8572$as_echo "no" >&6; }
8573fi
8574
8575
8576  test -n "$MKTEMP" && break
8577done
8578
8579  else
8580    # The variable is set, but is it from the command line or the environment?
8581
8582    # Try to remove the string !MKTEMP! from our list.
8583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8585      # If it failed, the variable was not from the command line. Ignore it,
8586      # but warn the user (except for BASH, which is always set by the calling BASH).
8587      if test "xMKTEMP" != xBASH; then
8588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8589$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8590      fi
8591      # Try to locate tool using the code snippet
8592      for ac_prog in mktemp
8593do
8594  # Extract the first word of "$ac_prog", so it can be a program name with args.
8595set dummy $ac_prog; ac_word=$2
8596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8597$as_echo_n "checking for $ac_word... " >&6; }
8598if ${ac_cv_path_MKTEMP+:} false; then :
8599  $as_echo_n "(cached) " >&6
8600else
8601  case $MKTEMP in
8602  [\\/]* | ?:[\\/]*)
8603  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8604  ;;
8605  *)
8606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8607for as_dir in $PATH
8608do
8609  IFS=$as_save_IFS
8610  test -z "$as_dir" && as_dir=.
8611    for ac_exec_ext in '' $ac_executable_extensions; do
8612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8613    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8615    break 2
8616  fi
8617done
8618  done
8619IFS=$as_save_IFS
8620
8621  ;;
8622esac
8623fi
8624MKTEMP=$ac_cv_path_MKTEMP
8625if test -n "$MKTEMP"; then
8626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8627$as_echo "$MKTEMP" >&6; }
8628else
8629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630$as_echo "no" >&6; }
8631fi
8632
8633
8634  test -n "$MKTEMP" && break
8635done
8636
8637    else
8638      # If it succeeded, then it was overridden by the user. We will use it
8639      # for the tool.
8640
8641      # First remove it from the list of overridden variables, so we can test
8642      # for unknown variables in the end.
8643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8644
8645      # Check if we try to supply an empty value
8646      if test "x$MKTEMP" = x; then
8647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8648$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8650$as_echo_n "checking for MKTEMP... " >&6; }
8651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8652$as_echo "disabled" >&6; }
8653      else
8654        # Check if the provided tool contains a complete path.
8655        tool_specified="$MKTEMP"
8656        tool_basename="${tool_specified##*/}"
8657        if test "x$tool_basename" = "x$tool_specified"; then
8658          # A command without a complete path is provided, search $PATH.
8659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8660$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8661          # Extract the first word of "$tool_basename", so it can be a program name with args.
8662set dummy $tool_basename; ac_word=$2
8663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8664$as_echo_n "checking for $ac_word... " >&6; }
8665if ${ac_cv_path_MKTEMP+:} false; then :
8666  $as_echo_n "(cached) " >&6
8667else
8668  case $MKTEMP in
8669  [\\/]* | ?:[\\/]*)
8670  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8671  ;;
8672  *)
8673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8674for as_dir in $PATH
8675do
8676  IFS=$as_save_IFS
8677  test -z "$as_dir" && as_dir=.
8678    for ac_exec_ext in '' $ac_executable_extensions; do
8679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8680    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8682    break 2
8683  fi
8684done
8685  done
8686IFS=$as_save_IFS
8687
8688  ;;
8689esac
8690fi
8691MKTEMP=$ac_cv_path_MKTEMP
8692if test -n "$MKTEMP"; then
8693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8694$as_echo "$MKTEMP" >&6; }
8695else
8696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8697$as_echo "no" >&6; }
8698fi
8699
8700
8701          if test "x$MKTEMP" = x; then
8702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8703          fi
8704        else
8705          # Otherwise we believe it is a complete path. Use it as it is.
8706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8707$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8709$as_echo_n "checking for MKTEMP... " >&6; }
8710          if test ! -x "$tool_specified"; then
8711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8712$as_echo "not found" >&6; }
8713            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8714          fi
8715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8716$as_echo "$tool_specified" >&6; }
8717        fi
8718      fi
8719    fi
8720
8721  fi
8722
8723
8724
8725  if test "x$MKTEMP" = x; then
8726    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8727  fi
8728
8729
8730
8731
8732
8733  # Publish this variable in the help.
8734
8735
8736  if [ -z "${MV+x}" ]; then
8737    # The variable is not set by user, try to locate tool using the code snippet
8738    for ac_prog in mv
8739do
8740  # Extract the first word of "$ac_prog", so it can be a program name with args.
8741set dummy $ac_prog; ac_word=$2
8742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8743$as_echo_n "checking for $ac_word... " >&6; }
8744if ${ac_cv_path_MV+:} false; then :
8745  $as_echo_n "(cached) " >&6
8746else
8747  case $MV in
8748  [\\/]* | ?:[\\/]*)
8749  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8750  ;;
8751  *)
8752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8753for as_dir in $PATH
8754do
8755  IFS=$as_save_IFS
8756  test -z "$as_dir" && as_dir=.
8757    for ac_exec_ext in '' $ac_executable_extensions; do
8758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8759    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8761    break 2
8762  fi
8763done
8764  done
8765IFS=$as_save_IFS
8766
8767  ;;
8768esac
8769fi
8770MV=$ac_cv_path_MV
8771if test -n "$MV"; then
8772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8773$as_echo "$MV" >&6; }
8774else
8775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8776$as_echo "no" >&6; }
8777fi
8778
8779
8780  test -n "$MV" && break
8781done
8782
8783  else
8784    # The variable is set, but is it from the command line or the environment?
8785
8786    # Try to remove the string !MV! from our list.
8787    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8788    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8789      # If it failed, the variable was not from the command line. Ignore it,
8790      # but warn the user (except for BASH, which is always set by the calling BASH).
8791      if test "xMV" != xBASH; then
8792        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8793$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8794      fi
8795      # Try to locate tool using the code snippet
8796      for ac_prog in mv
8797do
8798  # Extract the first word of "$ac_prog", so it can be a program name with args.
8799set dummy $ac_prog; ac_word=$2
8800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8801$as_echo_n "checking for $ac_word... " >&6; }
8802if ${ac_cv_path_MV+:} false; then :
8803  $as_echo_n "(cached) " >&6
8804else
8805  case $MV in
8806  [\\/]* | ?:[\\/]*)
8807  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8808  ;;
8809  *)
8810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8811for as_dir in $PATH
8812do
8813  IFS=$as_save_IFS
8814  test -z "$as_dir" && as_dir=.
8815    for ac_exec_ext in '' $ac_executable_extensions; do
8816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8817    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8819    break 2
8820  fi
8821done
8822  done
8823IFS=$as_save_IFS
8824
8825  ;;
8826esac
8827fi
8828MV=$ac_cv_path_MV
8829if test -n "$MV"; then
8830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8831$as_echo "$MV" >&6; }
8832else
8833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8834$as_echo "no" >&6; }
8835fi
8836
8837
8838  test -n "$MV" && break
8839done
8840
8841    else
8842      # If it succeeded, then it was overridden by the user. We will use it
8843      # for the tool.
8844
8845      # First remove it from the list of overridden variables, so we can test
8846      # for unknown variables in the end.
8847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8848
8849      # Check if we try to supply an empty value
8850      if test "x$MV" = x; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8852$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8854$as_echo_n "checking for MV... " >&6; }
8855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8856$as_echo "disabled" >&6; }
8857      else
8858        # Check if the provided tool contains a complete path.
8859        tool_specified="$MV"
8860        tool_basename="${tool_specified##*/}"
8861        if test "x$tool_basename" = "x$tool_specified"; then
8862          # A command without a complete path is provided, search $PATH.
8863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8864$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8865          # Extract the first word of "$tool_basename", so it can be a program name with args.
8866set dummy $tool_basename; ac_word=$2
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
8869if ${ac_cv_path_MV+:} false; then :
8870  $as_echo_n "(cached) " >&6
8871else
8872  case $MV in
8873  [\\/]* | ?:[\\/]*)
8874  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8875  ;;
8876  *)
8877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880  IFS=$as_save_IFS
8881  test -z "$as_dir" && as_dir=.
8882    for ac_exec_ext in '' $ac_executable_extensions; do
8883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8884    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8886    break 2
8887  fi
8888done
8889  done
8890IFS=$as_save_IFS
8891
8892  ;;
8893esac
8894fi
8895MV=$ac_cv_path_MV
8896if test -n "$MV"; then
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8898$as_echo "$MV" >&6; }
8899else
8900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8901$as_echo "no" >&6; }
8902fi
8903
8904
8905          if test "x$MV" = x; then
8906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8907          fi
8908        else
8909          # Otherwise we believe it is a complete path. Use it as it is.
8910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8911$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8913$as_echo_n "checking for MV... " >&6; }
8914          if test ! -x "$tool_specified"; then
8915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8916$as_echo "not found" >&6; }
8917            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8918          fi
8919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8920$as_echo "$tool_specified" >&6; }
8921        fi
8922      fi
8923    fi
8924
8925  fi
8926
8927
8928
8929  if test "x$MV" = x; then
8930    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8931  fi
8932
8933
8934
8935
8936
8937  # Publish this variable in the help.
8938
8939
8940  if [ -z "${NAWK+x}" ]; then
8941    # The variable is not set by user, try to locate tool using the code snippet
8942    for ac_prog in nawk gawk awk
8943do
8944  # Extract the first word of "$ac_prog", so it can be a program name with args.
8945set dummy $ac_prog; ac_word=$2
8946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8947$as_echo_n "checking for $ac_word... " >&6; }
8948if ${ac_cv_path_NAWK+:} false; then :
8949  $as_echo_n "(cached) " >&6
8950else
8951  case $NAWK in
8952  [\\/]* | ?:[\\/]*)
8953  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8954  ;;
8955  *)
8956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8957for as_dir in $PATH
8958do
8959  IFS=$as_save_IFS
8960  test -z "$as_dir" && as_dir=.
8961    for ac_exec_ext in '' $ac_executable_extensions; do
8962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8963    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8965    break 2
8966  fi
8967done
8968  done
8969IFS=$as_save_IFS
8970
8971  ;;
8972esac
8973fi
8974NAWK=$ac_cv_path_NAWK
8975if test -n "$NAWK"; then
8976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8977$as_echo "$NAWK" >&6; }
8978else
8979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8980$as_echo "no" >&6; }
8981fi
8982
8983
8984  test -n "$NAWK" && break
8985done
8986
8987  else
8988    # The variable is set, but is it from the command line or the environment?
8989
8990    # Try to remove the string !NAWK! from our list.
8991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8993      # If it failed, the variable was not from the command line. Ignore it,
8994      # but warn the user (except for BASH, which is always set by the calling BASH).
8995      if test "xNAWK" != xBASH; then
8996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8997$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8998      fi
8999      # Try to locate tool using the code snippet
9000      for ac_prog in nawk gawk awk
9001do
9002  # Extract the first word of "$ac_prog", so it can be a program name with args.
9003set dummy $ac_prog; ac_word=$2
9004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9005$as_echo_n "checking for $ac_word... " >&6; }
9006if ${ac_cv_path_NAWK+:} false; then :
9007  $as_echo_n "(cached) " >&6
9008else
9009  case $NAWK in
9010  [\\/]* | ?:[\\/]*)
9011  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9012  ;;
9013  *)
9014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9015for as_dir in $PATH
9016do
9017  IFS=$as_save_IFS
9018  test -z "$as_dir" && as_dir=.
9019    for ac_exec_ext in '' $ac_executable_extensions; do
9020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9021    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9023    break 2
9024  fi
9025done
9026  done
9027IFS=$as_save_IFS
9028
9029  ;;
9030esac
9031fi
9032NAWK=$ac_cv_path_NAWK
9033if test -n "$NAWK"; then
9034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9035$as_echo "$NAWK" >&6; }
9036else
9037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9038$as_echo "no" >&6; }
9039fi
9040
9041
9042  test -n "$NAWK" && break
9043done
9044
9045    else
9046      # If it succeeded, then it was overridden by the user. We will use it
9047      # for the tool.
9048
9049      # First remove it from the list of overridden variables, so we can test
9050      # for unknown variables in the end.
9051      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9052
9053      # Check if we try to supply an empty value
9054      if test "x$NAWK" = x; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9056$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9057        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9058$as_echo_n "checking for NAWK... " >&6; }
9059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9060$as_echo "disabled" >&6; }
9061      else
9062        # Check if the provided tool contains a complete path.
9063        tool_specified="$NAWK"
9064        tool_basename="${tool_specified##*/}"
9065        if test "x$tool_basename" = "x$tool_specified"; then
9066          # A command without a complete path is provided, search $PATH.
9067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9068$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9069          # Extract the first word of "$tool_basename", so it can be a program name with args.
9070set dummy $tool_basename; ac_word=$2
9071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9072$as_echo_n "checking for $ac_word... " >&6; }
9073if ${ac_cv_path_NAWK+:} false; then :
9074  $as_echo_n "(cached) " >&6
9075else
9076  case $NAWK in
9077  [\\/]* | ?:[\\/]*)
9078  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9079  ;;
9080  *)
9081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9082for as_dir in $PATH
9083do
9084  IFS=$as_save_IFS
9085  test -z "$as_dir" && as_dir=.
9086    for ac_exec_ext in '' $ac_executable_extensions; do
9087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9088    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9090    break 2
9091  fi
9092done
9093  done
9094IFS=$as_save_IFS
9095
9096  ;;
9097esac
9098fi
9099NAWK=$ac_cv_path_NAWK
9100if test -n "$NAWK"; then
9101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9102$as_echo "$NAWK" >&6; }
9103else
9104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105$as_echo "no" >&6; }
9106fi
9107
9108
9109          if test "x$NAWK" = x; then
9110            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9111          fi
9112        else
9113          # Otherwise we believe it is a complete path. Use it as it is.
9114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9115$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9116          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9117$as_echo_n "checking for NAWK... " >&6; }
9118          if test ! -x "$tool_specified"; then
9119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9120$as_echo "not found" >&6; }
9121            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9122          fi
9123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9124$as_echo "$tool_specified" >&6; }
9125        fi
9126      fi
9127    fi
9128
9129  fi
9130
9131
9132
9133  if test "x$NAWK" = x; then
9134    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9135  fi
9136
9137
9138
9139
9140
9141  # Publish this variable in the help.
9142
9143
9144  if [ -z "${PRINTF+x}" ]; then
9145    # The variable is not set by user, try to locate tool using the code snippet
9146    for ac_prog in printf
9147do
9148  # Extract the first word of "$ac_prog", so it can be a program name with args.
9149set dummy $ac_prog; ac_word=$2
9150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9151$as_echo_n "checking for $ac_word... " >&6; }
9152if ${ac_cv_path_PRINTF+:} false; then :
9153  $as_echo_n "(cached) " >&6
9154else
9155  case $PRINTF in
9156  [\\/]* | ?:[\\/]*)
9157  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9158  ;;
9159  *)
9160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9161for as_dir in $PATH
9162do
9163  IFS=$as_save_IFS
9164  test -z "$as_dir" && as_dir=.
9165    for ac_exec_ext in '' $ac_executable_extensions; do
9166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9167    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9169    break 2
9170  fi
9171done
9172  done
9173IFS=$as_save_IFS
9174
9175  ;;
9176esac
9177fi
9178PRINTF=$ac_cv_path_PRINTF
9179if test -n "$PRINTF"; then
9180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9181$as_echo "$PRINTF" >&6; }
9182else
9183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184$as_echo "no" >&6; }
9185fi
9186
9187
9188  test -n "$PRINTF" && break
9189done
9190
9191  else
9192    # The variable is set, but is it from the command line or the environment?
9193
9194    # Try to remove the string !PRINTF! from our list.
9195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9197      # If it failed, the variable was not from the command line. Ignore it,
9198      # but warn the user (except for BASH, which is always set by the calling BASH).
9199      if test "xPRINTF" != xBASH; then
9200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9201$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9202      fi
9203      # Try to locate tool using the code snippet
9204      for ac_prog in printf
9205do
9206  # Extract the first word of "$ac_prog", so it can be a program name with args.
9207set dummy $ac_prog; ac_word=$2
9208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9209$as_echo_n "checking for $ac_word... " >&6; }
9210if ${ac_cv_path_PRINTF+:} false; then :
9211  $as_echo_n "(cached) " >&6
9212else
9213  case $PRINTF in
9214  [\\/]* | ?:[\\/]*)
9215  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9216  ;;
9217  *)
9218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9219for as_dir in $PATH
9220do
9221  IFS=$as_save_IFS
9222  test -z "$as_dir" && as_dir=.
9223    for ac_exec_ext in '' $ac_executable_extensions; do
9224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9225    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9227    break 2
9228  fi
9229done
9230  done
9231IFS=$as_save_IFS
9232
9233  ;;
9234esac
9235fi
9236PRINTF=$ac_cv_path_PRINTF
9237if test -n "$PRINTF"; then
9238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9239$as_echo "$PRINTF" >&6; }
9240else
9241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9242$as_echo "no" >&6; }
9243fi
9244
9245
9246  test -n "$PRINTF" && break
9247done
9248
9249    else
9250      # If it succeeded, then it was overridden by the user. We will use it
9251      # for the tool.
9252
9253      # First remove it from the list of overridden variables, so we can test
9254      # for unknown variables in the end.
9255      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9256
9257      # Check if we try to supply an empty value
9258      if test "x$PRINTF" = x; then
9259        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9260$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9262$as_echo_n "checking for PRINTF... " >&6; }
9263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9264$as_echo "disabled" >&6; }
9265      else
9266        # Check if the provided tool contains a complete path.
9267        tool_specified="$PRINTF"
9268        tool_basename="${tool_specified##*/}"
9269        if test "x$tool_basename" = "x$tool_specified"; then
9270          # A command without a complete path is provided, search $PATH.
9271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9272$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9273          # Extract the first word of "$tool_basename", so it can be a program name with args.
9274set dummy $tool_basename; ac_word=$2
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276$as_echo_n "checking for $ac_word... " >&6; }
9277if ${ac_cv_path_PRINTF+:} false; then :
9278  $as_echo_n "(cached) " >&6
9279else
9280  case $PRINTF in
9281  [\\/]* | ?:[\\/]*)
9282  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9283  ;;
9284  *)
9285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286for as_dir in $PATH
9287do
9288  IFS=$as_save_IFS
9289  test -z "$as_dir" && as_dir=.
9290    for ac_exec_ext in '' $ac_executable_extensions; do
9291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294    break 2
9295  fi
9296done
9297  done
9298IFS=$as_save_IFS
9299
9300  ;;
9301esac
9302fi
9303PRINTF=$ac_cv_path_PRINTF
9304if test -n "$PRINTF"; then
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9306$as_echo "$PRINTF" >&6; }
9307else
9308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
9310fi
9311
9312
9313          if test "x$PRINTF" = x; then
9314            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9315          fi
9316        else
9317          # Otherwise we believe it is a complete path. Use it as it is.
9318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9319$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9320          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9321$as_echo_n "checking for PRINTF... " >&6; }
9322          if test ! -x "$tool_specified"; then
9323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9324$as_echo "not found" >&6; }
9325            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9326          fi
9327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9328$as_echo "$tool_specified" >&6; }
9329        fi
9330      fi
9331    fi
9332
9333  fi
9334
9335
9336
9337  if test "x$PRINTF" = x; then
9338    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9339  fi
9340
9341
9342
9343
9344
9345  # Publish this variable in the help.
9346
9347
9348  if [ -z "${RM+x}" ]; then
9349    # The variable is not set by user, try to locate tool using the code snippet
9350    for ac_prog in rm
9351do
9352  # Extract the first word of "$ac_prog", so it can be a program name with args.
9353set dummy $ac_prog; ac_word=$2
9354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9355$as_echo_n "checking for $ac_word... " >&6; }
9356if ${ac_cv_path_RM+:} false; then :
9357  $as_echo_n "(cached) " >&6
9358else
9359  case $RM in
9360  [\\/]* | ?:[\\/]*)
9361  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9362  ;;
9363  *)
9364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9365for as_dir in $PATH
9366do
9367  IFS=$as_save_IFS
9368  test -z "$as_dir" && as_dir=.
9369    for ac_exec_ext in '' $ac_executable_extensions; do
9370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9371    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9373    break 2
9374  fi
9375done
9376  done
9377IFS=$as_save_IFS
9378
9379  ;;
9380esac
9381fi
9382RM=$ac_cv_path_RM
9383if test -n "$RM"; then
9384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9385$as_echo "$RM" >&6; }
9386else
9387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9388$as_echo "no" >&6; }
9389fi
9390
9391
9392  test -n "$RM" && break
9393done
9394
9395  else
9396    # The variable is set, but is it from the command line or the environment?
9397
9398    # Try to remove the string !RM! from our list.
9399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9401      # If it failed, the variable was not from the command line. Ignore it,
9402      # but warn the user (except for BASH, which is always set by the calling BASH).
9403      if test "xRM" != xBASH; then
9404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9405$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9406      fi
9407      # Try to locate tool using the code snippet
9408      for ac_prog in rm
9409do
9410  # Extract the first word of "$ac_prog", so it can be a program name with args.
9411set dummy $ac_prog; ac_word=$2
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9413$as_echo_n "checking for $ac_word... " >&6; }
9414if ${ac_cv_path_RM+:} false; then :
9415  $as_echo_n "(cached) " >&6
9416else
9417  case $RM in
9418  [\\/]* | ?:[\\/]*)
9419  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9420  ;;
9421  *)
9422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9423for as_dir in $PATH
9424do
9425  IFS=$as_save_IFS
9426  test -z "$as_dir" && as_dir=.
9427    for ac_exec_ext in '' $ac_executable_extensions; do
9428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9429    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9431    break 2
9432  fi
9433done
9434  done
9435IFS=$as_save_IFS
9436
9437  ;;
9438esac
9439fi
9440RM=$ac_cv_path_RM
9441if test -n "$RM"; then
9442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9443$as_echo "$RM" >&6; }
9444else
9445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9446$as_echo "no" >&6; }
9447fi
9448
9449
9450  test -n "$RM" && break
9451done
9452
9453    else
9454      # If it succeeded, then it was overridden by the user. We will use it
9455      # for the tool.
9456
9457      # First remove it from the list of overridden variables, so we can test
9458      # for unknown variables in the end.
9459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9460
9461      # Check if we try to supply an empty value
9462      if test "x$RM" = x; then
9463        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9464$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9466$as_echo_n "checking for RM... " >&6; }
9467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9468$as_echo "disabled" >&6; }
9469      else
9470        # Check if the provided tool contains a complete path.
9471        tool_specified="$RM"
9472        tool_basename="${tool_specified##*/}"
9473        if test "x$tool_basename" = "x$tool_specified"; then
9474          # A command without a complete path is provided, search $PATH.
9475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9476$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9477          # Extract the first word of "$tool_basename", so it can be a program name with args.
9478set dummy $tool_basename; ac_word=$2
9479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9480$as_echo_n "checking for $ac_word... " >&6; }
9481if ${ac_cv_path_RM+:} false; then :
9482  $as_echo_n "(cached) " >&6
9483else
9484  case $RM in
9485  [\\/]* | ?:[\\/]*)
9486  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9487  ;;
9488  *)
9489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9490for as_dir in $PATH
9491do
9492  IFS=$as_save_IFS
9493  test -z "$as_dir" && as_dir=.
9494    for ac_exec_ext in '' $ac_executable_extensions; do
9495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9496    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9498    break 2
9499  fi
9500done
9501  done
9502IFS=$as_save_IFS
9503
9504  ;;
9505esac
9506fi
9507RM=$ac_cv_path_RM
9508if test -n "$RM"; then
9509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9510$as_echo "$RM" >&6; }
9511else
9512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513$as_echo "no" >&6; }
9514fi
9515
9516
9517          if test "x$RM" = x; then
9518            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9519          fi
9520        else
9521          # Otherwise we believe it is a complete path. Use it as it is.
9522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9523$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9524          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9525$as_echo_n "checking for RM... " >&6; }
9526          if test ! -x "$tool_specified"; then
9527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9528$as_echo "not found" >&6; }
9529            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9530          fi
9531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9532$as_echo "$tool_specified" >&6; }
9533        fi
9534      fi
9535    fi
9536
9537  fi
9538
9539
9540
9541  if test "x$RM" = x; then
9542    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9543  fi
9544
9545
9546
9547
9548
9549  # Publish this variable in the help.
9550
9551
9552  if [ -z "${RMDIR+x}" ]; then
9553    # The variable is not set by user, try to locate tool using the code snippet
9554    for ac_prog in rmdir
9555do
9556  # Extract the first word of "$ac_prog", so it can be a program name with args.
9557set dummy $ac_prog; ac_word=$2
9558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9559$as_echo_n "checking for $ac_word... " >&6; }
9560if ${ac_cv_path_RMDIR+:} false; then :
9561  $as_echo_n "(cached) " >&6
9562else
9563  case $RMDIR in
9564  [\\/]* | ?:[\\/]*)
9565  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9566  ;;
9567  *)
9568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9569for as_dir in $PATH
9570do
9571  IFS=$as_save_IFS
9572  test -z "$as_dir" && as_dir=.
9573    for ac_exec_ext in '' $ac_executable_extensions; do
9574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9575    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9577    break 2
9578  fi
9579done
9580  done
9581IFS=$as_save_IFS
9582
9583  ;;
9584esac
9585fi
9586RMDIR=$ac_cv_path_RMDIR
9587if test -n "$RMDIR"; then
9588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9589$as_echo "$RMDIR" >&6; }
9590else
9591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9592$as_echo "no" >&6; }
9593fi
9594
9595
9596  test -n "$RMDIR" && break
9597done
9598
9599  else
9600    # The variable is set, but is it from the command line or the environment?
9601
9602    # Try to remove the string !RMDIR! from our list.
9603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9605      # If it failed, the variable was not from the command line. Ignore it,
9606      # but warn the user (except for BASH, which is always set by the calling BASH).
9607      if test "xRMDIR" != xBASH; then
9608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9609$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9610      fi
9611      # Try to locate tool using the code snippet
9612      for ac_prog in rmdir
9613do
9614  # Extract the first word of "$ac_prog", so it can be a program name with args.
9615set dummy $ac_prog; ac_word=$2
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9617$as_echo_n "checking for $ac_word... " >&6; }
9618if ${ac_cv_path_RMDIR+:} false; then :
9619  $as_echo_n "(cached) " >&6
9620else
9621  case $RMDIR in
9622  [\\/]* | ?:[\\/]*)
9623  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9624  ;;
9625  *)
9626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9627for as_dir in $PATH
9628do
9629  IFS=$as_save_IFS
9630  test -z "$as_dir" && as_dir=.
9631    for ac_exec_ext in '' $ac_executable_extensions; do
9632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9633    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9635    break 2
9636  fi
9637done
9638  done
9639IFS=$as_save_IFS
9640
9641  ;;
9642esac
9643fi
9644RMDIR=$ac_cv_path_RMDIR
9645if test -n "$RMDIR"; then
9646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9647$as_echo "$RMDIR" >&6; }
9648else
9649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9650$as_echo "no" >&6; }
9651fi
9652
9653
9654  test -n "$RMDIR" && break
9655done
9656
9657    else
9658      # If it succeeded, then it was overridden by the user. We will use it
9659      # for the tool.
9660
9661      # First remove it from the list of overridden variables, so we can test
9662      # for unknown variables in the end.
9663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9664
9665      # Check if we try to supply an empty value
9666      if test "x$RMDIR" = x; then
9667        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9668$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9670$as_echo_n "checking for RMDIR... " >&6; }
9671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9672$as_echo "disabled" >&6; }
9673      else
9674        # Check if the provided tool contains a complete path.
9675        tool_specified="$RMDIR"
9676        tool_basename="${tool_specified##*/}"
9677        if test "x$tool_basename" = "x$tool_specified"; then
9678          # A command without a complete path is provided, search $PATH.
9679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9680$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9681          # Extract the first word of "$tool_basename", so it can be a program name with args.
9682set dummy $tool_basename; ac_word=$2
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9684$as_echo_n "checking for $ac_word... " >&6; }
9685if ${ac_cv_path_RMDIR+:} false; then :
9686  $as_echo_n "(cached) " >&6
9687else
9688  case $RMDIR in
9689  [\\/]* | ?:[\\/]*)
9690  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9691  ;;
9692  *)
9693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9694for as_dir in $PATH
9695do
9696  IFS=$as_save_IFS
9697  test -z "$as_dir" && as_dir=.
9698    for ac_exec_ext in '' $ac_executable_extensions; do
9699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9700    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9702    break 2
9703  fi
9704done
9705  done
9706IFS=$as_save_IFS
9707
9708  ;;
9709esac
9710fi
9711RMDIR=$ac_cv_path_RMDIR
9712if test -n "$RMDIR"; then
9713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9714$as_echo "$RMDIR" >&6; }
9715else
9716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9717$as_echo "no" >&6; }
9718fi
9719
9720
9721          if test "x$RMDIR" = x; then
9722            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9723          fi
9724        else
9725          # Otherwise we believe it is a complete path. Use it as it is.
9726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9727$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9729$as_echo_n "checking for RMDIR... " >&6; }
9730          if test ! -x "$tool_specified"; then
9731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9732$as_echo "not found" >&6; }
9733            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9734          fi
9735          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9736$as_echo "$tool_specified" >&6; }
9737        fi
9738      fi
9739    fi
9740
9741  fi
9742
9743
9744
9745  if test "x$RMDIR" = x; then
9746    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9747  fi
9748
9749
9750
9751
9752
9753  # Publish this variable in the help.
9754
9755
9756  if [ -z "${SH+x}" ]; then
9757    # The variable is not set by user, try to locate tool using the code snippet
9758    for ac_prog in sh
9759do
9760  # Extract the first word of "$ac_prog", so it can be a program name with args.
9761set dummy $ac_prog; ac_word=$2
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9763$as_echo_n "checking for $ac_word... " >&6; }
9764if ${ac_cv_path_SH+:} false; then :
9765  $as_echo_n "(cached) " >&6
9766else
9767  case $SH in
9768  [\\/]* | ?:[\\/]*)
9769  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9770  ;;
9771  *)
9772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9773for as_dir in $PATH
9774do
9775  IFS=$as_save_IFS
9776  test -z "$as_dir" && as_dir=.
9777    for ac_exec_ext in '' $ac_executable_extensions; do
9778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9779    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9781    break 2
9782  fi
9783done
9784  done
9785IFS=$as_save_IFS
9786
9787  ;;
9788esac
9789fi
9790SH=$ac_cv_path_SH
9791if test -n "$SH"; then
9792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9793$as_echo "$SH" >&6; }
9794else
9795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796$as_echo "no" >&6; }
9797fi
9798
9799
9800  test -n "$SH" && break
9801done
9802
9803  else
9804    # The variable is set, but is it from the command line or the environment?
9805
9806    # Try to remove the string !SH! from our list.
9807    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9808    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9809      # If it failed, the variable was not from the command line. Ignore it,
9810      # but warn the user (except for BASH, which is always set by the calling BASH).
9811      if test "xSH" != xBASH; then
9812        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9813$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9814      fi
9815      # Try to locate tool using the code snippet
9816      for ac_prog in sh
9817do
9818  # Extract the first word of "$ac_prog", so it can be a program name with args.
9819set dummy $ac_prog; ac_word=$2
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9821$as_echo_n "checking for $ac_word... " >&6; }
9822if ${ac_cv_path_SH+:} false; then :
9823  $as_echo_n "(cached) " >&6
9824else
9825  case $SH in
9826  [\\/]* | ?:[\\/]*)
9827  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9828  ;;
9829  *)
9830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9831for as_dir in $PATH
9832do
9833  IFS=$as_save_IFS
9834  test -z "$as_dir" && as_dir=.
9835    for ac_exec_ext in '' $ac_executable_extensions; do
9836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9837    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9839    break 2
9840  fi
9841done
9842  done
9843IFS=$as_save_IFS
9844
9845  ;;
9846esac
9847fi
9848SH=$ac_cv_path_SH
9849if test -n "$SH"; then
9850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9851$as_echo "$SH" >&6; }
9852else
9853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854$as_echo "no" >&6; }
9855fi
9856
9857
9858  test -n "$SH" && break
9859done
9860
9861    else
9862      # If it succeeded, then it was overridden by the user. We will use it
9863      # for the tool.
9864
9865      # First remove it from the list of overridden variables, so we can test
9866      # for unknown variables in the end.
9867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9868
9869      # Check if we try to supply an empty value
9870      if test "x$SH" = x; then
9871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9872$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9874$as_echo_n "checking for SH... " >&6; }
9875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9876$as_echo "disabled" >&6; }
9877      else
9878        # Check if the provided tool contains a complete path.
9879        tool_specified="$SH"
9880        tool_basename="${tool_specified##*/}"
9881        if test "x$tool_basename" = "x$tool_specified"; then
9882          # A command without a complete path is provided, search $PATH.
9883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9884$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9885          # Extract the first word of "$tool_basename", so it can be a program name with args.
9886set dummy $tool_basename; ac_word=$2
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9888$as_echo_n "checking for $ac_word... " >&6; }
9889if ${ac_cv_path_SH+:} false; then :
9890  $as_echo_n "(cached) " >&6
9891else
9892  case $SH in
9893  [\\/]* | ?:[\\/]*)
9894  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9895  ;;
9896  *)
9897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9898for as_dir in $PATH
9899do
9900  IFS=$as_save_IFS
9901  test -z "$as_dir" && as_dir=.
9902    for ac_exec_ext in '' $ac_executable_extensions; do
9903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9904    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9906    break 2
9907  fi
9908done
9909  done
9910IFS=$as_save_IFS
9911
9912  ;;
9913esac
9914fi
9915SH=$ac_cv_path_SH
9916if test -n "$SH"; then
9917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9918$as_echo "$SH" >&6; }
9919else
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
9922fi
9923
9924
9925          if test "x$SH" = x; then
9926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9927          fi
9928        else
9929          # Otherwise we believe it is a complete path. Use it as it is.
9930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9931$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9933$as_echo_n "checking for SH... " >&6; }
9934          if test ! -x "$tool_specified"; then
9935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9936$as_echo "not found" >&6; }
9937            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9938          fi
9939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9940$as_echo "$tool_specified" >&6; }
9941        fi
9942      fi
9943    fi
9944
9945  fi
9946
9947
9948
9949  if test "x$SH" = x; then
9950    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9951  fi
9952
9953
9954
9955
9956
9957  # Publish this variable in the help.
9958
9959
9960  if [ -z "${SORT+x}" ]; then
9961    # The variable is not set by user, try to locate tool using the code snippet
9962    for ac_prog in sort
9963do
9964  # Extract the first word of "$ac_prog", so it can be a program name with args.
9965set dummy $ac_prog; ac_word=$2
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
9968if ${ac_cv_path_SORT+:} false; then :
9969  $as_echo_n "(cached) " >&6
9970else
9971  case $SORT in
9972  [\\/]* | ?:[\\/]*)
9973  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9974  ;;
9975  *)
9976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979  IFS=$as_save_IFS
9980  test -z "$as_dir" && as_dir=.
9981    for ac_exec_ext in '' $ac_executable_extensions; do
9982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985    break 2
9986  fi
9987done
9988  done
9989IFS=$as_save_IFS
9990
9991  ;;
9992esac
9993fi
9994SORT=$ac_cv_path_SORT
9995if test -n "$SORT"; then
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9997$as_echo "$SORT" >&6; }
9998else
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
10001fi
10002
10003
10004  test -n "$SORT" && break
10005done
10006
10007  else
10008    # The variable is set, but is it from the command line or the environment?
10009
10010    # Try to remove the string !SORT! from our list.
10011    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10012    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10013      # If it failed, the variable was not from the command line. Ignore it,
10014      # but warn the user (except for BASH, which is always set by the calling BASH).
10015      if test "xSORT" != xBASH; then
10016        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10017$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10018      fi
10019      # Try to locate tool using the code snippet
10020      for ac_prog in sort
10021do
10022  # Extract the first word of "$ac_prog", so it can be a program name with args.
10023set dummy $ac_prog; ac_word=$2
10024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10025$as_echo_n "checking for $ac_word... " >&6; }
10026if ${ac_cv_path_SORT+:} false; then :
10027  $as_echo_n "(cached) " >&6
10028else
10029  case $SORT in
10030  [\\/]* | ?:[\\/]*)
10031  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10032  ;;
10033  *)
10034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10035for as_dir in $PATH
10036do
10037  IFS=$as_save_IFS
10038  test -z "$as_dir" && as_dir=.
10039    for ac_exec_ext in '' $ac_executable_extensions; do
10040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10041    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10043    break 2
10044  fi
10045done
10046  done
10047IFS=$as_save_IFS
10048
10049  ;;
10050esac
10051fi
10052SORT=$ac_cv_path_SORT
10053if test -n "$SORT"; then
10054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10055$as_echo "$SORT" >&6; }
10056else
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
10059fi
10060
10061
10062  test -n "$SORT" && break
10063done
10064
10065    else
10066      # If it succeeded, then it was overridden by the user. We will use it
10067      # for the tool.
10068
10069      # First remove it from the list of overridden variables, so we can test
10070      # for unknown variables in the end.
10071      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10072
10073      # Check if we try to supply an empty value
10074      if test "x$SORT" = x; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10076$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10077        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10078$as_echo_n "checking for SORT... " >&6; }
10079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10080$as_echo "disabled" >&6; }
10081      else
10082        # Check if the provided tool contains a complete path.
10083        tool_specified="$SORT"
10084        tool_basename="${tool_specified##*/}"
10085        if test "x$tool_basename" = "x$tool_specified"; then
10086          # A command without a complete path is provided, search $PATH.
10087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10088$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10089          # Extract the first word of "$tool_basename", so it can be a program name with args.
10090set dummy $tool_basename; ac_word=$2
10091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10092$as_echo_n "checking for $ac_word... " >&6; }
10093if ${ac_cv_path_SORT+:} false; then :
10094  $as_echo_n "(cached) " >&6
10095else
10096  case $SORT in
10097  [\\/]* | ?:[\\/]*)
10098  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10099  ;;
10100  *)
10101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10102for as_dir in $PATH
10103do
10104  IFS=$as_save_IFS
10105  test -z "$as_dir" && as_dir=.
10106    for ac_exec_ext in '' $ac_executable_extensions; do
10107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10108    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10110    break 2
10111  fi
10112done
10113  done
10114IFS=$as_save_IFS
10115
10116  ;;
10117esac
10118fi
10119SORT=$ac_cv_path_SORT
10120if test -n "$SORT"; then
10121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10122$as_echo "$SORT" >&6; }
10123else
10124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10125$as_echo "no" >&6; }
10126fi
10127
10128
10129          if test "x$SORT" = x; then
10130            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10131          fi
10132        else
10133          # Otherwise we believe it is a complete path. Use it as it is.
10134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10135$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10136          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10137$as_echo_n "checking for SORT... " >&6; }
10138          if test ! -x "$tool_specified"; then
10139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10140$as_echo "not found" >&6; }
10141            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10142          fi
10143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10144$as_echo "$tool_specified" >&6; }
10145        fi
10146      fi
10147    fi
10148
10149  fi
10150
10151
10152
10153  if test "x$SORT" = x; then
10154    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10155  fi
10156
10157
10158
10159
10160
10161  # Publish this variable in the help.
10162
10163
10164  if [ -z "${TAIL+x}" ]; then
10165    # The variable is not set by user, try to locate tool using the code snippet
10166    for ac_prog in tail
10167do
10168  # Extract the first word of "$ac_prog", so it can be a program name with args.
10169set dummy $ac_prog; ac_word=$2
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10171$as_echo_n "checking for $ac_word... " >&6; }
10172if ${ac_cv_path_TAIL+:} false; then :
10173  $as_echo_n "(cached) " >&6
10174else
10175  case $TAIL in
10176  [\\/]* | ?:[\\/]*)
10177  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10178  ;;
10179  *)
10180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10181for as_dir in $PATH
10182do
10183  IFS=$as_save_IFS
10184  test -z "$as_dir" && as_dir=.
10185    for ac_exec_ext in '' $ac_executable_extensions; do
10186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10187    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10189    break 2
10190  fi
10191done
10192  done
10193IFS=$as_save_IFS
10194
10195  ;;
10196esac
10197fi
10198TAIL=$ac_cv_path_TAIL
10199if test -n "$TAIL"; then
10200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10201$as_echo "$TAIL" >&6; }
10202else
10203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
10205fi
10206
10207
10208  test -n "$TAIL" && break
10209done
10210
10211  else
10212    # The variable is set, but is it from the command line or the environment?
10213
10214    # Try to remove the string !TAIL! from our list.
10215    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10216    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10217      # If it failed, the variable was not from the command line. Ignore it,
10218      # but warn the user (except for BASH, which is always set by the calling BASH).
10219      if test "xTAIL" != xBASH; then
10220        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10221$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10222      fi
10223      # Try to locate tool using the code snippet
10224      for ac_prog in tail
10225do
10226  # Extract the first word of "$ac_prog", so it can be a program name with args.
10227set dummy $ac_prog; ac_word=$2
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229$as_echo_n "checking for $ac_word... " >&6; }
10230if ${ac_cv_path_TAIL+:} false; then :
10231  $as_echo_n "(cached) " >&6
10232else
10233  case $TAIL in
10234  [\\/]* | ?:[\\/]*)
10235  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10236  ;;
10237  *)
10238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239for as_dir in $PATH
10240do
10241  IFS=$as_save_IFS
10242  test -z "$as_dir" && as_dir=.
10243    for ac_exec_ext in '' $ac_executable_extensions; do
10244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10245    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247    break 2
10248  fi
10249done
10250  done
10251IFS=$as_save_IFS
10252
10253  ;;
10254esac
10255fi
10256TAIL=$ac_cv_path_TAIL
10257if test -n "$TAIL"; then
10258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10259$as_echo "$TAIL" >&6; }
10260else
10261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266  test -n "$TAIL" && break
10267done
10268
10269    else
10270      # If it succeeded, then it was overridden by the user. We will use it
10271      # for the tool.
10272
10273      # First remove it from the list of overridden variables, so we can test
10274      # for unknown variables in the end.
10275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10276
10277      # Check if we try to supply an empty value
10278      if test "x$TAIL" = x; then
10279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10280$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10282$as_echo_n "checking for TAIL... " >&6; }
10283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10284$as_echo "disabled" >&6; }
10285      else
10286        # Check if the provided tool contains a complete path.
10287        tool_specified="$TAIL"
10288        tool_basename="${tool_specified##*/}"
10289        if test "x$tool_basename" = "x$tool_specified"; then
10290          # A command without a complete path is provided, search $PATH.
10291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10292$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10293          # Extract the first word of "$tool_basename", so it can be a program name with args.
10294set dummy $tool_basename; ac_word=$2
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296$as_echo_n "checking for $ac_word... " >&6; }
10297if ${ac_cv_path_TAIL+:} false; then :
10298  $as_echo_n "(cached) " >&6
10299else
10300  case $TAIL in
10301  [\\/]* | ?:[\\/]*)
10302  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10303  ;;
10304  *)
10305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306for as_dir in $PATH
10307do
10308  IFS=$as_save_IFS
10309  test -z "$as_dir" && as_dir=.
10310    for ac_exec_ext in '' $ac_executable_extensions; do
10311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10312    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314    break 2
10315  fi
10316done
10317  done
10318IFS=$as_save_IFS
10319
10320  ;;
10321esac
10322fi
10323TAIL=$ac_cv_path_TAIL
10324if test -n "$TAIL"; then
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10326$as_echo "$TAIL" >&6; }
10327else
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330fi
10331
10332
10333          if test "x$TAIL" = x; then
10334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10335          fi
10336        else
10337          # Otherwise we believe it is a complete path. Use it as it is.
10338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10339$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10341$as_echo_n "checking for TAIL... " >&6; }
10342          if test ! -x "$tool_specified"; then
10343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10344$as_echo "not found" >&6; }
10345            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10346          fi
10347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10348$as_echo "$tool_specified" >&6; }
10349        fi
10350      fi
10351    fi
10352
10353  fi
10354
10355
10356
10357  if test "x$TAIL" = x; then
10358    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10359  fi
10360
10361
10362
10363
10364
10365  # Publish this variable in the help.
10366
10367
10368  if [ -z "${TAR+x}" ]; then
10369    # The variable is not set by user, try to locate tool using the code snippet
10370    for ac_prog in tar
10371do
10372  # Extract the first word of "$ac_prog", so it can be a program name with args.
10373set dummy $ac_prog; ac_word=$2
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10375$as_echo_n "checking for $ac_word... " >&6; }
10376if ${ac_cv_path_TAR+:} false; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  case $TAR in
10380  [\\/]* | ?:[\\/]*)
10381  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10382  ;;
10383  *)
10384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10385for as_dir in $PATH
10386do
10387  IFS=$as_save_IFS
10388  test -z "$as_dir" && as_dir=.
10389    for ac_exec_ext in '' $ac_executable_extensions; do
10390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10391    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10393    break 2
10394  fi
10395done
10396  done
10397IFS=$as_save_IFS
10398
10399  ;;
10400esac
10401fi
10402TAR=$ac_cv_path_TAR
10403if test -n "$TAR"; then
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10405$as_echo "$TAR" >&6; }
10406else
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411
10412  test -n "$TAR" && break
10413done
10414
10415  else
10416    # The variable is set, but is it from the command line or the environment?
10417
10418    # Try to remove the string !TAR! from our list.
10419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10421      # If it failed, the variable was not from the command line. Ignore it,
10422      # but warn the user (except for BASH, which is always set by the calling BASH).
10423      if test "xTAR" != xBASH; then
10424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10425$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10426      fi
10427      # Try to locate tool using the code snippet
10428      for ac_prog in tar
10429do
10430  # Extract the first word of "$ac_prog", so it can be a program name with args.
10431set dummy $ac_prog; ac_word=$2
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10433$as_echo_n "checking for $ac_word... " >&6; }
10434if ${ac_cv_path_TAR+:} false; then :
10435  $as_echo_n "(cached) " >&6
10436else
10437  case $TAR in
10438  [\\/]* | ?:[\\/]*)
10439  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10440  ;;
10441  *)
10442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10443for as_dir in $PATH
10444do
10445  IFS=$as_save_IFS
10446  test -z "$as_dir" && as_dir=.
10447    for ac_exec_ext in '' $ac_executable_extensions; do
10448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10449    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10451    break 2
10452  fi
10453done
10454  done
10455IFS=$as_save_IFS
10456
10457  ;;
10458esac
10459fi
10460TAR=$ac_cv_path_TAR
10461if test -n "$TAR"; then
10462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10463$as_echo "$TAR" >&6; }
10464else
10465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10466$as_echo "no" >&6; }
10467fi
10468
10469
10470  test -n "$TAR" && break
10471done
10472
10473    else
10474      # If it succeeded, then it was overridden by the user. We will use it
10475      # for the tool.
10476
10477      # First remove it from the list of overridden variables, so we can test
10478      # for unknown variables in the end.
10479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10480
10481      # Check if we try to supply an empty value
10482      if test "x$TAR" = x; then
10483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10484$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10486$as_echo_n "checking for TAR... " >&6; }
10487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10488$as_echo "disabled" >&6; }
10489      else
10490        # Check if the provided tool contains a complete path.
10491        tool_specified="$TAR"
10492        tool_basename="${tool_specified##*/}"
10493        if test "x$tool_basename" = "x$tool_specified"; then
10494          # A command without a complete path is provided, search $PATH.
10495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10496$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10497          # Extract the first word of "$tool_basename", so it can be a program name with args.
10498set dummy $tool_basename; ac_word=$2
10499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10500$as_echo_n "checking for $ac_word... " >&6; }
10501if ${ac_cv_path_TAR+:} false; then :
10502  $as_echo_n "(cached) " >&6
10503else
10504  case $TAR in
10505  [\\/]* | ?:[\\/]*)
10506  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10507  ;;
10508  *)
10509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10510for as_dir in $PATH
10511do
10512  IFS=$as_save_IFS
10513  test -z "$as_dir" && as_dir=.
10514    for ac_exec_ext in '' $ac_executable_extensions; do
10515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10516    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10518    break 2
10519  fi
10520done
10521  done
10522IFS=$as_save_IFS
10523
10524  ;;
10525esac
10526fi
10527TAR=$ac_cv_path_TAR
10528if test -n "$TAR"; then
10529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10530$as_echo "$TAR" >&6; }
10531else
10532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10533$as_echo "no" >&6; }
10534fi
10535
10536
10537          if test "x$TAR" = x; then
10538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10539          fi
10540        else
10541          # Otherwise we believe it is a complete path. Use it as it is.
10542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10543$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10545$as_echo_n "checking for TAR... " >&6; }
10546          if test ! -x "$tool_specified"; then
10547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10548$as_echo "not found" >&6; }
10549            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10550          fi
10551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10552$as_echo "$tool_specified" >&6; }
10553        fi
10554      fi
10555    fi
10556
10557  fi
10558
10559
10560
10561  if test "x$TAR" = x; then
10562    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10563  fi
10564
10565
10566
10567
10568
10569  # Publish this variable in the help.
10570
10571
10572  if [ -z "${TEE+x}" ]; then
10573    # The variable is not set by user, try to locate tool using the code snippet
10574    for ac_prog in tee
10575do
10576  # Extract the first word of "$ac_prog", so it can be a program name with args.
10577set dummy $ac_prog; ac_word=$2
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10579$as_echo_n "checking for $ac_word... " >&6; }
10580if ${ac_cv_path_TEE+:} false; then :
10581  $as_echo_n "(cached) " >&6
10582else
10583  case $TEE in
10584  [\\/]* | ?:[\\/]*)
10585  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10586  ;;
10587  *)
10588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10589for as_dir in $PATH
10590do
10591  IFS=$as_save_IFS
10592  test -z "$as_dir" && as_dir=.
10593    for ac_exec_ext in '' $ac_executable_extensions; do
10594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10595    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10597    break 2
10598  fi
10599done
10600  done
10601IFS=$as_save_IFS
10602
10603  ;;
10604esac
10605fi
10606TEE=$ac_cv_path_TEE
10607if test -n "$TEE"; then
10608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10609$as_echo "$TEE" >&6; }
10610else
10611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612$as_echo "no" >&6; }
10613fi
10614
10615
10616  test -n "$TEE" && break
10617done
10618
10619  else
10620    # The variable is set, but is it from the command line or the environment?
10621
10622    # Try to remove the string !TEE! from our list.
10623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10625      # If it failed, the variable was not from the command line. Ignore it,
10626      # but warn the user (except for BASH, which is always set by the calling BASH).
10627      if test "xTEE" != xBASH; then
10628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10629$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10630      fi
10631      # Try to locate tool using the code snippet
10632      for ac_prog in tee
10633do
10634  # Extract the first word of "$ac_prog", so it can be a program name with args.
10635set dummy $ac_prog; ac_word=$2
10636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10637$as_echo_n "checking for $ac_word... " >&6; }
10638if ${ac_cv_path_TEE+:} false; then :
10639  $as_echo_n "(cached) " >&6
10640else
10641  case $TEE in
10642  [\\/]* | ?:[\\/]*)
10643  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10644  ;;
10645  *)
10646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10647for as_dir in $PATH
10648do
10649  IFS=$as_save_IFS
10650  test -z "$as_dir" && as_dir=.
10651    for ac_exec_ext in '' $ac_executable_extensions; do
10652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10653    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10655    break 2
10656  fi
10657done
10658  done
10659IFS=$as_save_IFS
10660
10661  ;;
10662esac
10663fi
10664TEE=$ac_cv_path_TEE
10665if test -n "$TEE"; then
10666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10667$as_echo "$TEE" >&6; }
10668else
10669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
10671fi
10672
10673
10674  test -n "$TEE" && break
10675done
10676
10677    else
10678      # If it succeeded, then it was overridden by the user. We will use it
10679      # for the tool.
10680
10681      # First remove it from the list of overridden variables, so we can test
10682      # for unknown variables in the end.
10683      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10684
10685      # Check if we try to supply an empty value
10686      if test "x$TEE" = x; then
10687        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10688$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10690$as_echo_n "checking for TEE... " >&6; }
10691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10692$as_echo "disabled" >&6; }
10693      else
10694        # Check if the provided tool contains a complete path.
10695        tool_specified="$TEE"
10696        tool_basename="${tool_specified##*/}"
10697        if test "x$tool_basename" = "x$tool_specified"; then
10698          # A command without a complete path is provided, search $PATH.
10699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10700$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10701          # Extract the first word of "$tool_basename", so it can be a program name with args.
10702set dummy $tool_basename; ac_word=$2
10703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10704$as_echo_n "checking for $ac_word... " >&6; }
10705if ${ac_cv_path_TEE+:} false; then :
10706  $as_echo_n "(cached) " >&6
10707else
10708  case $TEE in
10709  [\\/]* | ?:[\\/]*)
10710  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10711  ;;
10712  *)
10713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10714for as_dir in $PATH
10715do
10716  IFS=$as_save_IFS
10717  test -z "$as_dir" && as_dir=.
10718    for ac_exec_ext in '' $ac_executable_extensions; do
10719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10720    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10722    break 2
10723  fi
10724done
10725  done
10726IFS=$as_save_IFS
10727
10728  ;;
10729esac
10730fi
10731TEE=$ac_cv_path_TEE
10732if test -n "$TEE"; then
10733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10734$as_echo "$TEE" >&6; }
10735else
10736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
10738fi
10739
10740
10741          if test "x$TEE" = x; then
10742            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10743          fi
10744        else
10745          # Otherwise we believe it is a complete path. Use it as it is.
10746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10747$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10748          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10749$as_echo_n "checking for TEE... " >&6; }
10750          if test ! -x "$tool_specified"; then
10751            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10752$as_echo "not found" >&6; }
10753            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10754          fi
10755          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10756$as_echo "$tool_specified" >&6; }
10757        fi
10758      fi
10759    fi
10760
10761  fi
10762
10763
10764
10765  if test "x$TEE" = x; then
10766    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10767  fi
10768
10769
10770
10771
10772
10773  # Publish this variable in the help.
10774
10775
10776  if [ -z "${TOUCH+x}" ]; then
10777    # The variable is not set by user, try to locate tool using the code snippet
10778    for ac_prog in touch
10779do
10780  # Extract the first word of "$ac_prog", so it can be a program name with args.
10781set dummy $ac_prog; ac_word=$2
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10783$as_echo_n "checking for $ac_word... " >&6; }
10784if ${ac_cv_path_TOUCH+:} false; then :
10785  $as_echo_n "(cached) " >&6
10786else
10787  case $TOUCH in
10788  [\\/]* | ?:[\\/]*)
10789  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10790  ;;
10791  *)
10792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10793for as_dir in $PATH
10794do
10795  IFS=$as_save_IFS
10796  test -z "$as_dir" && as_dir=.
10797    for ac_exec_ext in '' $ac_executable_extensions; do
10798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10799    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10801    break 2
10802  fi
10803done
10804  done
10805IFS=$as_save_IFS
10806
10807  ;;
10808esac
10809fi
10810TOUCH=$ac_cv_path_TOUCH
10811if test -n "$TOUCH"; then
10812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10813$as_echo "$TOUCH" >&6; }
10814else
10815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10816$as_echo "no" >&6; }
10817fi
10818
10819
10820  test -n "$TOUCH" && break
10821done
10822
10823  else
10824    # The variable is set, but is it from the command line or the environment?
10825
10826    # Try to remove the string !TOUCH! from our list.
10827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10829      # If it failed, the variable was not from the command line. Ignore it,
10830      # but warn the user (except for BASH, which is always set by the calling BASH).
10831      if test "xTOUCH" != xBASH; then
10832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10833$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10834      fi
10835      # Try to locate tool using the code snippet
10836      for ac_prog in touch
10837do
10838  # Extract the first word of "$ac_prog", so it can be a program name with args.
10839set dummy $ac_prog; ac_word=$2
10840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10841$as_echo_n "checking for $ac_word... " >&6; }
10842if ${ac_cv_path_TOUCH+:} false; then :
10843  $as_echo_n "(cached) " >&6
10844else
10845  case $TOUCH in
10846  [\\/]* | ?:[\\/]*)
10847  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10848  ;;
10849  *)
10850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10851for as_dir in $PATH
10852do
10853  IFS=$as_save_IFS
10854  test -z "$as_dir" && as_dir=.
10855    for ac_exec_ext in '' $ac_executable_extensions; do
10856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10857    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10859    break 2
10860  fi
10861done
10862  done
10863IFS=$as_save_IFS
10864
10865  ;;
10866esac
10867fi
10868TOUCH=$ac_cv_path_TOUCH
10869if test -n "$TOUCH"; then
10870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10871$as_echo "$TOUCH" >&6; }
10872else
10873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10874$as_echo "no" >&6; }
10875fi
10876
10877
10878  test -n "$TOUCH" && break
10879done
10880
10881    else
10882      # If it succeeded, then it was overridden by the user. We will use it
10883      # for the tool.
10884
10885      # First remove it from the list of overridden variables, so we can test
10886      # for unknown variables in the end.
10887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10888
10889      # Check if we try to supply an empty value
10890      if test "x$TOUCH" = x; then
10891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10892$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10894$as_echo_n "checking for TOUCH... " >&6; }
10895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10896$as_echo "disabled" >&6; }
10897      else
10898        # Check if the provided tool contains a complete path.
10899        tool_specified="$TOUCH"
10900        tool_basename="${tool_specified##*/}"
10901        if test "x$tool_basename" = "x$tool_specified"; then
10902          # A command without a complete path is provided, search $PATH.
10903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10904$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10905          # Extract the first word of "$tool_basename", so it can be a program name with args.
10906set dummy $tool_basename; ac_word=$2
10907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10908$as_echo_n "checking for $ac_word... " >&6; }
10909if ${ac_cv_path_TOUCH+:} false; then :
10910  $as_echo_n "(cached) " >&6
10911else
10912  case $TOUCH in
10913  [\\/]* | ?:[\\/]*)
10914  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10915  ;;
10916  *)
10917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10918for as_dir in $PATH
10919do
10920  IFS=$as_save_IFS
10921  test -z "$as_dir" && as_dir=.
10922    for ac_exec_ext in '' $ac_executable_extensions; do
10923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10924    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10926    break 2
10927  fi
10928done
10929  done
10930IFS=$as_save_IFS
10931
10932  ;;
10933esac
10934fi
10935TOUCH=$ac_cv_path_TOUCH
10936if test -n "$TOUCH"; then
10937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10938$as_echo "$TOUCH" >&6; }
10939else
10940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10941$as_echo "no" >&6; }
10942fi
10943
10944
10945          if test "x$TOUCH" = x; then
10946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10947          fi
10948        else
10949          # Otherwise we believe it is a complete path. Use it as it is.
10950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10951$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10953$as_echo_n "checking for TOUCH... " >&6; }
10954          if test ! -x "$tool_specified"; then
10955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10956$as_echo "not found" >&6; }
10957            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10958          fi
10959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10960$as_echo "$tool_specified" >&6; }
10961        fi
10962      fi
10963    fi
10964
10965  fi
10966
10967
10968
10969  if test "x$TOUCH" = x; then
10970    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10971  fi
10972
10973
10974
10975
10976
10977  # Publish this variable in the help.
10978
10979
10980  if [ -z "${TR+x}" ]; then
10981    # The variable is not set by user, try to locate tool using the code snippet
10982    for ac_prog in tr
10983do
10984  # Extract the first word of "$ac_prog", so it can be a program name with args.
10985set dummy $ac_prog; ac_word=$2
10986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10987$as_echo_n "checking for $ac_word... " >&6; }
10988if ${ac_cv_path_TR+:} false; then :
10989  $as_echo_n "(cached) " >&6
10990else
10991  case $TR in
10992  [\\/]* | ?:[\\/]*)
10993  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10994  ;;
10995  *)
10996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10997for as_dir in $PATH
10998do
10999  IFS=$as_save_IFS
11000  test -z "$as_dir" && as_dir=.
11001    for ac_exec_ext in '' $ac_executable_extensions; do
11002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11003    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11005    break 2
11006  fi
11007done
11008  done
11009IFS=$as_save_IFS
11010
11011  ;;
11012esac
11013fi
11014TR=$ac_cv_path_TR
11015if test -n "$TR"; then
11016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11017$as_echo "$TR" >&6; }
11018else
11019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11020$as_echo "no" >&6; }
11021fi
11022
11023
11024  test -n "$TR" && break
11025done
11026
11027  else
11028    # The variable is set, but is it from the command line or the environment?
11029
11030    # Try to remove the string !TR! from our list.
11031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11033      # If it failed, the variable was not from the command line. Ignore it,
11034      # but warn the user (except for BASH, which is always set by the calling BASH).
11035      if test "xTR" != xBASH; then
11036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11037$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11038      fi
11039      # Try to locate tool using the code snippet
11040      for ac_prog in tr
11041do
11042  # Extract the first word of "$ac_prog", so it can be a program name with args.
11043set dummy $ac_prog; ac_word=$2
11044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11045$as_echo_n "checking for $ac_word... " >&6; }
11046if ${ac_cv_path_TR+:} false; then :
11047  $as_echo_n "(cached) " >&6
11048else
11049  case $TR in
11050  [\\/]* | ?:[\\/]*)
11051  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11052  ;;
11053  *)
11054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11055for as_dir in $PATH
11056do
11057  IFS=$as_save_IFS
11058  test -z "$as_dir" && as_dir=.
11059    for ac_exec_ext in '' $ac_executable_extensions; do
11060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11061    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11063    break 2
11064  fi
11065done
11066  done
11067IFS=$as_save_IFS
11068
11069  ;;
11070esac
11071fi
11072TR=$ac_cv_path_TR
11073if test -n "$TR"; then
11074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11075$as_echo "$TR" >&6; }
11076else
11077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11078$as_echo "no" >&6; }
11079fi
11080
11081
11082  test -n "$TR" && break
11083done
11084
11085    else
11086      # If it succeeded, then it was overridden by the user. We will use it
11087      # for the tool.
11088
11089      # First remove it from the list of overridden variables, so we can test
11090      # for unknown variables in the end.
11091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11092
11093      # Check if we try to supply an empty value
11094      if test "x$TR" = x; then
11095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11096$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11098$as_echo_n "checking for TR... " >&6; }
11099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11100$as_echo "disabled" >&6; }
11101      else
11102        # Check if the provided tool contains a complete path.
11103        tool_specified="$TR"
11104        tool_basename="${tool_specified##*/}"
11105        if test "x$tool_basename" = "x$tool_specified"; then
11106          # A command without a complete path is provided, search $PATH.
11107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11108$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11109          # Extract the first word of "$tool_basename", so it can be a program name with args.
11110set dummy $tool_basename; ac_word=$2
11111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11112$as_echo_n "checking for $ac_word... " >&6; }
11113if ${ac_cv_path_TR+:} false; then :
11114  $as_echo_n "(cached) " >&6
11115else
11116  case $TR in
11117  [\\/]* | ?:[\\/]*)
11118  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11119  ;;
11120  *)
11121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11122for as_dir in $PATH
11123do
11124  IFS=$as_save_IFS
11125  test -z "$as_dir" && as_dir=.
11126    for ac_exec_ext in '' $ac_executable_extensions; do
11127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11128    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11130    break 2
11131  fi
11132done
11133  done
11134IFS=$as_save_IFS
11135
11136  ;;
11137esac
11138fi
11139TR=$ac_cv_path_TR
11140if test -n "$TR"; then
11141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11142$as_echo "$TR" >&6; }
11143else
11144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11145$as_echo "no" >&6; }
11146fi
11147
11148
11149          if test "x$TR" = x; then
11150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11151          fi
11152        else
11153          # Otherwise we believe it is a complete path. Use it as it is.
11154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11155$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11157$as_echo_n "checking for TR... " >&6; }
11158          if test ! -x "$tool_specified"; then
11159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11160$as_echo "not found" >&6; }
11161            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11162          fi
11163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11164$as_echo "$tool_specified" >&6; }
11165        fi
11166      fi
11167    fi
11168
11169  fi
11170
11171
11172
11173  if test "x$TR" = x; then
11174    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11175  fi
11176
11177
11178
11179
11180
11181  # Publish this variable in the help.
11182
11183
11184  if [ -z "${UNAME+x}" ]; then
11185    # The variable is not set by user, try to locate tool using the code snippet
11186    for ac_prog in uname
11187do
11188  # Extract the first word of "$ac_prog", so it can be a program name with args.
11189set dummy $ac_prog; ac_word=$2
11190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11191$as_echo_n "checking for $ac_word... " >&6; }
11192if ${ac_cv_path_UNAME+:} false; then :
11193  $as_echo_n "(cached) " >&6
11194else
11195  case $UNAME in
11196  [\\/]* | ?:[\\/]*)
11197  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11198  ;;
11199  *)
11200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11201for as_dir in $PATH
11202do
11203  IFS=$as_save_IFS
11204  test -z "$as_dir" && as_dir=.
11205    for ac_exec_ext in '' $ac_executable_extensions; do
11206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11207    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11209    break 2
11210  fi
11211done
11212  done
11213IFS=$as_save_IFS
11214
11215  ;;
11216esac
11217fi
11218UNAME=$ac_cv_path_UNAME
11219if test -n "$UNAME"; then
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11221$as_echo "$UNAME" >&6; }
11222else
11223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11224$as_echo "no" >&6; }
11225fi
11226
11227
11228  test -n "$UNAME" && break
11229done
11230
11231  else
11232    # The variable is set, but is it from the command line or the environment?
11233
11234    # Try to remove the string !UNAME! from our list.
11235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11237      # If it failed, the variable was not from the command line. Ignore it,
11238      # but warn the user (except for BASH, which is always set by the calling BASH).
11239      if test "xUNAME" != xBASH; then
11240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11241$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11242      fi
11243      # Try to locate tool using the code snippet
11244      for ac_prog in uname
11245do
11246  # Extract the first word of "$ac_prog", so it can be a program name with args.
11247set dummy $ac_prog; ac_word=$2
11248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11249$as_echo_n "checking for $ac_word... " >&6; }
11250if ${ac_cv_path_UNAME+:} false; then :
11251  $as_echo_n "(cached) " >&6
11252else
11253  case $UNAME in
11254  [\\/]* | ?:[\\/]*)
11255  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11256  ;;
11257  *)
11258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11259for as_dir in $PATH
11260do
11261  IFS=$as_save_IFS
11262  test -z "$as_dir" && as_dir=.
11263    for ac_exec_ext in '' $ac_executable_extensions; do
11264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11265    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11267    break 2
11268  fi
11269done
11270  done
11271IFS=$as_save_IFS
11272
11273  ;;
11274esac
11275fi
11276UNAME=$ac_cv_path_UNAME
11277if test -n "$UNAME"; then
11278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11279$as_echo "$UNAME" >&6; }
11280else
11281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
11283fi
11284
11285
11286  test -n "$UNAME" && break
11287done
11288
11289    else
11290      # If it succeeded, then it was overridden by the user. We will use it
11291      # for the tool.
11292
11293      # First remove it from the list of overridden variables, so we can test
11294      # for unknown variables in the end.
11295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11296
11297      # Check if we try to supply an empty value
11298      if test "x$UNAME" = x; then
11299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11300$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11302$as_echo_n "checking for UNAME... " >&6; }
11303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11304$as_echo "disabled" >&6; }
11305      else
11306        # Check if the provided tool contains a complete path.
11307        tool_specified="$UNAME"
11308        tool_basename="${tool_specified##*/}"
11309        if test "x$tool_basename" = "x$tool_specified"; then
11310          # A command without a complete path is provided, search $PATH.
11311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11312$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11313          # Extract the first word of "$tool_basename", so it can be a program name with args.
11314set dummy $tool_basename; ac_word=$2
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11316$as_echo_n "checking for $ac_word... " >&6; }
11317if ${ac_cv_path_UNAME+:} false; then :
11318  $as_echo_n "(cached) " >&6
11319else
11320  case $UNAME in
11321  [\\/]* | ?:[\\/]*)
11322  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11323  ;;
11324  *)
11325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11326for as_dir in $PATH
11327do
11328  IFS=$as_save_IFS
11329  test -z "$as_dir" && as_dir=.
11330    for ac_exec_ext in '' $ac_executable_extensions; do
11331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11332    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11334    break 2
11335  fi
11336done
11337  done
11338IFS=$as_save_IFS
11339
11340  ;;
11341esac
11342fi
11343UNAME=$ac_cv_path_UNAME
11344if test -n "$UNAME"; then
11345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11346$as_echo "$UNAME" >&6; }
11347else
11348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
11350fi
11351
11352
11353          if test "x$UNAME" = x; then
11354            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11355          fi
11356        else
11357          # Otherwise we believe it is a complete path. Use it as it is.
11358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11359$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11361$as_echo_n "checking for UNAME... " >&6; }
11362          if test ! -x "$tool_specified"; then
11363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11364$as_echo "not found" >&6; }
11365            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11366          fi
11367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11368$as_echo "$tool_specified" >&6; }
11369        fi
11370      fi
11371    fi
11372
11373  fi
11374
11375
11376
11377  if test "x$UNAME" = x; then
11378    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11379  fi
11380
11381
11382
11383
11384
11385  # Publish this variable in the help.
11386
11387
11388  if [ -z "${UNIQ+x}" ]; then
11389    # The variable is not set by user, try to locate tool using the code snippet
11390    for ac_prog in uniq
11391do
11392  # Extract the first word of "$ac_prog", so it can be a program name with args.
11393set dummy $ac_prog; ac_word=$2
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11395$as_echo_n "checking for $ac_word... " >&6; }
11396if ${ac_cv_path_UNIQ+:} false; then :
11397  $as_echo_n "(cached) " >&6
11398else
11399  case $UNIQ in
11400  [\\/]* | ?:[\\/]*)
11401  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11402  ;;
11403  *)
11404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11405for as_dir in $PATH
11406do
11407  IFS=$as_save_IFS
11408  test -z "$as_dir" && as_dir=.
11409    for ac_exec_ext in '' $ac_executable_extensions; do
11410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11411    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11413    break 2
11414  fi
11415done
11416  done
11417IFS=$as_save_IFS
11418
11419  ;;
11420esac
11421fi
11422UNIQ=$ac_cv_path_UNIQ
11423if test -n "$UNIQ"; then
11424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11425$as_echo "$UNIQ" >&6; }
11426else
11427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11428$as_echo "no" >&6; }
11429fi
11430
11431
11432  test -n "$UNIQ" && break
11433done
11434
11435  else
11436    # The variable is set, but is it from the command line or the environment?
11437
11438    # Try to remove the string !UNIQ! from our list.
11439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11441      # If it failed, the variable was not from the command line. Ignore it,
11442      # but warn the user (except for BASH, which is always set by the calling BASH).
11443      if test "xUNIQ" != xBASH; then
11444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11445$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11446      fi
11447      # Try to locate tool using the code snippet
11448      for ac_prog in uniq
11449do
11450  # Extract the first word of "$ac_prog", so it can be a program name with args.
11451set dummy $ac_prog; ac_word=$2
11452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11453$as_echo_n "checking for $ac_word... " >&6; }
11454if ${ac_cv_path_UNIQ+:} false; then :
11455  $as_echo_n "(cached) " >&6
11456else
11457  case $UNIQ in
11458  [\\/]* | ?:[\\/]*)
11459  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11460  ;;
11461  *)
11462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11463for as_dir in $PATH
11464do
11465  IFS=$as_save_IFS
11466  test -z "$as_dir" && as_dir=.
11467    for ac_exec_ext in '' $ac_executable_extensions; do
11468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11469    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11471    break 2
11472  fi
11473done
11474  done
11475IFS=$as_save_IFS
11476
11477  ;;
11478esac
11479fi
11480UNIQ=$ac_cv_path_UNIQ
11481if test -n "$UNIQ"; then
11482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11483$as_echo "$UNIQ" >&6; }
11484else
11485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11486$as_echo "no" >&6; }
11487fi
11488
11489
11490  test -n "$UNIQ" && break
11491done
11492
11493    else
11494      # If it succeeded, then it was overridden by the user. We will use it
11495      # for the tool.
11496
11497      # First remove it from the list of overridden variables, so we can test
11498      # for unknown variables in the end.
11499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11500
11501      # Check if we try to supply an empty value
11502      if test "x$UNIQ" = x; then
11503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11504$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11506$as_echo_n "checking for UNIQ... " >&6; }
11507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11508$as_echo "disabled" >&6; }
11509      else
11510        # Check if the provided tool contains a complete path.
11511        tool_specified="$UNIQ"
11512        tool_basename="${tool_specified##*/}"
11513        if test "x$tool_basename" = "x$tool_specified"; then
11514          # A command without a complete path is provided, search $PATH.
11515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11516$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11517          # Extract the first word of "$tool_basename", so it can be a program name with args.
11518set dummy $tool_basename; ac_word=$2
11519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11520$as_echo_n "checking for $ac_word... " >&6; }
11521if ${ac_cv_path_UNIQ+:} false; then :
11522  $as_echo_n "(cached) " >&6
11523else
11524  case $UNIQ in
11525  [\\/]* | ?:[\\/]*)
11526  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11527  ;;
11528  *)
11529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11530for as_dir in $PATH
11531do
11532  IFS=$as_save_IFS
11533  test -z "$as_dir" && as_dir=.
11534    for ac_exec_ext in '' $ac_executable_extensions; do
11535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11536    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11538    break 2
11539  fi
11540done
11541  done
11542IFS=$as_save_IFS
11543
11544  ;;
11545esac
11546fi
11547UNIQ=$ac_cv_path_UNIQ
11548if test -n "$UNIQ"; then
11549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11550$as_echo "$UNIQ" >&6; }
11551else
11552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
11554fi
11555
11556
11557          if test "x$UNIQ" = x; then
11558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11559          fi
11560        else
11561          # Otherwise we believe it is a complete path. Use it as it is.
11562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11563$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11565$as_echo_n "checking for UNIQ... " >&6; }
11566          if test ! -x "$tool_specified"; then
11567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11568$as_echo "not found" >&6; }
11569            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11570          fi
11571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11572$as_echo "$tool_specified" >&6; }
11573        fi
11574      fi
11575    fi
11576
11577  fi
11578
11579
11580
11581  if test "x$UNIQ" = x; then
11582    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11583  fi
11584
11585
11586
11587
11588
11589  # Publish this variable in the help.
11590
11591
11592  if [ -z "${WC+x}" ]; then
11593    # The variable is not set by user, try to locate tool using the code snippet
11594    for ac_prog in wc
11595do
11596  # Extract the first word of "$ac_prog", so it can be a program name with args.
11597set dummy $ac_prog; ac_word=$2
11598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11599$as_echo_n "checking for $ac_word... " >&6; }
11600if ${ac_cv_path_WC+:} false; then :
11601  $as_echo_n "(cached) " >&6
11602else
11603  case $WC in
11604  [\\/]* | ?:[\\/]*)
11605  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11606  ;;
11607  *)
11608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11609for as_dir in $PATH
11610do
11611  IFS=$as_save_IFS
11612  test -z "$as_dir" && as_dir=.
11613    for ac_exec_ext in '' $ac_executable_extensions; do
11614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11615    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11617    break 2
11618  fi
11619done
11620  done
11621IFS=$as_save_IFS
11622
11623  ;;
11624esac
11625fi
11626WC=$ac_cv_path_WC
11627if test -n "$WC"; then
11628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11629$as_echo "$WC" >&6; }
11630else
11631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632$as_echo "no" >&6; }
11633fi
11634
11635
11636  test -n "$WC" && break
11637done
11638
11639  else
11640    # The variable is set, but is it from the command line or the environment?
11641
11642    # Try to remove the string !WC! from our list.
11643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11645      # If it failed, the variable was not from the command line. Ignore it,
11646      # but warn the user (except for BASH, which is always set by the calling BASH).
11647      if test "xWC" != xBASH; then
11648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11649$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11650      fi
11651      # Try to locate tool using the code snippet
11652      for ac_prog in wc
11653do
11654  # Extract the first word of "$ac_prog", so it can be a program name with args.
11655set dummy $ac_prog; ac_word=$2
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11657$as_echo_n "checking for $ac_word... " >&6; }
11658if ${ac_cv_path_WC+:} false; then :
11659  $as_echo_n "(cached) " >&6
11660else
11661  case $WC in
11662  [\\/]* | ?:[\\/]*)
11663  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11664  ;;
11665  *)
11666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11667for as_dir in $PATH
11668do
11669  IFS=$as_save_IFS
11670  test -z "$as_dir" && as_dir=.
11671    for ac_exec_ext in '' $ac_executable_extensions; do
11672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11673    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11675    break 2
11676  fi
11677done
11678  done
11679IFS=$as_save_IFS
11680
11681  ;;
11682esac
11683fi
11684WC=$ac_cv_path_WC
11685if test -n "$WC"; then
11686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11687$as_echo "$WC" >&6; }
11688else
11689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
11691fi
11692
11693
11694  test -n "$WC" && break
11695done
11696
11697    else
11698      # If it succeeded, then it was overridden by the user. We will use it
11699      # for the tool.
11700
11701      # First remove it from the list of overridden variables, so we can test
11702      # for unknown variables in the end.
11703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11704
11705      # Check if we try to supply an empty value
11706      if test "x$WC" = x; then
11707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11708$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11710$as_echo_n "checking for WC... " >&6; }
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11712$as_echo "disabled" >&6; }
11713      else
11714        # Check if the provided tool contains a complete path.
11715        tool_specified="$WC"
11716        tool_basename="${tool_specified##*/}"
11717        if test "x$tool_basename" = "x$tool_specified"; then
11718          # A command without a complete path is provided, search $PATH.
11719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11720$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11721          # Extract the first word of "$tool_basename", so it can be a program name with args.
11722set dummy $tool_basename; ac_word=$2
11723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11724$as_echo_n "checking for $ac_word... " >&6; }
11725if ${ac_cv_path_WC+:} false; then :
11726  $as_echo_n "(cached) " >&6
11727else
11728  case $WC in
11729  [\\/]* | ?:[\\/]*)
11730  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11731  ;;
11732  *)
11733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11734for as_dir in $PATH
11735do
11736  IFS=$as_save_IFS
11737  test -z "$as_dir" && as_dir=.
11738    for ac_exec_ext in '' $ac_executable_extensions; do
11739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11740    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11742    break 2
11743  fi
11744done
11745  done
11746IFS=$as_save_IFS
11747
11748  ;;
11749esac
11750fi
11751WC=$ac_cv_path_WC
11752if test -n "$WC"; then
11753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11754$as_echo "$WC" >&6; }
11755else
11756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11757$as_echo "no" >&6; }
11758fi
11759
11760
11761          if test "x$WC" = x; then
11762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11763          fi
11764        else
11765          # Otherwise we believe it is a complete path. Use it as it is.
11766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11767$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11769$as_echo_n "checking for WC... " >&6; }
11770          if test ! -x "$tool_specified"; then
11771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11772$as_echo "not found" >&6; }
11773            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11774          fi
11775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11776$as_echo "$tool_specified" >&6; }
11777        fi
11778      fi
11779    fi
11780
11781  fi
11782
11783
11784
11785  if test "x$WC" = x; then
11786    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11787  fi
11788
11789
11790
11791
11792
11793  # Publish this variable in the help.
11794
11795
11796  if [ -z "${WHICH+x}" ]; then
11797    # The variable is not set by user, try to locate tool using the code snippet
11798    for ac_prog in which
11799do
11800  # Extract the first word of "$ac_prog", so it can be a program name with args.
11801set dummy $ac_prog; ac_word=$2
11802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11803$as_echo_n "checking for $ac_word... " >&6; }
11804if ${ac_cv_path_WHICH+:} false; then :
11805  $as_echo_n "(cached) " >&6
11806else
11807  case $WHICH in
11808  [\\/]* | ?:[\\/]*)
11809  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11810  ;;
11811  *)
11812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11813for as_dir in $PATH
11814do
11815  IFS=$as_save_IFS
11816  test -z "$as_dir" && as_dir=.
11817    for ac_exec_ext in '' $ac_executable_extensions; do
11818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11819    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11821    break 2
11822  fi
11823done
11824  done
11825IFS=$as_save_IFS
11826
11827  ;;
11828esac
11829fi
11830WHICH=$ac_cv_path_WHICH
11831if test -n "$WHICH"; then
11832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11833$as_echo "$WHICH" >&6; }
11834else
11835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11836$as_echo "no" >&6; }
11837fi
11838
11839
11840  test -n "$WHICH" && break
11841done
11842
11843  else
11844    # The variable is set, but is it from the command line or the environment?
11845
11846    # Try to remove the string !WHICH! from our list.
11847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11849      # If it failed, the variable was not from the command line. Ignore it,
11850      # but warn the user (except for BASH, which is always set by the calling BASH).
11851      if test "xWHICH" != xBASH; then
11852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11853$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11854      fi
11855      # Try to locate tool using the code snippet
11856      for ac_prog in which
11857do
11858  # Extract the first word of "$ac_prog", so it can be a program name with args.
11859set dummy $ac_prog; ac_word=$2
11860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11861$as_echo_n "checking for $ac_word... " >&6; }
11862if ${ac_cv_path_WHICH+:} false; then :
11863  $as_echo_n "(cached) " >&6
11864else
11865  case $WHICH in
11866  [\\/]* | ?:[\\/]*)
11867  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11868  ;;
11869  *)
11870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11871for as_dir in $PATH
11872do
11873  IFS=$as_save_IFS
11874  test -z "$as_dir" && as_dir=.
11875    for ac_exec_ext in '' $ac_executable_extensions; do
11876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11877    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11879    break 2
11880  fi
11881done
11882  done
11883IFS=$as_save_IFS
11884
11885  ;;
11886esac
11887fi
11888WHICH=$ac_cv_path_WHICH
11889if test -n "$WHICH"; then
11890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11891$as_echo "$WHICH" >&6; }
11892else
11893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11894$as_echo "no" >&6; }
11895fi
11896
11897
11898  test -n "$WHICH" && break
11899done
11900
11901    else
11902      # If it succeeded, then it was overridden by the user. We will use it
11903      # for the tool.
11904
11905      # First remove it from the list of overridden variables, so we can test
11906      # for unknown variables in the end.
11907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11908
11909      # Check if we try to supply an empty value
11910      if test "x$WHICH" = x; then
11911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11912$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11914$as_echo_n "checking for WHICH... " >&6; }
11915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11916$as_echo "disabled" >&6; }
11917      else
11918        # Check if the provided tool contains a complete path.
11919        tool_specified="$WHICH"
11920        tool_basename="${tool_specified##*/}"
11921        if test "x$tool_basename" = "x$tool_specified"; then
11922          # A command without a complete path is provided, search $PATH.
11923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11924$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11925          # Extract the first word of "$tool_basename", so it can be a program name with args.
11926set dummy $tool_basename; ac_word=$2
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11928$as_echo_n "checking for $ac_word... " >&6; }
11929if ${ac_cv_path_WHICH+:} false; then :
11930  $as_echo_n "(cached) " >&6
11931else
11932  case $WHICH in
11933  [\\/]* | ?:[\\/]*)
11934  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11935  ;;
11936  *)
11937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11938for as_dir in $PATH
11939do
11940  IFS=$as_save_IFS
11941  test -z "$as_dir" && as_dir=.
11942    for ac_exec_ext in '' $ac_executable_extensions; do
11943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11944    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11946    break 2
11947  fi
11948done
11949  done
11950IFS=$as_save_IFS
11951
11952  ;;
11953esac
11954fi
11955WHICH=$ac_cv_path_WHICH
11956if test -n "$WHICH"; then
11957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11958$as_echo "$WHICH" >&6; }
11959else
11960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961$as_echo "no" >&6; }
11962fi
11963
11964
11965          if test "x$WHICH" = x; then
11966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11967          fi
11968        else
11969          # Otherwise we believe it is a complete path. Use it as it is.
11970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11971$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11973$as_echo_n "checking for WHICH... " >&6; }
11974          if test ! -x "$tool_specified"; then
11975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11976$as_echo "not found" >&6; }
11977            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11978          fi
11979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11980$as_echo "$tool_specified" >&6; }
11981        fi
11982      fi
11983    fi
11984
11985  fi
11986
11987
11988
11989  if test "x$WHICH" = x; then
11990    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11991  fi
11992
11993
11994
11995
11996
11997  # Publish this variable in the help.
11998
11999
12000  if [ -z "${XARGS+x}" ]; then
12001    # The variable is not set by user, try to locate tool using the code snippet
12002    for ac_prog in xargs
12003do
12004  # Extract the first word of "$ac_prog", so it can be a program name with args.
12005set dummy $ac_prog; ac_word=$2
12006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12007$as_echo_n "checking for $ac_word... " >&6; }
12008if ${ac_cv_path_XARGS+:} false; then :
12009  $as_echo_n "(cached) " >&6
12010else
12011  case $XARGS in
12012  [\\/]* | ?:[\\/]*)
12013  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12014  ;;
12015  *)
12016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12017for as_dir in $PATH
12018do
12019  IFS=$as_save_IFS
12020  test -z "$as_dir" && as_dir=.
12021    for ac_exec_ext in '' $ac_executable_extensions; do
12022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12023    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12025    break 2
12026  fi
12027done
12028  done
12029IFS=$as_save_IFS
12030
12031  ;;
12032esac
12033fi
12034XARGS=$ac_cv_path_XARGS
12035if test -n "$XARGS"; then
12036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12037$as_echo "$XARGS" >&6; }
12038else
12039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12040$as_echo "no" >&6; }
12041fi
12042
12043
12044  test -n "$XARGS" && break
12045done
12046
12047  else
12048    # The variable is set, but is it from the command line or the environment?
12049
12050    # Try to remove the string !XARGS! from our list.
12051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12053      # If it failed, the variable was not from the command line. Ignore it,
12054      # but warn the user (except for BASH, which is always set by the calling BASH).
12055      if test "xXARGS" != xBASH; then
12056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12057$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12058      fi
12059      # Try to locate tool using the code snippet
12060      for ac_prog in xargs
12061do
12062  # Extract the first word of "$ac_prog", so it can be a program name with args.
12063set dummy $ac_prog; ac_word=$2
12064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12065$as_echo_n "checking for $ac_word... " >&6; }
12066if ${ac_cv_path_XARGS+:} false; then :
12067  $as_echo_n "(cached) " >&6
12068else
12069  case $XARGS in
12070  [\\/]* | ?:[\\/]*)
12071  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12072  ;;
12073  *)
12074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12075for as_dir in $PATH
12076do
12077  IFS=$as_save_IFS
12078  test -z "$as_dir" && as_dir=.
12079    for ac_exec_ext in '' $ac_executable_extensions; do
12080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12081    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12083    break 2
12084  fi
12085done
12086  done
12087IFS=$as_save_IFS
12088
12089  ;;
12090esac
12091fi
12092XARGS=$ac_cv_path_XARGS
12093if test -n "$XARGS"; then
12094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12095$as_echo "$XARGS" >&6; }
12096else
12097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12098$as_echo "no" >&6; }
12099fi
12100
12101
12102  test -n "$XARGS" && break
12103done
12104
12105    else
12106      # If it succeeded, then it was overridden by the user. We will use it
12107      # for the tool.
12108
12109      # First remove it from the list of overridden variables, so we can test
12110      # for unknown variables in the end.
12111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12112
12113      # Check if we try to supply an empty value
12114      if test "x$XARGS" = x; then
12115        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12116$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12118$as_echo_n "checking for XARGS... " >&6; }
12119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12120$as_echo "disabled" >&6; }
12121      else
12122        # Check if the provided tool contains a complete path.
12123        tool_specified="$XARGS"
12124        tool_basename="${tool_specified##*/}"
12125        if test "x$tool_basename" = "x$tool_specified"; then
12126          # A command without a complete path is provided, search $PATH.
12127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12128$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12129          # Extract the first word of "$tool_basename", so it can be a program name with args.
12130set dummy $tool_basename; ac_word=$2
12131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12132$as_echo_n "checking for $ac_word... " >&6; }
12133if ${ac_cv_path_XARGS+:} false; then :
12134  $as_echo_n "(cached) " >&6
12135else
12136  case $XARGS in
12137  [\\/]* | ?:[\\/]*)
12138  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12139  ;;
12140  *)
12141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12142for as_dir in $PATH
12143do
12144  IFS=$as_save_IFS
12145  test -z "$as_dir" && as_dir=.
12146    for ac_exec_ext in '' $ac_executable_extensions; do
12147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12148    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12150    break 2
12151  fi
12152done
12153  done
12154IFS=$as_save_IFS
12155
12156  ;;
12157esac
12158fi
12159XARGS=$ac_cv_path_XARGS
12160if test -n "$XARGS"; then
12161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12162$as_echo "$XARGS" >&6; }
12163else
12164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12165$as_echo "no" >&6; }
12166fi
12167
12168
12169          if test "x$XARGS" = x; then
12170            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12171          fi
12172        else
12173          # Otherwise we believe it is a complete path. Use it as it is.
12174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12175$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12176          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12177$as_echo_n "checking for XARGS... " >&6; }
12178          if test ! -x "$tool_specified"; then
12179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12180$as_echo "not found" >&6; }
12181            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12182          fi
12183          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12184$as_echo "$tool_specified" >&6; }
12185        fi
12186      fi
12187    fi
12188
12189  fi
12190
12191
12192
12193  if test "x$XARGS" = x; then
12194    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12195  fi
12196
12197
12198
12199  # Then required tools that require some special treatment.
12200
12201
12202  # Publish this variable in the help.
12203
12204
12205  if [ -z "${AWK+x}" ]; then
12206    # The variable is not set by user, try to locate tool using the code snippet
12207    for ac_prog in gawk mawk nawk awk
12208do
12209  # Extract the first word of "$ac_prog", so it can be a program name with args.
12210set dummy $ac_prog; ac_word=$2
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12212$as_echo_n "checking for $ac_word... " >&6; }
12213if ${ac_cv_prog_AWK+:} false; then :
12214  $as_echo_n "(cached) " >&6
12215else
12216  if test -n "$AWK"; then
12217  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12218else
12219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12220for as_dir in $PATH
12221do
12222  IFS=$as_save_IFS
12223  test -z "$as_dir" && as_dir=.
12224    for ac_exec_ext in '' $ac_executable_extensions; do
12225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12226    ac_cv_prog_AWK="$ac_prog"
12227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12228    break 2
12229  fi
12230done
12231  done
12232IFS=$as_save_IFS
12233
12234fi
12235fi
12236AWK=$ac_cv_prog_AWK
12237if test -n "$AWK"; then
12238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12239$as_echo "$AWK" >&6; }
12240else
12241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12242$as_echo "no" >&6; }
12243fi
12244
12245
12246  test -n "$AWK" && break
12247done
12248
12249  else
12250    # The variable is set, but is it from the command line or the environment?
12251
12252    # Try to remove the string !AWK! from our list.
12253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12255      # If it failed, the variable was not from the command line. Ignore it,
12256      # but warn the user (except for BASH, which is always set by the calling BASH).
12257      if test "xAWK" != xBASH; then
12258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12259$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12260      fi
12261      # Try to locate tool using the code snippet
12262      for ac_prog in gawk mawk nawk awk
12263do
12264  # Extract the first word of "$ac_prog", so it can be a program name with args.
12265set dummy $ac_prog; ac_word=$2
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12267$as_echo_n "checking for $ac_word... " >&6; }
12268if ${ac_cv_prog_AWK+:} false; then :
12269  $as_echo_n "(cached) " >&6
12270else
12271  if test -n "$AWK"; then
12272  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12273else
12274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12275for as_dir in $PATH
12276do
12277  IFS=$as_save_IFS
12278  test -z "$as_dir" && as_dir=.
12279    for ac_exec_ext in '' $ac_executable_extensions; do
12280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12281    ac_cv_prog_AWK="$ac_prog"
12282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12283    break 2
12284  fi
12285done
12286  done
12287IFS=$as_save_IFS
12288
12289fi
12290fi
12291AWK=$ac_cv_prog_AWK
12292if test -n "$AWK"; then
12293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12294$as_echo "$AWK" >&6; }
12295else
12296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12297$as_echo "no" >&6; }
12298fi
12299
12300
12301  test -n "$AWK" && break
12302done
12303
12304    else
12305      # If it succeeded, then it was overridden by the user. We will use it
12306      # for the tool.
12307
12308      # First remove it from the list of overridden variables, so we can test
12309      # for unknown variables in the end.
12310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12311
12312      # Check if we try to supply an empty value
12313      if test "x$AWK" = x; then
12314        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12315$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12317$as_echo_n "checking for AWK... " >&6; }
12318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12319$as_echo "disabled" >&6; }
12320      else
12321        # Check if the provided tool contains a complete path.
12322        tool_specified="$AWK"
12323        tool_basename="${tool_specified##*/}"
12324        if test "x$tool_basename" = "x$tool_specified"; then
12325          # A command without a complete path is provided, search $PATH.
12326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12327$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12328          # Extract the first word of "$tool_basename", so it can be a program name with args.
12329set dummy $tool_basename; ac_word=$2
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12331$as_echo_n "checking for $ac_word... " >&6; }
12332if ${ac_cv_path_AWK+:} false; then :
12333  $as_echo_n "(cached) " >&6
12334else
12335  case $AWK in
12336  [\\/]* | ?:[\\/]*)
12337  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12338  ;;
12339  *)
12340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341for as_dir in $PATH
12342do
12343  IFS=$as_save_IFS
12344  test -z "$as_dir" && as_dir=.
12345    for ac_exec_ext in '' $ac_executable_extensions; do
12346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12347    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12349    break 2
12350  fi
12351done
12352  done
12353IFS=$as_save_IFS
12354
12355  ;;
12356esac
12357fi
12358AWK=$ac_cv_path_AWK
12359if test -n "$AWK"; then
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12361$as_echo "$AWK" >&6; }
12362else
12363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12364$as_echo "no" >&6; }
12365fi
12366
12367
12368          if test "x$AWK" = x; then
12369            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12370          fi
12371        else
12372          # Otherwise we believe it is a complete path. Use it as it is.
12373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12374$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12375          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12376$as_echo_n "checking for AWK... " >&6; }
12377          if test ! -x "$tool_specified"; then
12378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12379$as_echo "not found" >&6; }
12380            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12381          fi
12382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12383$as_echo "$tool_specified" >&6; }
12384        fi
12385      fi
12386    fi
12387
12388  fi
12389
12390
12391  if test "x$AWK" = x; then
12392    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12393  fi
12394
12395
12396
12397
12398  # Publish this variable in the help.
12399
12400
12401  if [ -z "${GREP+x}" ]; then
12402    # The variable is not set by user, try to locate tool using the code snippet
12403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12404$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12405if ${ac_cv_path_GREP+:} false; then :
12406  $as_echo_n "(cached) " >&6
12407else
12408  if test -z "$GREP"; then
12409  ac_path_GREP_found=false
12410  # Loop through the user's path and test for each of PROGNAME-LIST
12411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12412for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12413do
12414  IFS=$as_save_IFS
12415  test -z "$as_dir" && as_dir=.
12416    for ac_prog in grep ggrep; do
12417    for ac_exec_ext in '' $ac_executable_extensions; do
12418      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12419      as_fn_executable_p "$ac_path_GREP" || continue
12420# Check for GNU ac_path_GREP and select it if it is found.
12421  # Check for GNU $ac_path_GREP
12422case `"$ac_path_GREP" --version 2>&1` in
12423*GNU*)
12424  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12425*)
12426  ac_count=0
12427  $as_echo_n 0123456789 >"conftest.in"
12428  while :
12429  do
12430    cat "conftest.in" "conftest.in" >"conftest.tmp"
12431    mv "conftest.tmp" "conftest.in"
12432    cp "conftest.in" "conftest.nl"
12433    $as_echo 'GREP' >> "conftest.nl"
12434    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12435    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12436    as_fn_arith $ac_count + 1 && ac_count=$as_val
12437    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12438      # Best one so far, save it but keep looking for a better one
12439      ac_cv_path_GREP="$ac_path_GREP"
12440      ac_path_GREP_max=$ac_count
12441    fi
12442    # 10*(2^10) chars as input seems more than enough
12443    test $ac_count -gt 10 && break
12444  done
12445  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12446esac
12447
12448      $ac_path_GREP_found && break 3
12449    done
12450  done
12451  done
12452IFS=$as_save_IFS
12453  if test -z "$ac_cv_path_GREP"; then
12454    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12455  fi
12456else
12457  ac_cv_path_GREP=$GREP
12458fi
12459
12460fi
12461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12462$as_echo "$ac_cv_path_GREP" >&6; }
12463 GREP="$ac_cv_path_GREP"
12464
12465
12466  else
12467    # The variable is set, but is it from the command line or the environment?
12468
12469    # Try to remove the string !GREP! from our list.
12470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12472      # If it failed, the variable was not from the command line. Ignore it,
12473      # but warn the user (except for BASH, which is always set by the calling BASH).
12474      if test "xGREP" != xBASH; then
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12476$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12477      fi
12478      # Try to locate tool using the code snippet
12479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12480$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12481if ${ac_cv_path_GREP+:} false; then :
12482  $as_echo_n "(cached) " >&6
12483else
12484  if test -z "$GREP"; then
12485  ac_path_GREP_found=false
12486  # Loop through the user's path and test for each of PROGNAME-LIST
12487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12488for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12489do
12490  IFS=$as_save_IFS
12491  test -z "$as_dir" && as_dir=.
12492    for ac_prog in grep ggrep; do
12493    for ac_exec_ext in '' $ac_executable_extensions; do
12494      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12495      as_fn_executable_p "$ac_path_GREP" || continue
12496# Check for GNU ac_path_GREP and select it if it is found.
12497  # Check for GNU $ac_path_GREP
12498case `"$ac_path_GREP" --version 2>&1` in
12499*GNU*)
12500  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12501*)
12502  ac_count=0
12503  $as_echo_n 0123456789 >"conftest.in"
12504  while :
12505  do
12506    cat "conftest.in" "conftest.in" >"conftest.tmp"
12507    mv "conftest.tmp" "conftest.in"
12508    cp "conftest.in" "conftest.nl"
12509    $as_echo 'GREP' >> "conftest.nl"
12510    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12511    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12512    as_fn_arith $ac_count + 1 && ac_count=$as_val
12513    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12514      # Best one so far, save it but keep looking for a better one
12515      ac_cv_path_GREP="$ac_path_GREP"
12516      ac_path_GREP_max=$ac_count
12517    fi
12518    # 10*(2^10) chars as input seems more than enough
12519    test $ac_count -gt 10 && break
12520  done
12521  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12522esac
12523
12524      $ac_path_GREP_found && break 3
12525    done
12526  done
12527  done
12528IFS=$as_save_IFS
12529  if test -z "$ac_cv_path_GREP"; then
12530    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12531  fi
12532else
12533  ac_cv_path_GREP=$GREP
12534fi
12535
12536fi
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12538$as_echo "$ac_cv_path_GREP" >&6; }
12539 GREP="$ac_cv_path_GREP"
12540
12541
12542    else
12543      # If it succeeded, then it was overridden by the user. We will use it
12544      # for the tool.
12545
12546      # First remove it from the list of overridden variables, so we can test
12547      # for unknown variables in the end.
12548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12549
12550      # Check if we try to supply an empty value
12551      if test "x$GREP" = x; then
12552        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12553$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12555$as_echo_n "checking for GREP... " >&6; }
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12557$as_echo "disabled" >&6; }
12558      else
12559        # Check if the provided tool contains a complete path.
12560        tool_specified="$GREP"
12561        tool_basename="${tool_specified##*/}"
12562        if test "x$tool_basename" = "x$tool_specified"; then
12563          # A command without a complete path is provided, search $PATH.
12564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12565$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12566          # Extract the first word of "$tool_basename", so it can be a program name with args.
12567set dummy $tool_basename; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_GREP+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $GREP in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596GREP=$ac_cv_path_GREP
12597if test -n "$GREP"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12599$as_echo "$GREP" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606          if test "x$GREP" = x; then
12607            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12608          fi
12609        else
12610          # Otherwise we believe it is a complete path. Use it as it is.
12611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12612$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12613          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12614$as_echo_n "checking for GREP... " >&6; }
12615          if test ! -x "$tool_specified"; then
12616            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12617$as_echo "not found" >&6; }
12618            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12619          fi
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12621$as_echo "$tool_specified" >&6; }
12622        fi
12623      fi
12624    fi
12625
12626  fi
12627
12628
12629  if test "x$GREP" = x; then
12630    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12631  fi
12632
12633
12634
12635
12636  # Publish this variable in the help.
12637
12638
12639  if [ -z "${EGREP+x}" ]; then
12640    # The variable is not set by user, try to locate tool using the code snippet
12641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12642$as_echo_n "checking for egrep... " >&6; }
12643if ${ac_cv_path_EGREP+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12647   then ac_cv_path_EGREP="$GREP -E"
12648   else
12649     if test -z "$EGREP"; then
12650  ac_path_EGREP_found=false
12651  # Loop through the user's path and test for each of PROGNAME-LIST
12652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12653for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12654do
12655  IFS=$as_save_IFS
12656  test -z "$as_dir" && as_dir=.
12657    for ac_prog in egrep; do
12658    for ac_exec_ext in '' $ac_executable_extensions; do
12659      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12660      as_fn_executable_p "$ac_path_EGREP" || continue
12661# Check for GNU ac_path_EGREP and select it if it is found.
12662  # Check for GNU $ac_path_EGREP
12663case `"$ac_path_EGREP" --version 2>&1` in
12664*GNU*)
12665  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12666*)
12667  ac_count=0
12668  $as_echo_n 0123456789 >"conftest.in"
12669  while :
12670  do
12671    cat "conftest.in" "conftest.in" >"conftest.tmp"
12672    mv "conftest.tmp" "conftest.in"
12673    cp "conftest.in" "conftest.nl"
12674    $as_echo 'EGREP' >> "conftest.nl"
12675    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12676    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12677    as_fn_arith $ac_count + 1 && ac_count=$as_val
12678    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12679      # Best one so far, save it but keep looking for a better one
12680      ac_cv_path_EGREP="$ac_path_EGREP"
12681      ac_path_EGREP_max=$ac_count
12682    fi
12683    # 10*(2^10) chars as input seems more than enough
12684    test $ac_count -gt 10 && break
12685  done
12686  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12687esac
12688
12689      $ac_path_EGREP_found && break 3
12690    done
12691  done
12692  done
12693IFS=$as_save_IFS
12694  if test -z "$ac_cv_path_EGREP"; then
12695    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12696  fi
12697else
12698  ac_cv_path_EGREP=$EGREP
12699fi
12700
12701   fi
12702fi
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12704$as_echo "$ac_cv_path_EGREP" >&6; }
12705 EGREP="$ac_cv_path_EGREP"
12706
12707
12708  else
12709    # The variable is set, but is it from the command line or the environment?
12710
12711    # Try to remove the string !EGREP! from our list.
12712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12714      # If it failed, the variable was not from the command line. Ignore it,
12715      # but warn the user (except for BASH, which is always set by the calling BASH).
12716      if test "xEGREP" != xBASH; then
12717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12718$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12719      fi
12720      # Try to locate tool using the code snippet
12721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12722$as_echo_n "checking for egrep... " >&6; }
12723if ${ac_cv_path_EGREP+:} false; then :
12724  $as_echo_n "(cached) " >&6
12725else
12726  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12727   then ac_cv_path_EGREP="$GREP -E"
12728   else
12729     if test -z "$EGREP"; then
12730  ac_path_EGREP_found=false
12731  # Loop through the user's path and test for each of PROGNAME-LIST
12732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12733for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12734do
12735  IFS=$as_save_IFS
12736  test -z "$as_dir" && as_dir=.
12737    for ac_prog in egrep; do
12738    for ac_exec_ext in '' $ac_executable_extensions; do
12739      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12740      as_fn_executable_p "$ac_path_EGREP" || continue
12741# Check for GNU ac_path_EGREP and select it if it is found.
12742  # Check for GNU $ac_path_EGREP
12743case `"$ac_path_EGREP" --version 2>&1` in
12744*GNU*)
12745  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12746*)
12747  ac_count=0
12748  $as_echo_n 0123456789 >"conftest.in"
12749  while :
12750  do
12751    cat "conftest.in" "conftest.in" >"conftest.tmp"
12752    mv "conftest.tmp" "conftest.in"
12753    cp "conftest.in" "conftest.nl"
12754    $as_echo 'EGREP' >> "conftest.nl"
12755    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12756    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12757    as_fn_arith $ac_count + 1 && ac_count=$as_val
12758    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12759      # Best one so far, save it but keep looking for a better one
12760      ac_cv_path_EGREP="$ac_path_EGREP"
12761      ac_path_EGREP_max=$ac_count
12762    fi
12763    # 10*(2^10) chars as input seems more than enough
12764    test $ac_count -gt 10 && break
12765  done
12766  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12767esac
12768
12769      $ac_path_EGREP_found && break 3
12770    done
12771  done
12772  done
12773IFS=$as_save_IFS
12774  if test -z "$ac_cv_path_EGREP"; then
12775    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12776  fi
12777else
12778  ac_cv_path_EGREP=$EGREP
12779fi
12780
12781   fi
12782fi
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12784$as_echo "$ac_cv_path_EGREP" >&6; }
12785 EGREP="$ac_cv_path_EGREP"
12786
12787
12788    else
12789      # If it succeeded, then it was overridden by the user. We will use it
12790      # for the tool.
12791
12792      # First remove it from the list of overridden variables, so we can test
12793      # for unknown variables in the end.
12794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12795
12796      # Check if we try to supply an empty value
12797      if test "x$EGREP" = x; then
12798        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12799$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12801$as_echo_n "checking for EGREP... " >&6; }
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12803$as_echo "disabled" >&6; }
12804      else
12805        # Check if the provided tool contains a complete path.
12806        tool_specified="$EGREP"
12807        tool_basename="${tool_specified##*/}"
12808        if test "x$tool_basename" = "x$tool_specified"; then
12809          # A command without a complete path is provided, search $PATH.
12810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12811$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12812          # Extract the first word of "$tool_basename", so it can be a program name with args.
12813set dummy $tool_basename; ac_word=$2
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12815$as_echo_n "checking for $ac_word... " >&6; }
12816if ${ac_cv_path_EGREP+:} false; then :
12817  $as_echo_n "(cached) " >&6
12818else
12819  case $EGREP in
12820  [\\/]* | ?:[\\/]*)
12821  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12822  ;;
12823  *)
12824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12825for as_dir in $PATH
12826do
12827  IFS=$as_save_IFS
12828  test -z "$as_dir" && as_dir=.
12829    for ac_exec_ext in '' $ac_executable_extensions; do
12830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12831    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12833    break 2
12834  fi
12835done
12836  done
12837IFS=$as_save_IFS
12838
12839  ;;
12840esac
12841fi
12842EGREP=$ac_cv_path_EGREP
12843if test -n "$EGREP"; then
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12845$as_echo "$EGREP" >&6; }
12846else
12847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12848$as_echo "no" >&6; }
12849fi
12850
12851
12852          if test "x$EGREP" = x; then
12853            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12854          fi
12855        else
12856          # Otherwise we believe it is a complete path. Use it as it is.
12857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12858$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12860$as_echo_n "checking for EGREP... " >&6; }
12861          if test ! -x "$tool_specified"; then
12862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12863$as_echo "not found" >&6; }
12864            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12865          fi
12866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12867$as_echo "$tool_specified" >&6; }
12868        fi
12869      fi
12870    fi
12871
12872  fi
12873
12874
12875  if test "x$EGREP" = x; then
12876    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12877  fi
12878
12879
12880
12881
12882  # Publish this variable in the help.
12883
12884
12885  if [ -z "${FGREP+x}" ]; then
12886    # The variable is not set by user, try to locate tool using the code snippet
12887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12888$as_echo_n "checking for fgrep... " >&6; }
12889if ${ac_cv_path_FGREP+:} false; then :
12890  $as_echo_n "(cached) " >&6
12891else
12892  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12893   then ac_cv_path_FGREP="$GREP -F"
12894   else
12895     if test -z "$FGREP"; then
12896  ac_path_FGREP_found=false
12897  # Loop through the user's path and test for each of PROGNAME-LIST
12898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12899for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12900do
12901  IFS=$as_save_IFS
12902  test -z "$as_dir" && as_dir=.
12903    for ac_prog in fgrep; do
12904    for ac_exec_ext in '' $ac_executable_extensions; do
12905      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12906      as_fn_executable_p "$ac_path_FGREP" || continue
12907# Check for GNU ac_path_FGREP and select it if it is found.
12908  # Check for GNU $ac_path_FGREP
12909case `"$ac_path_FGREP" --version 2>&1` in
12910*GNU*)
12911  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12912*)
12913  ac_count=0
12914  $as_echo_n 0123456789 >"conftest.in"
12915  while :
12916  do
12917    cat "conftest.in" "conftest.in" >"conftest.tmp"
12918    mv "conftest.tmp" "conftest.in"
12919    cp "conftest.in" "conftest.nl"
12920    $as_echo 'FGREP' >> "conftest.nl"
12921    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12922    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12923    as_fn_arith $ac_count + 1 && ac_count=$as_val
12924    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12925      # Best one so far, save it but keep looking for a better one
12926      ac_cv_path_FGREP="$ac_path_FGREP"
12927      ac_path_FGREP_max=$ac_count
12928    fi
12929    # 10*(2^10) chars as input seems more than enough
12930    test $ac_count -gt 10 && break
12931  done
12932  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12933esac
12934
12935      $ac_path_FGREP_found && break 3
12936    done
12937  done
12938  done
12939IFS=$as_save_IFS
12940  if test -z "$ac_cv_path_FGREP"; then
12941    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12942  fi
12943else
12944  ac_cv_path_FGREP=$FGREP
12945fi
12946
12947   fi
12948fi
12949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12950$as_echo "$ac_cv_path_FGREP" >&6; }
12951 FGREP="$ac_cv_path_FGREP"
12952
12953
12954  else
12955    # The variable is set, but is it from the command line or the environment?
12956
12957    # Try to remove the string !FGREP! from our list.
12958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12960      # If it failed, the variable was not from the command line. Ignore it,
12961      # but warn the user (except for BASH, which is always set by the calling BASH).
12962      if test "xFGREP" != xBASH; then
12963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12964$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12965      fi
12966      # Try to locate tool using the code snippet
12967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12968$as_echo_n "checking for fgrep... " >&6; }
12969if ${ac_cv_path_FGREP+:} false; then :
12970  $as_echo_n "(cached) " >&6
12971else
12972  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12973   then ac_cv_path_FGREP="$GREP -F"
12974   else
12975     if test -z "$FGREP"; then
12976  ac_path_FGREP_found=false
12977  # Loop through the user's path and test for each of PROGNAME-LIST
12978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12979for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12980do
12981  IFS=$as_save_IFS
12982  test -z "$as_dir" && as_dir=.
12983    for ac_prog in fgrep; do
12984    for ac_exec_ext in '' $ac_executable_extensions; do
12985      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12986      as_fn_executable_p "$ac_path_FGREP" || continue
12987# Check for GNU ac_path_FGREP and select it if it is found.
12988  # Check for GNU $ac_path_FGREP
12989case `"$ac_path_FGREP" --version 2>&1` in
12990*GNU*)
12991  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12992*)
12993  ac_count=0
12994  $as_echo_n 0123456789 >"conftest.in"
12995  while :
12996  do
12997    cat "conftest.in" "conftest.in" >"conftest.tmp"
12998    mv "conftest.tmp" "conftest.in"
12999    cp "conftest.in" "conftest.nl"
13000    $as_echo 'FGREP' >> "conftest.nl"
13001    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13002    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13003    as_fn_arith $ac_count + 1 && ac_count=$as_val
13004    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13005      # Best one so far, save it but keep looking for a better one
13006      ac_cv_path_FGREP="$ac_path_FGREP"
13007      ac_path_FGREP_max=$ac_count
13008    fi
13009    # 10*(2^10) chars as input seems more than enough
13010    test $ac_count -gt 10 && break
13011  done
13012  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13013esac
13014
13015      $ac_path_FGREP_found && break 3
13016    done
13017  done
13018  done
13019IFS=$as_save_IFS
13020  if test -z "$ac_cv_path_FGREP"; then
13021    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13022  fi
13023else
13024  ac_cv_path_FGREP=$FGREP
13025fi
13026
13027   fi
13028fi
13029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13030$as_echo "$ac_cv_path_FGREP" >&6; }
13031 FGREP="$ac_cv_path_FGREP"
13032
13033
13034    else
13035      # If it succeeded, then it was overridden by the user. We will use it
13036      # for the tool.
13037
13038      # First remove it from the list of overridden variables, so we can test
13039      # for unknown variables in the end.
13040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13041
13042      # Check if we try to supply an empty value
13043      if test "x$FGREP" = x; then
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13045$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13047$as_echo_n "checking for FGREP... " >&6; }
13048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13049$as_echo "disabled" >&6; }
13050      else
13051        # Check if the provided tool contains a complete path.
13052        tool_specified="$FGREP"
13053        tool_basename="${tool_specified##*/}"
13054        if test "x$tool_basename" = "x$tool_specified"; then
13055          # A command without a complete path is provided, search $PATH.
13056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13057$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13058          # Extract the first word of "$tool_basename", so it can be a program name with args.
13059set dummy $tool_basename; ac_word=$2
13060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13061$as_echo_n "checking for $ac_word... " >&6; }
13062if ${ac_cv_path_FGREP+:} false; then :
13063  $as_echo_n "(cached) " >&6
13064else
13065  case $FGREP in
13066  [\\/]* | ?:[\\/]*)
13067  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13068  ;;
13069  *)
13070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13071for as_dir in $PATH
13072do
13073  IFS=$as_save_IFS
13074  test -z "$as_dir" && as_dir=.
13075    for ac_exec_ext in '' $ac_executable_extensions; do
13076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13077    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13079    break 2
13080  fi
13081done
13082  done
13083IFS=$as_save_IFS
13084
13085  ;;
13086esac
13087fi
13088FGREP=$ac_cv_path_FGREP
13089if test -n "$FGREP"; then
13090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13091$as_echo "$FGREP" >&6; }
13092else
13093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13094$as_echo "no" >&6; }
13095fi
13096
13097
13098          if test "x$FGREP" = x; then
13099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13100          fi
13101        else
13102          # Otherwise we believe it is a complete path. Use it as it is.
13103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13104$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13106$as_echo_n "checking for FGREP... " >&6; }
13107          if test ! -x "$tool_specified"; then
13108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13109$as_echo "not found" >&6; }
13110            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13111          fi
13112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13113$as_echo "$tool_specified" >&6; }
13114        fi
13115      fi
13116    fi
13117
13118  fi
13119
13120
13121  if test "x$FGREP" = x; then
13122    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13123  fi
13124
13125
13126
13127
13128  # Publish this variable in the help.
13129
13130
13131  if [ -z "${SED+x}" ]; then
13132    # The variable is not set by user, try to locate tool using the code snippet
13133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13134$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13135if ${ac_cv_path_SED+:} false; then :
13136  $as_echo_n "(cached) " >&6
13137else
13138            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13139     for ac_i in 1 2 3 4 5 6 7; do
13140       ac_script="$ac_script$as_nl$ac_script"
13141     done
13142     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13143     { ac_script=; unset ac_script;}
13144     if test -z "$SED"; then
13145  ac_path_SED_found=false
13146  # Loop through the user's path and test for each of PROGNAME-LIST
13147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13148for as_dir in $PATH
13149do
13150  IFS=$as_save_IFS
13151  test -z "$as_dir" && as_dir=.
13152    for ac_prog in sed gsed; do
13153    for ac_exec_ext in '' $ac_executable_extensions; do
13154      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13155      as_fn_executable_p "$ac_path_SED" || continue
13156# Check for GNU ac_path_SED and select it if it is found.
13157  # Check for GNU $ac_path_SED
13158case `"$ac_path_SED" --version 2>&1` in
13159*GNU*)
13160  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13161*)
13162  ac_count=0
13163  $as_echo_n 0123456789 >"conftest.in"
13164  while :
13165  do
13166    cat "conftest.in" "conftest.in" >"conftest.tmp"
13167    mv "conftest.tmp" "conftest.in"
13168    cp "conftest.in" "conftest.nl"
13169    $as_echo '' >> "conftest.nl"
13170    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13171    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13172    as_fn_arith $ac_count + 1 && ac_count=$as_val
13173    if test $ac_count -gt ${ac_path_SED_max-0}; then
13174      # Best one so far, save it but keep looking for a better one
13175      ac_cv_path_SED="$ac_path_SED"
13176      ac_path_SED_max=$ac_count
13177    fi
13178    # 10*(2^10) chars as input seems more than enough
13179    test $ac_count -gt 10 && break
13180  done
13181  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13182esac
13183
13184      $ac_path_SED_found && break 3
13185    done
13186  done
13187  done
13188IFS=$as_save_IFS
13189  if test -z "$ac_cv_path_SED"; then
13190    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13191  fi
13192else
13193  ac_cv_path_SED=$SED
13194fi
13195
13196fi
13197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13198$as_echo "$ac_cv_path_SED" >&6; }
13199 SED="$ac_cv_path_SED"
13200  rm -f conftest.sed
13201
13202  else
13203    # The variable is set, but is it from the command line or the environment?
13204
13205    # Try to remove the string !SED! from our list.
13206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13208      # If it failed, the variable was not from the command line. Ignore it,
13209      # but warn the user (except for BASH, which is always set by the calling BASH).
13210      if test "xSED" != xBASH; then
13211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13212$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13213      fi
13214      # Try to locate tool using the code snippet
13215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13216$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13217if ${ac_cv_path_SED+:} false; then :
13218  $as_echo_n "(cached) " >&6
13219else
13220            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13221     for ac_i in 1 2 3 4 5 6 7; do
13222       ac_script="$ac_script$as_nl$ac_script"
13223     done
13224     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13225     { ac_script=; unset ac_script;}
13226     if test -z "$SED"; then
13227  ac_path_SED_found=false
13228  # Loop through the user's path and test for each of PROGNAME-LIST
13229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13230for as_dir in $PATH
13231do
13232  IFS=$as_save_IFS
13233  test -z "$as_dir" && as_dir=.
13234    for ac_prog in sed gsed; do
13235    for ac_exec_ext in '' $ac_executable_extensions; do
13236      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13237      as_fn_executable_p "$ac_path_SED" || continue
13238# Check for GNU ac_path_SED and select it if it is found.
13239  # Check for GNU $ac_path_SED
13240case `"$ac_path_SED" --version 2>&1` in
13241*GNU*)
13242  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13243*)
13244  ac_count=0
13245  $as_echo_n 0123456789 >"conftest.in"
13246  while :
13247  do
13248    cat "conftest.in" "conftest.in" >"conftest.tmp"
13249    mv "conftest.tmp" "conftest.in"
13250    cp "conftest.in" "conftest.nl"
13251    $as_echo '' >> "conftest.nl"
13252    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13253    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13254    as_fn_arith $ac_count + 1 && ac_count=$as_val
13255    if test $ac_count -gt ${ac_path_SED_max-0}; then
13256      # Best one so far, save it but keep looking for a better one
13257      ac_cv_path_SED="$ac_path_SED"
13258      ac_path_SED_max=$ac_count
13259    fi
13260    # 10*(2^10) chars as input seems more than enough
13261    test $ac_count -gt 10 && break
13262  done
13263  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13264esac
13265
13266      $ac_path_SED_found && break 3
13267    done
13268  done
13269  done
13270IFS=$as_save_IFS
13271  if test -z "$ac_cv_path_SED"; then
13272    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13273  fi
13274else
13275  ac_cv_path_SED=$SED
13276fi
13277
13278fi
13279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13280$as_echo "$ac_cv_path_SED" >&6; }
13281 SED="$ac_cv_path_SED"
13282  rm -f conftest.sed
13283
13284    else
13285      # If it succeeded, then it was overridden by the user. We will use it
13286      # for the tool.
13287
13288      # First remove it from the list of overridden variables, so we can test
13289      # for unknown variables in the end.
13290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13291
13292      # Check if we try to supply an empty value
13293      if test "x$SED" = x; then
13294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13295$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13297$as_echo_n "checking for SED... " >&6; }
13298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13299$as_echo "disabled" >&6; }
13300      else
13301        # Check if the provided tool contains a complete path.
13302        tool_specified="$SED"
13303        tool_basename="${tool_specified##*/}"
13304        if test "x$tool_basename" = "x$tool_specified"; then
13305          # A command without a complete path is provided, search $PATH.
13306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13307$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13308          # Extract the first word of "$tool_basename", so it can be a program name with args.
13309set dummy $tool_basename; ac_word=$2
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13311$as_echo_n "checking for $ac_word... " >&6; }
13312if ${ac_cv_path_SED+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  case $SED in
13316  [\\/]* | ?:[\\/]*)
13317  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13318  ;;
13319  *)
13320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13321for as_dir in $PATH
13322do
13323  IFS=$as_save_IFS
13324  test -z "$as_dir" && as_dir=.
13325    for ac_exec_ext in '' $ac_executable_extensions; do
13326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13327    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13329    break 2
13330  fi
13331done
13332  done
13333IFS=$as_save_IFS
13334
13335  ;;
13336esac
13337fi
13338SED=$ac_cv_path_SED
13339if test -n "$SED"; then
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13341$as_echo "$SED" >&6; }
13342else
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
13345fi
13346
13347
13348          if test "x$SED" = x; then
13349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13350          fi
13351        else
13352          # Otherwise we believe it is a complete path. Use it as it is.
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13354$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13356$as_echo_n "checking for SED... " >&6; }
13357          if test ! -x "$tool_specified"; then
13358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13359$as_echo "not found" >&6; }
13360            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13361          fi
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13363$as_echo "$tool_specified" >&6; }
13364        fi
13365      fi
13366    fi
13367
13368  fi
13369
13370
13371  if test "x$SED" = x; then
13372    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13373  fi
13374
13375
13376
13377  # Always force rm.
13378  RM="$RM -f"
13379
13380  # pwd behaves differently on various platforms and some don't support the -L flag.
13381  # Always use the bash builtin pwd to get uniform behavior.
13382  THEPWDCMD=pwd
13383
13384  # These are not required on all platforms
13385
13386
13387  # Publish this variable in the help.
13388
13389
13390  if [ -z "${CYGPATH+x}" ]; then
13391    # The variable is not set by user, try to locate tool using the code snippet
13392    for ac_prog in cygpath
13393do
13394  # Extract the first word of "$ac_prog", so it can be a program name with args.
13395set dummy $ac_prog; ac_word=$2
13396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13397$as_echo_n "checking for $ac_word... " >&6; }
13398if ${ac_cv_path_CYGPATH+:} false; then :
13399  $as_echo_n "(cached) " >&6
13400else
13401  case $CYGPATH in
13402  [\\/]* | ?:[\\/]*)
13403  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13404  ;;
13405  *)
13406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13407for as_dir in $PATH
13408do
13409  IFS=$as_save_IFS
13410  test -z "$as_dir" && as_dir=.
13411    for ac_exec_ext in '' $ac_executable_extensions; do
13412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13413    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13415    break 2
13416  fi
13417done
13418  done
13419IFS=$as_save_IFS
13420
13421  ;;
13422esac
13423fi
13424CYGPATH=$ac_cv_path_CYGPATH
13425if test -n "$CYGPATH"; then
13426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13427$as_echo "$CYGPATH" >&6; }
13428else
13429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13430$as_echo "no" >&6; }
13431fi
13432
13433
13434  test -n "$CYGPATH" && break
13435done
13436
13437  else
13438    # The variable is set, but is it from the command line or the environment?
13439
13440    # Try to remove the string !CYGPATH! from our list.
13441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13443      # If it failed, the variable was not from the command line. Ignore it,
13444      # but warn the user (except for BASH, which is always set by the calling BASH).
13445      if test "xCYGPATH" != xBASH; then
13446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13447$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13448      fi
13449      # Try to locate tool using the code snippet
13450      for ac_prog in cygpath
13451do
13452  # Extract the first word of "$ac_prog", so it can be a program name with args.
13453set dummy $ac_prog; ac_word=$2
13454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13455$as_echo_n "checking for $ac_word... " >&6; }
13456if ${ac_cv_path_CYGPATH+:} false; then :
13457  $as_echo_n "(cached) " >&6
13458else
13459  case $CYGPATH in
13460  [\\/]* | ?:[\\/]*)
13461  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13462  ;;
13463  *)
13464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13465for as_dir in $PATH
13466do
13467  IFS=$as_save_IFS
13468  test -z "$as_dir" && as_dir=.
13469    for ac_exec_ext in '' $ac_executable_extensions; do
13470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13471    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13473    break 2
13474  fi
13475done
13476  done
13477IFS=$as_save_IFS
13478
13479  ;;
13480esac
13481fi
13482CYGPATH=$ac_cv_path_CYGPATH
13483if test -n "$CYGPATH"; then
13484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13485$as_echo "$CYGPATH" >&6; }
13486else
13487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13488$as_echo "no" >&6; }
13489fi
13490
13491
13492  test -n "$CYGPATH" && break
13493done
13494
13495    else
13496      # If it succeeded, then it was overridden by the user. We will use it
13497      # for the tool.
13498
13499      # First remove it from the list of overridden variables, so we can test
13500      # for unknown variables in the end.
13501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13502
13503      # Check if we try to supply an empty value
13504      if test "x$CYGPATH" = x; then
13505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13506$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13508$as_echo_n "checking for CYGPATH... " >&6; }
13509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13510$as_echo "disabled" >&6; }
13511      else
13512        # Check if the provided tool contains a complete path.
13513        tool_specified="$CYGPATH"
13514        tool_basename="${tool_specified##*/}"
13515        if test "x$tool_basename" = "x$tool_specified"; then
13516          # A command without a complete path is provided, search $PATH.
13517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13518$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13519          # Extract the first word of "$tool_basename", so it can be a program name with args.
13520set dummy $tool_basename; ac_word=$2
13521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13522$as_echo_n "checking for $ac_word... " >&6; }
13523if ${ac_cv_path_CYGPATH+:} false; then :
13524  $as_echo_n "(cached) " >&6
13525else
13526  case $CYGPATH in
13527  [\\/]* | ?:[\\/]*)
13528  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13529  ;;
13530  *)
13531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13532for as_dir in $PATH
13533do
13534  IFS=$as_save_IFS
13535  test -z "$as_dir" && as_dir=.
13536    for ac_exec_ext in '' $ac_executable_extensions; do
13537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13538    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13540    break 2
13541  fi
13542done
13543  done
13544IFS=$as_save_IFS
13545
13546  ;;
13547esac
13548fi
13549CYGPATH=$ac_cv_path_CYGPATH
13550if test -n "$CYGPATH"; then
13551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13552$as_echo "$CYGPATH" >&6; }
13553else
13554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13555$as_echo "no" >&6; }
13556fi
13557
13558
13559          if test "x$CYGPATH" = x; then
13560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13561          fi
13562        else
13563          # Otherwise we believe it is a complete path. Use it as it is.
13564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13565$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13567$as_echo_n "checking for CYGPATH... " >&6; }
13568          if test ! -x "$tool_specified"; then
13569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13570$as_echo "not found" >&6; }
13571            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13572          fi
13573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13574$as_echo "$tool_specified" >&6; }
13575        fi
13576      fi
13577    fi
13578
13579  fi
13580
13581
13582
13583
13584  # Publish this variable in the help.
13585
13586
13587  if [ -z "${READLINK+x}" ]; then
13588    # The variable is not set by user, try to locate tool using the code snippet
13589    for ac_prog in greadlink readlink
13590do
13591  # Extract the first word of "$ac_prog", so it can be a program name with args.
13592set dummy $ac_prog; ac_word=$2
13593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13594$as_echo_n "checking for $ac_word... " >&6; }
13595if ${ac_cv_path_READLINK+:} false; then :
13596  $as_echo_n "(cached) " >&6
13597else
13598  case $READLINK in
13599  [\\/]* | ?:[\\/]*)
13600  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13601  ;;
13602  *)
13603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13604for as_dir in $PATH
13605do
13606  IFS=$as_save_IFS
13607  test -z "$as_dir" && as_dir=.
13608    for ac_exec_ext in '' $ac_executable_extensions; do
13609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13610    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13612    break 2
13613  fi
13614done
13615  done
13616IFS=$as_save_IFS
13617
13618  ;;
13619esac
13620fi
13621READLINK=$ac_cv_path_READLINK
13622if test -n "$READLINK"; then
13623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13624$as_echo "$READLINK" >&6; }
13625else
13626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13627$as_echo "no" >&6; }
13628fi
13629
13630
13631  test -n "$READLINK" && break
13632done
13633
13634  else
13635    # The variable is set, but is it from the command line or the environment?
13636
13637    # Try to remove the string !READLINK! from our list.
13638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13640      # If it failed, the variable was not from the command line. Ignore it,
13641      # but warn the user (except for BASH, which is always set by the calling BASH).
13642      if test "xREADLINK" != xBASH; then
13643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13644$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13645      fi
13646      # Try to locate tool using the code snippet
13647      for ac_prog in greadlink readlink
13648do
13649  # Extract the first word of "$ac_prog", so it can be a program name with args.
13650set dummy $ac_prog; ac_word=$2
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13652$as_echo_n "checking for $ac_word... " >&6; }
13653if ${ac_cv_path_READLINK+:} false; then :
13654  $as_echo_n "(cached) " >&6
13655else
13656  case $READLINK in
13657  [\\/]* | ?:[\\/]*)
13658  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13659  ;;
13660  *)
13661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13662for as_dir in $PATH
13663do
13664  IFS=$as_save_IFS
13665  test -z "$as_dir" && as_dir=.
13666    for ac_exec_ext in '' $ac_executable_extensions; do
13667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13668    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13670    break 2
13671  fi
13672done
13673  done
13674IFS=$as_save_IFS
13675
13676  ;;
13677esac
13678fi
13679READLINK=$ac_cv_path_READLINK
13680if test -n "$READLINK"; then
13681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13682$as_echo "$READLINK" >&6; }
13683else
13684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13685$as_echo "no" >&6; }
13686fi
13687
13688
13689  test -n "$READLINK" && break
13690done
13691
13692    else
13693      # If it succeeded, then it was overridden by the user. We will use it
13694      # for the tool.
13695
13696      # First remove it from the list of overridden variables, so we can test
13697      # for unknown variables in the end.
13698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13699
13700      # Check if we try to supply an empty value
13701      if test "x$READLINK" = x; then
13702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13703$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13705$as_echo_n "checking for READLINK... " >&6; }
13706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13707$as_echo "disabled" >&6; }
13708      else
13709        # Check if the provided tool contains a complete path.
13710        tool_specified="$READLINK"
13711        tool_basename="${tool_specified##*/}"
13712        if test "x$tool_basename" = "x$tool_specified"; then
13713          # A command without a complete path is provided, search $PATH.
13714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13715$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13716          # Extract the first word of "$tool_basename", so it can be a program name with args.
13717set dummy $tool_basename; ac_word=$2
13718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13719$as_echo_n "checking for $ac_word... " >&6; }
13720if ${ac_cv_path_READLINK+:} false; then :
13721  $as_echo_n "(cached) " >&6
13722else
13723  case $READLINK in
13724  [\\/]* | ?:[\\/]*)
13725  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13726  ;;
13727  *)
13728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13729for as_dir in $PATH
13730do
13731  IFS=$as_save_IFS
13732  test -z "$as_dir" && as_dir=.
13733    for ac_exec_ext in '' $ac_executable_extensions; do
13734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13735    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13737    break 2
13738  fi
13739done
13740  done
13741IFS=$as_save_IFS
13742
13743  ;;
13744esac
13745fi
13746READLINK=$ac_cv_path_READLINK
13747if test -n "$READLINK"; then
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13749$as_echo "$READLINK" >&6; }
13750else
13751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13752$as_echo "no" >&6; }
13753fi
13754
13755
13756          if test "x$READLINK" = x; then
13757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13758          fi
13759        else
13760          # Otherwise we believe it is a complete path. Use it as it is.
13761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13762$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13764$as_echo_n "checking for READLINK... " >&6; }
13765          if test ! -x "$tool_specified"; then
13766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13767$as_echo "not found" >&6; }
13768            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13769          fi
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13771$as_echo "$tool_specified" >&6; }
13772        fi
13773      fi
13774    fi
13775
13776  fi
13777
13778
13779
13780
13781  # Publish this variable in the help.
13782
13783
13784  if [ -z "${DF+x}" ]; then
13785    # The variable is not set by user, try to locate tool using the code snippet
13786    for ac_prog in df
13787do
13788  # Extract the first word of "$ac_prog", so it can be a program name with args.
13789set dummy $ac_prog; ac_word=$2
13790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13791$as_echo_n "checking for $ac_word... " >&6; }
13792if ${ac_cv_path_DF+:} false; then :
13793  $as_echo_n "(cached) " >&6
13794else
13795  case $DF in
13796  [\\/]* | ?:[\\/]*)
13797  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13798  ;;
13799  *)
13800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13801for as_dir in $PATH
13802do
13803  IFS=$as_save_IFS
13804  test -z "$as_dir" && as_dir=.
13805    for ac_exec_ext in '' $ac_executable_extensions; do
13806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13807    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13809    break 2
13810  fi
13811done
13812  done
13813IFS=$as_save_IFS
13814
13815  ;;
13816esac
13817fi
13818DF=$ac_cv_path_DF
13819if test -n "$DF"; then
13820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13821$as_echo "$DF" >&6; }
13822else
13823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13824$as_echo "no" >&6; }
13825fi
13826
13827
13828  test -n "$DF" && break
13829done
13830
13831  else
13832    # The variable is set, but is it from the command line or the environment?
13833
13834    # Try to remove the string !DF! from our list.
13835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13837      # If it failed, the variable was not from the command line. Ignore it,
13838      # but warn the user (except for BASH, which is always set by the calling BASH).
13839      if test "xDF" != xBASH; then
13840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13841$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13842      fi
13843      # Try to locate tool using the code snippet
13844      for ac_prog in df
13845do
13846  # Extract the first word of "$ac_prog", so it can be a program name with args.
13847set dummy $ac_prog; ac_word=$2
13848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13849$as_echo_n "checking for $ac_word... " >&6; }
13850if ${ac_cv_path_DF+:} false; then :
13851  $as_echo_n "(cached) " >&6
13852else
13853  case $DF in
13854  [\\/]* | ?:[\\/]*)
13855  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13856  ;;
13857  *)
13858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13859for as_dir in $PATH
13860do
13861  IFS=$as_save_IFS
13862  test -z "$as_dir" && as_dir=.
13863    for ac_exec_ext in '' $ac_executable_extensions; do
13864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13865    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13867    break 2
13868  fi
13869done
13870  done
13871IFS=$as_save_IFS
13872
13873  ;;
13874esac
13875fi
13876DF=$ac_cv_path_DF
13877if test -n "$DF"; then
13878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13879$as_echo "$DF" >&6; }
13880else
13881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13882$as_echo "no" >&6; }
13883fi
13884
13885
13886  test -n "$DF" && break
13887done
13888
13889    else
13890      # If it succeeded, then it was overridden by the user. We will use it
13891      # for the tool.
13892
13893      # First remove it from the list of overridden variables, so we can test
13894      # for unknown variables in the end.
13895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13896
13897      # Check if we try to supply an empty value
13898      if test "x$DF" = x; then
13899        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13900$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13902$as_echo_n "checking for DF... " >&6; }
13903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13904$as_echo "disabled" >&6; }
13905      else
13906        # Check if the provided tool contains a complete path.
13907        tool_specified="$DF"
13908        tool_basename="${tool_specified##*/}"
13909        if test "x$tool_basename" = "x$tool_specified"; then
13910          # A command without a complete path is provided, search $PATH.
13911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13912$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13913          # Extract the first word of "$tool_basename", so it can be a program name with args.
13914set dummy $tool_basename; ac_word=$2
13915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13916$as_echo_n "checking for $ac_word... " >&6; }
13917if ${ac_cv_path_DF+:} false; then :
13918  $as_echo_n "(cached) " >&6
13919else
13920  case $DF in
13921  [\\/]* | ?:[\\/]*)
13922  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13923  ;;
13924  *)
13925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13926for as_dir in $PATH
13927do
13928  IFS=$as_save_IFS
13929  test -z "$as_dir" && as_dir=.
13930    for ac_exec_ext in '' $ac_executable_extensions; do
13931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13932    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13934    break 2
13935  fi
13936done
13937  done
13938IFS=$as_save_IFS
13939
13940  ;;
13941esac
13942fi
13943DF=$ac_cv_path_DF
13944if test -n "$DF"; then
13945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13946$as_echo "$DF" >&6; }
13947else
13948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13949$as_echo "no" >&6; }
13950fi
13951
13952
13953          if test "x$DF" = x; then
13954            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13955          fi
13956        else
13957          # Otherwise we believe it is a complete path. Use it as it is.
13958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13959$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13960          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13961$as_echo_n "checking for DF... " >&6; }
13962          if test ! -x "$tool_specified"; then
13963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13964$as_echo "not found" >&6; }
13965            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13966          fi
13967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13968$as_echo "$tool_specified" >&6; }
13969        fi
13970      fi
13971    fi
13972
13973  fi
13974
13975
13976
13977
13978  # Publish this variable in the help.
13979
13980
13981  if [ -z "${CPIO+x}" ]; then
13982    # The variable is not set by user, try to locate tool using the code snippet
13983    for ac_prog in cpio bsdcpio
13984do
13985  # Extract the first word of "$ac_prog", so it can be a program name with args.
13986set dummy $ac_prog; ac_word=$2
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13988$as_echo_n "checking for $ac_word... " >&6; }
13989if ${ac_cv_path_CPIO+:} false; then :
13990  $as_echo_n "(cached) " >&6
13991else
13992  case $CPIO in
13993  [\\/]* | ?:[\\/]*)
13994  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13995  ;;
13996  *)
13997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13998for as_dir in $PATH
13999do
14000  IFS=$as_save_IFS
14001  test -z "$as_dir" && as_dir=.
14002    for ac_exec_ext in '' $ac_executable_extensions; do
14003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14004    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14006    break 2
14007  fi
14008done
14009  done
14010IFS=$as_save_IFS
14011
14012  ;;
14013esac
14014fi
14015CPIO=$ac_cv_path_CPIO
14016if test -n "$CPIO"; then
14017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14018$as_echo "$CPIO" >&6; }
14019else
14020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14021$as_echo "no" >&6; }
14022fi
14023
14024
14025  test -n "$CPIO" && break
14026done
14027
14028  else
14029    # The variable is set, but is it from the command line or the environment?
14030
14031    # Try to remove the string !CPIO! from our list.
14032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14034      # If it failed, the variable was not from the command line. Ignore it,
14035      # but warn the user (except for BASH, which is always set by the calling BASH).
14036      if test "xCPIO" != xBASH; then
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14038$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14039      fi
14040      # Try to locate tool using the code snippet
14041      for ac_prog in cpio bsdcpio
14042do
14043  # Extract the first word of "$ac_prog", so it can be a program name with args.
14044set dummy $ac_prog; ac_word=$2
14045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14046$as_echo_n "checking for $ac_word... " >&6; }
14047if ${ac_cv_path_CPIO+:} false; then :
14048  $as_echo_n "(cached) " >&6
14049else
14050  case $CPIO in
14051  [\\/]* | ?:[\\/]*)
14052  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14053  ;;
14054  *)
14055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14056for as_dir in $PATH
14057do
14058  IFS=$as_save_IFS
14059  test -z "$as_dir" && as_dir=.
14060    for ac_exec_ext in '' $ac_executable_extensions; do
14061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14062    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14064    break 2
14065  fi
14066done
14067  done
14068IFS=$as_save_IFS
14069
14070  ;;
14071esac
14072fi
14073CPIO=$ac_cv_path_CPIO
14074if test -n "$CPIO"; then
14075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14076$as_echo "$CPIO" >&6; }
14077else
14078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14079$as_echo "no" >&6; }
14080fi
14081
14082
14083  test -n "$CPIO" && break
14084done
14085
14086    else
14087      # If it succeeded, then it was overridden by the user. We will use it
14088      # for the tool.
14089
14090      # First remove it from the list of overridden variables, so we can test
14091      # for unknown variables in the end.
14092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14093
14094      # Check if we try to supply an empty value
14095      if test "x$CPIO" = x; then
14096        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14097$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14099$as_echo_n "checking for CPIO... " >&6; }
14100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14101$as_echo "disabled" >&6; }
14102      else
14103        # Check if the provided tool contains a complete path.
14104        tool_specified="$CPIO"
14105        tool_basename="${tool_specified##*/}"
14106        if test "x$tool_basename" = "x$tool_specified"; then
14107          # A command without a complete path is provided, search $PATH.
14108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14109$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14110          # Extract the first word of "$tool_basename", so it can be a program name with args.
14111set dummy $tool_basename; ac_word=$2
14112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14113$as_echo_n "checking for $ac_word... " >&6; }
14114if ${ac_cv_path_CPIO+:} false; then :
14115  $as_echo_n "(cached) " >&6
14116else
14117  case $CPIO in
14118  [\\/]* | ?:[\\/]*)
14119  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14120  ;;
14121  *)
14122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14123for as_dir in $PATH
14124do
14125  IFS=$as_save_IFS
14126  test -z "$as_dir" && as_dir=.
14127    for ac_exec_ext in '' $ac_executable_extensions; do
14128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14129    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14131    break 2
14132  fi
14133done
14134  done
14135IFS=$as_save_IFS
14136
14137  ;;
14138esac
14139fi
14140CPIO=$ac_cv_path_CPIO
14141if test -n "$CPIO"; then
14142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14143$as_echo "$CPIO" >&6; }
14144else
14145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14146$as_echo "no" >&6; }
14147fi
14148
14149
14150          if test "x$CPIO" = x; then
14151            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14152          fi
14153        else
14154          # Otherwise we believe it is a complete path. Use it as it is.
14155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14156$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14157          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14158$as_echo_n "checking for CPIO... " >&6; }
14159          if test ! -x "$tool_specified"; then
14160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14161$as_echo "not found" >&6; }
14162            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14163          fi
14164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14165$as_echo "$tool_specified" >&6; }
14166        fi
14167      fi
14168    fi
14169
14170  fi
14171
14172
14173
14174
14175  # Publish this variable in the help.
14176
14177
14178  if [ -z "${NICE+x}" ]; then
14179    # The variable is not set by user, try to locate tool using the code snippet
14180    for ac_prog in nice
14181do
14182  # Extract the first word of "$ac_prog", so it can be a program name with args.
14183set dummy $ac_prog; ac_word=$2
14184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14185$as_echo_n "checking for $ac_word... " >&6; }
14186if ${ac_cv_path_NICE+:} false; then :
14187  $as_echo_n "(cached) " >&6
14188else
14189  case $NICE in
14190  [\\/]* | ?:[\\/]*)
14191  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14192  ;;
14193  *)
14194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14195for as_dir in $PATH
14196do
14197  IFS=$as_save_IFS
14198  test -z "$as_dir" && as_dir=.
14199    for ac_exec_ext in '' $ac_executable_extensions; do
14200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14201    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14203    break 2
14204  fi
14205done
14206  done
14207IFS=$as_save_IFS
14208
14209  ;;
14210esac
14211fi
14212NICE=$ac_cv_path_NICE
14213if test -n "$NICE"; then
14214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14215$as_echo "$NICE" >&6; }
14216else
14217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14218$as_echo "no" >&6; }
14219fi
14220
14221
14222  test -n "$NICE" && break
14223done
14224
14225  else
14226    # The variable is set, but is it from the command line or the environment?
14227
14228    # Try to remove the string !NICE! from our list.
14229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14231      # If it failed, the variable was not from the command line. Ignore it,
14232      # but warn the user (except for BASH, which is always set by the calling BASH).
14233      if test "xNICE" != xBASH; then
14234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14235$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14236      fi
14237      # Try to locate tool using the code snippet
14238      for ac_prog in nice
14239do
14240  # Extract the first word of "$ac_prog", so it can be a program name with args.
14241set dummy $ac_prog; ac_word=$2
14242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14243$as_echo_n "checking for $ac_word... " >&6; }
14244if ${ac_cv_path_NICE+:} false; then :
14245  $as_echo_n "(cached) " >&6
14246else
14247  case $NICE in
14248  [\\/]* | ?:[\\/]*)
14249  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14250  ;;
14251  *)
14252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14253for as_dir in $PATH
14254do
14255  IFS=$as_save_IFS
14256  test -z "$as_dir" && as_dir=.
14257    for ac_exec_ext in '' $ac_executable_extensions; do
14258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14259    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14261    break 2
14262  fi
14263done
14264  done
14265IFS=$as_save_IFS
14266
14267  ;;
14268esac
14269fi
14270NICE=$ac_cv_path_NICE
14271if test -n "$NICE"; then
14272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14273$as_echo "$NICE" >&6; }
14274else
14275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14276$as_echo "no" >&6; }
14277fi
14278
14279
14280  test -n "$NICE" && break
14281done
14282
14283    else
14284      # If it succeeded, then it was overridden by the user. We will use it
14285      # for the tool.
14286
14287      # First remove it from the list of overridden variables, so we can test
14288      # for unknown variables in the end.
14289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14290
14291      # Check if we try to supply an empty value
14292      if test "x$NICE" = x; then
14293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14294$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14296$as_echo_n "checking for NICE... " >&6; }
14297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14298$as_echo "disabled" >&6; }
14299      else
14300        # Check if the provided tool contains a complete path.
14301        tool_specified="$NICE"
14302        tool_basename="${tool_specified##*/}"
14303        if test "x$tool_basename" = "x$tool_specified"; then
14304          # A command without a complete path is provided, search $PATH.
14305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14306$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14307          # Extract the first word of "$tool_basename", so it can be a program name with args.
14308set dummy $tool_basename; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_NICE+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $NICE in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337NICE=$ac_cv_path_NICE
14338if test -n "$NICE"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14340$as_echo "$NICE" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347          if test "x$NICE" = x; then
14348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14349          fi
14350        else
14351          # Otherwise we believe it is a complete path. Use it as it is.
14352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14353$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14355$as_echo_n "checking for NICE... " >&6; }
14356          if test ! -x "$tool_specified"; then
14357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14358$as_echo "not found" >&6; }
14359            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14360          fi
14361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14362$as_echo "$tool_specified" >&6; }
14363        fi
14364      fi
14365    fi
14366
14367  fi
14368
14369
14370
14371
14372# Now we can determine OpenJDK build and target platforms. This is required to
14373# have early on.
14374# Make sure we can run config.sub.
14375$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14376  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14377
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14379$as_echo_n "checking build system type... " >&6; }
14380if ${ac_cv_build+:} false; then :
14381  $as_echo_n "(cached) " >&6
14382else
14383  ac_build_alias=$build_alias
14384test "x$ac_build_alias" = x &&
14385  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14386test "x$ac_build_alias" = x &&
14387  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14388ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14389  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14390
14391fi
14392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14393$as_echo "$ac_cv_build" >&6; }
14394case $ac_cv_build in
14395*-*-*) ;;
14396*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14397esac
14398build=$ac_cv_build
14399ac_save_IFS=$IFS; IFS='-'
14400set x $ac_cv_build
14401shift
14402build_cpu=$1
14403build_vendor=$2
14404shift; shift
14405# Remember, the first character of IFS is used to create $*,
14406# except with old shells:
14407build_os=$*
14408IFS=$ac_save_IFS
14409case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14410
14411
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14413$as_echo_n "checking host system type... " >&6; }
14414if ${ac_cv_host+:} false; then :
14415  $as_echo_n "(cached) " >&6
14416else
14417  if test "x$host_alias" = x; then
14418  ac_cv_host=$ac_cv_build
14419else
14420  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14421    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14422fi
14423
14424fi
14425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14426$as_echo "$ac_cv_host" >&6; }
14427case $ac_cv_host in
14428*-*-*) ;;
14429*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14430esac
14431host=$ac_cv_host
14432ac_save_IFS=$IFS; IFS='-'
14433set x $ac_cv_host
14434shift
14435host_cpu=$1
14436host_vendor=$2
14437shift; shift
14438# Remember, the first character of IFS is used to create $*,
14439# except with old shells:
14440host_os=$*
14441IFS=$ac_save_IFS
14442case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14443
14444
14445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14446$as_echo_n "checking target system type... " >&6; }
14447if ${ac_cv_target+:} false; then :
14448  $as_echo_n "(cached) " >&6
14449else
14450  if test "x$target_alias" = x; then
14451  ac_cv_target=$ac_cv_host
14452else
14453  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14454    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14455fi
14456
14457fi
14458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14459$as_echo "$ac_cv_target" >&6; }
14460case $ac_cv_target in
14461*-*-*) ;;
14462*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14463esac
14464target=$ac_cv_target
14465ac_save_IFS=$IFS; IFS='-'
14466set x $ac_cv_target
14467shift
14468target_cpu=$1
14469target_vendor=$2
14470shift; shift
14471# Remember, the first character of IFS is used to create $*,
14472# except with old shells:
14473target_os=$*
14474IFS=$ac_save_IFS
14475case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14476
14477
14478# The aliases save the names the user supplied, while $host etc.
14479# will get canonicalized.
14480test -n "$target_alias" &&
14481  test "$program_prefix$program_suffix$program_transform_name" = \
14482    NONENONEs,x,x, &&
14483  program_prefix=${target_alias}-
14484
14485  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14486  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14487  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14488  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14489  # to use the configure naming style.
14490
14491
14492
14493
14494
14495  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14496  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14497  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14498  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14499  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14500  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14501
14502
14503
14504  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14505
14506  case "$build_os" in
14507    *linux*)
14508      VAR_OS=linux
14509      VAR_OS_TYPE=unix
14510      ;;
14511    *solaris*)
14512      VAR_OS=solaris
14513      VAR_OS_TYPE=unix
14514      ;;
14515    *darwin*)
14516      VAR_OS=macosx
14517      VAR_OS_TYPE=unix
14518      ;;
14519    *bsd*)
14520      VAR_OS=bsd
14521      VAR_OS_TYPE=unix
14522      ;;
14523    *cygwin*)
14524      VAR_OS=windows
14525      VAR_OS_ENV=windows.cygwin
14526      ;;
14527    *mingw*)
14528      VAR_OS=windows
14529      VAR_OS_ENV=windows.msys
14530      ;;
14531    *aix*)
14532      VAR_OS=aix
14533      VAR_OS_TYPE=unix
14534      ;;
14535    *)
14536      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14537      ;;
14538  esac
14539
14540
14541  # First argument is the cpu name from the trip/quad
14542  case "$build_cpu" in
14543    x86_64)
14544      VAR_CPU=x86_64
14545      VAR_CPU_ARCH=x86
14546      VAR_CPU_BITS=64
14547      VAR_CPU_ENDIAN=little
14548      ;;
14549    i?86)
14550      VAR_CPU=x86
14551      VAR_CPU_ARCH=x86
14552      VAR_CPU_BITS=32
14553      VAR_CPU_ENDIAN=little
14554      ;;
14555    arm*)
14556      VAR_CPU=arm
14557      VAR_CPU_ARCH=arm
14558      VAR_CPU_BITS=32
14559      VAR_CPU_ENDIAN=little
14560      ;;
14561    aarch64)
14562      VAR_CPU=aarch64
14563      VAR_CPU_ARCH=aarch64
14564      VAR_CPU_BITS=64
14565      VAR_CPU_ENDIAN=little
14566      ;;
14567    powerpc)
14568      VAR_CPU=ppc
14569      VAR_CPU_ARCH=ppc
14570      VAR_CPU_BITS=32
14571      VAR_CPU_ENDIAN=big
14572      ;;
14573    powerpc64)
14574      VAR_CPU=ppc64
14575      VAR_CPU_ARCH=ppc
14576      VAR_CPU_BITS=64
14577      VAR_CPU_ENDIAN=big
14578      ;;
14579    powerpc64le)
14580      VAR_CPU=ppc64
14581      VAR_CPU_ARCH=ppc
14582      VAR_CPU_BITS=64
14583      VAR_CPU_ENDIAN=little
14584      ;;
14585    s390)
14586      VAR_CPU=s390
14587      VAR_CPU_ARCH=s390
14588      VAR_CPU_BITS=32
14589      VAR_CPU_ENDIAN=big
14590      ;;
14591    s390x)
14592      VAR_CPU=s390x
14593      VAR_CPU_ARCH=s390
14594      VAR_CPU_BITS=64
14595      VAR_CPU_ENDIAN=big
14596      ;;
14597    sparc)
14598      VAR_CPU=sparc
14599      VAR_CPU_ARCH=sparc
14600      VAR_CPU_BITS=32
14601      VAR_CPU_ENDIAN=big
14602      ;;
14603    sparcv9|sparc64)
14604      VAR_CPU=sparcv9
14605      VAR_CPU_ARCH=sparc
14606      VAR_CPU_BITS=64
14607      VAR_CPU_ENDIAN=big
14608      ;;
14609    *)
14610      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14611      ;;
14612  esac
14613
14614  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14615  OPENJDK_BUILD_OS="$VAR_OS"
14616  if test "x$VAR_OS_TYPE" != x; then
14617    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14618  else
14619    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14620  fi
14621  if test "x$VAR_OS_ENV" != x; then
14622    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14623  else
14624    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14625  fi
14626  OPENJDK_BUILD_CPU="$VAR_CPU"
14627  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14628  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14629  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14630
14631
14632
14633
14634
14635
14636
14637
14638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14639$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14641$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14642
14643  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14644
14645  case "$host_os" in
14646    *linux*)
14647      VAR_OS=linux
14648      VAR_OS_TYPE=unix
14649      ;;
14650    *solaris*)
14651      VAR_OS=solaris
14652      VAR_OS_TYPE=unix
14653      ;;
14654    *darwin*)
14655      VAR_OS=macosx
14656      VAR_OS_TYPE=unix
14657      ;;
14658    *bsd*)
14659      VAR_OS=bsd
14660      VAR_OS_TYPE=unix
14661      ;;
14662    *cygwin*)
14663      VAR_OS=windows
14664      VAR_OS_ENV=windows.cygwin
14665      ;;
14666    *mingw*)
14667      VAR_OS=windows
14668      VAR_OS_ENV=windows.msys
14669      ;;
14670    *aix*)
14671      VAR_OS=aix
14672      VAR_OS_TYPE=unix
14673      ;;
14674    *)
14675      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14676      ;;
14677  esac
14678
14679
14680  # First argument is the cpu name from the trip/quad
14681  case "$host_cpu" in
14682    x86_64)
14683      VAR_CPU=x86_64
14684      VAR_CPU_ARCH=x86
14685      VAR_CPU_BITS=64
14686      VAR_CPU_ENDIAN=little
14687      ;;
14688    i?86)
14689      VAR_CPU=x86
14690      VAR_CPU_ARCH=x86
14691      VAR_CPU_BITS=32
14692      VAR_CPU_ENDIAN=little
14693      ;;
14694    arm*)
14695      VAR_CPU=arm
14696      VAR_CPU_ARCH=arm
14697      VAR_CPU_BITS=32
14698      VAR_CPU_ENDIAN=little
14699      ;;
14700    aarch64)
14701      VAR_CPU=aarch64
14702      VAR_CPU_ARCH=aarch64
14703      VAR_CPU_BITS=64
14704      VAR_CPU_ENDIAN=little
14705      ;;
14706    powerpc)
14707      VAR_CPU=ppc
14708      VAR_CPU_ARCH=ppc
14709      VAR_CPU_BITS=32
14710      VAR_CPU_ENDIAN=big
14711      ;;
14712    powerpc64)
14713      VAR_CPU=ppc64
14714      VAR_CPU_ARCH=ppc
14715      VAR_CPU_BITS=64
14716      VAR_CPU_ENDIAN=big
14717      ;;
14718    powerpc64le)
14719      VAR_CPU=ppc64
14720      VAR_CPU_ARCH=ppc
14721      VAR_CPU_BITS=64
14722      VAR_CPU_ENDIAN=little
14723      ;;
14724    s390)
14725      VAR_CPU=s390
14726      VAR_CPU_ARCH=s390
14727      VAR_CPU_BITS=32
14728      VAR_CPU_ENDIAN=big
14729      ;;
14730    s390x)
14731      VAR_CPU=s390x
14732      VAR_CPU_ARCH=s390
14733      VAR_CPU_BITS=64
14734      VAR_CPU_ENDIAN=big
14735      ;;
14736    sparc)
14737      VAR_CPU=sparc
14738      VAR_CPU_ARCH=sparc
14739      VAR_CPU_BITS=32
14740      VAR_CPU_ENDIAN=big
14741      ;;
14742    sparcv9|sparc64)
14743      VAR_CPU=sparcv9
14744      VAR_CPU_ARCH=sparc
14745      VAR_CPU_BITS=64
14746      VAR_CPU_ENDIAN=big
14747      ;;
14748    *)
14749      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14750      ;;
14751  esac
14752
14753  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14754  OPENJDK_TARGET_OS="$VAR_OS"
14755  if test "x$VAR_OS_TYPE" != x; then
14756    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14757  else
14758    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14759  fi
14760  if test "x$VAR_OS_ENV" != x; then
14761    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14762  else
14763    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14764  fi
14765  OPENJDK_TARGET_CPU="$VAR_CPU"
14766  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14767  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14768  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14769
14770
14771
14772
14773
14774
14775
14776
14777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14778$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14780$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14781
14782
14783
14784# Check whether --with-target-bits was given.
14785if test "${with_target_bits+set}" = set; then :
14786  withval=$with_target_bits;
14787fi
14788
14789
14790  # We have three types of compiles:
14791  # native  == normal compilation, target system == build system
14792  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14793  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14794  #
14795  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14796    # We're doing a proper cross-compilation
14797    COMPILE_TYPE="cross"
14798  else
14799    COMPILE_TYPE="native"
14800  fi
14801
14802  if test "x$with_target_bits" != x; then
14803    if test "x$COMPILE_TYPE" = "xcross"; then
14804      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14805    fi
14806
14807    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14808      # A reduced build is requested
14809      COMPILE_TYPE="reduced"
14810      OPENJDK_TARGET_CPU_BITS=32
14811      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14812        OPENJDK_TARGET_CPU=x86
14813      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14814        OPENJDK_TARGET_CPU=sparc
14815      else
14816        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14817      fi
14818    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14819      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
14820    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14821      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14822$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14823    else
14824      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14825    fi
14826  fi
14827
14828
14829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14830$as_echo_n "checking compilation type... " >&6; }
14831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14832$as_echo "$COMPILE_TYPE" >&6; }
14833
14834
14835  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14836    REQUIRED_OS_NAME=SunOS
14837    REQUIRED_OS_VERSION=5.10
14838  fi
14839  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14840    REQUIRED_OS_NAME=Linux
14841    REQUIRED_OS_VERSION=2.6
14842  fi
14843  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14844    REQUIRED_OS_NAME=Windows
14845    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14846      REQUIRED_OS_VERSION=5.2
14847    else
14848      REQUIRED_OS_VERSION=5.1
14849    fi
14850  fi
14851  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14852    REQUIRED_OS_NAME=Darwin
14853    REQUIRED_OS_VERSION=11.2
14854  fi
14855
14856
14857
14858
14859
14860  # Also store the legacy naming of the cpu.
14861  # Ie i586 and amd64 instead of x86 and x86_64
14862  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14863  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14864    OPENJDK_TARGET_CPU_LEGACY="i586"
14865  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14866    # On all platforms except MacOSX replace x86_64 with amd64.
14867    OPENJDK_TARGET_CPU_LEGACY="amd64"
14868  fi
14869
14870
14871  # And the second legacy naming of the cpu.
14872  # Ie i386 and amd64 instead of x86 and x86_64.
14873  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14874  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14875    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14876  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14877    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14878  fi
14879
14880
14881  # This is the name of the cpu (but using i386 and amd64 instead of
14882  # x86 and x86_64, respectively), preceeded by a /, to be used when
14883  # locating libraries. On macosx, it's empty, though.
14884  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14885  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14886    OPENJDK_TARGET_CPU_LIBDIR=""
14887  fi
14888
14889
14890  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14891  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14892  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14893  OPENJDK_TARGET_CPU_ISADIR=""
14894  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14895    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14896      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14897    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14898      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14899    fi
14900  fi
14901
14902
14903  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14904  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14905  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14906    # On linux only, we replace x86 with i386.
14907    OPENJDK_TARGET_CPU_OSARCH="i386"
14908  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14909    # On all platforms except macosx, we replace x86_64 with amd64.
14910    OPENJDK_TARGET_CPU_OSARCH="amd64"
14911  fi
14912
14913
14914  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14915  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14916    OPENJDK_TARGET_CPU_JLI="i386"
14917  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14918    # On all platforms except macosx, we replace x86_64 with amd64.
14919    OPENJDK_TARGET_CPU_JLI="amd64"
14920  fi
14921  # Now setup the -D flags for building libjli.
14922  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14923  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14924    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14925      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14926    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14927      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14928    fi
14929  fi
14930
14931
14932  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14933      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14934  else
14935      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14936  fi
14937
14938
14939  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14940    A_LP64="LP64:="
14941    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14942    # unpack200.exe
14943    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14944      ADD_LP64="-D_LP64=1"
14945    fi
14946  fi
14947  LP64=$A_LP64
14948
14949
14950  if test "x$COMPILE_TYPE" = "xcross"; then
14951    # FIXME: ... or should this include reduced builds..?
14952    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14953  else
14954    DEFINE_CROSS_COMPILE_ARCH=""
14955  fi
14956
14957
14958  # ZERO_ARCHDEF is used to enable architecture-specific code
14959  case "${OPENJDK_TARGET_CPU}" in
14960    ppc)     ZERO_ARCHDEF=PPC32 ;;
14961    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14962    s390*)   ZERO_ARCHDEF=S390  ;;
14963    sparc*)  ZERO_ARCHDEF=SPARC ;;
14964    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14965    x86)     ZERO_ARCHDEF=IA32  ;;
14966    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14967  esac
14968
14969
14970
14971
14972# Continue setting up basic stuff. Most remaining code require fundamental tools.
14973
14974  # Save the current directory this script was started from
14975  CURDIR="$PWD"
14976
14977  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
14978  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
14979  # was not available at that time.
14980  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
14981  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
14982    ORIGINAL_PATH="$REWRITTEN_PATH"
14983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
14984$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
14985  fi
14986
14987  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14988    PATH_SEP=";"
14989
14990  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14991  if test $SRC_ROOT_LENGTH -gt 100; then
14992    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14993  fi
14994
14995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14997$as_echo_n "checking cygwin release... " >&6; }
14998    CYGWIN_VERSION=`$UNAME -r`
14999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15000$as_echo "$CYGWIN_VERSION" >&6; }
15001    WINDOWS_ENV_VENDOR='cygwin'
15002    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15003
15004    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15005    if test "x$CYGWIN_VERSION_OLD" != x; then
15006      { $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
15007$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;}
15008      as_fn_error $? "Cannot continue" "$LINENO" 5
15009    fi
15010    if test "x$CYGPATH" = x; then
15011      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15012    fi
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15014$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15015    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15016    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15017    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15018    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15020$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15021    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15022    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15023    if test "x$test_cygdrive_prefix" = x; then
15024      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15025    fi
15026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15028$as_echo_n "checking msys release... " >&6; }
15029    MSYS_VERSION=`$UNAME -r`
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15031$as_echo "$MSYS_VERSION" >&6; }
15032
15033    WINDOWS_ENV_VENDOR='msys'
15034    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15035
15036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15037$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15038    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15039    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15040
15041  windows_path="$MSYS_ROOT_PATH"
15042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15043    unix_path=`$CYGPATH -u "$windows_path"`
15044    MSYS_ROOT_PATH="$unix_path"
15045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15047    MSYS_ROOT_PATH="$unix_path"
15048  fi
15049
15050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15051$as_echo "$MSYS_ROOT_PATH" >&6; }
15052    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15053  else
15054    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15055  fi
15056
15057  # Test if windows or unix (cygwin/msys) find is first in path.
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15059$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15060  FIND_BINARY_OUTPUT=`find --version 2>&1`
15061  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15063$as_echo "unix style" >&6; }
15064  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15066$as_echo "Windows" >&6; }
15067    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15068$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15069    { $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
15070$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15071    as_fn_error $? "Cannot continue" "$LINENO" 5
15072  else
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15074$as_echo "unknown" >&6; }
15075    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15076$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15077  fi
15078
15079  else
15080    PATH_SEP=":"
15081  fi
15082
15083
15084  # We get the top-level directory from the supporting wrappers.
15085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15086$as_echo_n "checking for top-level directory... " >&6; }
15087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15088$as_echo "$TOPDIR" >&6; }
15089
15090
15091  # Save the original version of TOPDIR for string comparisons
15092  ORIGINAL_TOPDIR="$TOPDIR"
15093
15094
15095  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15096
15097  # Only process if variable expands to non-empty
15098
15099  if test "x$CURDIR" != x; then
15100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15101
15102  # Input might be given as Windows format, start by converting to
15103  # unix format.
15104  path="$CURDIR"
15105  new_path=`$CYGPATH -u "$path"`
15106
15107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15110  # "foo.exe" is OK but "foo" is an error.
15111  #
15112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15113  # It is also a way to make sure we got the proper file name for the real test later on.
15114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15115  if test "x$test_shortpath" = x; then
15116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15117$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15118    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15119  fi
15120
15121  # Call helper function which possibly converts this using DOS-style short mode.
15122  # If so, the updated path is stored in $new_path.
15123
15124  input_path="$new_path"
15125  # Check if we need to convert this using DOS-style short mode. If the path
15126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15127  # take no chances and rewrite it.
15128  # Note: m4 eats our [], so we need to use [ and ] instead.
15129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15130  if test "x$has_forbidden_chars" != x; then
15131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15135      # Going to short mode and back again did indeed matter. Since short mode is
15136      # case insensitive, let's make it lowercase to improve readability.
15137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15138      # Now convert it back to Unix-style (cygpath)
15139      input_path=`$CYGPATH -u "$shortmode_path"`
15140      new_path="$input_path"
15141    fi
15142  fi
15143
15144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15145  if test "x$test_cygdrive_prefix" = x; then
15146    # As a simple fix, exclude /usr/bin since it's not a real path.
15147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15149      # a path prefixed by /cygdrive for fixpath to work.
15150      new_path="$CYGWIN_ROOT_PATH$input_path"
15151    fi
15152  fi
15153
15154
15155  if test "x$path" != "x$new_path"; then
15156    CURDIR="$new_path"
15157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15158$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15159  fi
15160
15161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15162
15163  path="$CURDIR"
15164  has_colon=`$ECHO $path | $GREP ^.:`
15165  new_path="$path"
15166  if test "x$has_colon" = x; then
15167    # Not in mixed or Windows style, start by that.
15168    new_path=`cmd //c echo $path`
15169  fi
15170
15171
15172  input_path="$new_path"
15173  # Check if we need to convert this using DOS-style short mode. If the path
15174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15175  # take no chances and rewrite it.
15176  # Note: m4 eats our [], so we need to use [ and ] instead.
15177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15178  if test "x$has_forbidden_chars" != x; then
15179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15181  fi
15182
15183
15184  windows_path="$new_path"
15185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15186    unix_path=`$CYGPATH -u "$windows_path"`
15187    new_path="$unix_path"
15188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15190    new_path="$unix_path"
15191  fi
15192
15193  if test "x$path" != "x$new_path"; then
15194    CURDIR="$new_path"
15195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15196$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15197  fi
15198
15199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15201
15202    else
15203      # We're on a unix platform. Hooray! :)
15204      path="$CURDIR"
15205      has_space=`$ECHO "$path" | $GREP " "`
15206      if test "x$has_space" != x; then
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15208$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15210      fi
15211
15212      # Use eval to expand a potential ~
15213      eval path="$path"
15214      if test ! -f "$path" && test ! -d "$path"; then
15215        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15216      fi
15217
15218      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15219    fi
15220  fi
15221
15222
15223  # Only process if variable expands to non-empty
15224
15225  if test "x$TOPDIR" != x; then
15226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15227
15228  # Input might be given as Windows format, start by converting to
15229  # unix format.
15230  path="$TOPDIR"
15231  new_path=`$CYGPATH -u "$path"`
15232
15233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15236  # "foo.exe" is OK but "foo" is an error.
15237  #
15238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15239  # It is also a way to make sure we got the proper file name for the real test later on.
15240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15241  if test "x$test_shortpath" = x; then
15242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15243$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15244    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15245  fi
15246
15247  # Call helper function which possibly converts this using DOS-style short mode.
15248  # If so, the updated path is stored in $new_path.
15249
15250  input_path="$new_path"
15251  # Check if we need to convert this using DOS-style short mode. If the path
15252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15253  # take no chances and rewrite it.
15254  # Note: m4 eats our [], so we need to use [ and ] instead.
15255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15256  if test "x$has_forbidden_chars" != x; then
15257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15261      # Going to short mode and back again did indeed matter. Since short mode is
15262      # case insensitive, let's make it lowercase to improve readability.
15263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15264      # Now convert it back to Unix-style (cygpath)
15265      input_path=`$CYGPATH -u "$shortmode_path"`
15266      new_path="$input_path"
15267    fi
15268  fi
15269
15270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15271  if test "x$test_cygdrive_prefix" = x; then
15272    # As a simple fix, exclude /usr/bin since it's not a real path.
15273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15275      # a path prefixed by /cygdrive for fixpath to work.
15276      new_path="$CYGWIN_ROOT_PATH$input_path"
15277    fi
15278  fi
15279
15280
15281  if test "x$path" != "x$new_path"; then
15282    TOPDIR="$new_path"
15283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15284$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15285  fi
15286
15287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15288
15289  path="$TOPDIR"
15290  has_colon=`$ECHO $path | $GREP ^.:`
15291  new_path="$path"
15292  if test "x$has_colon" = x; then
15293    # Not in mixed or Windows style, start by that.
15294    new_path=`cmd //c echo $path`
15295  fi
15296
15297
15298  input_path="$new_path"
15299  # Check if we need to convert this using DOS-style short mode. If the path
15300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15301  # take no chances and rewrite it.
15302  # Note: m4 eats our [], so we need to use [ and ] instead.
15303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15304  if test "x$has_forbidden_chars" != x; then
15305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15307  fi
15308
15309
15310  windows_path="$new_path"
15311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15312    unix_path=`$CYGPATH -u "$windows_path"`
15313    new_path="$unix_path"
15314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15316    new_path="$unix_path"
15317  fi
15318
15319  if test "x$path" != "x$new_path"; then
15320    TOPDIR="$new_path"
15321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15322$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15323  fi
15324
15325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15327
15328    else
15329      # We're on a unix platform. Hooray! :)
15330      path="$TOPDIR"
15331      has_space=`$ECHO "$path" | $GREP " "`
15332      if test "x$has_space" != x; then
15333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15334$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15336      fi
15337
15338      # Use eval to expand a potential ~
15339      eval path="$path"
15340      if test ! -f "$path" && test ! -d "$path"; then
15341        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15342      fi
15343
15344      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15345    fi
15346  fi
15347
15348  # SRC_ROOT is a traditional alias for TOPDIR.
15349  SRC_ROOT=$TOPDIR
15350
15351  # Calculate a canonical version of TOPDIR for string comparisons
15352  CANONICAL_TOPDIR=$TOPDIR
15353
15354  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15355    # Follow a chain of symbolic links. Use readlink
15356    # where it exists, else fall back to horribly
15357    # complicated shell code.
15358    if test "x$READLINK_TESTED" != yes; then
15359      # On MacOSX there is a readlink tool with a different
15360      # purpose than the GNU readlink tool. Check the found readlink.
15361      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15362      if test "x$ISGNU" = x; then
15363        # A readlink that we do not know how to use.
15364        # Are there other non-GNU readlinks out there?
15365        READLINK_TESTED=yes
15366        READLINK=
15367      fi
15368    fi
15369
15370    if test "x$READLINK" != x; then
15371      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15372    else
15373      # Save the current directory for restoring afterwards
15374      STARTDIR=$PWD
15375      COUNTER=0
15376      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15377      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15378      cd $sym_link_dir
15379      # Use -P flag to resolve symlinks in directories.
15380      cd `$THEPWDCMD -P`
15381      sym_link_dir=`$THEPWDCMD -P`
15382      # Resolve file symlinks
15383      while test $COUNTER -lt 20; do
15384        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15385        if test "x$ISLINK" == x; then
15386          # This is not a symbolic link! We are done!
15387          break
15388        fi
15389        # Again resolve directory symlinks since the target of the just found
15390        # link could be in a different directory
15391        cd `$DIRNAME $ISLINK`
15392        sym_link_dir=`$THEPWDCMD -P`
15393        sym_link_file=`$BASENAME $ISLINK`
15394        let COUNTER=COUNTER+1
15395      done
15396      cd $STARTDIR
15397      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15398    fi
15399  fi
15400
15401
15402
15403  # Locate the directory of this script.
15404  AUTOCONF_DIR=$TOPDIR/common/autoconf
15405
15406
15407# Check if it's a pure open build or if custom sources are to be used.
15408
15409  # Check whether --enable-openjdk-only was given.
15410if test "${enable_openjdk_only+set}" = set; then :
15411  enableval=$enable_openjdk_only;
15412else
15413  enable_openjdk_only="no"
15414fi
15415
15416
15417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15418$as_echo_n "checking for presence of closed sources... " >&6; }
15419  if test -d "$SRC_ROOT/jdk/src/closed"; then
15420    CLOSED_SOURCE_PRESENT=yes
15421  else
15422    CLOSED_SOURCE_PRESENT=no
15423  fi
15424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15425$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15426
15427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15428$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15429  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15431$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15432
15433  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15434    OPENJDK=true
15435    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15436      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15437$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15438    fi
15439  else
15440    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15441      OPENJDK=true
15442    else
15443      OPENJDK=false
15444    fi
15445  fi
15446
15447  if test "x$OPENJDK" = "xtrue"; then
15448    SET_OPENJDK="OPENJDK=true"
15449  fi
15450
15451
15452
15453  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15454  # the IncludeCustomExtension macro.
15455
15456
15457# Check whether --with-custom-make-dir was given.
15458if test "${with_custom_make_dir+set}" = set; then :
15459  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
15460$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15461fi
15462
15463
15464
15465
15466# These are needed to be able to create a configuration name (and thus the output directory)
15467
15468  ###############################################################################
15469  #
15470  # Check which variant of the JDK that we want to build.
15471  # Currently we have:
15472  #    normal:   standard edition
15473  # but the custom make system may add other variants
15474  #
15475  # Effectively the JDK variant gives a name to a specific set of
15476  # modules to compile into the JDK. In the future, these modules
15477  # might even be Jigsaw modules.
15478  #
15479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15480$as_echo_n "checking which variant of the JDK to build... " >&6; }
15481
15482# Check whether --with-jdk-variant was given.
15483if test "${with_jdk_variant+set}" = set; then :
15484  withval=$with_jdk_variant;
15485fi
15486
15487
15488  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15489    JDK_VARIANT="normal"
15490  else
15491    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15492  fi
15493
15494
15495
15496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15497$as_echo "$JDK_VARIANT" >&6; }
15498
15499
15500###############################################################################
15501#
15502# Check which interpreter of the JVM we want to build.
15503# Currently we have:
15504#    template: Template interpreter (the default)
15505#    cpp     : C++ interpreter
15506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15507$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15508
15509# Check whether --with-jvm-interpreter was given.
15510if test "${with_jvm_interpreter+set}" = set; then :
15511  withval=$with_jvm_interpreter;
15512fi
15513
15514
15515if test "x$with_jvm_interpreter" = x; then
15516     with_jvm_interpreter="template"
15517fi
15518
15519JVM_INTERPRETER="$with_jvm_interpreter"
15520
15521if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15522   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15523fi
15524
15525
15526
15527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15528$as_echo "$with_jvm_interpreter" >&6; }
15529
15530
15531
15532  ###############################################################################
15533  #
15534  # Check which variants of the JVM that we want to build.
15535  # Currently we have:
15536  #    server: normal interpreter and a tiered C1/C2 compiler
15537  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15538  #    minimal1: reduced form of client with optional VM services and features stripped out
15539  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15540  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15541  #    zero: no machine code interpreter, no compiler
15542  #    zeroshark: zero interpreter and shark/llvm compiler backend
15543#    core: interpreter only, no compiler (only works on some platforms)
15544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15545$as_echo_n "checking which variants of the JVM to build... " >&6; }
15546
15547# Check whether --with-jvm-variants was given.
15548if test "${with_jvm_variants+set}" = set; then :
15549  withval=$with_jvm_variants;
15550fi
15551
15552
15553  if test "x$with_jvm_variants" = x; then
15554    with_jvm_variants="server"
15555  fi
15556
15557  JVM_VARIANTS=",$with_jvm_variants,"
15558  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,//'`
15559
15560  if test "x$TEST_VARIANTS" != "x,"; then
15561     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15562  fi
15563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15564$as_echo "$with_jvm_variants" >&6; }
15565
15566  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15567  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15568  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15569  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15570  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15571  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15572  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15573
15574  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15575    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15576      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15577    fi
15578  fi
15579  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15580    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15581      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15582    fi
15583  fi
15584  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15585    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15586      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15587    fi
15588  fi
15589
15590  # Replace the commas with AND for use in the build directory name.
15591  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15592  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/'`
15593  if test "x$COUNT_VARIANTS" != "x,1"; then
15594    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15595  else
15596    BUILDING_MULTIPLE_JVM_VARIANTS=no
15597  fi
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608  INCLUDE_SA=true
15609  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15610    INCLUDE_SA=false
15611  fi
15612  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15613    INCLUDE_SA=false
15614  fi
15615  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15616    INCLUDE_SA=false
15617  fi
15618  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15619    INCLUDE_SA=false
15620  fi
15621
15622
15623  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15624    MACOSX_UNIVERSAL="true"
15625  fi
15626
15627
15628
15629
15630  ###############################################################################
15631  #
15632  # Set the debug level
15633  #    release: no debug information, all optimizations, no asserts.
15634  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15635  #    fastdebug: debug information (-g), all optimizations, all asserts
15636  #    slowdebug: debug information (-g), no optimizations, all asserts
15637  #
15638  DEBUG_LEVEL="release"
15639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15640$as_echo_n "checking which debug level to use... " >&6; }
15641  # Check whether --enable-debug was given.
15642if test "${enable_debug+set}" = set; then :
15643  enableval=$enable_debug;
15644        ENABLE_DEBUG="${enableval}"
15645        DEBUG_LEVEL="fastdebug"
15646
15647else
15648  ENABLE_DEBUG="no"
15649fi
15650
15651
15652
15653# Check whether --with-debug-level was given.
15654if test "${with_debug_level+set}" = set; then :
15655  withval=$with_debug_level;
15656        DEBUG_LEVEL="${withval}"
15657        if test "x$ENABLE_DEBUG" = xyes; then
15658          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15659        fi
15660
15661fi
15662
15663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15664$as_echo "$DEBUG_LEVEL" >&6; }
15665
15666  if test "x$DEBUG_LEVEL" != xrelease && \
15667      test "x$DEBUG_LEVEL" != xoptimized && \
15668      test "x$DEBUG_LEVEL" != xfastdebug && \
15669      test "x$DEBUG_LEVEL" != xslowdebug; then
15670    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15671  fi
15672
15673
15674  ###############################################################################
15675  #
15676  # Setup legacy vars/targets and new vars to deal with different debug levels.
15677  #
15678
15679  case $DEBUG_LEVEL in
15680    release )
15681      VARIANT="OPT"
15682      FASTDEBUG="false"
15683      DEBUG_CLASSFILES="false"
15684      BUILD_VARIANT_RELEASE=""
15685      HOTSPOT_DEBUG_LEVEL="product"
15686      HOTSPOT_EXPORT="product"
15687      ;;
15688    fastdebug )
15689      VARIANT="DBG"
15690      FASTDEBUG="true"
15691      DEBUG_CLASSFILES="true"
15692      BUILD_VARIANT_RELEASE="-fastdebug"
15693      HOTSPOT_DEBUG_LEVEL="fastdebug"
15694      HOTSPOT_EXPORT="fastdebug"
15695      ;;
15696    slowdebug )
15697      VARIANT="DBG"
15698      FASTDEBUG="false"
15699      DEBUG_CLASSFILES="true"
15700      BUILD_VARIANT_RELEASE="-debug"
15701      HOTSPOT_DEBUG_LEVEL="debug"
15702      HOTSPOT_EXPORT="debug"
15703      ;;
15704    optimized )
15705      VARIANT="OPT"
15706      FASTDEBUG="false"
15707      DEBUG_CLASSFILES="false"
15708      BUILD_VARIANT_RELEASE="-optimized"
15709      HOTSPOT_DEBUG_LEVEL="optimized"
15710      HOTSPOT_EXPORT="optimized"
15711      ;;
15712  esac
15713
15714  # The debug level 'optimized' is a little special because it is currently only
15715  # applicable to the HotSpot build where it means to build a completely
15716  # optimized version of the VM without any debugging code (like for the
15717  # 'release' debug level which is called 'product' in the HotSpot build) but
15718  # with the exception that it can contain additional code which is otherwise
15719  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15720  # test new and/or experimental features which are not intended for customer
15721  # shipment. Because these new features need to be tested and benchmarked in
15722  # real world scenarios, we want to build the containing JDK at the 'release'
15723  # debug level.
15724  if test "x$DEBUG_LEVEL" = xoptimized; then
15725    DEBUG_LEVEL="release"
15726  fi
15727
15728  #####
15729  # Generate the legacy makefile targets for hotspot.
15730  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15731  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15732  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15733  # But until then ...
15734  HOTSPOT_TARGET=""
15735
15736  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15737    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15738  fi
15739
15740  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15741    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15742  fi
15743
15744  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15745    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15746  fi
15747
15748  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15749    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15750  fi
15751
15752  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15753    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15754  fi
15755
15756  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15757    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15758  fi
15759
15760  if test "x$JVM_VARIANT_CORE" = xtrue; then
15761    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15762  fi
15763
15764  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15765
15766  # On Macosx universal binaries are produced, but they only contain
15767  # 64 bit intel. This invalidates control of which jvms are built
15768  # from configure, but only server is valid anyway. Fix this
15769  # when hotspot makefiles are rewritten.
15770  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15771    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15772  fi
15773
15774  #####
15775
15776
15777
15778
15779
15780
15781
15782
15783# With basic setup done, call the custom early hook.
15784
15785
15786# Check if we have devkits, extra paths or sysroot set.
15787
15788
15789# Check whether --with-devkit was given.
15790if test "${with_devkit+set}" = set; then :
15791  withval=$with_devkit;
15792
15793  # Only process if variable expands to non-empty
15794
15795  if test "x$with_devkit" != x; then
15796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15797
15798  # Input might be given as Windows format, start by converting to
15799  # unix format.
15800  path="$with_devkit"
15801  new_path=`$CYGPATH -u "$path"`
15802
15803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15806  # "foo.exe" is OK but "foo" is an error.
15807  #
15808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15809  # It is also a way to make sure we got the proper file name for the real test later on.
15810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15811  if test "x$test_shortpath" = x; then
15812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15813$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15814    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15815  fi
15816
15817  # Call helper function which possibly converts this using DOS-style short mode.
15818  # If so, the updated path is stored in $new_path.
15819
15820  input_path="$new_path"
15821  # Check if we need to convert this using DOS-style short mode. If the path
15822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15823  # take no chances and rewrite it.
15824  # Note: m4 eats our [], so we need to use [ and ] instead.
15825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15826  if test "x$has_forbidden_chars" != x; then
15827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15831      # Going to short mode and back again did indeed matter. Since short mode is
15832      # case insensitive, let's make it lowercase to improve readability.
15833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15834      # Now convert it back to Unix-style (cygpath)
15835      input_path=`$CYGPATH -u "$shortmode_path"`
15836      new_path="$input_path"
15837    fi
15838  fi
15839
15840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15841  if test "x$test_cygdrive_prefix" = x; then
15842    # As a simple fix, exclude /usr/bin since it's not a real path.
15843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15845      # a path prefixed by /cygdrive for fixpath to work.
15846      new_path="$CYGWIN_ROOT_PATH$input_path"
15847    fi
15848  fi
15849
15850
15851  if test "x$path" != "x$new_path"; then
15852    with_devkit="$new_path"
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15854$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15855  fi
15856
15857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15858
15859  path="$with_devkit"
15860  has_colon=`$ECHO $path | $GREP ^.:`
15861  new_path="$path"
15862  if test "x$has_colon" = x; then
15863    # Not in mixed or Windows style, start by that.
15864    new_path=`cmd //c echo $path`
15865  fi
15866
15867
15868  input_path="$new_path"
15869  # Check if we need to convert this using DOS-style short mode. If the path
15870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15871  # take no chances and rewrite it.
15872  # Note: m4 eats our [], so we need to use [ and ] instead.
15873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15874  if test "x$has_forbidden_chars" != x; then
15875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15877  fi
15878
15879
15880  windows_path="$new_path"
15881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15882    unix_path=`$CYGPATH -u "$windows_path"`
15883    new_path="$unix_path"
15884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15886    new_path="$unix_path"
15887  fi
15888
15889  if test "x$path" != "x$new_path"; then
15890    with_devkit="$new_path"
15891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15892$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15893  fi
15894
15895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15897
15898    else
15899      # We're on a unix platform. Hooray! :)
15900      path="$with_devkit"
15901      has_space=`$ECHO "$path" | $GREP " "`
15902      if test "x$has_space" != x; then
15903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15904$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15906      fi
15907
15908      # Use eval to expand a potential ~
15909      eval path="$path"
15910      if test ! -f "$path" && test ! -d "$path"; then
15911        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15912      fi
15913
15914      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15915    fi
15916  fi
15917
15918        DEVKIT_ROOT="$with_devkit"
15919        # Check for a meta data info file in the root of the devkit
15920        if test -f "$DEVKIT_ROOT/devkit.info"; then
15921          . $DEVKIT_ROOT/devkit.info
15922          # This potentially sets the following:
15923          # A descriptive name of the devkit
15924
15925  if test "x$DEVKIT_NAME" = x; then
15926    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15927  fi
15928
15929          # Corresponds to --with-extra-path
15930
15931  if test "x$DEVKIT_EXTRA_PATH" = x; then
15932    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15933  fi
15934
15935          # Corresponds to --with-toolchain-path
15936
15937  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15938    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15939  fi
15940
15941          # Corresponds to --with-sysroot
15942
15943  if test "x$DEVKIT_SYSROOT" = x; then
15944    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15945  fi
15946
15947
15948          # Identifies the Visual Studio version in the devkit
15949
15950  if test "x$DEVKIT_VS_VERSION" = x; then
15951    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15952  fi
15953
15954          # The Visual Studio include environment variable
15955
15956  if test "x$DEVKIT_VS_INCLUDE" = x; then
15957    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15958  fi
15959
15960          # The Visual Studio lib environment variable
15961
15962  if test "x$DEVKIT_VS_LIB" = x; then
15963    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15964  fi
15965
15966          # Corresponds to --with-msvcr-dll
15967
15968  if test "x$DEVKIT_MSVCR_DLL" = x; then
15969    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15970  fi
15971
15972          # Corresponds to --with-msvcp-dll
15973
15974  if test "x$DEVKIT_MSVCP_DLL" = x; then
15975    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15976  fi
15977
15978        fi
15979
15980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15981$as_echo_n "checking for devkit... " >&6; }
15982        if test "x$DEVKIT_NAME" != x; then
15983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15984$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15985        else
15986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15987$as_echo "$DEVKIT_ROOT" >&6; }
15988        fi
15989
15990
15991  if test "x$DEVKIT_EXTRA_PATH" != x; then
15992    if test "x$EXTRA_PATH" = x; then
15993      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15994    else
15995      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15996    fi
15997  fi
15998
15999
16000        # Fallback default of just /bin if DEVKIT_PATH is not defined
16001        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16002          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16003        fi
16004
16005  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16006    if test "x$TOOLCHAIN_PATH" = x; then
16007      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16008    else
16009      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16010    fi
16011  fi
16012
16013
16014        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16015        # places for backwards compatiblity.
16016        if test "x$DEVKIT_SYSROOT" != x; then
16017          SYSROOT="$DEVKIT_SYSROOT"
16018        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16019          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16020        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16021          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16022        fi
16023
16024
16025fi
16026
16027
16028  # You can force the sysroot if the sysroot encoded into the compiler tools
16029  # is not correct.
16030
16031# Check whether --with-sys-root was given.
16032if test "${with_sys_root+set}" = set; then :
16033  withval=$with_sys_root; SYSROOT=$with_sys_root
16034
16035fi
16036
16037
16038
16039# Check whether --with-sysroot was given.
16040if test "${with_sysroot+set}" = set; then :
16041  withval=$with_sysroot; SYSROOT=$with_sysroot
16042
16043fi
16044
16045
16046
16047# Check whether --with-tools-dir was given.
16048if test "${with_tools_dir+set}" = set; then :
16049  withval=$with_tools_dir;
16050  if test "x$with_tools_dir" != x; then
16051    if test "x$TOOLCHAIN_PATH" = x; then
16052      TOOLCHAIN_PATH="$with_tools_dir"
16053    else
16054      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16055    fi
16056  fi
16057
16058
16059fi
16060
16061
16062
16063# Check whether --with-toolchain-path was given.
16064if test "${with_toolchain_path+set}" = set; then :
16065  withval=$with_toolchain_path;
16066  if test "x$with_toolchain_path" != x; then
16067    if test "x$TOOLCHAIN_PATH" = x; then
16068      TOOLCHAIN_PATH="$with_toolchain_path"
16069    else
16070      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16071    fi
16072  fi
16073
16074
16075fi
16076
16077
16078
16079# Check whether --with-extra-path was given.
16080if test "${with_extra_path+set}" = set; then :
16081  withval=$with_extra_path;
16082  if test "x$with_extra_path" != x; then
16083    if test "x$EXTRA_PATH" = x; then
16084      EXTRA_PATH="$with_extra_path"
16085    else
16086      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16087    fi
16088  fi
16089
16090
16091fi
16092
16093
16094  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16095    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16096    # If not, detect if Xcode is installed by running xcodebuild -version
16097    # if no Xcode installed, xcodebuild exits with 1
16098    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16099    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16100      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16101      # fall back on the stub binary in /usr/bin/xcodebuild
16102      # Extract the first word of "xcodebuild", so it can be a program name with args.
16103set dummy xcodebuild; ac_word=$2
16104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16105$as_echo_n "checking for $ac_word... " >&6; }
16106if ${ac_cv_path_XCODEBUILD+:} false; then :
16107  $as_echo_n "(cached) " >&6
16108else
16109  case $XCODEBUILD in
16110  [\\/]* | ?:[\\/]*)
16111  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16112  ;;
16113  *)
16114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16115for as_dir in $TOOLCHAIN_PATH
16116do
16117  IFS=$as_save_IFS
16118  test -z "$as_dir" && as_dir=.
16119    for ac_exec_ext in '' $ac_executable_extensions; do
16120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16121    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16123    break 2
16124  fi
16125done
16126  done
16127IFS=$as_save_IFS
16128
16129  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16130  ;;
16131esac
16132fi
16133XCODEBUILD=$ac_cv_path_XCODEBUILD
16134if test -n "$XCODEBUILD"; then
16135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16136$as_echo "$XCODEBUILD" >&6; }
16137else
16138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16139$as_echo "no" >&6; }
16140fi
16141
16142
16143    else
16144      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16145      # when only the command line tools are installed there are no SDKs, so headers
16146      # are copied into the system frameworks
16147      XCODEBUILD=
16148
16149    fi
16150
16151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16152$as_echo_n "checking for sdk name... " >&6; }
16153
16154# Check whether --with-sdk-name was given.
16155if test "${with_sdk_name+set}" = set; then :
16156  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16157
16158fi
16159
16160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16161$as_echo "$SDKNAME" >&6; }
16162
16163    # if toolchain path is specified then don't rely on system headers, they may not compile
16164    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16165    test -z "$TOOLCHAIN_PATH" && \
16166      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16167
16168    if test -z "$SYSROOT"; then
16169      if test -n "$XCODEBUILD"; then
16170        # if we don't have system headers, use default SDK name (last resort)
16171        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16172          SDKNAME=${SDKNAME:-macosx}
16173        fi
16174
16175        if test -n "$SDKNAME"; then
16176          # Call xcodebuild to determine SYSROOT
16177          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16178        fi
16179      else
16180        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16181          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
16182        fi
16183      fi
16184    else
16185      # warn user if --with-sdk-name was also set
16186      if test -n "$with_sdk_name"; then
16187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16188$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16189      fi
16190    fi
16191
16192    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16193      # If no system framework headers, then SYSROOT must be set, or we won't build
16194      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
16195    fi
16196
16197    # Perform a basic sanity test
16198    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16199      if test -z "$SYSROOT"; then
16200        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
16201      else
16202        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16203      fi
16204    fi
16205
16206    # set SDKROOT too, Xcode tools will pick it up
16207    SDKROOT=$SYSROOT
16208
16209  fi
16210
16211  # Prepend the extra path to the global path
16212
16213  if test "x$EXTRA_PATH" != x; then
16214    if test "x$PATH" = x; then
16215      PATH="$EXTRA_PATH"
16216    else
16217      PATH="$EXTRA_PATH:$PATH"
16218    fi
16219  fi
16220
16221
16222  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16223    # Add extra search paths on solaris for utilities like ar and as etc...
16224    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16225  fi
16226
16227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16228$as_echo_n "checking for sysroot... " >&6; }
16229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16230$as_echo "$SYSROOT" >&6; }
16231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16232$as_echo_n "checking for toolchain path... " >&6; }
16233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16234$as_echo "$TOOLCHAIN_PATH" >&6; }
16235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16236$as_echo_n "checking for extra path... " >&6; }
16237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16238$as_echo "$EXTRA_PATH" >&6; }
16239
16240
16241# To properly create a configuration name, we need to have the OpenJDK target
16242# and options (variants and debug level) parsed.
16243
16244
16245
16246# Check whether --with-conf-name was given.
16247if test "${with_conf_name+set}" = set; then :
16248  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16249fi
16250
16251
16252  # Test from where we are running configure, in or outside of src root.
16253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16254$as_echo_n "checking where to store configuration... " >&6; }
16255  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16256      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16257      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16258    # We are running configure from the src root.
16259    # Create a default ./build/target-variant-debuglevel output root.
16260    if test "x${CONF_NAME}" = x; then
16261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16262$as_echo "in default location" >&6; }
16263      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16264    else
16265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16266$as_echo "in build directory with custom name" >&6; }
16267    fi
16268    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16269    $MKDIR -p "$OUTPUT_ROOT"
16270    if test ! -d "$OUTPUT_ROOT"; then
16271      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16272    fi
16273  else
16274    # We are running configure from outside of the src dir.
16275    # Then use the current directory as output dir!
16276    # If configuration is situated in normal build directory, just use the build
16277    # directory name as configuration name, otherwise use the complete path.
16278    if test "x${CONF_NAME}" = x; then
16279      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16280    fi
16281    OUTPUT_ROOT="$CURDIR"
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16283$as_echo "in current directory" >&6; }
16284
16285    # WARNING: This might be a bad thing to do. You need to be sure you want to
16286    # have a configuration in this directory. Do some sanity checks!
16287
16288    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16289      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16290      # other files
16291      files_present=`$LS $OUTPUT_ROOT`
16292      # Configure has already touched config.log and confdefs.h in the current dir when this check
16293      # is performed.
16294      filtered_files=`$ECHO "$files_present" \
16295          | $SED -e 's/config.log//g' \
16296              -e 's/configure.log//g' \
16297              -e 's/confdefs.h//g' \
16298              -e 's/ //g' \
16299          | $TR -d '\n'`
16300      if test "x$filtered_files" != x; then
16301        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16302$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16303        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16304$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16305        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16306$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16307        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16308$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16309        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16310$as_echo "$as_me: seriously mess up just about everything." >&6;}
16311        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16312$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16313        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16314$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16315        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16316      fi
16317    fi
16318  fi
16319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16320$as_echo_n "checking what configuration name to use... " >&6; }
16321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16322$as_echo "$CONF_NAME" >&6; }
16323
16324
16325  # Only process if variable expands to non-empty
16326
16327  if test "x$OUTPUT_ROOT" != x; then
16328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16329
16330  # Input might be given as Windows format, start by converting to
16331  # unix format.
16332  path="$OUTPUT_ROOT"
16333  new_path=`$CYGPATH -u "$path"`
16334
16335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16338  # "foo.exe" is OK but "foo" is an error.
16339  #
16340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16341  # It is also a way to make sure we got the proper file name for the real test later on.
16342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16343  if test "x$test_shortpath" = x; then
16344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16345$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16346    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16347  fi
16348
16349  # Call helper function which possibly converts this using DOS-style short mode.
16350  # If so, the updated path is stored in $new_path.
16351
16352  input_path="$new_path"
16353  # Check if we need to convert this using DOS-style short mode. If the path
16354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16355  # take no chances and rewrite it.
16356  # Note: m4 eats our [], so we need to use [ and ] instead.
16357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16358  if test "x$has_forbidden_chars" != x; then
16359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16363      # Going to short mode and back again did indeed matter. Since short mode is
16364      # case insensitive, let's make it lowercase to improve readability.
16365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16366      # Now convert it back to Unix-style (cygpath)
16367      input_path=`$CYGPATH -u "$shortmode_path"`
16368      new_path="$input_path"
16369    fi
16370  fi
16371
16372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16373  if test "x$test_cygdrive_prefix" = x; then
16374    # As a simple fix, exclude /usr/bin since it's not a real path.
16375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16377      # a path prefixed by /cygdrive for fixpath to work.
16378      new_path="$CYGWIN_ROOT_PATH$input_path"
16379    fi
16380  fi
16381
16382
16383  if test "x$path" != "x$new_path"; then
16384    OUTPUT_ROOT="$new_path"
16385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16386$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16387  fi
16388
16389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16390
16391  path="$OUTPUT_ROOT"
16392  has_colon=`$ECHO $path | $GREP ^.:`
16393  new_path="$path"
16394  if test "x$has_colon" = x; then
16395    # Not in mixed or Windows style, start by that.
16396    new_path=`cmd //c echo $path`
16397  fi
16398
16399
16400  input_path="$new_path"
16401  # Check if we need to convert this using DOS-style short mode. If the path
16402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16403  # take no chances and rewrite it.
16404  # Note: m4 eats our [], so we need to use [ and ] instead.
16405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16406  if test "x$has_forbidden_chars" != x; then
16407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16409  fi
16410
16411
16412  windows_path="$new_path"
16413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414    unix_path=`$CYGPATH -u "$windows_path"`
16415    new_path="$unix_path"
16416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16418    new_path="$unix_path"
16419  fi
16420
16421  if test "x$path" != "x$new_path"; then
16422    OUTPUT_ROOT="$new_path"
16423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16424$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16425  fi
16426
16427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16429
16430    else
16431      # We're on a unix platform. Hooray! :)
16432      path="$OUTPUT_ROOT"
16433      has_space=`$ECHO "$path" | $GREP " "`
16434      if test "x$has_space" != x; then
16435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16436$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16438      fi
16439
16440      # Use eval to expand a potential ~
16441      eval path="$path"
16442      if test ! -f "$path" && test ! -d "$path"; then
16443        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16444      fi
16445
16446      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16447    fi
16448  fi
16449
16450
16451  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16452  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16453
16454  SPEC=$OUTPUT_ROOT/spec.gmk
16455
16456  CONF_NAME=$CONF_NAME
16457
16458  OUTPUT_ROOT=$OUTPUT_ROOT
16459
16460
16461
16462  # The spec.gmk file contains all variables for the make system.
16463  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16464
16465  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16466  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16467
16468  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16469  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16470
16471  # The compare.sh is used to compare the build output to other builds.
16472  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16473
16474  # The generated Makefile knows where the spec.gmk is and where the source is.
16475  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16476  # which will look for generated configurations
16477  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16478
16479
16480
16481# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16482
16483  for ac_prog in apt-get yum port pkgutil pkgadd
16484do
16485  # Extract the first word of "$ac_prog", so it can be a program name with args.
16486set dummy $ac_prog; ac_word=$2
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16488$as_echo_n "checking for $ac_word... " >&6; }
16489if ${ac_cv_prog_PKGHANDLER+:} false; then :
16490  $as_echo_n "(cached) " >&6
16491else
16492  if test -n "$PKGHANDLER"; then
16493  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16494else
16495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16496for as_dir in $PATH
16497do
16498  IFS=$as_save_IFS
16499  test -z "$as_dir" && as_dir=.
16500    for ac_exec_ext in '' $ac_executable_extensions; do
16501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16502    ac_cv_prog_PKGHANDLER="$ac_prog"
16503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16504    break 2
16505  fi
16506done
16507  done
16508IFS=$as_save_IFS
16509
16510fi
16511fi
16512PKGHANDLER=$ac_cv_prog_PKGHANDLER
16513if test -n "$PKGHANDLER"; then
16514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16515$as_echo "$PKGHANDLER" >&6; }
16516else
16517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16518$as_echo "no" >&6; }
16519fi
16520
16521
16522  test -n "$PKGHANDLER" && break
16523done
16524
16525
16526
16527# Setup tools that requires more complex handling, or that is not needed by the configure script.
16528
16529
16530
16531  # Publish this variable in the help.
16532
16533
16534  if [ -z "${MAKE+x}" ]; then
16535    # The variable is not set by user, try to locate tool using the code snippet
16536
16537    # Try our hardest to locate a correct version of GNU make
16538    for ac_prog in gmake
16539do
16540  # Extract the first word of "$ac_prog", so it can be a program name with args.
16541set dummy $ac_prog; ac_word=$2
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16543$as_echo_n "checking for $ac_word... " >&6; }
16544if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16545  $as_echo_n "(cached) " >&6
16546else
16547  case $CHECK_GMAKE in
16548  [\\/]* | ?:[\\/]*)
16549  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16550  ;;
16551  *)
16552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16553for as_dir in $PATH
16554do
16555  IFS=$as_save_IFS
16556  test -z "$as_dir" && as_dir=.
16557    for ac_exec_ext in '' $ac_executable_extensions; do
16558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16559    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16561    break 2
16562  fi
16563done
16564  done
16565IFS=$as_save_IFS
16566
16567  ;;
16568esac
16569fi
16570CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16571if test -n "$CHECK_GMAKE"; then
16572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16573$as_echo "$CHECK_GMAKE" >&6; }
16574else
16575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16576$as_echo "no" >&6; }
16577fi
16578
16579
16580  test -n "$CHECK_GMAKE" && break
16581done
16582
16583
16584  MAKE_CANDIDATE=""$CHECK_GMAKE""
16585  DESCRIPTION="gmake in PATH"
16586
16587  # On Cygwin, we require a newer version of make than on other platforms
16588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16589    MAKE_VERSION_EXPR="-e 4\."
16590    MAKE_REQUIRED_VERSION="4.0"
16591   else
16592    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16593    MAKE_REQUIRED_VERSION="3.81"
16594  fi
16595
16596  if test "x$MAKE_CANDIDATE" != x; then
16597    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16598$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16599    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16600    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16601    if test "x$IS_GNU_MAKE" = x; then
16602      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16603$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16604    else
16605      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16606      if test "x$IS_MODERN_MAKE" = x; then
16607        { $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
16608$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;}
16609      else
16610        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16611          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16612            MAKE_EXPECTED_ENV='cygwin'
16613          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16614            MAKE_EXPECTED_ENV='msys'
16615          else
16616            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16617          fi
16618          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16619          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16620        else
16621          # Not relevant for non-Windows
16622          IS_MAKE_CORRECT_ENV=true
16623        fi
16624        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16625          { $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
16626$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;}
16627        else
16628          FOUND_MAKE=$MAKE_CANDIDATE
16629
16630  # Only process if variable expands to non-empty
16631
16632  if test "x$FOUND_MAKE" != x; then
16633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16634
16635  # First separate the path from the arguments. This will split at the first
16636  # space.
16637  complete="$FOUND_MAKE"
16638  path="${complete%% *}"
16639  tmp="$complete EOL"
16640  arguments="${tmp#* }"
16641
16642  # Input might be given as Windows format, start by converting to
16643  # unix format.
16644  new_path=`$CYGPATH -u "$path"`
16645
16646  # Now try to locate executable using which
16647  new_path=`$WHICH "$new_path" 2> /dev/null`
16648  # bat and cmd files are not always considered executable in cygwin causing which
16649  # to not find them
16650  if test "x$new_path" = x \
16651      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16652      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16653    new_path=`$CYGPATH -u "$path"`
16654  fi
16655  if test "x$new_path" = x; then
16656    # Oops. Which didn't find the executable.
16657    # The splitting of arguments from the executable at a space might have been incorrect,
16658    # since paths with space are more likely in Windows. Give it another try with the whole
16659    # argument.
16660    path="$complete"
16661    arguments="EOL"
16662    new_path=`$CYGPATH -u "$path"`
16663    new_path=`$WHICH "$new_path" 2> /dev/null`
16664    # bat and cmd files are not always considered executable in cygwin causing which
16665    # to not find them
16666    if test "x$new_path" = x \
16667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16669      new_path=`$CYGPATH -u "$path"`
16670    fi
16671    if test "x$new_path" = x; then
16672      # It's still not found. Now this is an unrecoverable error.
16673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16675      has_space=`$ECHO "$complete" | $GREP " "`
16676      if test "x$has_space" != x; then
16677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16679      fi
16680      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16681    fi
16682  fi
16683
16684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16687  # "foo.exe" is OK but "foo" is an error.
16688  #
16689  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16690  # It is also a way to make sure we got the proper file name for the real test later on.
16691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16692  if test "x$test_shortpath" = x; then
16693    # Short path failed, file does not exist as specified.
16694    # Try adding .exe or .cmd
16695    if test -f "${new_path}.exe"; then
16696      input_to_shortpath="${new_path}.exe"
16697    elif test -f "${new_path}.cmd"; then
16698      input_to_shortpath="${new_path}.cmd"
16699    else
16700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16705    fi
16706  else
16707    input_to_shortpath="$new_path"
16708  fi
16709
16710  # Call helper function which possibly converts this using DOS-style short mode.
16711  # If so, the updated path is stored in $new_path.
16712  new_path="$input_to_shortpath"
16713
16714  input_path="$input_to_shortpath"
16715  # Check if we need to convert this using DOS-style short mode. If the path
16716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16717  # take no chances and rewrite it.
16718  # Note: m4 eats our [], so we need to use [ and ] instead.
16719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16720  if test "x$has_forbidden_chars" != x; then
16721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16725      # Going to short mode and back again did indeed matter. Since short mode is
16726      # case insensitive, let's make it lowercase to improve readability.
16727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16728      # Now convert it back to Unix-style (cygpath)
16729      input_path=`$CYGPATH -u "$shortmode_path"`
16730      new_path="$input_path"
16731    fi
16732  fi
16733
16734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16735  if test "x$test_cygdrive_prefix" = x; then
16736    # As a simple fix, exclude /usr/bin since it's not a real path.
16737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16739      # a path prefixed by /cygdrive for fixpath to work.
16740      new_path="$CYGWIN_ROOT_PATH$input_path"
16741    fi
16742  fi
16743
16744  # remove trailing .exe if any
16745  new_path="${new_path/%.exe/}"
16746
16747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16748
16749  # First separate the path from the arguments. This will split at the first
16750  # space.
16751  complete="$FOUND_MAKE"
16752  path="${complete%% *}"
16753  tmp="$complete EOL"
16754  arguments="${tmp#* }"
16755
16756  # Input might be given as Windows format, start by converting to
16757  # unix format.
16758  new_path="$path"
16759
16760  windows_path="$new_path"
16761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16762    unix_path=`$CYGPATH -u "$windows_path"`
16763    new_path="$unix_path"
16764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16766    new_path="$unix_path"
16767  fi
16768
16769
16770  # Now try to locate executable using which
16771  new_path=`$WHICH "$new_path" 2> /dev/null`
16772
16773  if test "x$new_path" = x; then
16774    # Oops. Which didn't find the executable.
16775    # The splitting of arguments from the executable at a space might have been incorrect,
16776    # since paths with space are more likely in Windows. Give it another try with the whole
16777    # argument.
16778    path="$complete"
16779    arguments="EOL"
16780    new_path="$path"
16781
16782  windows_path="$new_path"
16783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16784    unix_path=`$CYGPATH -u "$windows_path"`
16785    new_path="$unix_path"
16786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16788    new_path="$unix_path"
16789  fi
16790
16791
16792    new_path=`$WHICH "$new_path" 2> /dev/null`
16793    # bat and cmd files are not always considered executable in MSYS causing which
16794    # to not find them
16795    if test "x$new_path" = x \
16796        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16797        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16798      new_path="$path"
16799
16800  windows_path="$new_path"
16801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16802    unix_path=`$CYGPATH -u "$windows_path"`
16803    new_path="$unix_path"
16804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16806    new_path="$unix_path"
16807  fi
16808
16809    fi
16810
16811    if test "x$new_path" = x; then
16812      # It's still not found. Now this is an unrecoverable error.
16813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16815      has_space=`$ECHO "$complete" | $GREP " "`
16816      if test "x$has_space" != x; then
16817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16819      fi
16820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16821    fi
16822  fi
16823
16824  # Now new_path has a complete unix path to the binary
16825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16826    # Keep paths in /bin as-is, but remove trailing .exe if any
16827    new_path="${new_path/%.exe/}"
16828    # Do not save /bin paths to all_fixpath_prefixes!
16829  else
16830    # Not in mixed or Windows style, start by that.
16831    new_path=`cmd //c echo $new_path`
16832
16833  input_path="$new_path"
16834  # Check if we need to convert this using DOS-style short mode. If the path
16835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16836  # take no chances and rewrite it.
16837  # Note: m4 eats our [], so we need to use [ and ] instead.
16838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16839  if test "x$has_forbidden_chars" != x; then
16840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16842  fi
16843
16844    # Output is in $new_path
16845
16846  windows_path="$new_path"
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848    unix_path=`$CYGPATH -u "$windows_path"`
16849    new_path="$unix_path"
16850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16852    new_path="$unix_path"
16853  fi
16854
16855    # remove trailing .exe if any
16856    new_path="${new_path/%.exe/}"
16857
16858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16860  fi
16861
16862    else
16863      # We're on a unix platform. Hooray! :)
16864      # First separate the path from the arguments. This will split at the first
16865      # space.
16866      complete="$FOUND_MAKE"
16867      path="${complete%% *}"
16868      tmp="$complete EOL"
16869      arguments="${tmp#* }"
16870
16871      # Cannot rely on the command "which" here since it doesn't always work.
16872      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16873      if test -z "$is_absolute_path"; then
16874        # Path to executable is not absolute. Find it.
16875        IFS_save="$IFS"
16876        IFS=:
16877        for p in $PATH; do
16878          if test -f "$p/$path" && test -x "$p/$path"; then
16879            new_path="$p/$path"
16880            break
16881          fi
16882        done
16883        IFS="$IFS_save"
16884      else
16885        # This is an absolute path, we can use it without further modifications.
16886        new_path="$path"
16887      fi
16888
16889      if test "x$new_path" = x; then
16890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16892        has_space=`$ECHO "$complete" | $GREP " "`
16893        if test "x$has_space" != x; then
16894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16896        fi
16897        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16898      fi
16899    fi
16900
16901    # Now join together the path and the arguments once again
16902    if test "x$arguments" != xEOL; then
16903      new_complete="$new_path ${arguments% *}"
16904    else
16905      new_complete="$new_path"
16906    fi
16907
16908    if test "x$complete" != "x$new_complete"; then
16909      FOUND_MAKE="$new_complete"
16910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16911$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16912    fi
16913  fi
16914
16915        fi
16916      fi
16917    fi
16918  fi
16919
16920
16921    if test "x$FOUND_MAKE" = x; then
16922      for ac_prog in make
16923do
16924  # Extract the first word of "$ac_prog", so it can be a program name with args.
16925set dummy $ac_prog; ac_word=$2
16926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16927$as_echo_n "checking for $ac_word... " >&6; }
16928if ${ac_cv_path_CHECK_MAKE+:} false; then :
16929  $as_echo_n "(cached) " >&6
16930else
16931  case $CHECK_MAKE in
16932  [\\/]* | ?:[\\/]*)
16933  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16934  ;;
16935  *)
16936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16937for as_dir in $PATH
16938do
16939  IFS=$as_save_IFS
16940  test -z "$as_dir" && as_dir=.
16941    for ac_exec_ext in '' $ac_executable_extensions; do
16942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16943    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16945    break 2
16946  fi
16947done
16948  done
16949IFS=$as_save_IFS
16950
16951  ;;
16952esac
16953fi
16954CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16955if test -n "$CHECK_MAKE"; then
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16957$as_echo "$CHECK_MAKE" >&6; }
16958else
16959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16960$as_echo "no" >&6; }
16961fi
16962
16963
16964  test -n "$CHECK_MAKE" && break
16965done
16966
16967
16968  MAKE_CANDIDATE=""$CHECK_MAKE""
16969  DESCRIPTION="make in PATH"
16970
16971  # On Cygwin, we require a newer version of make than on other platforms
16972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16973    MAKE_VERSION_EXPR="-e 4\."
16974    MAKE_REQUIRED_VERSION="4.0"
16975   else
16976    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16977    MAKE_REQUIRED_VERSION="3.81"
16978  fi
16979
16980  if test "x$MAKE_CANDIDATE" != x; then
16981    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16982$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16983    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16984    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16985    if test "x$IS_GNU_MAKE" = x; then
16986      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16987$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16988    else
16989      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16990      if test "x$IS_MODERN_MAKE" = x; then
16991        { $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
16992$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;}
16993      else
16994        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16995          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16996            MAKE_EXPECTED_ENV='cygwin'
16997          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16998            MAKE_EXPECTED_ENV='msys'
16999          else
17000            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17001          fi
17002          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17003          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17004        else
17005          # Not relevant for non-Windows
17006          IS_MAKE_CORRECT_ENV=true
17007        fi
17008        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17009          { $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
17010$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;}
17011        else
17012          FOUND_MAKE=$MAKE_CANDIDATE
17013
17014  # Only process if variable expands to non-empty
17015
17016  if test "x$FOUND_MAKE" != x; then
17017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018
17019  # First separate the path from the arguments. This will split at the first
17020  # space.
17021  complete="$FOUND_MAKE"
17022  path="${complete%% *}"
17023  tmp="$complete EOL"
17024  arguments="${tmp#* }"
17025
17026  # Input might be given as Windows format, start by converting to
17027  # unix format.
17028  new_path=`$CYGPATH -u "$path"`
17029
17030  # Now try to locate executable using which
17031  new_path=`$WHICH "$new_path" 2> /dev/null`
17032  # bat and cmd files are not always considered executable in cygwin causing which
17033  # to not find them
17034  if test "x$new_path" = x \
17035      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17036      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17037    new_path=`$CYGPATH -u "$path"`
17038  fi
17039  if test "x$new_path" = x; then
17040    # Oops. Which didn't find the executable.
17041    # The splitting of arguments from the executable at a space might have been incorrect,
17042    # since paths with space are more likely in Windows. Give it another try with the whole
17043    # argument.
17044    path="$complete"
17045    arguments="EOL"
17046    new_path=`$CYGPATH -u "$path"`
17047    new_path=`$WHICH "$new_path" 2> /dev/null`
17048    # bat and cmd files are not always considered executable in cygwin causing which
17049    # to not find them
17050    if test "x$new_path" = x \
17051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17053      new_path=`$CYGPATH -u "$path"`
17054    fi
17055    if test "x$new_path" = x; then
17056      # It's still not found. Now this is an unrecoverable error.
17057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17059      has_space=`$ECHO "$complete" | $GREP " "`
17060      if test "x$has_space" != x; then
17061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17063      fi
17064      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17065    fi
17066  fi
17067
17068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17071  # "foo.exe" is OK but "foo" is an error.
17072  #
17073  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17074  # It is also a way to make sure we got the proper file name for the real test later on.
17075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17076  if test "x$test_shortpath" = x; then
17077    # Short path failed, file does not exist as specified.
17078    # Try adding .exe or .cmd
17079    if test -f "${new_path}.exe"; then
17080      input_to_shortpath="${new_path}.exe"
17081    elif test -f "${new_path}.cmd"; then
17082      input_to_shortpath="${new_path}.cmd"
17083    else
17084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17085$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17089    fi
17090  else
17091    input_to_shortpath="$new_path"
17092  fi
17093
17094  # Call helper function which possibly converts this using DOS-style short mode.
17095  # If so, the updated path is stored in $new_path.
17096  new_path="$input_to_shortpath"
17097
17098  input_path="$input_to_shortpath"
17099  # Check if we need to convert this using DOS-style short mode. If the path
17100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17101  # take no chances and rewrite it.
17102  # Note: m4 eats our [], so we need to use [ and ] instead.
17103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17104  if test "x$has_forbidden_chars" != x; then
17105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17109      # Going to short mode and back again did indeed matter. Since short mode is
17110      # case insensitive, let's make it lowercase to improve readability.
17111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17112      # Now convert it back to Unix-style (cygpath)
17113      input_path=`$CYGPATH -u "$shortmode_path"`
17114      new_path="$input_path"
17115    fi
17116  fi
17117
17118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17119  if test "x$test_cygdrive_prefix" = x; then
17120    # As a simple fix, exclude /usr/bin since it's not a real path.
17121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17123      # a path prefixed by /cygdrive for fixpath to work.
17124      new_path="$CYGWIN_ROOT_PATH$input_path"
17125    fi
17126  fi
17127
17128  # remove trailing .exe if any
17129  new_path="${new_path/%.exe/}"
17130
17131    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17132
17133  # First separate the path from the arguments. This will split at the first
17134  # space.
17135  complete="$FOUND_MAKE"
17136  path="${complete%% *}"
17137  tmp="$complete EOL"
17138  arguments="${tmp#* }"
17139
17140  # Input might be given as Windows format, start by converting to
17141  # unix format.
17142  new_path="$path"
17143
17144  windows_path="$new_path"
17145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17146    unix_path=`$CYGPATH -u "$windows_path"`
17147    new_path="$unix_path"
17148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17150    new_path="$unix_path"
17151  fi
17152
17153
17154  # Now try to locate executable using which
17155  new_path=`$WHICH "$new_path" 2> /dev/null`
17156
17157  if test "x$new_path" = x; then
17158    # Oops. Which didn't find the executable.
17159    # The splitting of arguments from the executable at a space might have been incorrect,
17160    # since paths with space are more likely in Windows. Give it another try with the whole
17161    # argument.
17162    path="$complete"
17163    arguments="EOL"
17164    new_path="$path"
17165
17166  windows_path="$new_path"
17167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17168    unix_path=`$CYGPATH -u "$windows_path"`
17169    new_path="$unix_path"
17170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17172    new_path="$unix_path"
17173  fi
17174
17175
17176    new_path=`$WHICH "$new_path" 2> /dev/null`
17177    # bat and cmd files are not always considered executable in MSYS causing which
17178    # to not find them
17179    if test "x$new_path" = x \
17180        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17181        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17182      new_path="$path"
17183
17184  windows_path="$new_path"
17185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17186    unix_path=`$CYGPATH -u "$windows_path"`
17187    new_path="$unix_path"
17188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17190    new_path="$unix_path"
17191  fi
17192
17193    fi
17194
17195    if test "x$new_path" = x; then
17196      # It's still not found. Now this is an unrecoverable error.
17197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17198$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17199      has_space=`$ECHO "$complete" | $GREP " "`
17200      if test "x$has_space" != x; then
17201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17203      fi
17204      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17205    fi
17206  fi
17207
17208  # Now new_path has a complete unix path to the binary
17209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17210    # Keep paths in /bin as-is, but remove trailing .exe if any
17211    new_path="${new_path/%.exe/}"
17212    # Do not save /bin paths to all_fixpath_prefixes!
17213  else
17214    # Not in mixed or Windows style, start by that.
17215    new_path=`cmd //c echo $new_path`
17216
17217  input_path="$new_path"
17218  # Check if we need to convert this using DOS-style short mode. If the path
17219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17220  # take no chances and rewrite it.
17221  # Note: m4 eats our [], so we need to use [ and ] instead.
17222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17223  if test "x$has_forbidden_chars" != x; then
17224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17226  fi
17227
17228    # Output is in $new_path
17229
17230  windows_path="$new_path"
17231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17232    unix_path=`$CYGPATH -u "$windows_path"`
17233    new_path="$unix_path"
17234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17236    new_path="$unix_path"
17237  fi
17238
17239    # remove trailing .exe if any
17240    new_path="${new_path/%.exe/}"
17241
17242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17244  fi
17245
17246    else
17247      # We're on a unix platform. Hooray! :)
17248      # First separate the path from the arguments. This will split at the first
17249      # space.
17250      complete="$FOUND_MAKE"
17251      path="${complete%% *}"
17252      tmp="$complete EOL"
17253      arguments="${tmp#* }"
17254
17255      # Cannot rely on the command "which" here since it doesn't always work.
17256      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17257      if test -z "$is_absolute_path"; then
17258        # Path to executable is not absolute. Find it.
17259        IFS_save="$IFS"
17260        IFS=:
17261        for p in $PATH; do
17262          if test -f "$p/$path" && test -x "$p/$path"; then
17263            new_path="$p/$path"
17264            break
17265          fi
17266        done
17267        IFS="$IFS_save"
17268      else
17269        # This is an absolute path, we can use it without further modifications.
17270        new_path="$path"
17271      fi
17272
17273      if test "x$new_path" = x; then
17274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17275$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17276        has_space=`$ECHO "$complete" | $GREP " "`
17277        if test "x$has_space" != x; then
17278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17280        fi
17281        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17282      fi
17283    fi
17284
17285    # Now join together the path and the arguments once again
17286    if test "x$arguments" != xEOL; then
17287      new_complete="$new_path ${arguments% *}"
17288    else
17289      new_complete="$new_path"
17290    fi
17291
17292    if test "x$complete" != "x$new_complete"; then
17293      FOUND_MAKE="$new_complete"
17294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17295$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17296    fi
17297  fi
17298
17299        fi
17300      fi
17301    fi
17302  fi
17303
17304    fi
17305
17306    if test "x$FOUND_MAKE" = x; then
17307      if test "x$TOOLCHAIN_PATH" != x; then
17308        # We have a toolchain path, check that as well before giving up.
17309        OLD_PATH=$PATH
17310        PATH=$TOOLCHAIN_PATH:$PATH
17311        for ac_prog in gmake
17312do
17313  # Extract the first word of "$ac_prog", so it can be a program name with args.
17314set dummy $ac_prog; ac_word=$2
17315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17316$as_echo_n "checking for $ac_word... " >&6; }
17317if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17318  $as_echo_n "(cached) " >&6
17319else
17320  case $CHECK_TOOLSDIR_GMAKE in
17321  [\\/]* | ?:[\\/]*)
17322  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17323  ;;
17324  *)
17325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17326for as_dir in $PATH
17327do
17328  IFS=$as_save_IFS
17329  test -z "$as_dir" && as_dir=.
17330    for ac_exec_ext in '' $ac_executable_extensions; do
17331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17332    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17334    break 2
17335  fi
17336done
17337  done
17338IFS=$as_save_IFS
17339
17340  ;;
17341esac
17342fi
17343CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17344if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17346$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17347else
17348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17349$as_echo "no" >&6; }
17350fi
17351
17352
17353  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17354done
17355
17356
17357  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17358  DESCRIPTION="gmake in tools-dir"
17359
17360  # On Cygwin, we require a newer version of make than on other platforms
17361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17362    MAKE_VERSION_EXPR="-e 4\."
17363    MAKE_REQUIRED_VERSION="4.0"
17364   else
17365    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17366    MAKE_REQUIRED_VERSION="3.81"
17367  fi
17368
17369  if test "x$MAKE_CANDIDATE" != x; then
17370    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17371$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17372    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17373    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17374    if test "x$IS_GNU_MAKE" = x; then
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17376$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17377    else
17378      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17379      if test "x$IS_MODERN_MAKE" = x; then
17380        { $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
17381$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;}
17382      else
17383        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17384          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17385            MAKE_EXPECTED_ENV='cygwin'
17386          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17387            MAKE_EXPECTED_ENV='msys'
17388          else
17389            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17390          fi
17391          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17392          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17393        else
17394          # Not relevant for non-Windows
17395          IS_MAKE_CORRECT_ENV=true
17396        fi
17397        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17398          { $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
17399$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;}
17400        else
17401          FOUND_MAKE=$MAKE_CANDIDATE
17402
17403  # Only process if variable expands to non-empty
17404
17405  if test "x$FOUND_MAKE" != x; then
17406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17407
17408  # First separate the path from the arguments. This will split at the first
17409  # space.
17410  complete="$FOUND_MAKE"
17411  path="${complete%% *}"
17412  tmp="$complete EOL"
17413  arguments="${tmp#* }"
17414
17415  # Input might be given as Windows format, start by converting to
17416  # unix format.
17417  new_path=`$CYGPATH -u "$path"`
17418
17419  # Now try to locate executable using which
17420  new_path=`$WHICH "$new_path" 2> /dev/null`
17421  # bat and cmd files are not always considered executable in cygwin causing which
17422  # to not find them
17423  if test "x$new_path" = x \
17424      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17425      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17426    new_path=`$CYGPATH -u "$path"`
17427  fi
17428  if test "x$new_path" = x; then
17429    # Oops. Which didn't find the executable.
17430    # The splitting of arguments from the executable at a space might have been incorrect,
17431    # since paths with space are more likely in Windows. Give it another try with the whole
17432    # argument.
17433    path="$complete"
17434    arguments="EOL"
17435    new_path=`$CYGPATH -u "$path"`
17436    new_path=`$WHICH "$new_path" 2> /dev/null`
17437    # bat and cmd files are not always considered executable in cygwin causing which
17438    # to not find them
17439    if test "x$new_path" = x \
17440        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17441        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17442      new_path=`$CYGPATH -u "$path"`
17443    fi
17444    if test "x$new_path" = x; then
17445      # It's still not found. Now this is an unrecoverable error.
17446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17448      has_space=`$ECHO "$complete" | $GREP " "`
17449      if test "x$has_space" != x; then
17450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17452      fi
17453      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17454    fi
17455  fi
17456
17457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17460  # "foo.exe" is OK but "foo" is an error.
17461  #
17462  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17463  # It is also a way to make sure we got the proper file name for the real test later on.
17464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17465  if test "x$test_shortpath" = x; then
17466    # Short path failed, file does not exist as specified.
17467    # Try adding .exe or .cmd
17468    if test -f "${new_path}.exe"; then
17469      input_to_shortpath="${new_path}.exe"
17470    elif test -f "${new_path}.cmd"; then
17471      input_to_shortpath="${new_path}.cmd"
17472    else
17473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17474$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17475      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17476$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17477      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17478    fi
17479  else
17480    input_to_shortpath="$new_path"
17481  fi
17482
17483  # Call helper function which possibly converts this using DOS-style short mode.
17484  # If so, the updated path is stored in $new_path.
17485  new_path="$input_to_shortpath"
17486
17487  input_path="$input_to_shortpath"
17488  # Check if we need to convert this using DOS-style short mode. If the path
17489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17490  # take no chances and rewrite it.
17491  # Note: m4 eats our [], so we need to use [ and ] instead.
17492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17493  if test "x$has_forbidden_chars" != x; then
17494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17498      # Going to short mode and back again did indeed matter. Since short mode is
17499      # case insensitive, let's make it lowercase to improve readability.
17500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17501      # Now convert it back to Unix-style (cygpath)
17502      input_path=`$CYGPATH -u "$shortmode_path"`
17503      new_path="$input_path"
17504    fi
17505  fi
17506
17507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17508  if test "x$test_cygdrive_prefix" = x; then
17509    # As a simple fix, exclude /usr/bin since it's not a real path.
17510    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17512      # a path prefixed by /cygdrive for fixpath to work.
17513      new_path="$CYGWIN_ROOT_PATH$input_path"
17514    fi
17515  fi
17516
17517  # remove trailing .exe if any
17518  new_path="${new_path/%.exe/}"
17519
17520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17521
17522  # First separate the path from the arguments. This will split at the first
17523  # space.
17524  complete="$FOUND_MAKE"
17525  path="${complete%% *}"
17526  tmp="$complete EOL"
17527  arguments="${tmp#* }"
17528
17529  # Input might be given as Windows format, start by converting to
17530  # unix format.
17531  new_path="$path"
17532
17533  windows_path="$new_path"
17534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17535    unix_path=`$CYGPATH -u "$windows_path"`
17536    new_path="$unix_path"
17537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17539    new_path="$unix_path"
17540  fi
17541
17542
17543  # Now try to locate executable using which
17544  new_path=`$WHICH "$new_path" 2> /dev/null`
17545
17546  if test "x$new_path" = x; then
17547    # Oops. Which didn't find the executable.
17548    # The splitting of arguments from the executable at a space might have been incorrect,
17549    # since paths with space are more likely in Windows. Give it another try with the whole
17550    # argument.
17551    path="$complete"
17552    arguments="EOL"
17553    new_path="$path"
17554
17555  windows_path="$new_path"
17556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17557    unix_path=`$CYGPATH -u "$windows_path"`
17558    new_path="$unix_path"
17559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17561    new_path="$unix_path"
17562  fi
17563
17564
17565    new_path=`$WHICH "$new_path" 2> /dev/null`
17566    # bat and cmd files are not always considered executable in MSYS causing which
17567    # to not find them
17568    if test "x$new_path" = x \
17569        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17570        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17571      new_path="$path"
17572
17573  windows_path="$new_path"
17574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17575    unix_path=`$CYGPATH -u "$windows_path"`
17576    new_path="$unix_path"
17577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17579    new_path="$unix_path"
17580  fi
17581
17582    fi
17583
17584    if test "x$new_path" = x; then
17585      # It's still not found. Now this is an unrecoverable error.
17586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17587$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17588      has_space=`$ECHO "$complete" | $GREP " "`
17589      if test "x$has_space" != x; then
17590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17592      fi
17593      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17594    fi
17595  fi
17596
17597  # Now new_path has a complete unix path to the binary
17598  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17599    # Keep paths in /bin as-is, but remove trailing .exe if any
17600    new_path="${new_path/%.exe/}"
17601    # Do not save /bin paths to all_fixpath_prefixes!
17602  else
17603    # Not in mixed or Windows style, start by that.
17604    new_path=`cmd //c echo $new_path`
17605
17606  input_path="$new_path"
17607  # Check if we need to convert this using DOS-style short mode. If the path
17608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17609  # take no chances and rewrite it.
17610  # Note: m4 eats our [], so we need to use [ and ] instead.
17611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17612  if test "x$has_forbidden_chars" != x; then
17613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17615  fi
17616
17617    # Output is in $new_path
17618
17619  windows_path="$new_path"
17620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17621    unix_path=`$CYGPATH -u "$windows_path"`
17622    new_path="$unix_path"
17623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17625    new_path="$unix_path"
17626  fi
17627
17628    # remove trailing .exe if any
17629    new_path="${new_path/%.exe/}"
17630
17631    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17632    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17633  fi
17634
17635    else
17636      # We're on a unix platform. Hooray! :)
17637      # First separate the path from the arguments. This will split at the first
17638      # space.
17639      complete="$FOUND_MAKE"
17640      path="${complete%% *}"
17641      tmp="$complete EOL"
17642      arguments="${tmp#* }"
17643
17644      # Cannot rely on the command "which" here since it doesn't always work.
17645      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17646      if test -z "$is_absolute_path"; then
17647        # Path to executable is not absolute. Find it.
17648        IFS_save="$IFS"
17649        IFS=:
17650        for p in $PATH; do
17651          if test -f "$p/$path" && test -x "$p/$path"; then
17652            new_path="$p/$path"
17653            break
17654          fi
17655        done
17656        IFS="$IFS_save"
17657      else
17658        # This is an absolute path, we can use it without further modifications.
17659        new_path="$path"
17660      fi
17661
17662      if test "x$new_path" = x; then
17663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17665        has_space=`$ECHO "$complete" | $GREP " "`
17666        if test "x$has_space" != x; then
17667          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17668$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17669        fi
17670        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17671      fi
17672    fi
17673
17674    # Now join together the path and the arguments once again
17675    if test "x$arguments" != xEOL; then
17676      new_complete="$new_path ${arguments% *}"
17677    else
17678      new_complete="$new_path"
17679    fi
17680
17681    if test "x$complete" != "x$new_complete"; then
17682      FOUND_MAKE="$new_complete"
17683      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17684$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17685    fi
17686  fi
17687
17688        fi
17689      fi
17690    fi
17691  fi
17692
17693        if test "x$FOUND_MAKE" = x; then
17694          for ac_prog in make
17695do
17696  # Extract the first word of "$ac_prog", so it can be a program name with args.
17697set dummy $ac_prog; ac_word=$2
17698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17699$as_echo_n "checking for $ac_word... " >&6; }
17700if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17701  $as_echo_n "(cached) " >&6
17702else
17703  case $CHECK_TOOLSDIR_MAKE in
17704  [\\/]* | ?:[\\/]*)
17705  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17706  ;;
17707  *)
17708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17709for as_dir in $PATH
17710do
17711  IFS=$as_save_IFS
17712  test -z "$as_dir" && as_dir=.
17713    for ac_exec_ext in '' $ac_executable_extensions; do
17714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17715    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17717    break 2
17718  fi
17719done
17720  done
17721IFS=$as_save_IFS
17722
17723  ;;
17724esac
17725fi
17726CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17727if test -n "$CHECK_TOOLSDIR_MAKE"; then
17728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17729$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17730else
17731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17732$as_echo "no" >&6; }
17733fi
17734
17735
17736  test -n "$CHECK_TOOLSDIR_MAKE" && break
17737done
17738
17739
17740  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17741  DESCRIPTION="make in tools-dir"
17742
17743  # On Cygwin, we require a newer version of make than on other platforms
17744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17745    MAKE_VERSION_EXPR="-e 4\."
17746    MAKE_REQUIRED_VERSION="4.0"
17747   else
17748    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17749    MAKE_REQUIRED_VERSION="3.81"
17750  fi
17751
17752  if test "x$MAKE_CANDIDATE" != x; then
17753    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17754$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17755    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17756    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17757    if test "x$IS_GNU_MAKE" = x; then
17758      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17759$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17760    else
17761      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17762      if test "x$IS_MODERN_MAKE" = x; then
17763        { $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
17764$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;}
17765      else
17766        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17767          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17768            MAKE_EXPECTED_ENV='cygwin'
17769          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17770            MAKE_EXPECTED_ENV='msys'
17771          else
17772            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17773          fi
17774          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17775          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17776        else
17777          # Not relevant for non-Windows
17778          IS_MAKE_CORRECT_ENV=true
17779        fi
17780        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17781          { $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
17782$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;}
17783        else
17784          FOUND_MAKE=$MAKE_CANDIDATE
17785
17786  # Only process if variable expands to non-empty
17787
17788  if test "x$FOUND_MAKE" != x; then
17789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17790
17791  # First separate the path from the arguments. This will split at the first
17792  # space.
17793  complete="$FOUND_MAKE"
17794  path="${complete%% *}"
17795  tmp="$complete EOL"
17796  arguments="${tmp#* }"
17797
17798  # Input might be given as Windows format, start by converting to
17799  # unix format.
17800  new_path=`$CYGPATH -u "$path"`
17801
17802  # Now try to locate executable using which
17803  new_path=`$WHICH "$new_path" 2> /dev/null`
17804  # bat and cmd files are not always considered executable in cygwin causing which
17805  # to not find them
17806  if test "x$new_path" = x \
17807      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17808      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17809    new_path=`$CYGPATH -u "$path"`
17810  fi
17811  if test "x$new_path" = x; then
17812    # Oops. Which didn't find the executable.
17813    # The splitting of arguments from the executable at a space might have been incorrect,
17814    # since paths with space are more likely in Windows. Give it another try with the whole
17815    # argument.
17816    path="$complete"
17817    arguments="EOL"
17818    new_path=`$CYGPATH -u "$path"`
17819    new_path=`$WHICH "$new_path" 2> /dev/null`
17820    # bat and cmd files are not always considered executable in cygwin causing which
17821    # to not find them
17822    if test "x$new_path" = x \
17823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17825      new_path=`$CYGPATH -u "$path"`
17826    fi
17827    if test "x$new_path" = x; then
17828      # It's still not found. Now this is an unrecoverable error.
17829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17831      has_space=`$ECHO "$complete" | $GREP " "`
17832      if test "x$has_space" != x; then
17833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17835      fi
17836      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17837    fi
17838  fi
17839
17840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17843  # "foo.exe" is OK but "foo" is an error.
17844  #
17845  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17846  # It is also a way to make sure we got the proper file name for the real test later on.
17847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17848  if test "x$test_shortpath" = x; then
17849    # Short path failed, file does not exist as specified.
17850    # Try adding .exe or .cmd
17851    if test -f "${new_path}.exe"; then
17852      input_to_shortpath="${new_path}.exe"
17853    elif test -f "${new_path}.cmd"; then
17854      input_to_shortpath="${new_path}.cmd"
17855    else
17856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17858      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17859$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17860      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17861    fi
17862  else
17863    input_to_shortpath="$new_path"
17864  fi
17865
17866  # Call helper function which possibly converts this using DOS-style short mode.
17867  # If so, the updated path is stored in $new_path.
17868  new_path="$input_to_shortpath"
17869
17870  input_path="$input_to_shortpath"
17871  # Check if we need to convert this using DOS-style short mode. If the path
17872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17873  # take no chances and rewrite it.
17874  # Note: m4 eats our [], so we need to use [ and ] instead.
17875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17876  if test "x$has_forbidden_chars" != x; then
17877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17881      # Going to short mode and back again did indeed matter. Since short mode is
17882      # case insensitive, let's make it lowercase to improve readability.
17883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17884      # Now convert it back to Unix-style (cygpath)
17885      input_path=`$CYGPATH -u "$shortmode_path"`
17886      new_path="$input_path"
17887    fi
17888  fi
17889
17890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17891  if test "x$test_cygdrive_prefix" = x; then
17892    # As a simple fix, exclude /usr/bin since it's not a real path.
17893    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17895      # a path prefixed by /cygdrive for fixpath to work.
17896      new_path="$CYGWIN_ROOT_PATH$input_path"
17897    fi
17898  fi
17899
17900  # remove trailing .exe if any
17901  new_path="${new_path/%.exe/}"
17902
17903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17904
17905  # First separate the path from the arguments. This will split at the first
17906  # space.
17907  complete="$FOUND_MAKE"
17908  path="${complete%% *}"
17909  tmp="$complete EOL"
17910  arguments="${tmp#* }"
17911
17912  # Input might be given as Windows format, start by converting to
17913  # unix format.
17914  new_path="$path"
17915
17916  windows_path="$new_path"
17917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17918    unix_path=`$CYGPATH -u "$windows_path"`
17919    new_path="$unix_path"
17920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17922    new_path="$unix_path"
17923  fi
17924
17925
17926  # Now try to locate executable using which
17927  new_path=`$WHICH "$new_path" 2> /dev/null`
17928
17929  if test "x$new_path" = x; then
17930    # Oops. Which didn't find the executable.
17931    # The splitting of arguments from the executable at a space might have been incorrect,
17932    # since paths with space are more likely in Windows. Give it another try with the whole
17933    # argument.
17934    path="$complete"
17935    arguments="EOL"
17936    new_path="$path"
17937
17938  windows_path="$new_path"
17939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17940    unix_path=`$CYGPATH -u "$windows_path"`
17941    new_path="$unix_path"
17942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17944    new_path="$unix_path"
17945  fi
17946
17947
17948    new_path=`$WHICH "$new_path" 2> /dev/null`
17949    # bat and cmd files are not always considered executable in MSYS causing which
17950    # to not find them
17951    if test "x$new_path" = x \
17952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17954      new_path="$path"
17955
17956  windows_path="$new_path"
17957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17958    unix_path=`$CYGPATH -u "$windows_path"`
17959    new_path="$unix_path"
17960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17962    new_path="$unix_path"
17963  fi
17964
17965    fi
17966
17967    if test "x$new_path" = x; then
17968      # It's still not found. Now this is an unrecoverable error.
17969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17970$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17971      has_space=`$ECHO "$complete" | $GREP " "`
17972      if test "x$has_space" != x; then
17973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17975      fi
17976      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17977    fi
17978  fi
17979
17980  # Now new_path has a complete unix path to the binary
17981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17982    # Keep paths in /bin as-is, but remove trailing .exe if any
17983    new_path="${new_path/%.exe/}"
17984    # Do not save /bin paths to all_fixpath_prefixes!
17985  else
17986    # Not in mixed or Windows style, start by that.
17987    new_path=`cmd //c echo $new_path`
17988
17989  input_path="$new_path"
17990  # Check if we need to convert this using DOS-style short mode. If the path
17991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17992  # take no chances and rewrite it.
17993  # Note: m4 eats our [], so we need to use [ and ] instead.
17994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17995  if test "x$has_forbidden_chars" != x; then
17996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17998  fi
17999
18000    # Output is in $new_path
18001
18002  windows_path="$new_path"
18003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18004    unix_path=`$CYGPATH -u "$windows_path"`
18005    new_path="$unix_path"
18006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18008    new_path="$unix_path"
18009  fi
18010
18011    # remove trailing .exe if any
18012    new_path="${new_path/%.exe/}"
18013
18014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18016  fi
18017
18018    else
18019      # We're on a unix platform. Hooray! :)
18020      # First separate the path from the arguments. This will split at the first
18021      # space.
18022      complete="$FOUND_MAKE"
18023      path="${complete%% *}"
18024      tmp="$complete EOL"
18025      arguments="${tmp#* }"
18026
18027      # Cannot rely on the command "which" here since it doesn't always work.
18028      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18029      if test -z "$is_absolute_path"; then
18030        # Path to executable is not absolute. Find it.
18031        IFS_save="$IFS"
18032        IFS=:
18033        for p in $PATH; do
18034          if test -f "$p/$path" && test -x "$p/$path"; then
18035            new_path="$p/$path"
18036            break
18037          fi
18038        done
18039        IFS="$IFS_save"
18040      else
18041        # This is an absolute path, we can use it without further modifications.
18042        new_path="$path"
18043      fi
18044
18045      if test "x$new_path" = x; then
18046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18048        has_space=`$ECHO "$complete" | $GREP " "`
18049        if test "x$has_space" != x; then
18050          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18051$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18052        fi
18053        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18054      fi
18055    fi
18056
18057    # Now join together the path and the arguments once again
18058    if test "x$arguments" != xEOL; then
18059      new_complete="$new_path ${arguments% *}"
18060    else
18061      new_complete="$new_path"
18062    fi
18063
18064    if test "x$complete" != "x$new_complete"; then
18065      FOUND_MAKE="$new_complete"
18066      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18067$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18068    fi
18069  fi
18070
18071        fi
18072      fi
18073    fi
18074  fi
18075
18076        fi
18077        PATH=$OLD_PATH
18078      fi
18079    fi
18080
18081    if test "x$FOUND_MAKE" = x; then
18082      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
18083    fi
18084
18085  else
18086    # The variable is set, but is it from the command line or the environment?
18087
18088    # Try to remove the string !MAKE! from our list.
18089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18091      # If it failed, the variable was not from the command line. Ignore it,
18092      # but warn the user (except for BASH, which is always set by the calling BASH).
18093      if test "xMAKE" != xBASH; then
18094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18095$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18096      fi
18097      # Try to locate tool using the code snippet
18098
18099    # Try our hardest to locate a correct version of GNU make
18100    for ac_prog in gmake
18101do
18102  # Extract the first word of "$ac_prog", so it can be a program name with args.
18103set dummy $ac_prog; ac_word=$2
18104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18105$as_echo_n "checking for $ac_word... " >&6; }
18106if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18107  $as_echo_n "(cached) " >&6
18108else
18109  case $CHECK_GMAKE in
18110  [\\/]* | ?:[\\/]*)
18111  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18112  ;;
18113  *)
18114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18115for as_dir in $PATH
18116do
18117  IFS=$as_save_IFS
18118  test -z "$as_dir" && as_dir=.
18119    for ac_exec_ext in '' $ac_executable_extensions; do
18120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18121    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18123    break 2
18124  fi
18125done
18126  done
18127IFS=$as_save_IFS
18128
18129  ;;
18130esac
18131fi
18132CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18133if test -n "$CHECK_GMAKE"; then
18134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18135$as_echo "$CHECK_GMAKE" >&6; }
18136else
18137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18138$as_echo "no" >&6; }
18139fi
18140
18141
18142  test -n "$CHECK_GMAKE" && break
18143done
18144
18145
18146  MAKE_CANDIDATE=""$CHECK_GMAKE""
18147  DESCRIPTION="gmake in PATH"
18148
18149  # On Cygwin, we require a newer version of make than on other platforms
18150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18151    MAKE_VERSION_EXPR="-e 4\."
18152    MAKE_REQUIRED_VERSION="4.0"
18153   else
18154    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18155    MAKE_REQUIRED_VERSION="3.81"
18156  fi
18157
18158  if test "x$MAKE_CANDIDATE" != x; then
18159    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18160$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18161    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18162    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18163    if test "x$IS_GNU_MAKE" = x; then
18164      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18165$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18166    else
18167      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18168      if test "x$IS_MODERN_MAKE" = x; then
18169        { $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
18170$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;}
18171      else
18172        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18173          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18174            MAKE_EXPECTED_ENV='cygwin'
18175          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18176            MAKE_EXPECTED_ENV='msys'
18177          else
18178            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18179          fi
18180          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18181          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18182        else
18183          # Not relevant for non-Windows
18184          IS_MAKE_CORRECT_ENV=true
18185        fi
18186        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18187          { $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
18188$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;}
18189        else
18190          FOUND_MAKE=$MAKE_CANDIDATE
18191
18192  # Only process if variable expands to non-empty
18193
18194  if test "x$FOUND_MAKE" != x; then
18195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18196
18197  # First separate the path from the arguments. This will split at the first
18198  # space.
18199  complete="$FOUND_MAKE"
18200  path="${complete%% *}"
18201  tmp="$complete EOL"
18202  arguments="${tmp#* }"
18203
18204  # Input might be given as Windows format, start by converting to
18205  # unix format.
18206  new_path=`$CYGPATH -u "$path"`
18207
18208  # Now try to locate executable using which
18209  new_path=`$WHICH "$new_path" 2> /dev/null`
18210  # bat and cmd files are not always considered executable in cygwin causing which
18211  # to not find them
18212  if test "x$new_path" = x \
18213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18215    new_path=`$CYGPATH -u "$path"`
18216  fi
18217  if test "x$new_path" = x; then
18218    # Oops. Which didn't find the executable.
18219    # The splitting of arguments from the executable at a space might have been incorrect,
18220    # since paths with space are more likely in Windows. Give it another try with the whole
18221    # argument.
18222    path="$complete"
18223    arguments="EOL"
18224    new_path=`$CYGPATH -u "$path"`
18225    new_path=`$WHICH "$new_path" 2> /dev/null`
18226    # bat and cmd files are not always considered executable in cygwin causing which
18227    # to not find them
18228    if test "x$new_path" = x \
18229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18231      new_path=`$CYGPATH -u "$path"`
18232    fi
18233    if test "x$new_path" = x; then
18234      # It's still not found. Now this is an unrecoverable error.
18235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18236$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18237      has_space=`$ECHO "$complete" | $GREP " "`
18238      if test "x$has_space" != x; then
18239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18241      fi
18242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18243    fi
18244  fi
18245
18246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18249  # "foo.exe" is OK but "foo" is an error.
18250  #
18251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18252  # It is also a way to make sure we got the proper file name for the real test later on.
18253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18254  if test "x$test_shortpath" = x; then
18255    # Short path failed, file does not exist as specified.
18256    # Try adding .exe or .cmd
18257    if test -f "${new_path}.exe"; then
18258      input_to_shortpath="${new_path}.exe"
18259    elif test -f "${new_path}.cmd"; then
18260      input_to_shortpath="${new_path}.cmd"
18261    else
18262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18263$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18267    fi
18268  else
18269    input_to_shortpath="$new_path"
18270  fi
18271
18272  # Call helper function which possibly converts this using DOS-style short mode.
18273  # If so, the updated path is stored in $new_path.
18274  new_path="$input_to_shortpath"
18275
18276  input_path="$input_to_shortpath"
18277  # Check if we need to convert this using DOS-style short mode. If the path
18278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18279  # take no chances and rewrite it.
18280  # Note: m4 eats our [], so we need to use [ and ] instead.
18281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18282  if test "x$has_forbidden_chars" != x; then
18283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18287      # Going to short mode and back again did indeed matter. Since short mode is
18288      # case insensitive, let's make it lowercase to improve readability.
18289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18290      # Now convert it back to Unix-style (cygpath)
18291      input_path=`$CYGPATH -u "$shortmode_path"`
18292      new_path="$input_path"
18293    fi
18294  fi
18295
18296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18297  if test "x$test_cygdrive_prefix" = x; then
18298    # As a simple fix, exclude /usr/bin since it's not a real path.
18299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18301      # a path prefixed by /cygdrive for fixpath to work.
18302      new_path="$CYGWIN_ROOT_PATH$input_path"
18303    fi
18304  fi
18305
18306  # remove trailing .exe if any
18307  new_path="${new_path/%.exe/}"
18308
18309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18310
18311  # First separate the path from the arguments. This will split at the first
18312  # space.
18313  complete="$FOUND_MAKE"
18314  path="${complete%% *}"
18315  tmp="$complete EOL"
18316  arguments="${tmp#* }"
18317
18318  # Input might be given as Windows format, start by converting to
18319  # unix format.
18320  new_path="$path"
18321
18322  windows_path="$new_path"
18323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18324    unix_path=`$CYGPATH -u "$windows_path"`
18325    new_path="$unix_path"
18326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18328    new_path="$unix_path"
18329  fi
18330
18331
18332  # Now try to locate executable using which
18333  new_path=`$WHICH "$new_path" 2> /dev/null`
18334
18335  if test "x$new_path" = x; then
18336    # Oops. Which didn't find the executable.
18337    # The splitting of arguments from the executable at a space might have been incorrect,
18338    # since paths with space are more likely in Windows. Give it another try with the whole
18339    # argument.
18340    path="$complete"
18341    arguments="EOL"
18342    new_path="$path"
18343
18344  windows_path="$new_path"
18345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18346    unix_path=`$CYGPATH -u "$windows_path"`
18347    new_path="$unix_path"
18348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18350    new_path="$unix_path"
18351  fi
18352
18353
18354    new_path=`$WHICH "$new_path" 2> /dev/null`
18355    # bat and cmd files are not always considered executable in MSYS causing which
18356    # to not find them
18357    if test "x$new_path" = x \
18358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18360      new_path="$path"
18361
18362  windows_path="$new_path"
18363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18364    unix_path=`$CYGPATH -u "$windows_path"`
18365    new_path="$unix_path"
18366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18368    new_path="$unix_path"
18369  fi
18370
18371    fi
18372
18373    if test "x$new_path" = x; then
18374      # It's still not found. Now this is an unrecoverable error.
18375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18376$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18377      has_space=`$ECHO "$complete" | $GREP " "`
18378      if test "x$has_space" != x; then
18379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18381      fi
18382      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18383    fi
18384  fi
18385
18386  # Now new_path has a complete unix path to the binary
18387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18388    # Keep paths in /bin as-is, but remove trailing .exe if any
18389    new_path="${new_path/%.exe/}"
18390    # Do not save /bin paths to all_fixpath_prefixes!
18391  else
18392    # Not in mixed or Windows style, start by that.
18393    new_path=`cmd //c echo $new_path`
18394
18395  input_path="$new_path"
18396  # Check if we need to convert this using DOS-style short mode. If the path
18397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18398  # take no chances and rewrite it.
18399  # Note: m4 eats our [], so we need to use [ and ] instead.
18400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18401  if test "x$has_forbidden_chars" != x; then
18402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18404  fi
18405
18406    # Output is in $new_path
18407
18408  windows_path="$new_path"
18409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18410    unix_path=`$CYGPATH -u "$windows_path"`
18411    new_path="$unix_path"
18412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18414    new_path="$unix_path"
18415  fi
18416
18417    # remove trailing .exe if any
18418    new_path="${new_path/%.exe/}"
18419
18420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18422  fi
18423
18424    else
18425      # We're on a unix platform. Hooray! :)
18426      # First separate the path from the arguments. This will split at the first
18427      # space.
18428      complete="$FOUND_MAKE"
18429      path="${complete%% *}"
18430      tmp="$complete EOL"
18431      arguments="${tmp#* }"
18432
18433      # Cannot rely on the command "which" here since it doesn't always work.
18434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18435      if test -z "$is_absolute_path"; then
18436        # Path to executable is not absolute. Find it.
18437        IFS_save="$IFS"
18438        IFS=:
18439        for p in $PATH; do
18440          if test -f "$p/$path" && test -x "$p/$path"; then
18441            new_path="$p/$path"
18442            break
18443          fi
18444        done
18445        IFS="$IFS_save"
18446      else
18447        # This is an absolute path, we can use it without further modifications.
18448        new_path="$path"
18449      fi
18450
18451      if test "x$new_path" = x; then
18452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18454        has_space=`$ECHO "$complete" | $GREP " "`
18455        if test "x$has_space" != x; then
18456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18458        fi
18459        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18460      fi
18461    fi
18462
18463    # Now join together the path and the arguments once again
18464    if test "x$arguments" != xEOL; then
18465      new_complete="$new_path ${arguments% *}"
18466    else
18467      new_complete="$new_path"
18468    fi
18469
18470    if test "x$complete" != "x$new_complete"; then
18471      FOUND_MAKE="$new_complete"
18472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18473$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18474    fi
18475  fi
18476
18477        fi
18478      fi
18479    fi
18480  fi
18481
18482
18483    if test "x$FOUND_MAKE" = x; then
18484      for ac_prog in make
18485do
18486  # Extract the first word of "$ac_prog", so it can be a program name with args.
18487set dummy $ac_prog; ac_word=$2
18488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18489$as_echo_n "checking for $ac_word... " >&6; }
18490if ${ac_cv_path_CHECK_MAKE+:} false; then :
18491  $as_echo_n "(cached) " >&6
18492else
18493  case $CHECK_MAKE in
18494  [\\/]* | ?:[\\/]*)
18495  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18496  ;;
18497  *)
18498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18499for as_dir in $PATH
18500do
18501  IFS=$as_save_IFS
18502  test -z "$as_dir" && as_dir=.
18503    for ac_exec_ext in '' $ac_executable_extensions; do
18504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18505    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18507    break 2
18508  fi
18509done
18510  done
18511IFS=$as_save_IFS
18512
18513  ;;
18514esac
18515fi
18516CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18517if test -n "$CHECK_MAKE"; then
18518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18519$as_echo "$CHECK_MAKE" >&6; }
18520else
18521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18522$as_echo "no" >&6; }
18523fi
18524
18525
18526  test -n "$CHECK_MAKE" && break
18527done
18528
18529
18530  MAKE_CANDIDATE=""$CHECK_MAKE""
18531  DESCRIPTION="make in PATH"
18532
18533  # On Cygwin, we require a newer version of make than on other platforms
18534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18535    MAKE_VERSION_EXPR="-e 4\."
18536    MAKE_REQUIRED_VERSION="4.0"
18537   else
18538    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18539    MAKE_REQUIRED_VERSION="3.81"
18540  fi
18541
18542  if test "x$MAKE_CANDIDATE" != x; then
18543    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18544$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18545    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18546    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18547    if test "x$IS_GNU_MAKE" = x; then
18548      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18549$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18550    else
18551      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18552      if test "x$IS_MODERN_MAKE" = x; then
18553        { $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
18554$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;}
18555      else
18556        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18557          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18558            MAKE_EXPECTED_ENV='cygwin'
18559          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18560            MAKE_EXPECTED_ENV='msys'
18561          else
18562            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18563          fi
18564          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18565          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18566        else
18567          # Not relevant for non-Windows
18568          IS_MAKE_CORRECT_ENV=true
18569        fi
18570        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18571          { $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
18572$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;}
18573        else
18574          FOUND_MAKE=$MAKE_CANDIDATE
18575
18576  # Only process if variable expands to non-empty
18577
18578  if test "x$FOUND_MAKE" != x; then
18579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18580
18581  # First separate the path from the arguments. This will split at the first
18582  # space.
18583  complete="$FOUND_MAKE"
18584  path="${complete%% *}"
18585  tmp="$complete EOL"
18586  arguments="${tmp#* }"
18587
18588  # Input might be given as Windows format, start by converting to
18589  # unix format.
18590  new_path=`$CYGPATH -u "$path"`
18591
18592  # Now try to locate executable using which
18593  new_path=`$WHICH "$new_path" 2> /dev/null`
18594  # bat and cmd files are not always considered executable in cygwin causing which
18595  # to not find them
18596  if test "x$new_path" = x \
18597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18599    new_path=`$CYGPATH -u "$path"`
18600  fi
18601  if test "x$new_path" = x; then
18602    # Oops. Which didn't find the executable.
18603    # The splitting of arguments from the executable at a space might have been incorrect,
18604    # since paths with space are more likely in Windows. Give it another try with the whole
18605    # argument.
18606    path="$complete"
18607    arguments="EOL"
18608    new_path=`$CYGPATH -u "$path"`
18609    new_path=`$WHICH "$new_path" 2> /dev/null`
18610    # bat and cmd files are not always considered executable in cygwin causing which
18611    # to not find them
18612    if test "x$new_path" = x \
18613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18615      new_path=`$CYGPATH -u "$path"`
18616    fi
18617    if test "x$new_path" = x; then
18618      # It's still not found. Now this is an unrecoverable error.
18619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18621      has_space=`$ECHO "$complete" | $GREP " "`
18622      if test "x$has_space" != x; then
18623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18625      fi
18626      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18627    fi
18628  fi
18629
18630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18633  # "foo.exe" is OK but "foo" is an error.
18634  #
18635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18636  # It is also a way to make sure we got the proper file name for the real test later on.
18637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18638  if test "x$test_shortpath" = x; then
18639    # Short path failed, file does not exist as specified.
18640    # Try adding .exe or .cmd
18641    if test -f "${new_path}.exe"; then
18642      input_to_shortpath="${new_path}.exe"
18643    elif test -f "${new_path}.cmd"; then
18644      input_to_shortpath="${new_path}.cmd"
18645    else
18646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18651    fi
18652  else
18653    input_to_shortpath="$new_path"
18654  fi
18655
18656  # Call helper function which possibly converts this using DOS-style short mode.
18657  # If so, the updated path is stored in $new_path.
18658  new_path="$input_to_shortpath"
18659
18660  input_path="$input_to_shortpath"
18661  # Check if we need to convert this using DOS-style short mode. If the path
18662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18663  # take no chances and rewrite it.
18664  # Note: m4 eats our [], so we need to use [ and ] instead.
18665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18666  if test "x$has_forbidden_chars" != x; then
18667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18671      # Going to short mode and back again did indeed matter. Since short mode is
18672      # case insensitive, let's make it lowercase to improve readability.
18673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18674      # Now convert it back to Unix-style (cygpath)
18675      input_path=`$CYGPATH -u "$shortmode_path"`
18676      new_path="$input_path"
18677    fi
18678  fi
18679
18680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18681  if test "x$test_cygdrive_prefix" = x; then
18682    # As a simple fix, exclude /usr/bin since it's not a real path.
18683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18685      # a path prefixed by /cygdrive for fixpath to work.
18686      new_path="$CYGWIN_ROOT_PATH$input_path"
18687    fi
18688  fi
18689
18690  # remove trailing .exe if any
18691  new_path="${new_path/%.exe/}"
18692
18693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18694
18695  # First separate the path from the arguments. This will split at the first
18696  # space.
18697  complete="$FOUND_MAKE"
18698  path="${complete%% *}"
18699  tmp="$complete EOL"
18700  arguments="${tmp#* }"
18701
18702  # Input might be given as Windows format, start by converting to
18703  # unix format.
18704  new_path="$path"
18705
18706  windows_path="$new_path"
18707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18708    unix_path=`$CYGPATH -u "$windows_path"`
18709    new_path="$unix_path"
18710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18712    new_path="$unix_path"
18713  fi
18714
18715
18716  # Now try to locate executable using which
18717  new_path=`$WHICH "$new_path" 2> /dev/null`
18718
18719  if test "x$new_path" = x; then
18720    # Oops. Which didn't find the executable.
18721    # The splitting of arguments from the executable at a space might have been incorrect,
18722    # since paths with space are more likely in Windows. Give it another try with the whole
18723    # argument.
18724    path="$complete"
18725    arguments="EOL"
18726    new_path="$path"
18727
18728  windows_path="$new_path"
18729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18730    unix_path=`$CYGPATH -u "$windows_path"`
18731    new_path="$unix_path"
18732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18734    new_path="$unix_path"
18735  fi
18736
18737
18738    new_path=`$WHICH "$new_path" 2> /dev/null`
18739    # bat and cmd files are not always considered executable in MSYS causing which
18740    # to not find them
18741    if test "x$new_path" = x \
18742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18744      new_path="$path"
18745
18746  windows_path="$new_path"
18747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18748    unix_path=`$CYGPATH -u "$windows_path"`
18749    new_path="$unix_path"
18750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18752    new_path="$unix_path"
18753  fi
18754
18755    fi
18756
18757    if test "x$new_path" = x; then
18758      # It's still not found. Now this is an unrecoverable error.
18759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18760$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18761      has_space=`$ECHO "$complete" | $GREP " "`
18762      if test "x$has_space" != x; then
18763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18765      fi
18766      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18767    fi
18768  fi
18769
18770  # Now new_path has a complete unix path to the binary
18771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18772    # Keep paths in /bin as-is, but remove trailing .exe if any
18773    new_path="${new_path/%.exe/}"
18774    # Do not save /bin paths to all_fixpath_prefixes!
18775  else
18776    # Not in mixed or Windows style, start by that.
18777    new_path=`cmd //c echo $new_path`
18778
18779  input_path="$new_path"
18780  # Check if we need to convert this using DOS-style short mode. If the path
18781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18782  # take no chances and rewrite it.
18783  # Note: m4 eats our [], so we need to use [ and ] instead.
18784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18785  if test "x$has_forbidden_chars" != x; then
18786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18788  fi
18789
18790    # Output is in $new_path
18791
18792  windows_path="$new_path"
18793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18794    unix_path=`$CYGPATH -u "$windows_path"`
18795    new_path="$unix_path"
18796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18798    new_path="$unix_path"
18799  fi
18800
18801    # remove trailing .exe if any
18802    new_path="${new_path/%.exe/}"
18803
18804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18806  fi
18807
18808    else
18809      # We're on a unix platform. Hooray! :)
18810      # First separate the path from the arguments. This will split at the first
18811      # space.
18812      complete="$FOUND_MAKE"
18813      path="${complete%% *}"
18814      tmp="$complete EOL"
18815      arguments="${tmp#* }"
18816
18817      # Cannot rely on the command "which" here since it doesn't always work.
18818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18819      if test -z "$is_absolute_path"; then
18820        # Path to executable is not absolute. Find it.
18821        IFS_save="$IFS"
18822        IFS=:
18823        for p in $PATH; do
18824          if test -f "$p/$path" && test -x "$p/$path"; then
18825            new_path="$p/$path"
18826            break
18827          fi
18828        done
18829        IFS="$IFS_save"
18830      else
18831        # This is an absolute path, we can use it without further modifications.
18832        new_path="$path"
18833      fi
18834
18835      if test "x$new_path" = x; then
18836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18837$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18838        has_space=`$ECHO "$complete" | $GREP " "`
18839        if test "x$has_space" != x; then
18840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18842        fi
18843        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18844      fi
18845    fi
18846
18847    # Now join together the path and the arguments once again
18848    if test "x$arguments" != xEOL; then
18849      new_complete="$new_path ${arguments% *}"
18850    else
18851      new_complete="$new_path"
18852    fi
18853
18854    if test "x$complete" != "x$new_complete"; then
18855      FOUND_MAKE="$new_complete"
18856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18857$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18858    fi
18859  fi
18860
18861        fi
18862      fi
18863    fi
18864  fi
18865
18866    fi
18867
18868    if test "x$FOUND_MAKE" = x; then
18869      if test "x$TOOLCHAIN_PATH" != x; then
18870        # We have a toolchain path, check that as well before giving up.
18871        OLD_PATH=$PATH
18872        PATH=$TOOLCHAIN_PATH:$PATH
18873        for ac_prog in gmake
18874do
18875  # Extract the first word of "$ac_prog", so it can be a program name with args.
18876set dummy $ac_prog; ac_word=$2
18877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18878$as_echo_n "checking for $ac_word... " >&6; }
18879if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18880  $as_echo_n "(cached) " >&6
18881else
18882  case $CHECK_TOOLSDIR_GMAKE in
18883  [\\/]* | ?:[\\/]*)
18884  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18885  ;;
18886  *)
18887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18888for as_dir in $PATH
18889do
18890  IFS=$as_save_IFS
18891  test -z "$as_dir" && as_dir=.
18892    for ac_exec_ext in '' $ac_executable_extensions; do
18893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18894    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18896    break 2
18897  fi
18898done
18899  done
18900IFS=$as_save_IFS
18901
18902  ;;
18903esac
18904fi
18905CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18906if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18908$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18909else
18910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18911$as_echo "no" >&6; }
18912fi
18913
18914
18915  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18916done
18917
18918
18919  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18920  DESCRIPTION="gmake in tools-dir"
18921
18922  # On Cygwin, we require a newer version of make than on other platforms
18923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18924    MAKE_VERSION_EXPR="-e 4\."
18925    MAKE_REQUIRED_VERSION="4.0"
18926   else
18927    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18928    MAKE_REQUIRED_VERSION="3.81"
18929  fi
18930
18931  if test "x$MAKE_CANDIDATE" != x; then
18932    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18933$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18934    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18935    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18936    if test "x$IS_GNU_MAKE" = x; then
18937      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18938$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18939    else
18940      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18941      if test "x$IS_MODERN_MAKE" = x; then
18942        { $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
18943$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;}
18944      else
18945        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18946          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18947            MAKE_EXPECTED_ENV='cygwin'
18948          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949            MAKE_EXPECTED_ENV='msys'
18950          else
18951            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18952          fi
18953          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18954          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18955        else
18956          # Not relevant for non-Windows
18957          IS_MAKE_CORRECT_ENV=true
18958        fi
18959        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18960          { $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
18961$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;}
18962        else
18963          FOUND_MAKE=$MAKE_CANDIDATE
18964
18965  # Only process if variable expands to non-empty
18966
18967  if test "x$FOUND_MAKE" != x; then
18968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18969
18970  # First separate the path from the arguments. This will split at the first
18971  # space.
18972  complete="$FOUND_MAKE"
18973  path="${complete%% *}"
18974  tmp="$complete EOL"
18975  arguments="${tmp#* }"
18976
18977  # Input might be given as Windows format, start by converting to
18978  # unix format.
18979  new_path=`$CYGPATH -u "$path"`
18980
18981  # Now try to locate executable using which
18982  new_path=`$WHICH "$new_path" 2> /dev/null`
18983  # bat and cmd files are not always considered executable in cygwin causing which
18984  # to not find them
18985  if test "x$new_path" = x \
18986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18988    new_path=`$CYGPATH -u "$path"`
18989  fi
18990  if test "x$new_path" = x; then
18991    # Oops. Which didn't find the executable.
18992    # The splitting of arguments from the executable at a space might have been incorrect,
18993    # since paths with space are more likely in Windows. Give it another try with the whole
18994    # argument.
18995    path="$complete"
18996    arguments="EOL"
18997    new_path=`$CYGPATH -u "$path"`
18998    new_path=`$WHICH "$new_path" 2> /dev/null`
18999    # bat and cmd files are not always considered executable in cygwin causing which
19000    # to not find them
19001    if test "x$new_path" = x \
19002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19004      new_path=`$CYGPATH -u "$path"`
19005    fi
19006    if test "x$new_path" = x; then
19007      # It's still not found. Now this is an unrecoverable error.
19008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19009$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19010      has_space=`$ECHO "$complete" | $GREP " "`
19011      if test "x$has_space" != x; then
19012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19014      fi
19015      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19016    fi
19017  fi
19018
19019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19022  # "foo.exe" is OK but "foo" is an error.
19023  #
19024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19025  # It is also a way to make sure we got the proper file name for the real test later on.
19026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19027  if test "x$test_shortpath" = x; then
19028    # Short path failed, file does not exist as specified.
19029    # Try adding .exe or .cmd
19030    if test -f "${new_path}.exe"; then
19031      input_to_shortpath="${new_path}.exe"
19032    elif test -f "${new_path}.cmd"; then
19033      input_to_shortpath="${new_path}.cmd"
19034    else
19035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19036$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19039      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19040    fi
19041  else
19042    input_to_shortpath="$new_path"
19043  fi
19044
19045  # Call helper function which possibly converts this using DOS-style short mode.
19046  # If so, the updated path is stored in $new_path.
19047  new_path="$input_to_shortpath"
19048
19049  input_path="$input_to_shortpath"
19050  # Check if we need to convert this using DOS-style short mode. If the path
19051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19052  # take no chances and rewrite it.
19053  # Note: m4 eats our [], so we need to use [ and ] instead.
19054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19055  if test "x$has_forbidden_chars" != x; then
19056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19060      # Going to short mode and back again did indeed matter. Since short mode is
19061      # case insensitive, let's make it lowercase to improve readability.
19062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19063      # Now convert it back to Unix-style (cygpath)
19064      input_path=`$CYGPATH -u "$shortmode_path"`
19065      new_path="$input_path"
19066    fi
19067  fi
19068
19069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19070  if test "x$test_cygdrive_prefix" = x; then
19071    # As a simple fix, exclude /usr/bin since it's not a real path.
19072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19074      # a path prefixed by /cygdrive for fixpath to work.
19075      new_path="$CYGWIN_ROOT_PATH$input_path"
19076    fi
19077  fi
19078
19079  # remove trailing .exe if any
19080  new_path="${new_path/%.exe/}"
19081
19082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19083
19084  # First separate the path from the arguments. This will split at the first
19085  # space.
19086  complete="$FOUND_MAKE"
19087  path="${complete%% *}"
19088  tmp="$complete EOL"
19089  arguments="${tmp#* }"
19090
19091  # Input might be given as Windows format, start by converting to
19092  # unix format.
19093  new_path="$path"
19094
19095  windows_path="$new_path"
19096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19097    unix_path=`$CYGPATH -u "$windows_path"`
19098    new_path="$unix_path"
19099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19101    new_path="$unix_path"
19102  fi
19103
19104
19105  # Now try to locate executable using which
19106  new_path=`$WHICH "$new_path" 2> /dev/null`
19107
19108  if test "x$new_path" = x; then
19109    # Oops. Which didn't find the executable.
19110    # The splitting of arguments from the executable at a space might have been incorrect,
19111    # since paths with space are more likely in Windows. Give it another try with the whole
19112    # argument.
19113    path="$complete"
19114    arguments="EOL"
19115    new_path="$path"
19116
19117  windows_path="$new_path"
19118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19119    unix_path=`$CYGPATH -u "$windows_path"`
19120    new_path="$unix_path"
19121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19123    new_path="$unix_path"
19124  fi
19125
19126
19127    new_path=`$WHICH "$new_path" 2> /dev/null`
19128    # bat and cmd files are not always considered executable in MSYS causing which
19129    # to not find them
19130    if test "x$new_path" = x \
19131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19133      new_path="$path"
19134
19135  windows_path="$new_path"
19136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19137    unix_path=`$CYGPATH -u "$windows_path"`
19138    new_path="$unix_path"
19139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19141    new_path="$unix_path"
19142  fi
19143
19144    fi
19145
19146    if test "x$new_path" = x; then
19147      # It's still not found. Now this is an unrecoverable error.
19148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19149$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19150      has_space=`$ECHO "$complete" | $GREP " "`
19151      if test "x$has_space" != x; then
19152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19154      fi
19155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19156    fi
19157  fi
19158
19159  # Now new_path has a complete unix path to the binary
19160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19161    # Keep paths in /bin as-is, but remove trailing .exe if any
19162    new_path="${new_path/%.exe/}"
19163    # Do not save /bin paths to all_fixpath_prefixes!
19164  else
19165    # Not in mixed or Windows style, start by that.
19166    new_path=`cmd //c echo $new_path`
19167
19168  input_path="$new_path"
19169  # Check if we need to convert this using DOS-style short mode. If the path
19170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19171  # take no chances and rewrite it.
19172  # Note: m4 eats our [], so we need to use [ and ] instead.
19173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19174  if test "x$has_forbidden_chars" != x; then
19175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19177  fi
19178
19179    # Output is in $new_path
19180
19181  windows_path="$new_path"
19182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19183    unix_path=`$CYGPATH -u "$windows_path"`
19184    new_path="$unix_path"
19185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19187    new_path="$unix_path"
19188  fi
19189
19190    # remove trailing .exe if any
19191    new_path="${new_path/%.exe/}"
19192
19193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19195  fi
19196
19197    else
19198      # We're on a unix platform. Hooray! :)
19199      # First separate the path from the arguments. This will split at the first
19200      # space.
19201      complete="$FOUND_MAKE"
19202      path="${complete%% *}"
19203      tmp="$complete EOL"
19204      arguments="${tmp#* }"
19205
19206      # Cannot rely on the command "which" here since it doesn't always work.
19207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19208      if test -z "$is_absolute_path"; then
19209        # Path to executable is not absolute. Find it.
19210        IFS_save="$IFS"
19211        IFS=:
19212        for p in $PATH; do
19213          if test -f "$p/$path" && test -x "$p/$path"; then
19214            new_path="$p/$path"
19215            break
19216          fi
19217        done
19218        IFS="$IFS_save"
19219      else
19220        # This is an absolute path, we can use it without further modifications.
19221        new_path="$path"
19222      fi
19223
19224      if test "x$new_path" = x; then
19225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19227        has_space=`$ECHO "$complete" | $GREP " "`
19228        if test "x$has_space" != x; then
19229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19231        fi
19232        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19233      fi
19234    fi
19235
19236    # Now join together the path and the arguments once again
19237    if test "x$arguments" != xEOL; then
19238      new_complete="$new_path ${arguments% *}"
19239    else
19240      new_complete="$new_path"
19241    fi
19242
19243    if test "x$complete" != "x$new_complete"; then
19244      FOUND_MAKE="$new_complete"
19245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19246$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19247    fi
19248  fi
19249
19250        fi
19251      fi
19252    fi
19253  fi
19254
19255        if test "x$FOUND_MAKE" = x; then
19256          for ac_prog in make
19257do
19258  # Extract the first word of "$ac_prog", so it can be a program name with args.
19259set dummy $ac_prog; ac_word=$2
19260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19261$as_echo_n "checking for $ac_word... " >&6; }
19262if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19263  $as_echo_n "(cached) " >&6
19264else
19265  case $CHECK_TOOLSDIR_MAKE in
19266  [\\/]* | ?:[\\/]*)
19267  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19268  ;;
19269  *)
19270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19271for as_dir in $PATH
19272do
19273  IFS=$as_save_IFS
19274  test -z "$as_dir" && as_dir=.
19275    for ac_exec_ext in '' $ac_executable_extensions; do
19276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19277    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19279    break 2
19280  fi
19281done
19282  done
19283IFS=$as_save_IFS
19284
19285  ;;
19286esac
19287fi
19288CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19289if test -n "$CHECK_TOOLSDIR_MAKE"; then
19290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19291$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19292else
19293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19294$as_echo "no" >&6; }
19295fi
19296
19297
19298  test -n "$CHECK_TOOLSDIR_MAKE" && break
19299done
19300
19301
19302  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19303  DESCRIPTION="make in tools-dir"
19304
19305  # On Cygwin, we require a newer version of make than on other platforms
19306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19307    MAKE_VERSION_EXPR="-e 4\."
19308    MAKE_REQUIRED_VERSION="4.0"
19309   else
19310    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19311    MAKE_REQUIRED_VERSION="3.81"
19312  fi
19313
19314  if test "x$MAKE_CANDIDATE" != x; then
19315    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19316$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19317    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19318    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19319    if test "x$IS_GNU_MAKE" = x; then
19320      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19321$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19322    else
19323      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19324      if test "x$IS_MODERN_MAKE" = x; then
19325        { $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
19326$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;}
19327      else
19328        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19329          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19330            MAKE_EXPECTED_ENV='cygwin'
19331          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19332            MAKE_EXPECTED_ENV='msys'
19333          else
19334            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19335          fi
19336          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19337          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19338        else
19339          # Not relevant for non-Windows
19340          IS_MAKE_CORRECT_ENV=true
19341        fi
19342        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19343          { $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
19344$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;}
19345        else
19346          FOUND_MAKE=$MAKE_CANDIDATE
19347
19348  # Only process if variable expands to non-empty
19349
19350  if test "x$FOUND_MAKE" != x; then
19351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19352
19353  # First separate the path from the arguments. This will split at the first
19354  # space.
19355  complete="$FOUND_MAKE"
19356  path="${complete%% *}"
19357  tmp="$complete EOL"
19358  arguments="${tmp#* }"
19359
19360  # Input might be given as Windows format, start by converting to
19361  # unix format.
19362  new_path=`$CYGPATH -u "$path"`
19363
19364  # Now try to locate executable using which
19365  new_path=`$WHICH "$new_path" 2> /dev/null`
19366  # bat and cmd files are not always considered executable in cygwin causing which
19367  # to not find them
19368  if test "x$new_path" = x \
19369      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19370      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19371    new_path=`$CYGPATH -u "$path"`
19372  fi
19373  if test "x$new_path" = x; then
19374    # Oops. Which didn't find the executable.
19375    # The splitting of arguments from the executable at a space might have been incorrect,
19376    # since paths with space are more likely in Windows. Give it another try with the whole
19377    # argument.
19378    path="$complete"
19379    arguments="EOL"
19380    new_path=`$CYGPATH -u "$path"`
19381    new_path=`$WHICH "$new_path" 2> /dev/null`
19382    # bat and cmd files are not always considered executable in cygwin causing which
19383    # to not find them
19384    if test "x$new_path" = x \
19385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19387      new_path=`$CYGPATH -u "$path"`
19388    fi
19389    if test "x$new_path" = x; then
19390      # It's still not found. Now this is an unrecoverable error.
19391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19393      has_space=`$ECHO "$complete" | $GREP " "`
19394      if test "x$has_space" != x; then
19395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19397      fi
19398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19399    fi
19400  fi
19401
19402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19405  # "foo.exe" is OK but "foo" is an error.
19406  #
19407  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19408  # It is also a way to make sure we got the proper file name for the real test later on.
19409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19410  if test "x$test_shortpath" = x; then
19411    # Short path failed, file does not exist as specified.
19412    # Try adding .exe or .cmd
19413    if test -f "${new_path}.exe"; then
19414      input_to_shortpath="${new_path}.exe"
19415    elif test -f "${new_path}.cmd"; then
19416      input_to_shortpath="${new_path}.cmd"
19417    else
19418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19422      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19423    fi
19424  else
19425    input_to_shortpath="$new_path"
19426  fi
19427
19428  # Call helper function which possibly converts this using DOS-style short mode.
19429  # If so, the updated path is stored in $new_path.
19430  new_path="$input_to_shortpath"
19431
19432  input_path="$input_to_shortpath"
19433  # Check if we need to convert this using DOS-style short mode. If the path
19434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19435  # take no chances and rewrite it.
19436  # Note: m4 eats our [], so we need to use [ and ] instead.
19437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19438  if test "x$has_forbidden_chars" != x; then
19439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19443      # Going to short mode and back again did indeed matter. Since short mode is
19444      # case insensitive, let's make it lowercase to improve readability.
19445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19446      # Now convert it back to Unix-style (cygpath)
19447      input_path=`$CYGPATH -u "$shortmode_path"`
19448      new_path="$input_path"
19449    fi
19450  fi
19451
19452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19453  if test "x$test_cygdrive_prefix" = x; then
19454    # As a simple fix, exclude /usr/bin since it's not a real path.
19455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19457      # a path prefixed by /cygdrive for fixpath to work.
19458      new_path="$CYGWIN_ROOT_PATH$input_path"
19459    fi
19460  fi
19461
19462  # remove trailing .exe if any
19463  new_path="${new_path/%.exe/}"
19464
19465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19466
19467  # First separate the path from the arguments. This will split at the first
19468  # space.
19469  complete="$FOUND_MAKE"
19470  path="${complete%% *}"
19471  tmp="$complete EOL"
19472  arguments="${tmp#* }"
19473
19474  # Input might be given as Windows format, start by converting to
19475  # unix format.
19476  new_path="$path"
19477
19478  windows_path="$new_path"
19479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19480    unix_path=`$CYGPATH -u "$windows_path"`
19481    new_path="$unix_path"
19482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19484    new_path="$unix_path"
19485  fi
19486
19487
19488  # Now try to locate executable using which
19489  new_path=`$WHICH "$new_path" 2> /dev/null`
19490
19491  if test "x$new_path" = x; then
19492    # Oops. Which didn't find the executable.
19493    # The splitting of arguments from the executable at a space might have been incorrect,
19494    # since paths with space are more likely in Windows. Give it another try with the whole
19495    # argument.
19496    path="$complete"
19497    arguments="EOL"
19498    new_path="$path"
19499
19500  windows_path="$new_path"
19501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19502    unix_path=`$CYGPATH -u "$windows_path"`
19503    new_path="$unix_path"
19504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19506    new_path="$unix_path"
19507  fi
19508
19509
19510    new_path=`$WHICH "$new_path" 2> /dev/null`
19511    # bat and cmd files are not always considered executable in MSYS causing which
19512    # to not find them
19513    if test "x$new_path" = x \
19514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19516      new_path="$path"
19517
19518  windows_path="$new_path"
19519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19520    unix_path=`$CYGPATH -u "$windows_path"`
19521    new_path="$unix_path"
19522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19524    new_path="$unix_path"
19525  fi
19526
19527    fi
19528
19529    if test "x$new_path" = x; then
19530      # It's still not found. Now this is an unrecoverable error.
19531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19533      has_space=`$ECHO "$complete" | $GREP " "`
19534      if test "x$has_space" != x; then
19535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19537      fi
19538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19539    fi
19540  fi
19541
19542  # Now new_path has a complete unix path to the binary
19543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19544    # Keep paths in /bin as-is, but remove trailing .exe if any
19545    new_path="${new_path/%.exe/}"
19546    # Do not save /bin paths to all_fixpath_prefixes!
19547  else
19548    # Not in mixed or Windows style, start by that.
19549    new_path=`cmd //c echo $new_path`
19550
19551  input_path="$new_path"
19552  # Check if we need to convert this using DOS-style short mode. If the path
19553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19554  # take no chances and rewrite it.
19555  # Note: m4 eats our [], so we need to use [ and ] instead.
19556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19557  if test "x$has_forbidden_chars" != x; then
19558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19560  fi
19561
19562    # Output is in $new_path
19563
19564  windows_path="$new_path"
19565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19566    unix_path=`$CYGPATH -u "$windows_path"`
19567    new_path="$unix_path"
19568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19570    new_path="$unix_path"
19571  fi
19572
19573    # remove trailing .exe if any
19574    new_path="${new_path/%.exe/}"
19575
19576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19578  fi
19579
19580    else
19581      # We're on a unix platform. Hooray! :)
19582      # First separate the path from the arguments. This will split at the first
19583      # space.
19584      complete="$FOUND_MAKE"
19585      path="${complete%% *}"
19586      tmp="$complete EOL"
19587      arguments="${tmp#* }"
19588
19589      # Cannot rely on the command "which" here since it doesn't always work.
19590      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19591      if test -z "$is_absolute_path"; then
19592        # Path to executable is not absolute. Find it.
19593        IFS_save="$IFS"
19594        IFS=:
19595        for p in $PATH; do
19596          if test -f "$p/$path" && test -x "$p/$path"; then
19597            new_path="$p/$path"
19598            break
19599          fi
19600        done
19601        IFS="$IFS_save"
19602      else
19603        # This is an absolute path, we can use it without further modifications.
19604        new_path="$path"
19605      fi
19606
19607      if test "x$new_path" = x; then
19608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19610        has_space=`$ECHO "$complete" | $GREP " "`
19611        if test "x$has_space" != x; then
19612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19614        fi
19615        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19616      fi
19617    fi
19618
19619    # Now join together the path and the arguments once again
19620    if test "x$arguments" != xEOL; then
19621      new_complete="$new_path ${arguments% *}"
19622    else
19623      new_complete="$new_path"
19624    fi
19625
19626    if test "x$complete" != "x$new_complete"; then
19627      FOUND_MAKE="$new_complete"
19628      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19629$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19630    fi
19631  fi
19632
19633        fi
19634      fi
19635    fi
19636  fi
19637
19638        fi
19639        PATH=$OLD_PATH
19640      fi
19641    fi
19642
19643    if test "x$FOUND_MAKE" = x; then
19644      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
19645    fi
19646
19647    else
19648      # If it succeeded, then it was overridden by the user. We will use it
19649      # for the tool.
19650
19651      # First remove it from the list of overridden variables, so we can test
19652      # for unknown variables in the end.
19653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19654
19655      # Check if we try to supply an empty value
19656      if test "x$MAKE" = x; then
19657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19658$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19660$as_echo_n "checking for MAKE... " >&6; }
19661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19662$as_echo "disabled" >&6; }
19663      else
19664        # Check if the provided tool contains a complete path.
19665        tool_specified="$MAKE"
19666        tool_basename="${tool_specified##*/}"
19667        if test "x$tool_basename" = "x$tool_specified"; then
19668          # A command without a complete path is provided, search $PATH.
19669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19670$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19671          # Extract the first word of "$tool_basename", so it can be a program name with args.
19672set dummy $tool_basename; ac_word=$2
19673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19674$as_echo_n "checking for $ac_word... " >&6; }
19675if ${ac_cv_path_MAKE+:} false; then :
19676  $as_echo_n "(cached) " >&6
19677else
19678  case $MAKE in
19679  [\\/]* | ?:[\\/]*)
19680  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19681  ;;
19682  *)
19683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19684for as_dir in $PATH
19685do
19686  IFS=$as_save_IFS
19687  test -z "$as_dir" && as_dir=.
19688    for ac_exec_ext in '' $ac_executable_extensions; do
19689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19690    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19692    break 2
19693  fi
19694done
19695  done
19696IFS=$as_save_IFS
19697
19698  ;;
19699esac
19700fi
19701MAKE=$ac_cv_path_MAKE
19702if test -n "$MAKE"; then
19703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19704$as_echo "$MAKE" >&6; }
19705else
19706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19707$as_echo "no" >&6; }
19708fi
19709
19710
19711          if test "x$MAKE" = x; then
19712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19713          fi
19714        else
19715          # Otherwise we believe it is a complete path. Use it as it is.
19716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19717$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19719$as_echo_n "checking for MAKE... " >&6; }
19720          if test ! -x "$tool_specified"; then
19721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19722$as_echo "not found" >&6; }
19723            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19724          fi
19725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19726$as_echo "$tool_specified" >&6; }
19727        fi
19728      fi
19729    fi
19730
19731    # If MAKE was set by user, verify the version
19732
19733  MAKE_CANDIDATE=""$MAKE""
19734  DESCRIPTION="user supplied MAKE=$MAKE"
19735
19736  # On Cygwin, we require a newer version of make than on other platforms
19737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19738    MAKE_VERSION_EXPR="-e 4\."
19739    MAKE_REQUIRED_VERSION="4.0"
19740   else
19741    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19742    MAKE_REQUIRED_VERSION="3.81"
19743  fi
19744
19745  if test "x$MAKE_CANDIDATE" != x; then
19746    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19747$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19748    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19749    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19750    if test "x$IS_GNU_MAKE" = x; then
19751      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19752$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19753    else
19754      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19755      if test "x$IS_MODERN_MAKE" = x; then
19756        { $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
19757$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;}
19758      else
19759        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19760          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19761            MAKE_EXPECTED_ENV='cygwin'
19762          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19763            MAKE_EXPECTED_ENV='msys'
19764          else
19765            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19766          fi
19767          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19768          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19769        else
19770          # Not relevant for non-Windows
19771          IS_MAKE_CORRECT_ENV=true
19772        fi
19773        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19774          { $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
19775$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;}
19776        else
19777          FOUND_MAKE=$MAKE_CANDIDATE
19778
19779  # Only process if variable expands to non-empty
19780
19781  if test "x$FOUND_MAKE" != x; then
19782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19783
19784  # First separate the path from the arguments. This will split at the first
19785  # space.
19786  complete="$FOUND_MAKE"
19787  path="${complete%% *}"
19788  tmp="$complete EOL"
19789  arguments="${tmp#* }"
19790
19791  # Input might be given as Windows format, start by converting to
19792  # unix format.
19793  new_path=`$CYGPATH -u "$path"`
19794
19795  # Now try to locate executable using which
19796  new_path=`$WHICH "$new_path" 2> /dev/null`
19797  # bat and cmd files are not always considered executable in cygwin causing which
19798  # to not find them
19799  if test "x$new_path" = x \
19800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19802    new_path=`$CYGPATH -u "$path"`
19803  fi
19804  if test "x$new_path" = x; then
19805    # Oops. Which didn't find the executable.
19806    # The splitting of arguments from the executable at a space might have been incorrect,
19807    # since paths with space are more likely in Windows. Give it another try with the whole
19808    # argument.
19809    path="$complete"
19810    arguments="EOL"
19811    new_path=`$CYGPATH -u "$path"`
19812    new_path=`$WHICH "$new_path" 2> /dev/null`
19813    # bat and cmd files are not always considered executable in cygwin causing which
19814    # to not find them
19815    if test "x$new_path" = x \
19816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19818      new_path=`$CYGPATH -u "$path"`
19819    fi
19820    if test "x$new_path" = x; then
19821      # It's still not found. Now this is an unrecoverable error.
19822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19824      has_space=`$ECHO "$complete" | $GREP " "`
19825      if test "x$has_space" != x; then
19826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19828      fi
19829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19830    fi
19831  fi
19832
19833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19836  # "foo.exe" is OK but "foo" is an error.
19837  #
19838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19839  # It is also a way to make sure we got the proper file name for the real test later on.
19840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19841  if test "x$test_shortpath" = x; then
19842    # Short path failed, file does not exist as specified.
19843    # Try adding .exe or .cmd
19844    if test -f "${new_path}.exe"; then
19845      input_to_shortpath="${new_path}.exe"
19846    elif test -f "${new_path}.cmd"; then
19847      input_to_shortpath="${new_path}.cmd"
19848    else
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19854    fi
19855  else
19856    input_to_shortpath="$new_path"
19857  fi
19858
19859  # Call helper function which possibly converts this using DOS-style short mode.
19860  # If so, the updated path is stored in $new_path.
19861  new_path="$input_to_shortpath"
19862
19863  input_path="$input_to_shortpath"
19864  # Check if we need to convert this using DOS-style short mode. If the path
19865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19866  # take no chances and rewrite it.
19867  # Note: m4 eats our [], so we need to use [ and ] instead.
19868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19869  if test "x$has_forbidden_chars" != x; then
19870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19874      # Going to short mode and back again did indeed matter. Since short mode is
19875      # case insensitive, let's make it lowercase to improve readability.
19876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19877      # Now convert it back to Unix-style (cygpath)
19878      input_path=`$CYGPATH -u "$shortmode_path"`
19879      new_path="$input_path"
19880    fi
19881  fi
19882
19883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19884  if test "x$test_cygdrive_prefix" = x; then
19885    # As a simple fix, exclude /usr/bin since it's not a real path.
19886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19888      # a path prefixed by /cygdrive for fixpath to work.
19889      new_path="$CYGWIN_ROOT_PATH$input_path"
19890    fi
19891  fi
19892
19893  # remove trailing .exe if any
19894  new_path="${new_path/%.exe/}"
19895
19896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19897
19898  # First separate the path from the arguments. This will split at the first
19899  # space.
19900  complete="$FOUND_MAKE"
19901  path="${complete%% *}"
19902  tmp="$complete EOL"
19903  arguments="${tmp#* }"
19904
19905  # Input might be given as Windows format, start by converting to
19906  # unix format.
19907  new_path="$path"
19908
19909  windows_path="$new_path"
19910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19911    unix_path=`$CYGPATH -u "$windows_path"`
19912    new_path="$unix_path"
19913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19915    new_path="$unix_path"
19916  fi
19917
19918
19919  # Now try to locate executable using which
19920  new_path=`$WHICH "$new_path" 2> /dev/null`
19921
19922  if test "x$new_path" = x; then
19923    # Oops. Which didn't find the executable.
19924    # The splitting of arguments from the executable at a space might have been incorrect,
19925    # since paths with space are more likely in Windows. Give it another try with the whole
19926    # argument.
19927    path="$complete"
19928    arguments="EOL"
19929    new_path="$path"
19930
19931  windows_path="$new_path"
19932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19933    unix_path=`$CYGPATH -u "$windows_path"`
19934    new_path="$unix_path"
19935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19937    new_path="$unix_path"
19938  fi
19939
19940
19941    new_path=`$WHICH "$new_path" 2> /dev/null`
19942    # bat and cmd files are not always considered executable in MSYS causing which
19943    # to not find them
19944    if test "x$new_path" = x \
19945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19947      new_path="$path"
19948
19949  windows_path="$new_path"
19950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951    unix_path=`$CYGPATH -u "$windows_path"`
19952    new_path="$unix_path"
19953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19955    new_path="$unix_path"
19956  fi
19957
19958    fi
19959
19960    if test "x$new_path" = x; then
19961      # It's still not found. Now this is an unrecoverable error.
19962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19964      has_space=`$ECHO "$complete" | $GREP " "`
19965      if test "x$has_space" != x; then
19966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19968      fi
19969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19970    fi
19971  fi
19972
19973  # Now new_path has a complete unix path to the binary
19974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19975    # Keep paths in /bin as-is, but remove trailing .exe if any
19976    new_path="${new_path/%.exe/}"
19977    # Do not save /bin paths to all_fixpath_prefixes!
19978  else
19979    # Not in mixed or Windows style, start by that.
19980    new_path=`cmd //c echo $new_path`
19981
19982  input_path="$new_path"
19983  # Check if we need to convert this using DOS-style short mode. If the path
19984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19985  # take no chances and rewrite it.
19986  # Note: m4 eats our [], so we need to use [ and ] instead.
19987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19988  if test "x$has_forbidden_chars" != x; then
19989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19991  fi
19992
19993    # Output is in $new_path
19994
19995  windows_path="$new_path"
19996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19997    unix_path=`$CYGPATH -u "$windows_path"`
19998    new_path="$unix_path"
19999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20001    new_path="$unix_path"
20002  fi
20003
20004    # remove trailing .exe if any
20005    new_path="${new_path/%.exe/}"
20006
20007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20009  fi
20010
20011    else
20012      # We're on a unix platform. Hooray! :)
20013      # First separate the path from the arguments. This will split at the first
20014      # space.
20015      complete="$FOUND_MAKE"
20016      path="${complete%% *}"
20017      tmp="$complete EOL"
20018      arguments="${tmp#* }"
20019
20020      # Cannot rely on the command "which" here since it doesn't always work.
20021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20022      if test -z "$is_absolute_path"; then
20023        # Path to executable is not absolute. Find it.
20024        IFS_save="$IFS"
20025        IFS=:
20026        for p in $PATH; do
20027          if test -f "$p/$path" && test -x "$p/$path"; then
20028            new_path="$p/$path"
20029            break
20030          fi
20031        done
20032        IFS="$IFS_save"
20033      else
20034        # This is an absolute path, we can use it without further modifications.
20035        new_path="$path"
20036      fi
20037
20038      if test "x$new_path" = x; then
20039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20041        has_space=`$ECHO "$complete" | $GREP " "`
20042        if test "x$has_space" != x; then
20043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20045        fi
20046        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20047      fi
20048    fi
20049
20050    # Now join together the path and the arguments once again
20051    if test "x$arguments" != xEOL; then
20052      new_complete="$new_path ${arguments% *}"
20053    else
20054      new_complete="$new_path"
20055    fi
20056
20057    if test "x$complete" != "x$new_complete"; then
20058      FOUND_MAKE="$new_complete"
20059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20061    fi
20062  fi
20063
20064        fi
20065      fi
20066    fi
20067  fi
20068
20069    if test "x$FOUND_MAKE" = x; then
20070      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20071    fi
20072
20073  fi
20074
20075
20076  MAKE=$FOUND_MAKE
20077
20078  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20079$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20080
20081
20082  # Check if make supports the output sync option and if so, setup using it.
20083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20084$as_echo_n "checking if make --output-sync is supported... " >&6; }
20085  if $MAKE --version -O > /dev/null 2>&1; then
20086    OUTPUT_SYNC_SUPPORTED=true
20087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20088$as_echo "yes" >&6; }
20089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20090$as_echo_n "checking for output-sync value... " >&6; }
20091
20092# Check whether --with-output-sync was given.
20093if test "${with_output_sync+set}" = set; then :
20094  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20095fi
20096
20097    if test "x$OUTPUT_SYNC" = "x"; then
20098      OUTPUT_SYNC=none
20099    fi
20100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20101$as_echo "$OUTPUT_SYNC" >&6; }
20102    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20103      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20104    fi
20105  else
20106    OUTPUT_SYNC_SUPPORTED=false
20107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20108$as_echo "no" >&6; }
20109  fi
20110
20111
20112
20113
20114
20115
20116  # Test if find supports -delete
20117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20118$as_echo_n "checking if find supports -delete... " >&6; }
20119  FIND_DELETE="-delete"
20120
20121  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20122
20123  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20124
20125  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20126  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20127    # No, it does not.
20128    rm $DELETEDIR/TestIfFindSupportsDelete
20129    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20130      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20131      FIND_DELETE="-print | xargs rm"
20132    else
20133      FIND_DELETE="-exec rm \{\} \+"
20134    fi
20135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20136$as_echo "no" >&6; }
20137  else
20138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20139$as_echo "yes" >&6; }
20140  fi
20141  rmdir $DELETEDIR
20142
20143
20144
20145  # These tools might not be installed by default,
20146  # need hint on how to install them.
20147
20148
20149
20150  # Publish this variable in the help.
20151
20152
20153  if [ -z "${UNZIP+x}" ]; then
20154    # The variable is not set by user, try to locate tool using the code snippet
20155    for ac_prog in unzip
20156do
20157  # Extract the first word of "$ac_prog", so it can be a program name with args.
20158set dummy $ac_prog; ac_word=$2
20159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20160$as_echo_n "checking for $ac_word... " >&6; }
20161if ${ac_cv_path_UNZIP+:} false; then :
20162  $as_echo_n "(cached) " >&6
20163else
20164  case $UNZIP in
20165  [\\/]* | ?:[\\/]*)
20166  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20167  ;;
20168  *)
20169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20170for as_dir in $PATH
20171do
20172  IFS=$as_save_IFS
20173  test -z "$as_dir" && as_dir=.
20174    for ac_exec_ext in '' $ac_executable_extensions; do
20175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20176    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20178    break 2
20179  fi
20180done
20181  done
20182IFS=$as_save_IFS
20183
20184  ;;
20185esac
20186fi
20187UNZIP=$ac_cv_path_UNZIP
20188if test -n "$UNZIP"; then
20189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20190$as_echo "$UNZIP" >&6; }
20191else
20192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20193$as_echo "no" >&6; }
20194fi
20195
20196
20197  test -n "$UNZIP" && break
20198done
20199
20200  else
20201    # The variable is set, but is it from the command line or the environment?
20202
20203    # Try to remove the string !UNZIP! from our list.
20204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20206      # If it failed, the variable was not from the command line. Ignore it,
20207      # but warn the user (except for BASH, which is always set by the calling BASH).
20208      if test "xUNZIP" != xBASH; then
20209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20210$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20211      fi
20212      # Try to locate tool using the code snippet
20213      for ac_prog in unzip
20214do
20215  # Extract the first word of "$ac_prog", so it can be a program name with args.
20216set dummy $ac_prog; ac_word=$2
20217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20218$as_echo_n "checking for $ac_word... " >&6; }
20219if ${ac_cv_path_UNZIP+:} false; then :
20220  $as_echo_n "(cached) " >&6
20221else
20222  case $UNZIP in
20223  [\\/]* | ?:[\\/]*)
20224  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20225  ;;
20226  *)
20227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20228for as_dir in $PATH
20229do
20230  IFS=$as_save_IFS
20231  test -z "$as_dir" && as_dir=.
20232    for ac_exec_ext in '' $ac_executable_extensions; do
20233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20234    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20236    break 2
20237  fi
20238done
20239  done
20240IFS=$as_save_IFS
20241
20242  ;;
20243esac
20244fi
20245UNZIP=$ac_cv_path_UNZIP
20246if test -n "$UNZIP"; then
20247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20248$as_echo "$UNZIP" >&6; }
20249else
20250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20251$as_echo "no" >&6; }
20252fi
20253
20254
20255  test -n "$UNZIP" && break
20256done
20257
20258    else
20259      # If it succeeded, then it was overridden by the user. We will use it
20260      # for the tool.
20261
20262      # First remove it from the list of overridden variables, so we can test
20263      # for unknown variables in the end.
20264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20265
20266      # Check if we try to supply an empty value
20267      if test "x$UNZIP" = x; then
20268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20269$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20271$as_echo_n "checking for UNZIP... " >&6; }
20272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20273$as_echo "disabled" >&6; }
20274      else
20275        # Check if the provided tool contains a complete path.
20276        tool_specified="$UNZIP"
20277        tool_basename="${tool_specified##*/}"
20278        if test "x$tool_basename" = "x$tool_specified"; then
20279          # A command without a complete path is provided, search $PATH.
20280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20281$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20282          # Extract the first word of "$tool_basename", so it can be a program name with args.
20283set dummy $tool_basename; ac_word=$2
20284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20285$as_echo_n "checking for $ac_word... " >&6; }
20286if ${ac_cv_path_UNZIP+:} false; then :
20287  $as_echo_n "(cached) " >&6
20288else
20289  case $UNZIP in
20290  [\\/]* | ?:[\\/]*)
20291  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20292  ;;
20293  *)
20294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20295for as_dir in $PATH
20296do
20297  IFS=$as_save_IFS
20298  test -z "$as_dir" && as_dir=.
20299    for ac_exec_ext in '' $ac_executable_extensions; do
20300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20301    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20303    break 2
20304  fi
20305done
20306  done
20307IFS=$as_save_IFS
20308
20309  ;;
20310esac
20311fi
20312UNZIP=$ac_cv_path_UNZIP
20313if test -n "$UNZIP"; then
20314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20315$as_echo "$UNZIP" >&6; }
20316else
20317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20318$as_echo "no" >&6; }
20319fi
20320
20321
20322          if test "x$UNZIP" = x; then
20323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20324          fi
20325        else
20326          # Otherwise we believe it is a complete path. Use it as it is.
20327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20328$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20330$as_echo_n "checking for UNZIP... " >&6; }
20331          if test ! -x "$tool_specified"; then
20332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20333$as_echo "not found" >&6; }
20334            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20335          fi
20336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20337$as_echo "$tool_specified" >&6; }
20338        fi
20339      fi
20340    fi
20341
20342  fi
20343
20344
20345
20346  if test "x$UNZIP" = x; then
20347    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20348  fi
20349
20350
20351
20352
20353
20354  # Publish this variable in the help.
20355
20356
20357  if [ -z "${ZIP+x}" ]; then
20358    # The variable is not set by user, try to locate tool using the code snippet
20359    for ac_prog in zip
20360do
20361  # Extract the first word of "$ac_prog", so it can be a program name with args.
20362set dummy $ac_prog; ac_word=$2
20363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20364$as_echo_n "checking for $ac_word... " >&6; }
20365if ${ac_cv_path_ZIP+:} false; then :
20366  $as_echo_n "(cached) " >&6
20367else
20368  case $ZIP in
20369  [\\/]* | ?:[\\/]*)
20370  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20371  ;;
20372  *)
20373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20374for as_dir in $PATH
20375do
20376  IFS=$as_save_IFS
20377  test -z "$as_dir" && as_dir=.
20378    for ac_exec_ext in '' $ac_executable_extensions; do
20379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20380    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20382    break 2
20383  fi
20384done
20385  done
20386IFS=$as_save_IFS
20387
20388  ;;
20389esac
20390fi
20391ZIP=$ac_cv_path_ZIP
20392if test -n "$ZIP"; then
20393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20394$as_echo "$ZIP" >&6; }
20395else
20396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20397$as_echo "no" >&6; }
20398fi
20399
20400
20401  test -n "$ZIP" && break
20402done
20403
20404  else
20405    # The variable is set, but is it from the command line or the environment?
20406
20407    # Try to remove the string !ZIP! from our list.
20408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20410      # If it failed, the variable was not from the command line. Ignore it,
20411      # but warn the user (except for BASH, which is always set by the calling BASH).
20412      if test "xZIP" != xBASH; then
20413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20414$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20415      fi
20416      # Try to locate tool using the code snippet
20417      for ac_prog in zip
20418do
20419  # Extract the first word of "$ac_prog", so it can be a program name with args.
20420set dummy $ac_prog; ac_word=$2
20421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20422$as_echo_n "checking for $ac_word... " >&6; }
20423if ${ac_cv_path_ZIP+:} false; then :
20424  $as_echo_n "(cached) " >&6
20425else
20426  case $ZIP in
20427  [\\/]* | ?:[\\/]*)
20428  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20429  ;;
20430  *)
20431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20432for as_dir in $PATH
20433do
20434  IFS=$as_save_IFS
20435  test -z "$as_dir" && as_dir=.
20436    for ac_exec_ext in '' $ac_executable_extensions; do
20437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20438    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20440    break 2
20441  fi
20442done
20443  done
20444IFS=$as_save_IFS
20445
20446  ;;
20447esac
20448fi
20449ZIP=$ac_cv_path_ZIP
20450if test -n "$ZIP"; then
20451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20452$as_echo "$ZIP" >&6; }
20453else
20454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20455$as_echo "no" >&6; }
20456fi
20457
20458
20459  test -n "$ZIP" && break
20460done
20461
20462    else
20463      # If it succeeded, then it was overridden by the user. We will use it
20464      # for the tool.
20465
20466      # First remove it from the list of overridden variables, so we can test
20467      # for unknown variables in the end.
20468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20469
20470      # Check if we try to supply an empty value
20471      if test "x$ZIP" = x; then
20472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20473$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20475$as_echo_n "checking for ZIP... " >&6; }
20476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20477$as_echo "disabled" >&6; }
20478      else
20479        # Check if the provided tool contains a complete path.
20480        tool_specified="$ZIP"
20481        tool_basename="${tool_specified##*/}"
20482        if test "x$tool_basename" = "x$tool_specified"; then
20483          # A command without a complete path is provided, search $PATH.
20484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20485$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20486          # Extract the first word of "$tool_basename", so it can be a program name with args.
20487set dummy $tool_basename; ac_word=$2
20488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20489$as_echo_n "checking for $ac_word... " >&6; }
20490if ${ac_cv_path_ZIP+:} false; then :
20491  $as_echo_n "(cached) " >&6
20492else
20493  case $ZIP in
20494  [\\/]* | ?:[\\/]*)
20495  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20496  ;;
20497  *)
20498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20499for as_dir in $PATH
20500do
20501  IFS=$as_save_IFS
20502  test -z "$as_dir" && as_dir=.
20503    for ac_exec_ext in '' $ac_executable_extensions; do
20504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20505    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20507    break 2
20508  fi
20509done
20510  done
20511IFS=$as_save_IFS
20512
20513  ;;
20514esac
20515fi
20516ZIP=$ac_cv_path_ZIP
20517if test -n "$ZIP"; then
20518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20519$as_echo "$ZIP" >&6; }
20520else
20521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20522$as_echo "no" >&6; }
20523fi
20524
20525
20526          if test "x$ZIP" = x; then
20527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20528          fi
20529        else
20530          # Otherwise we believe it is a complete path. Use it as it is.
20531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20532$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20534$as_echo_n "checking for ZIP... " >&6; }
20535          if test ! -x "$tool_specified"; then
20536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20537$as_echo "not found" >&6; }
20538            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20539          fi
20540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20541$as_echo "$tool_specified" >&6; }
20542        fi
20543      fi
20544    fi
20545
20546  fi
20547
20548
20549
20550  if test "x$ZIP" = x; then
20551    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20552  fi
20553
20554
20555
20556  # Non-required basic tools
20557
20558
20559
20560  # Publish this variable in the help.
20561
20562
20563  if [ -z "${LDD+x}" ]; then
20564    # The variable is not set by user, try to locate tool using the code snippet
20565    for ac_prog in ldd
20566do
20567  # Extract the first word of "$ac_prog", so it can be a program name with args.
20568set dummy $ac_prog; ac_word=$2
20569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20570$as_echo_n "checking for $ac_word... " >&6; }
20571if ${ac_cv_path_LDD+:} false; then :
20572  $as_echo_n "(cached) " >&6
20573else
20574  case $LDD in
20575  [\\/]* | ?:[\\/]*)
20576  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20577  ;;
20578  *)
20579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20580for as_dir in $PATH
20581do
20582  IFS=$as_save_IFS
20583  test -z "$as_dir" && as_dir=.
20584    for ac_exec_ext in '' $ac_executable_extensions; do
20585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20586    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20588    break 2
20589  fi
20590done
20591  done
20592IFS=$as_save_IFS
20593
20594  ;;
20595esac
20596fi
20597LDD=$ac_cv_path_LDD
20598if test -n "$LDD"; then
20599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20600$as_echo "$LDD" >&6; }
20601else
20602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20603$as_echo "no" >&6; }
20604fi
20605
20606
20607  test -n "$LDD" && break
20608done
20609
20610  else
20611    # The variable is set, but is it from the command line or the environment?
20612
20613    # Try to remove the string !LDD! from our list.
20614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20616      # If it failed, the variable was not from the command line. Ignore it,
20617      # but warn the user (except for BASH, which is always set by the calling BASH).
20618      if test "xLDD" != xBASH; then
20619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20620$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20621      fi
20622      # Try to locate tool using the code snippet
20623      for ac_prog in ldd
20624do
20625  # Extract the first word of "$ac_prog", so it can be a program name with args.
20626set dummy $ac_prog; ac_word=$2
20627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20628$as_echo_n "checking for $ac_word... " >&6; }
20629if ${ac_cv_path_LDD+:} false; then :
20630  $as_echo_n "(cached) " >&6
20631else
20632  case $LDD in
20633  [\\/]* | ?:[\\/]*)
20634  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20635  ;;
20636  *)
20637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20638for as_dir in $PATH
20639do
20640  IFS=$as_save_IFS
20641  test -z "$as_dir" && as_dir=.
20642    for ac_exec_ext in '' $ac_executable_extensions; do
20643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20644    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20646    break 2
20647  fi
20648done
20649  done
20650IFS=$as_save_IFS
20651
20652  ;;
20653esac
20654fi
20655LDD=$ac_cv_path_LDD
20656if test -n "$LDD"; then
20657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20658$as_echo "$LDD" >&6; }
20659else
20660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20661$as_echo "no" >&6; }
20662fi
20663
20664
20665  test -n "$LDD" && break
20666done
20667
20668    else
20669      # If it succeeded, then it was overridden by the user. We will use it
20670      # for the tool.
20671
20672      # First remove it from the list of overridden variables, so we can test
20673      # for unknown variables in the end.
20674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20675
20676      # Check if we try to supply an empty value
20677      if test "x$LDD" = x; then
20678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20679$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20681$as_echo_n "checking for LDD... " >&6; }
20682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20683$as_echo "disabled" >&6; }
20684      else
20685        # Check if the provided tool contains a complete path.
20686        tool_specified="$LDD"
20687        tool_basename="${tool_specified##*/}"
20688        if test "x$tool_basename" = "x$tool_specified"; then
20689          # A command without a complete path is provided, search $PATH.
20690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20691$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20692          # Extract the first word of "$tool_basename", so it can be a program name with args.
20693set dummy $tool_basename; ac_word=$2
20694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20695$as_echo_n "checking for $ac_word... " >&6; }
20696if ${ac_cv_path_LDD+:} false; then :
20697  $as_echo_n "(cached) " >&6
20698else
20699  case $LDD in
20700  [\\/]* | ?:[\\/]*)
20701  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20702  ;;
20703  *)
20704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20705for as_dir in $PATH
20706do
20707  IFS=$as_save_IFS
20708  test -z "$as_dir" && as_dir=.
20709    for ac_exec_ext in '' $ac_executable_extensions; do
20710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20711    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20713    break 2
20714  fi
20715done
20716  done
20717IFS=$as_save_IFS
20718
20719  ;;
20720esac
20721fi
20722LDD=$ac_cv_path_LDD
20723if test -n "$LDD"; then
20724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20725$as_echo "$LDD" >&6; }
20726else
20727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20728$as_echo "no" >&6; }
20729fi
20730
20731
20732          if test "x$LDD" = x; then
20733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20734          fi
20735        else
20736          # Otherwise we believe it is a complete path. Use it as it is.
20737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20738$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20740$as_echo_n "checking for LDD... " >&6; }
20741          if test ! -x "$tool_specified"; then
20742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20743$as_echo "not found" >&6; }
20744            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20745          fi
20746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20747$as_echo "$tool_specified" >&6; }
20748        fi
20749      fi
20750    fi
20751
20752  fi
20753
20754
20755  if test "x$LDD" = "x"; then
20756    # List shared lib dependencies is used for
20757    # debug output and checking for forbidden dependencies.
20758    # We can build without it.
20759    LDD="true"
20760  fi
20761
20762
20763  # Publish this variable in the help.
20764
20765
20766  if [ -z "${OTOOL+x}" ]; then
20767    # The variable is not set by user, try to locate tool using the code snippet
20768    for ac_prog in otool
20769do
20770  # Extract the first word of "$ac_prog", so it can be a program name with args.
20771set dummy $ac_prog; ac_word=$2
20772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20773$as_echo_n "checking for $ac_word... " >&6; }
20774if ${ac_cv_path_OTOOL+:} false; then :
20775  $as_echo_n "(cached) " >&6
20776else
20777  case $OTOOL in
20778  [\\/]* | ?:[\\/]*)
20779  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20780  ;;
20781  *)
20782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20783for as_dir in $PATH
20784do
20785  IFS=$as_save_IFS
20786  test -z "$as_dir" && as_dir=.
20787    for ac_exec_ext in '' $ac_executable_extensions; do
20788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20789    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20791    break 2
20792  fi
20793done
20794  done
20795IFS=$as_save_IFS
20796
20797  ;;
20798esac
20799fi
20800OTOOL=$ac_cv_path_OTOOL
20801if test -n "$OTOOL"; then
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20803$as_echo "$OTOOL" >&6; }
20804else
20805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20806$as_echo "no" >&6; }
20807fi
20808
20809
20810  test -n "$OTOOL" && break
20811done
20812
20813  else
20814    # The variable is set, but is it from the command line or the environment?
20815
20816    # Try to remove the string !OTOOL! from our list.
20817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20819      # If it failed, the variable was not from the command line. Ignore it,
20820      # but warn the user (except for BASH, which is always set by the calling BASH).
20821      if test "xOTOOL" != xBASH; then
20822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20823$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20824      fi
20825      # Try to locate tool using the code snippet
20826      for ac_prog in otool
20827do
20828  # Extract the first word of "$ac_prog", so it can be a program name with args.
20829set dummy $ac_prog; ac_word=$2
20830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20831$as_echo_n "checking for $ac_word... " >&6; }
20832if ${ac_cv_path_OTOOL+:} false; then :
20833  $as_echo_n "(cached) " >&6
20834else
20835  case $OTOOL in
20836  [\\/]* | ?:[\\/]*)
20837  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20838  ;;
20839  *)
20840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20841for as_dir in $PATH
20842do
20843  IFS=$as_save_IFS
20844  test -z "$as_dir" && as_dir=.
20845    for ac_exec_ext in '' $ac_executable_extensions; do
20846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20847    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20849    break 2
20850  fi
20851done
20852  done
20853IFS=$as_save_IFS
20854
20855  ;;
20856esac
20857fi
20858OTOOL=$ac_cv_path_OTOOL
20859if test -n "$OTOOL"; then
20860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20861$as_echo "$OTOOL" >&6; }
20862else
20863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20864$as_echo "no" >&6; }
20865fi
20866
20867
20868  test -n "$OTOOL" && break
20869done
20870
20871    else
20872      # If it succeeded, then it was overridden by the user. We will use it
20873      # for the tool.
20874
20875      # First remove it from the list of overridden variables, so we can test
20876      # for unknown variables in the end.
20877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20878
20879      # Check if we try to supply an empty value
20880      if test "x$OTOOL" = x; then
20881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20882$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20884$as_echo_n "checking for OTOOL... " >&6; }
20885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20886$as_echo "disabled" >&6; }
20887      else
20888        # Check if the provided tool contains a complete path.
20889        tool_specified="$OTOOL"
20890        tool_basename="${tool_specified##*/}"
20891        if test "x$tool_basename" = "x$tool_specified"; then
20892          # A command without a complete path is provided, search $PATH.
20893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20894$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20895          # Extract the first word of "$tool_basename", so it can be a program name with args.
20896set dummy $tool_basename; ac_word=$2
20897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20898$as_echo_n "checking for $ac_word... " >&6; }
20899if ${ac_cv_path_OTOOL+:} false; then :
20900  $as_echo_n "(cached) " >&6
20901else
20902  case $OTOOL in
20903  [\\/]* | ?:[\\/]*)
20904  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20905  ;;
20906  *)
20907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20908for as_dir in $PATH
20909do
20910  IFS=$as_save_IFS
20911  test -z "$as_dir" && as_dir=.
20912    for ac_exec_ext in '' $ac_executable_extensions; do
20913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20914    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20916    break 2
20917  fi
20918done
20919  done
20920IFS=$as_save_IFS
20921
20922  ;;
20923esac
20924fi
20925OTOOL=$ac_cv_path_OTOOL
20926if test -n "$OTOOL"; then
20927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20928$as_echo "$OTOOL" >&6; }
20929else
20930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20931$as_echo "no" >&6; }
20932fi
20933
20934
20935          if test "x$OTOOL" = x; then
20936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20937          fi
20938        else
20939          # Otherwise we believe it is a complete path. Use it as it is.
20940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20941$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20943$as_echo_n "checking for OTOOL... " >&6; }
20944          if test ! -x "$tool_specified"; then
20945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20946$as_echo "not found" >&6; }
20947            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20948          fi
20949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20950$as_echo "$tool_specified" >&6; }
20951        fi
20952      fi
20953    fi
20954
20955  fi
20956
20957
20958  if test "x$OTOOL" = "x"; then
20959    OTOOL="true"
20960  fi
20961
20962
20963  # Publish this variable in the help.
20964
20965
20966  if [ -z "${READELF+x}" ]; then
20967    # The variable is not set by user, try to locate tool using the code snippet
20968    for ac_prog in greadelf readelf
20969do
20970  # Extract the first word of "$ac_prog", so it can be a program name with args.
20971set dummy $ac_prog; ac_word=$2
20972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20973$as_echo_n "checking for $ac_word... " >&6; }
20974if ${ac_cv_path_READELF+:} false; then :
20975  $as_echo_n "(cached) " >&6
20976else
20977  case $READELF in
20978  [\\/]* | ?:[\\/]*)
20979  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
20980  ;;
20981  *)
20982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20983for as_dir in $PATH
20984do
20985  IFS=$as_save_IFS
20986  test -z "$as_dir" && as_dir=.
20987    for ac_exec_ext in '' $ac_executable_extensions; do
20988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20989    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
20990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20991    break 2
20992  fi
20993done
20994  done
20995IFS=$as_save_IFS
20996
20997  ;;
20998esac
20999fi
21000READELF=$ac_cv_path_READELF
21001if test -n "$READELF"; then
21002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21003$as_echo "$READELF" >&6; }
21004else
21005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21006$as_echo "no" >&6; }
21007fi
21008
21009
21010  test -n "$READELF" && break
21011done
21012
21013  else
21014    # The variable is set, but is it from the command line or the environment?
21015
21016    # Try to remove the string !READELF! from our list.
21017    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21018    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21019      # If it failed, the variable was not from the command line. Ignore it,
21020      # but warn the user (except for BASH, which is always set by the calling BASH).
21021      if test "xREADELF" != xBASH; then
21022        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21023$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21024      fi
21025      # Try to locate tool using the code snippet
21026      for ac_prog in greadelf readelf
21027do
21028  # Extract the first word of "$ac_prog", so it can be a program name with args.
21029set dummy $ac_prog; ac_word=$2
21030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21031$as_echo_n "checking for $ac_word... " >&6; }
21032if ${ac_cv_path_READELF+:} false; then :
21033  $as_echo_n "(cached) " >&6
21034else
21035  case $READELF in
21036  [\\/]* | ?:[\\/]*)
21037  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21038  ;;
21039  *)
21040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21041for as_dir in $PATH
21042do
21043  IFS=$as_save_IFS
21044  test -z "$as_dir" && as_dir=.
21045    for ac_exec_ext in '' $ac_executable_extensions; do
21046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21047    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21049    break 2
21050  fi
21051done
21052  done
21053IFS=$as_save_IFS
21054
21055  ;;
21056esac
21057fi
21058READELF=$ac_cv_path_READELF
21059if test -n "$READELF"; then
21060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21061$as_echo "$READELF" >&6; }
21062else
21063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21064$as_echo "no" >&6; }
21065fi
21066
21067
21068  test -n "$READELF" && break
21069done
21070
21071    else
21072      # If it succeeded, then it was overridden by the user. We will use it
21073      # for the tool.
21074
21075      # First remove it from the list of overridden variables, so we can test
21076      # for unknown variables in the end.
21077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21078
21079      # Check if we try to supply an empty value
21080      if test "x$READELF" = x; then
21081        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21082$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21083        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21084$as_echo_n "checking for READELF... " >&6; }
21085        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21086$as_echo "disabled" >&6; }
21087      else
21088        # Check if the provided tool contains a complete path.
21089        tool_specified="$READELF"
21090        tool_basename="${tool_specified##*/}"
21091        if test "x$tool_basename" = "x$tool_specified"; then
21092          # A command without a complete path is provided, search $PATH.
21093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21094$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21095          # Extract the first word of "$tool_basename", so it can be a program name with args.
21096set dummy $tool_basename; ac_word=$2
21097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21098$as_echo_n "checking for $ac_word... " >&6; }
21099if ${ac_cv_path_READELF+:} false; then :
21100  $as_echo_n "(cached) " >&6
21101else
21102  case $READELF in
21103  [\\/]* | ?:[\\/]*)
21104  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21105  ;;
21106  *)
21107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21108for as_dir in $PATH
21109do
21110  IFS=$as_save_IFS
21111  test -z "$as_dir" && as_dir=.
21112    for ac_exec_ext in '' $ac_executable_extensions; do
21113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21114    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21116    break 2
21117  fi
21118done
21119  done
21120IFS=$as_save_IFS
21121
21122  ;;
21123esac
21124fi
21125READELF=$ac_cv_path_READELF
21126if test -n "$READELF"; then
21127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21128$as_echo "$READELF" >&6; }
21129else
21130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21131$as_echo "no" >&6; }
21132fi
21133
21134
21135          if test "x$READELF" = x; then
21136            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21137          fi
21138        else
21139          # Otherwise we believe it is a complete path. Use it as it is.
21140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21141$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21142          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21143$as_echo_n "checking for READELF... " >&6; }
21144          if test ! -x "$tool_specified"; then
21145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21146$as_echo "not found" >&6; }
21147            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21148          fi
21149          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21150$as_echo "$tool_specified" >&6; }
21151        fi
21152      fi
21153    fi
21154
21155  fi
21156
21157
21158
21159
21160  # Publish this variable in the help.
21161
21162
21163  if [ -z "${HG+x}" ]; then
21164    # The variable is not set by user, try to locate tool using the code snippet
21165    for ac_prog in hg
21166do
21167  # Extract the first word of "$ac_prog", so it can be a program name with args.
21168set dummy $ac_prog; ac_word=$2
21169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21170$as_echo_n "checking for $ac_word... " >&6; }
21171if ${ac_cv_path_HG+:} false; then :
21172  $as_echo_n "(cached) " >&6
21173else
21174  case $HG in
21175  [\\/]* | ?:[\\/]*)
21176  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21177  ;;
21178  *)
21179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21180for as_dir in $PATH
21181do
21182  IFS=$as_save_IFS
21183  test -z "$as_dir" && as_dir=.
21184    for ac_exec_ext in '' $ac_executable_extensions; do
21185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21186    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21188    break 2
21189  fi
21190done
21191  done
21192IFS=$as_save_IFS
21193
21194  ;;
21195esac
21196fi
21197HG=$ac_cv_path_HG
21198if test -n "$HG"; then
21199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21200$as_echo "$HG" >&6; }
21201else
21202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21203$as_echo "no" >&6; }
21204fi
21205
21206
21207  test -n "$HG" && break
21208done
21209
21210  else
21211    # The variable is set, but is it from the command line or the environment?
21212
21213    # Try to remove the string !HG! from our list.
21214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21216      # If it failed, the variable was not from the command line. Ignore it,
21217      # but warn the user (except for BASH, which is always set by the calling BASH).
21218      if test "xHG" != xBASH; then
21219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21220$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21221      fi
21222      # Try to locate tool using the code snippet
21223      for ac_prog in hg
21224do
21225  # Extract the first word of "$ac_prog", so it can be a program name with args.
21226set dummy $ac_prog; ac_word=$2
21227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21228$as_echo_n "checking for $ac_word... " >&6; }
21229if ${ac_cv_path_HG+:} false; then :
21230  $as_echo_n "(cached) " >&6
21231else
21232  case $HG in
21233  [\\/]* | ?:[\\/]*)
21234  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21235  ;;
21236  *)
21237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21238for as_dir in $PATH
21239do
21240  IFS=$as_save_IFS
21241  test -z "$as_dir" && as_dir=.
21242    for ac_exec_ext in '' $ac_executable_extensions; do
21243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21244    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21246    break 2
21247  fi
21248done
21249  done
21250IFS=$as_save_IFS
21251
21252  ;;
21253esac
21254fi
21255HG=$ac_cv_path_HG
21256if test -n "$HG"; then
21257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21258$as_echo "$HG" >&6; }
21259else
21260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21261$as_echo "no" >&6; }
21262fi
21263
21264
21265  test -n "$HG" && break
21266done
21267
21268    else
21269      # If it succeeded, then it was overridden by the user. We will use it
21270      # for the tool.
21271
21272      # First remove it from the list of overridden variables, so we can test
21273      # for unknown variables in the end.
21274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21275
21276      # Check if we try to supply an empty value
21277      if test "x$HG" = x; then
21278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21279$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21281$as_echo_n "checking for HG... " >&6; }
21282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21283$as_echo "disabled" >&6; }
21284      else
21285        # Check if the provided tool contains a complete path.
21286        tool_specified="$HG"
21287        tool_basename="${tool_specified##*/}"
21288        if test "x$tool_basename" = "x$tool_specified"; then
21289          # A command without a complete path is provided, search $PATH.
21290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21291$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21292          # Extract the first word of "$tool_basename", so it can be a program name with args.
21293set dummy $tool_basename; ac_word=$2
21294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21295$as_echo_n "checking for $ac_word... " >&6; }
21296if ${ac_cv_path_HG+:} false; then :
21297  $as_echo_n "(cached) " >&6
21298else
21299  case $HG in
21300  [\\/]* | ?:[\\/]*)
21301  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21302  ;;
21303  *)
21304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21305for as_dir in $PATH
21306do
21307  IFS=$as_save_IFS
21308  test -z "$as_dir" && as_dir=.
21309    for ac_exec_ext in '' $ac_executable_extensions; do
21310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21311    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21313    break 2
21314  fi
21315done
21316  done
21317IFS=$as_save_IFS
21318
21319  ;;
21320esac
21321fi
21322HG=$ac_cv_path_HG
21323if test -n "$HG"; then
21324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21325$as_echo "$HG" >&6; }
21326else
21327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21328$as_echo "no" >&6; }
21329fi
21330
21331
21332          if test "x$HG" = x; then
21333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21334          fi
21335        else
21336          # Otherwise we believe it is a complete path. Use it as it is.
21337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21338$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21340$as_echo_n "checking for HG... " >&6; }
21341          if test ! -x "$tool_specified"; then
21342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21343$as_echo "not found" >&6; }
21344            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21345          fi
21346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21347$as_echo "$tool_specified" >&6; }
21348        fi
21349      fi
21350    fi
21351
21352  fi
21353
21354
21355
21356
21357  # Publish this variable in the help.
21358
21359
21360  if [ -z "${STAT+x}" ]; then
21361    # The variable is not set by user, try to locate tool using the code snippet
21362    for ac_prog in stat
21363do
21364  # Extract the first word of "$ac_prog", so it can be a program name with args.
21365set dummy $ac_prog; ac_word=$2
21366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21367$as_echo_n "checking for $ac_word... " >&6; }
21368if ${ac_cv_path_STAT+:} false; then :
21369  $as_echo_n "(cached) " >&6
21370else
21371  case $STAT in
21372  [\\/]* | ?:[\\/]*)
21373  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21374  ;;
21375  *)
21376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21377for as_dir in $PATH
21378do
21379  IFS=$as_save_IFS
21380  test -z "$as_dir" && as_dir=.
21381    for ac_exec_ext in '' $ac_executable_extensions; do
21382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21383    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21385    break 2
21386  fi
21387done
21388  done
21389IFS=$as_save_IFS
21390
21391  ;;
21392esac
21393fi
21394STAT=$ac_cv_path_STAT
21395if test -n "$STAT"; then
21396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21397$as_echo "$STAT" >&6; }
21398else
21399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21400$as_echo "no" >&6; }
21401fi
21402
21403
21404  test -n "$STAT" && break
21405done
21406
21407  else
21408    # The variable is set, but is it from the command line or the environment?
21409
21410    # Try to remove the string !STAT! from our list.
21411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21413      # If it failed, the variable was not from the command line. Ignore it,
21414      # but warn the user (except for BASH, which is always set by the calling BASH).
21415      if test "xSTAT" != xBASH; then
21416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21417$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21418      fi
21419      # Try to locate tool using the code snippet
21420      for ac_prog in stat
21421do
21422  # Extract the first word of "$ac_prog", so it can be a program name with args.
21423set dummy $ac_prog; ac_word=$2
21424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21425$as_echo_n "checking for $ac_word... " >&6; }
21426if ${ac_cv_path_STAT+:} false; then :
21427  $as_echo_n "(cached) " >&6
21428else
21429  case $STAT in
21430  [\\/]* | ?:[\\/]*)
21431  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21432  ;;
21433  *)
21434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21435for as_dir in $PATH
21436do
21437  IFS=$as_save_IFS
21438  test -z "$as_dir" && as_dir=.
21439    for ac_exec_ext in '' $ac_executable_extensions; do
21440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21441    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21443    break 2
21444  fi
21445done
21446  done
21447IFS=$as_save_IFS
21448
21449  ;;
21450esac
21451fi
21452STAT=$ac_cv_path_STAT
21453if test -n "$STAT"; then
21454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21455$as_echo "$STAT" >&6; }
21456else
21457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21458$as_echo "no" >&6; }
21459fi
21460
21461
21462  test -n "$STAT" && break
21463done
21464
21465    else
21466      # If it succeeded, then it was overridden by the user. We will use it
21467      # for the tool.
21468
21469      # First remove it from the list of overridden variables, so we can test
21470      # for unknown variables in the end.
21471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21472
21473      # Check if we try to supply an empty value
21474      if test "x$STAT" = x; then
21475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21476$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21478$as_echo_n "checking for STAT... " >&6; }
21479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21480$as_echo "disabled" >&6; }
21481      else
21482        # Check if the provided tool contains a complete path.
21483        tool_specified="$STAT"
21484        tool_basename="${tool_specified##*/}"
21485        if test "x$tool_basename" = "x$tool_specified"; then
21486          # A command without a complete path is provided, search $PATH.
21487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21488$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21489          # Extract the first word of "$tool_basename", so it can be a program name with args.
21490set dummy $tool_basename; ac_word=$2
21491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21492$as_echo_n "checking for $ac_word... " >&6; }
21493if ${ac_cv_path_STAT+:} false; then :
21494  $as_echo_n "(cached) " >&6
21495else
21496  case $STAT in
21497  [\\/]* | ?:[\\/]*)
21498  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21499  ;;
21500  *)
21501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21502for as_dir in $PATH
21503do
21504  IFS=$as_save_IFS
21505  test -z "$as_dir" && as_dir=.
21506    for ac_exec_ext in '' $ac_executable_extensions; do
21507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21508    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21510    break 2
21511  fi
21512done
21513  done
21514IFS=$as_save_IFS
21515
21516  ;;
21517esac
21518fi
21519STAT=$ac_cv_path_STAT
21520if test -n "$STAT"; then
21521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21522$as_echo "$STAT" >&6; }
21523else
21524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21525$as_echo "no" >&6; }
21526fi
21527
21528
21529          if test "x$STAT" = x; then
21530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21531          fi
21532        else
21533          # Otherwise we believe it is a complete path. Use it as it is.
21534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21535$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21537$as_echo_n "checking for STAT... " >&6; }
21538          if test ! -x "$tool_specified"; then
21539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21540$as_echo "not found" >&6; }
21541            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21542          fi
21543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21544$as_echo "$tool_specified" >&6; }
21545        fi
21546      fi
21547    fi
21548
21549  fi
21550
21551
21552
21553
21554  # Publish this variable in the help.
21555
21556
21557  if [ -z "${TIME+x}" ]; then
21558    # The variable is not set by user, try to locate tool using the code snippet
21559    for ac_prog in time
21560do
21561  # Extract the first word of "$ac_prog", so it can be a program name with args.
21562set dummy $ac_prog; ac_word=$2
21563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21564$as_echo_n "checking for $ac_word... " >&6; }
21565if ${ac_cv_path_TIME+:} false; then :
21566  $as_echo_n "(cached) " >&6
21567else
21568  case $TIME in
21569  [\\/]* | ?:[\\/]*)
21570  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21571  ;;
21572  *)
21573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21574for as_dir in $PATH
21575do
21576  IFS=$as_save_IFS
21577  test -z "$as_dir" && as_dir=.
21578    for ac_exec_ext in '' $ac_executable_extensions; do
21579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21580    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21582    break 2
21583  fi
21584done
21585  done
21586IFS=$as_save_IFS
21587
21588  ;;
21589esac
21590fi
21591TIME=$ac_cv_path_TIME
21592if test -n "$TIME"; then
21593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21594$as_echo "$TIME" >&6; }
21595else
21596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21597$as_echo "no" >&6; }
21598fi
21599
21600
21601  test -n "$TIME" && break
21602done
21603
21604  else
21605    # The variable is set, but is it from the command line or the environment?
21606
21607    # Try to remove the string !TIME! from our list.
21608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21610      # If it failed, the variable was not from the command line. Ignore it,
21611      # but warn the user (except for BASH, which is always set by the calling BASH).
21612      if test "xTIME" != xBASH; then
21613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21614$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21615      fi
21616      # Try to locate tool using the code snippet
21617      for ac_prog in time
21618do
21619  # Extract the first word of "$ac_prog", so it can be a program name with args.
21620set dummy $ac_prog; ac_word=$2
21621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21622$as_echo_n "checking for $ac_word... " >&6; }
21623if ${ac_cv_path_TIME+:} false; then :
21624  $as_echo_n "(cached) " >&6
21625else
21626  case $TIME in
21627  [\\/]* | ?:[\\/]*)
21628  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21629  ;;
21630  *)
21631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21632for as_dir in $PATH
21633do
21634  IFS=$as_save_IFS
21635  test -z "$as_dir" && as_dir=.
21636    for ac_exec_ext in '' $ac_executable_extensions; do
21637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21638    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21640    break 2
21641  fi
21642done
21643  done
21644IFS=$as_save_IFS
21645
21646  ;;
21647esac
21648fi
21649TIME=$ac_cv_path_TIME
21650if test -n "$TIME"; then
21651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21652$as_echo "$TIME" >&6; }
21653else
21654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21655$as_echo "no" >&6; }
21656fi
21657
21658
21659  test -n "$TIME" && break
21660done
21661
21662    else
21663      # If it succeeded, then it was overridden by the user. We will use it
21664      # for the tool.
21665
21666      # First remove it from the list of overridden variables, so we can test
21667      # for unknown variables in the end.
21668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21669
21670      # Check if we try to supply an empty value
21671      if test "x$TIME" = x; then
21672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21673$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21675$as_echo_n "checking for TIME... " >&6; }
21676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21677$as_echo "disabled" >&6; }
21678      else
21679        # Check if the provided tool contains a complete path.
21680        tool_specified="$TIME"
21681        tool_basename="${tool_specified##*/}"
21682        if test "x$tool_basename" = "x$tool_specified"; then
21683          # A command without a complete path is provided, search $PATH.
21684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21685$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21686          # Extract the first word of "$tool_basename", so it can be a program name with args.
21687set dummy $tool_basename; ac_word=$2
21688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21689$as_echo_n "checking for $ac_word... " >&6; }
21690if ${ac_cv_path_TIME+:} false; then :
21691  $as_echo_n "(cached) " >&6
21692else
21693  case $TIME in
21694  [\\/]* | ?:[\\/]*)
21695  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21696  ;;
21697  *)
21698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21699for as_dir in $PATH
21700do
21701  IFS=$as_save_IFS
21702  test -z "$as_dir" && as_dir=.
21703    for ac_exec_ext in '' $ac_executable_extensions; do
21704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21705    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21707    break 2
21708  fi
21709done
21710  done
21711IFS=$as_save_IFS
21712
21713  ;;
21714esac
21715fi
21716TIME=$ac_cv_path_TIME
21717if test -n "$TIME"; then
21718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21719$as_echo "$TIME" >&6; }
21720else
21721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21722$as_echo "no" >&6; }
21723fi
21724
21725
21726          if test "x$TIME" = x; then
21727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21728          fi
21729        else
21730          # Otherwise we believe it is a complete path. Use it as it is.
21731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21732$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21734$as_echo_n "checking for TIME... " >&6; }
21735          if test ! -x "$tool_specified"; then
21736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21737$as_echo "not found" >&6; }
21738            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21739          fi
21740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21741$as_echo "$tool_specified" >&6; }
21742        fi
21743      fi
21744    fi
21745
21746  fi
21747
21748
21749
21750
21751  # Publish this variable in the help.
21752
21753
21754  if [ -z "${PATCH+x}" ]; then
21755    # The variable is not set by user, try to locate tool using the code snippet
21756    for ac_prog in gpatch patch
21757do
21758  # Extract the first word of "$ac_prog", so it can be a program name with args.
21759set dummy $ac_prog; ac_word=$2
21760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21761$as_echo_n "checking for $ac_word... " >&6; }
21762if ${ac_cv_path_PATCH+:} false; then :
21763  $as_echo_n "(cached) " >&6
21764else
21765  case $PATCH in
21766  [\\/]* | ?:[\\/]*)
21767  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21768  ;;
21769  *)
21770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21771for as_dir in $PATH
21772do
21773  IFS=$as_save_IFS
21774  test -z "$as_dir" && as_dir=.
21775    for ac_exec_ext in '' $ac_executable_extensions; do
21776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21777    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21779    break 2
21780  fi
21781done
21782  done
21783IFS=$as_save_IFS
21784
21785  ;;
21786esac
21787fi
21788PATCH=$ac_cv_path_PATCH
21789if test -n "$PATCH"; then
21790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21791$as_echo "$PATCH" >&6; }
21792else
21793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21794$as_echo "no" >&6; }
21795fi
21796
21797
21798  test -n "$PATCH" && break
21799done
21800
21801  else
21802    # The variable is set, but is it from the command line or the environment?
21803
21804    # Try to remove the string !PATCH! from our list.
21805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21807      # If it failed, the variable was not from the command line. Ignore it,
21808      # but warn the user (except for BASH, which is always set by the calling BASH).
21809      if test "xPATCH" != xBASH; then
21810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21811$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21812      fi
21813      # Try to locate tool using the code snippet
21814      for ac_prog in gpatch patch
21815do
21816  # Extract the first word of "$ac_prog", so it can be a program name with args.
21817set dummy $ac_prog; ac_word=$2
21818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21819$as_echo_n "checking for $ac_word... " >&6; }
21820if ${ac_cv_path_PATCH+:} false; then :
21821  $as_echo_n "(cached) " >&6
21822else
21823  case $PATCH in
21824  [\\/]* | ?:[\\/]*)
21825  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21826  ;;
21827  *)
21828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21829for as_dir in $PATH
21830do
21831  IFS=$as_save_IFS
21832  test -z "$as_dir" && as_dir=.
21833    for ac_exec_ext in '' $ac_executable_extensions; do
21834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21835    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21837    break 2
21838  fi
21839done
21840  done
21841IFS=$as_save_IFS
21842
21843  ;;
21844esac
21845fi
21846PATCH=$ac_cv_path_PATCH
21847if test -n "$PATCH"; then
21848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21849$as_echo "$PATCH" >&6; }
21850else
21851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21852$as_echo "no" >&6; }
21853fi
21854
21855
21856  test -n "$PATCH" && break
21857done
21858
21859    else
21860      # If it succeeded, then it was overridden by the user. We will use it
21861      # for the tool.
21862
21863      # First remove it from the list of overridden variables, so we can test
21864      # for unknown variables in the end.
21865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21866
21867      # Check if we try to supply an empty value
21868      if test "x$PATCH" = x; then
21869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21870$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21872$as_echo_n "checking for PATCH... " >&6; }
21873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21874$as_echo "disabled" >&6; }
21875      else
21876        # Check if the provided tool contains a complete path.
21877        tool_specified="$PATCH"
21878        tool_basename="${tool_specified##*/}"
21879        if test "x$tool_basename" = "x$tool_specified"; then
21880          # A command without a complete path is provided, search $PATH.
21881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21882$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21883          # Extract the first word of "$tool_basename", so it can be a program name with args.
21884set dummy $tool_basename; ac_word=$2
21885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21886$as_echo_n "checking for $ac_word... " >&6; }
21887if ${ac_cv_path_PATCH+:} false; then :
21888  $as_echo_n "(cached) " >&6
21889else
21890  case $PATCH in
21891  [\\/]* | ?:[\\/]*)
21892  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21893  ;;
21894  *)
21895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21896for as_dir in $PATH
21897do
21898  IFS=$as_save_IFS
21899  test -z "$as_dir" && as_dir=.
21900    for ac_exec_ext in '' $ac_executable_extensions; do
21901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21902    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21904    break 2
21905  fi
21906done
21907  done
21908IFS=$as_save_IFS
21909
21910  ;;
21911esac
21912fi
21913PATCH=$ac_cv_path_PATCH
21914if test -n "$PATCH"; then
21915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21916$as_echo "$PATCH" >&6; }
21917else
21918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21919$as_echo "no" >&6; }
21920fi
21921
21922
21923          if test "x$PATCH" = x; then
21924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21925          fi
21926        else
21927          # Otherwise we believe it is a complete path. Use it as it is.
21928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21929$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21931$as_echo_n "checking for PATCH... " >&6; }
21932          if test ! -x "$tool_specified"; then
21933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21934$as_echo "not found" >&6; }
21935            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21936          fi
21937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21938$as_echo "$tool_specified" >&6; }
21939        fi
21940      fi
21941    fi
21942
21943  fi
21944
21945
21946  # Check if it's GNU time
21947  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21948  if test "x$IS_GNU_TIME" != x; then
21949    IS_GNU_TIME=yes
21950  else
21951    IS_GNU_TIME=no
21952  fi
21953
21954
21955  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21956
21957
21958
21959  # Publish this variable in the help.
21960
21961
21962  if [ -z "${DSYMUTIL+x}" ]; then
21963    # The variable is not set by user, try to locate tool using the code snippet
21964    for ac_prog in dsymutil
21965do
21966  # Extract the first word of "$ac_prog", so it can be a program name with args.
21967set dummy $ac_prog; ac_word=$2
21968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21969$as_echo_n "checking for $ac_word... " >&6; }
21970if ${ac_cv_path_DSYMUTIL+:} false; then :
21971  $as_echo_n "(cached) " >&6
21972else
21973  case $DSYMUTIL in
21974  [\\/]* | ?:[\\/]*)
21975  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
21976  ;;
21977  *)
21978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21979for as_dir in $PATH
21980do
21981  IFS=$as_save_IFS
21982  test -z "$as_dir" && as_dir=.
21983    for ac_exec_ext in '' $ac_executable_extensions; do
21984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21985    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
21986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21987    break 2
21988  fi
21989done
21990  done
21991IFS=$as_save_IFS
21992
21993  ;;
21994esac
21995fi
21996DSYMUTIL=$ac_cv_path_DSYMUTIL
21997if test -n "$DSYMUTIL"; then
21998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
21999$as_echo "$DSYMUTIL" >&6; }
22000else
22001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22002$as_echo "no" >&6; }
22003fi
22004
22005
22006  test -n "$DSYMUTIL" && break
22007done
22008
22009  else
22010    # The variable is set, but is it from the command line or the environment?
22011
22012    # Try to remove the string !DSYMUTIL! from our list.
22013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22015      # If it failed, the variable was not from the command line. Ignore it,
22016      # but warn the user (except for BASH, which is always set by the calling BASH).
22017      if test "xDSYMUTIL" != xBASH; then
22018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22019$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22020      fi
22021      # Try to locate tool using the code snippet
22022      for ac_prog in dsymutil
22023do
22024  # Extract the first word of "$ac_prog", so it can be a program name with args.
22025set dummy $ac_prog; ac_word=$2
22026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22027$as_echo_n "checking for $ac_word... " >&6; }
22028if ${ac_cv_path_DSYMUTIL+:} false; then :
22029  $as_echo_n "(cached) " >&6
22030else
22031  case $DSYMUTIL in
22032  [\\/]* | ?:[\\/]*)
22033  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22034  ;;
22035  *)
22036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22037for as_dir in $PATH
22038do
22039  IFS=$as_save_IFS
22040  test -z "$as_dir" && as_dir=.
22041    for ac_exec_ext in '' $ac_executable_extensions; do
22042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22043    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22045    break 2
22046  fi
22047done
22048  done
22049IFS=$as_save_IFS
22050
22051  ;;
22052esac
22053fi
22054DSYMUTIL=$ac_cv_path_DSYMUTIL
22055if test -n "$DSYMUTIL"; then
22056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22057$as_echo "$DSYMUTIL" >&6; }
22058else
22059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22060$as_echo "no" >&6; }
22061fi
22062
22063
22064  test -n "$DSYMUTIL" && break
22065done
22066
22067    else
22068      # If it succeeded, then it was overridden by the user. We will use it
22069      # for the tool.
22070
22071      # First remove it from the list of overridden variables, so we can test
22072      # for unknown variables in the end.
22073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22074
22075      # Check if we try to supply an empty value
22076      if test "x$DSYMUTIL" = x; then
22077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22078$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22080$as_echo_n "checking for DSYMUTIL... " >&6; }
22081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22082$as_echo "disabled" >&6; }
22083      else
22084        # Check if the provided tool contains a complete path.
22085        tool_specified="$DSYMUTIL"
22086        tool_basename="${tool_specified##*/}"
22087        if test "x$tool_basename" = "x$tool_specified"; then
22088          # A command without a complete path is provided, search $PATH.
22089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22090$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22091          # Extract the first word of "$tool_basename", so it can be a program name with args.
22092set dummy $tool_basename; ac_word=$2
22093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22094$as_echo_n "checking for $ac_word... " >&6; }
22095if ${ac_cv_path_DSYMUTIL+:} false; then :
22096  $as_echo_n "(cached) " >&6
22097else
22098  case $DSYMUTIL in
22099  [\\/]* | ?:[\\/]*)
22100  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22101  ;;
22102  *)
22103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22104for as_dir in $PATH
22105do
22106  IFS=$as_save_IFS
22107  test -z "$as_dir" && as_dir=.
22108    for ac_exec_ext in '' $ac_executable_extensions; do
22109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22110    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22112    break 2
22113  fi
22114done
22115  done
22116IFS=$as_save_IFS
22117
22118  ;;
22119esac
22120fi
22121DSYMUTIL=$ac_cv_path_DSYMUTIL
22122if test -n "$DSYMUTIL"; then
22123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22124$as_echo "$DSYMUTIL" >&6; }
22125else
22126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22127$as_echo "no" >&6; }
22128fi
22129
22130
22131          if test "x$DSYMUTIL" = x; then
22132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22133          fi
22134        else
22135          # Otherwise we believe it is a complete path. Use it as it is.
22136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22137$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22139$as_echo_n "checking for DSYMUTIL... " >&6; }
22140          if test ! -x "$tool_specified"; then
22141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22142$as_echo "not found" >&6; }
22143            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22144          fi
22145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22146$as_echo "$tool_specified" >&6; }
22147        fi
22148      fi
22149    fi
22150
22151  fi
22152
22153
22154
22155  if test "x$DSYMUTIL" = x; then
22156    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22157  fi
22158
22159
22160
22161
22162
22163  # Publish this variable in the help.
22164
22165
22166  if [ -z "${XATTR+x}" ]; then
22167    # The variable is not set by user, try to locate tool using the code snippet
22168    for ac_prog in xattr
22169do
22170  # Extract the first word of "$ac_prog", so it can be a program name with args.
22171set dummy $ac_prog; ac_word=$2
22172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22173$as_echo_n "checking for $ac_word... " >&6; }
22174if ${ac_cv_path_XATTR+:} false; then :
22175  $as_echo_n "(cached) " >&6
22176else
22177  case $XATTR in
22178  [\\/]* | ?:[\\/]*)
22179  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22180  ;;
22181  *)
22182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22183for as_dir in $PATH
22184do
22185  IFS=$as_save_IFS
22186  test -z "$as_dir" && as_dir=.
22187    for ac_exec_ext in '' $ac_executable_extensions; do
22188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22189    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22191    break 2
22192  fi
22193done
22194  done
22195IFS=$as_save_IFS
22196
22197  ;;
22198esac
22199fi
22200XATTR=$ac_cv_path_XATTR
22201if test -n "$XATTR"; then
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22203$as_echo "$XATTR" >&6; }
22204else
22205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22206$as_echo "no" >&6; }
22207fi
22208
22209
22210  test -n "$XATTR" && break
22211done
22212
22213  else
22214    # The variable is set, but is it from the command line or the environment?
22215
22216    # Try to remove the string !XATTR! from our list.
22217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22219      # If it failed, the variable was not from the command line. Ignore it,
22220      # but warn the user (except for BASH, which is always set by the calling BASH).
22221      if test "xXATTR" != xBASH; then
22222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22223$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22224      fi
22225      # Try to locate tool using the code snippet
22226      for ac_prog in xattr
22227do
22228  # Extract the first word of "$ac_prog", so it can be a program name with args.
22229set dummy $ac_prog; ac_word=$2
22230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22231$as_echo_n "checking for $ac_word... " >&6; }
22232if ${ac_cv_path_XATTR+:} false; then :
22233  $as_echo_n "(cached) " >&6
22234else
22235  case $XATTR in
22236  [\\/]* | ?:[\\/]*)
22237  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22238  ;;
22239  *)
22240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22241for as_dir in $PATH
22242do
22243  IFS=$as_save_IFS
22244  test -z "$as_dir" && as_dir=.
22245    for ac_exec_ext in '' $ac_executable_extensions; do
22246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22247    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22249    break 2
22250  fi
22251done
22252  done
22253IFS=$as_save_IFS
22254
22255  ;;
22256esac
22257fi
22258XATTR=$ac_cv_path_XATTR
22259if test -n "$XATTR"; then
22260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22261$as_echo "$XATTR" >&6; }
22262else
22263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22264$as_echo "no" >&6; }
22265fi
22266
22267
22268  test -n "$XATTR" && break
22269done
22270
22271    else
22272      # If it succeeded, then it was overridden by the user. We will use it
22273      # for the tool.
22274
22275      # First remove it from the list of overridden variables, so we can test
22276      # for unknown variables in the end.
22277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22278
22279      # Check if we try to supply an empty value
22280      if test "x$XATTR" = x; then
22281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22282$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22284$as_echo_n "checking for XATTR... " >&6; }
22285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22286$as_echo "disabled" >&6; }
22287      else
22288        # Check if the provided tool contains a complete path.
22289        tool_specified="$XATTR"
22290        tool_basename="${tool_specified##*/}"
22291        if test "x$tool_basename" = "x$tool_specified"; then
22292          # A command without a complete path is provided, search $PATH.
22293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22294$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22295          # Extract the first word of "$tool_basename", so it can be a program name with args.
22296set dummy $tool_basename; ac_word=$2
22297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22298$as_echo_n "checking for $ac_word... " >&6; }
22299if ${ac_cv_path_XATTR+:} false; then :
22300  $as_echo_n "(cached) " >&6
22301else
22302  case $XATTR in
22303  [\\/]* | ?:[\\/]*)
22304  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22305  ;;
22306  *)
22307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22308for as_dir in $PATH
22309do
22310  IFS=$as_save_IFS
22311  test -z "$as_dir" && as_dir=.
22312    for ac_exec_ext in '' $ac_executable_extensions; do
22313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22314    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22316    break 2
22317  fi
22318done
22319  done
22320IFS=$as_save_IFS
22321
22322  ;;
22323esac
22324fi
22325XATTR=$ac_cv_path_XATTR
22326if test -n "$XATTR"; then
22327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22328$as_echo "$XATTR" >&6; }
22329else
22330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22331$as_echo "no" >&6; }
22332fi
22333
22334
22335          if test "x$XATTR" = x; then
22336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22337          fi
22338        else
22339          # Otherwise we believe it is a complete path. Use it as it is.
22340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22341$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22343$as_echo_n "checking for XATTR... " >&6; }
22344          if test ! -x "$tool_specified"; then
22345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22346$as_echo "not found" >&6; }
22347            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22348          fi
22349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22350$as_echo "$tool_specified" >&6; }
22351        fi
22352      fi
22353    fi
22354
22355  fi
22356
22357
22358
22359  if test "x$XATTR" = x; then
22360    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22361  fi
22362
22363
22364
22365
22366  # Publish this variable in the help.
22367
22368
22369  if [ -z "${CODESIGN+x}" ]; then
22370    # The variable is not set by user, try to locate tool using the code snippet
22371    for ac_prog in codesign
22372do
22373  # Extract the first word of "$ac_prog", so it can be a program name with args.
22374set dummy $ac_prog; ac_word=$2
22375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22376$as_echo_n "checking for $ac_word... " >&6; }
22377if ${ac_cv_path_CODESIGN+:} false; then :
22378  $as_echo_n "(cached) " >&6
22379else
22380  case $CODESIGN in
22381  [\\/]* | ?:[\\/]*)
22382  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22383  ;;
22384  *)
22385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22386for as_dir in $PATH
22387do
22388  IFS=$as_save_IFS
22389  test -z "$as_dir" && as_dir=.
22390    for ac_exec_ext in '' $ac_executable_extensions; do
22391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22392    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22394    break 2
22395  fi
22396done
22397  done
22398IFS=$as_save_IFS
22399
22400  ;;
22401esac
22402fi
22403CODESIGN=$ac_cv_path_CODESIGN
22404if test -n "$CODESIGN"; then
22405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22406$as_echo "$CODESIGN" >&6; }
22407else
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22409$as_echo "no" >&6; }
22410fi
22411
22412
22413  test -n "$CODESIGN" && break
22414done
22415
22416  else
22417    # The variable is set, but is it from the command line or the environment?
22418
22419    # Try to remove the string !CODESIGN! from our list.
22420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22422      # If it failed, the variable was not from the command line. Ignore it,
22423      # but warn the user (except for BASH, which is always set by the calling BASH).
22424      if test "xCODESIGN" != xBASH; then
22425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22426$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22427      fi
22428      # Try to locate tool using the code snippet
22429      for ac_prog in codesign
22430do
22431  # Extract the first word of "$ac_prog", so it can be a program name with args.
22432set dummy $ac_prog; ac_word=$2
22433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22434$as_echo_n "checking for $ac_word... " >&6; }
22435if ${ac_cv_path_CODESIGN+:} false; then :
22436  $as_echo_n "(cached) " >&6
22437else
22438  case $CODESIGN in
22439  [\\/]* | ?:[\\/]*)
22440  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22441  ;;
22442  *)
22443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22444for as_dir in $PATH
22445do
22446  IFS=$as_save_IFS
22447  test -z "$as_dir" && as_dir=.
22448    for ac_exec_ext in '' $ac_executable_extensions; do
22449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22450    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22452    break 2
22453  fi
22454done
22455  done
22456IFS=$as_save_IFS
22457
22458  ;;
22459esac
22460fi
22461CODESIGN=$ac_cv_path_CODESIGN
22462if test -n "$CODESIGN"; then
22463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22464$as_echo "$CODESIGN" >&6; }
22465else
22466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22467$as_echo "no" >&6; }
22468fi
22469
22470
22471  test -n "$CODESIGN" && break
22472done
22473
22474    else
22475      # If it succeeded, then it was overridden by the user. We will use it
22476      # for the tool.
22477
22478      # First remove it from the list of overridden variables, so we can test
22479      # for unknown variables in the end.
22480      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22481
22482      # Check if we try to supply an empty value
22483      if test "x$CODESIGN" = x; then
22484        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22485$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22487$as_echo_n "checking for CODESIGN... " >&6; }
22488        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22489$as_echo "disabled" >&6; }
22490      else
22491        # Check if the provided tool contains a complete path.
22492        tool_specified="$CODESIGN"
22493        tool_basename="${tool_specified##*/}"
22494        if test "x$tool_basename" = "x$tool_specified"; then
22495          # A command without a complete path is provided, search $PATH.
22496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22497$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22498          # Extract the first word of "$tool_basename", so it can be a program name with args.
22499set dummy $tool_basename; ac_word=$2
22500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22501$as_echo_n "checking for $ac_word... " >&6; }
22502if ${ac_cv_path_CODESIGN+:} false; then :
22503  $as_echo_n "(cached) " >&6
22504else
22505  case $CODESIGN in
22506  [\\/]* | ?:[\\/]*)
22507  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22508  ;;
22509  *)
22510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22511for as_dir in $PATH
22512do
22513  IFS=$as_save_IFS
22514  test -z "$as_dir" && as_dir=.
22515    for ac_exec_ext in '' $ac_executable_extensions; do
22516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22517    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22519    break 2
22520  fi
22521done
22522  done
22523IFS=$as_save_IFS
22524
22525  ;;
22526esac
22527fi
22528CODESIGN=$ac_cv_path_CODESIGN
22529if test -n "$CODESIGN"; then
22530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22531$as_echo "$CODESIGN" >&6; }
22532else
22533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22534$as_echo "no" >&6; }
22535fi
22536
22537
22538          if test "x$CODESIGN" = x; then
22539            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22540          fi
22541        else
22542          # Otherwise we believe it is a complete path. Use it as it is.
22543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22544$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22545          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22546$as_echo_n "checking for CODESIGN... " >&6; }
22547          if test ! -x "$tool_specified"; then
22548            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22549$as_echo "not found" >&6; }
22550            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22551          fi
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22553$as_echo "$tool_specified" >&6; }
22554        fi
22555      fi
22556    fi
22557
22558  fi
22559
22560
22561    if test "x$CODESIGN" != "x"; then
22562      # Verify that the openjdk_codesign certificate is present
22563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22564$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22565      rm -f codesign-testfile
22566      touch codesign-testfile
22567      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22568      rm -f codesign-testfile
22569      if test "x$CODESIGN" = x; then
22570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22571$as_echo "no" >&6; }
22572      else
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22574$as_echo "yes" >&6; }
22575      fi
22576    fi
22577
22578
22579
22580  # Publish this variable in the help.
22581
22582
22583  if [ -z "${SETFILE+x}" ]; then
22584    # The variable is not set by user, try to locate tool using the code snippet
22585    for ac_prog in SetFile
22586do
22587  # Extract the first word of "$ac_prog", so it can be a program name with args.
22588set dummy $ac_prog; ac_word=$2
22589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22590$as_echo_n "checking for $ac_word... " >&6; }
22591if ${ac_cv_path_SETFILE+:} false; then :
22592  $as_echo_n "(cached) " >&6
22593else
22594  case $SETFILE in
22595  [\\/]* | ?:[\\/]*)
22596  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22597  ;;
22598  *)
22599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22600for as_dir in $PATH
22601do
22602  IFS=$as_save_IFS
22603  test -z "$as_dir" && as_dir=.
22604    for ac_exec_ext in '' $ac_executable_extensions; do
22605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22606    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22608    break 2
22609  fi
22610done
22611  done
22612IFS=$as_save_IFS
22613
22614  ;;
22615esac
22616fi
22617SETFILE=$ac_cv_path_SETFILE
22618if test -n "$SETFILE"; then
22619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22620$as_echo "$SETFILE" >&6; }
22621else
22622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22623$as_echo "no" >&6; }
22624fi
22625
22626
22627  test -n "$SETFILE" && break
22628done
22629
22630  else
22631    # The variable is set, but is it from the command line or the environment?
22632
22633    # Try to remove the string !SETFILE! from our list.
22634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22636      # If it failed, the variable was not from the command line. Ignore it,
22637      # but warn the user (except for BASH, which is always set by the calling BASH).
22638      if test "xSETFILE" != xBASH; then
22639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22640$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22641      fi
22642      # Try to locate tool using the code snippet
22643      for ac_prog in SetFile
22644do
22645  # Extract the first word of "$ac_prog", so it can be a program name with args.
22646set dummy $ac_prog; ac_word=$2
22647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22648$as_echo_n "checking for $ac_word... " >&6; }
22649if ${ac_cv_path_SETFILE+:} false; then :
22650  $as_echo_n "(cached) " >&6
22651else
22652  case $SETFILE in
22653  [\\/]* | ?:[\\/]*)
22654  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22655  ;;
22656  *)
22657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22658for as_dir in $PATH
22659do
22660  IFS=$as_save_IFS
22661  test -z "$as_dir" && as_dir=.
22662    for ac_exec_ext in '' $ac_executable_extensions; do
22663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22664    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22666    break 2
22667  fi
22668done
22669  done
22670IFS=$as_save_IFS
22671
22672  ;;
22673esac
22674fi
22675SETFILE=$ac_cv_path_SETFILE
22676if test -n "$SETFILE"; then
22677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22678$as_echo "$SETFILE" >&6; }
22679else
22680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22681$as_echo "no" >&6; }
22682fi
22683
22684
22685  test -n "$SETFILE" && break
22686done
22687
22688    else
22689      # If it succeeded, then it was overridden by the user. We will use it
22690      # for the tool.
22691
22692      # First remove it from the list of overridden variables, so we can test
22693      # for unknown variables in the end.
22694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22695
22696      # Check if we try to supply an empty value
22697      if test "x$SETFILE" = x; then
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22699$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22701$as_echo_n "checking for SETFILE... " >&6; }
22702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22703$as_echo "disabled" >&6; }
22704      else
22705        # Check if the provided tool contains a complete path.
22706        tool_specified="$SETFILE"
22707        tool_basename="${tool_specified##*/}"
22708        if test "x$tool_basename" = "x$tool_specified"; then
22709          # A command without a complete path is provided, search $PATH.
22710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22711$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22712          # Extract the first word of "$tool_basename", so it can be a program name with args.
22713set dummy $tool_basename; ac_word=$2
22714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22715$as_echo_n "checking for $ac_word... " >&6; }
22716if ${ac_cv_path_SETFILE+:} false; then :
22717  $as_echo_n "(cached) " >&6
22718else
22719  case $SETFILE in
22720  [\\/]* | ?:[\\/]*)
22721  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22722  ;;
22723  *)
22724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22725for as_dir in $PATH
22726do
22727  IFS=$as_save_IFS
22728  test -z "$as_dir" && as_dir=.
22729    for ac_exec_ext in '' $ac_executable_extensions; do
22730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22731    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22733    break 2
22734  fi
22735done
22736  done
22737IFS=$as_save_IFS
22738
22739  ;;
22740esac
22741fi
22742SETFILE=$ac_cv_path_SETFILE
22743if test -n "$SETFILE"; then
22744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22745$as_echo "$SETFILE" >&6; }
22746else
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22748$as_echo "no" >&6; }
22749fi
22750
22751
22752          if test "x$SETFILE" = x; then
22753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22754          fi
22755        else
22756          # Otherwise we believe it is a complete path. Use it as it is.
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22758$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22760$as_echo_n "checking for SETFILE... " >&6; }
22761          if test ! -x "$tool_specified"; then
22762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22763$as_echo "not found" >&6; }
22764            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22765          fi
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22767$as_echo "$tool_specified" >&6; }
22768        fi
22769      fi
22770    fi
22771
22772  fi
22773
22774
22775
22776  if test "x$SETFILE" = x; then
22777    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22778  fi
22779
22780
22781  fi
22782
22783
22784  # Test if bash supports pipefail.
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22786$as_echo_n "checking if bash supports pipefail... " >&6; }
22787  if ${BASH} -c 'set -o pipefail'; then
22788    BASH_ARGS="$BASH_ARGS -o pipefail"
22789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22790$as_echo "yes" >&6; }
22791  else
22792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22793$as_echo "no" >&6; }
22794  fi
22795
22796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22797$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22798  if ${BASH} -e -c 'true'; then
22799    BASH_ARGS="$BASH_ARGS -e"
22800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22801$as_echo "yes" >&6; }
22802  else
22803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22804$as_echo "no" >&6; }
22805  fi
22806
22807
22808
22809
22810# Check if pkg-config is available.
22811
22812
22813if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22814	if test -n "$ac_tool_prefix"; then
22815  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22816set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22818$as_echo_n "checking for $ac_word... " >&6; }
22819if ${ac_cv_path_PKG_CONFIG+:} false; then :
22820  $as_echo_n "(cached) " >&6
22821else
22822  case $PKG_CONFIG in
22823  [\\/]* | ?:[\\/]*)
22824  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22825  ;;
22826  *)
22827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22828for as_dir in $PATH
22829do
22830  IFS=$as_save_IFS
22831  test -z "$as_dir" && as_dir=.
22832    for ac_exec_ext in '' $ac_executable_extensions; do
22833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22834    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22836    break 2
22837  fi
22838done
22839  done
22840IFS=$as_save_IFS
22841
22842  ;;
22843esac
22844fi
22845PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22846if test -n "$PKG_CONFIG"; then
22847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22848$as_echo "$PKG_CONFIG" >&6; }
22849else
22850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22851$as_echo "no" >&6; }
22852fi
22853
22854
22855fi
22856if test -z "$ac_cv_path_PKG_CONFIG"; then
22857  ac_pt_PKG_CONFIG=$PKG_CONFIG
22858  # Extract the first word of "pkg-config", so it can be a program name with args.
22859set dummy pkg-config; ac_word=$2
22860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22861$as_echo_n "checking for $ac_word... " >&6; }
22862if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22863  $as_echo_n "(cached) " >&6
22864else
22865  case $ac_pt_PKG_CONFIG in
22866  [\\/]* | ?:[\\/]*)
22867  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22868  ;;
22869  *)
22870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22871for as_dir in $PATH
22872do
22873  IFS=$as_save_IFS
22874  test -z "$as_dir" && as_dir=.
22875    for ac_exec_ext in '' $ac_executable_extensions; do
22876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22877    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22879    break 2
22880  fi
22881done
22882  done
22883IFS=$as_save_IFS
22884
22885  ;;
22886esac
22887fi
22888ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22889if test -n "$ac_pt_PKG_CONFIG"; then
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22891$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22892else
22893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22894$as_echo "no" >&6; }
22895fi
22896
22897  if test "x$ac_pt_PKG_CONFIG" = x; then
22898    PKG_CONFIG=""
22899  else
22900    case $cross_compiling:$ac_tool_warned in
22901yes:)
22902{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22903$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22904ac_tool_warned=yes ;;
22905esac
22906    PKG_CONFIG=$ac_pt_PKG_CONFIG
22907  fi
22908else
22909  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22910fi
22911
22912fi
22913if test -n "$PKG_CONFIG"; then
22914	_pkg_min_version=0.9.0
22915	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22916$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22917	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22918		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22919$as_echo "yes" >&6; }
22920	else
22921		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22922$as_echo "no" >&6; }
22923		PKG_CONFIG=""
22924	fi
22925
22926fi
22927
22928# After basic tools have been setup, we can check build os specific details.
22929
22930  ###############################################################################
22931
22932  # Note that this is the build platform OS version!
22933
22934  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22935  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22936  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22937  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22938
22939
22940
22941
22942
22943###############################################################################
22944#
22945# Determine OpenJDK variants, options and version numbers.
22946#
22947###############################################################################
22948
22949# We need build & target for this.
22950
22951
22952  ###############################################################################
22953  #
22954  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22955  # We always build headless support.
22956  #
22957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
22958$as_echo_n "checking headful support... " >&6; }
22959  # Check whether --enable-headful was given.
22960if test "${enable_headful+set}" = set; then :
22961  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
22962else
22963  SUPPORT_HEADFUL=yes
22964fi
22965
22966
22967  SUPPORT_HEADLESS=yes
22968  BUILD_HEADLESS="BUILD_HEADLESS:=true"
22969
22970  if test "x$SUPPORT_HEADFUL" = xyes; then
22971    # We are building both headful and headless.
22972    headful_msg="include support for both headful and headless"
22973  fi
22974
22975  if test "x$SUPPORT_HEADFUL" = xno; then
22976    # Thus we are building headless only.
22977    BUILD_HEADLESS="BUILD_HEADLESS:=true"
22978    headful_msg="headless only"
22979  fi
22980
22981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
22982$as_echo "$headful_msg" >&6; }
22983
22984
22985
22986
22987
22988  # Control wether Hotspot runs Queens test after build.
22989  # Check whether --enable-hotspot-test-in-build was given.
22990if test "${enable_hotspot_test_in_build+set}" = set; then :
22991  enableval=$enable_hotspot_test_in_build;
22992else
22993  enable_hotspot_test_in_build=no
22994fi
22995
22996  if test "x$enable_hotspot_test_in_build" = "xyes"; then
22997    TEST_IN_BUILD=true
22998  else
22999    TEST_IN_BUILD=false
23000  fi
23001
23002
23003  ###############################################################################
23004  #
23005  # Choose cacerts source file
23006  #
23007
23008# Check whether --with-cacerts-file was given.
23009if test "${with_cacerts_file+set}" = set; then :
23010  withval=$with_cacerts_file;
23011fi
23012
23013  if test "x$with_cacerts_file" != x; then
23014    CACERTS_FILE=$with_cacerts_file
23015  fi
23016
23017
23018  ###############################################################################
23019  #
23020  # Enable or disable unlimited crypto
23021  #
23022  # Check whether --enable-unlimited-crypto was given.
23023if test "${enable_unlimited_crypto+set}" = set; then :
23024  enableval=$enable_unlimited_crypto;
23025else
23026  enable_unlimited_crypto=no
23027fi
23028
23029  if test "x$enable_unlimited_crypto" = "xyes"; then
23030    UNLIMITED_CRYPTO=true
23031  else
23032    UNLIMITED_CRYPTO=false
23033  fi
23034
23035
23036  ###############################################################################
23037  #
23038  # Enable or disable the elliptic curve crypto implementation
23039  #
23040
23041
23042  ###############################################################################
23043  #
23044  # Compress jars
23045  #
23046  COMPRESS_JARS=false
23047
23048
23049
23050
23051  # Source the version numbers
23052  . $AUTOCONF_DIR/version-numbers
23053
23054  # Get the settings from parameters
23055
23056# Check whether --with-milestone was given.
23057if test "${with_milestone+set}" = set; then :
23058  withval=$with_milestone;
23059fi
23060
23061  if test "x$with_milestone" = xyes; then
23062    as_fn_error $? "Milestone must have a value" "$LINENO" 5
23063  elif test "x$with_milestone" != x; then
23064    MILESTONE="$with_milestone"
23065  fi
23066  if test "x$MILESTONE" = x; then
23067    MILESTONE=internal
23068  fi
23069
23070
23071# Check whether --with-update-version was given.
23072if test "${with_update_version+set}" = set; then :
23073  withval=$with_update_version;
23074fi
23075
23076  if test "x$with_update_version" = xyes; then
23077    as_fn_error $? "Update version must have a value" "$LINENO" 5
23078  elif test "x$with_update_version" != x; then
23079    JDK_UPDATE_VERSION="$with_update_version"
23080    # On macosx 10.7, it's not possible to set --with-update-version=0X due
23081    # to a bug in expr (which reduces it to just X). To work around this, we
23082    # always add a 0 to one digit update versions.
23083    if test "${#JDK_UPDATE_VERSION}" = "1"; then
23084      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23085    fi
23086  fi
23087
23088
23089# Check whether --with-user-release-suffix was given.
23090if test "${with_user_release_suffix+set}" = set; then :
23091  withval=$with_user_release_suffix;
23092fi
23093
23094  if test "x$with_user_release_suffix" = xyes; then
23095    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23096  elif test "x$with_user_release_suffix" != x; then
23097    USER_RELEASE_SUFFIX="$with_user_release_suffix"
23098  fi
23099
23100
23101# Check whether --with-build-number was given.
23102if test "${with_build_number+set}" = set; then :
23103  withval=$with_build_number;
23104fi
23105
23106  if test "x$with_build_number" = xyes; then
23107    as_fn_error $? "Build number must have a value" "$LINENO" 5
23108  elif test "x$with_build_number" != x; then
23109    JDK_BUILD_NUMBER="$with_build_number"
23110  fi
23111  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23112  if test "x$JDK_BUILD_NUMBER" = x; then
23113    JDK_BUILD_NUMBER=b00
23114    if test "x$USER_RELEASE_SUFFIX" = x; then
23115      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23116      # Avoid [:alnum:] since it depends on the locale.
23117      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23118      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23119    fi
23120  fi
23121
23122  # Now set the JDK version, milestone, build number etc.
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139# Check whether --with-copyright-year was given.
23140if test "${with_copyright_year+set}" = set; then :
23141  withval=$with_copyright_year;
23142fi
23143
23144  if test "x$with_copyright_year" = xyes; then
23145    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23146  elif test "x$with_copyright_year" != x; then
23147    COPYRIGHT_YEAR="$with_copyright_year"
23148  else
23149    COPYRIGHT_YEAR=`date +'%Y'`
23150  fi
23151
23152
23153  if test "x$JDK_UPDATE_VERSION" != x; then
23154    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23155  else
23156    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23157  fi
23158
23159
23160  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23161
23162
23163
23164###############################################################################
23165#
23166# Setup BootJDK, used to bootstrap the build.
23167#
23168###############################################################################
23169
23170
23171  BOOT_JDK_FOUND=no
23172
23173# Check whether --with-boot-jdk was given.
23174if test "${with_boot_jdk+set}" = set; then :
23175  withval=$with_boot_jdk;
23176fi
23177
23178
23179  # We look for the Boot JDK through various means, going from more certain to
23180  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23181  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23182  # must check if this is indeed valid; otherwise we'll continue looking.
23183
23184  # Test: Is bootjdk explicitely set by command line arguments?
23185
23186  if test "x$BOOT_JDK_FOUND" = xno; then
23187    # Now execute the test
23188
23189  if test "x$with_boot_jdk" != x; then
23190    BOOT_JDK=$with_boot_jdk
23191    BOOT_JDK_FOUND=maybe
23192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23193$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23194  fi
23195
23196
23197    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23198    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23199      # Do we have a bin/java?
23200      if test ! -x "$BOOT_JDK/bin/java"; then
23201        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23203        BOOT_JDK_FOUND=no
23204      else
23205        # Do we have a bin/javac?
23206        if test ! -x "$BOOT_JDK/bin/javac"; then
23207          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23209          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23210$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23211          BOOT_JDK_FOUND=no
23212        else
23213          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23214          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23215
23216          # Extra M4 quote needed to protect [] in grep expression.
23217          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23218          if test "x$FOUND_CORRECT_VERSION" = x; then
23219            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23221            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23222$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23223            BOOT_JDK_FOUND=no
23224          else
23225            # We're done! :-)
23226            BOOT_JDK_FOUND=yes
23227
23228  # Only process if variable expands to non-empty
23229
23230  if test "x$BOOT_JDK" != x; then
23231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23232
23233  # Input might be given as Windows format, start by converting to
23234  # unix format.
23235  path="$BOOT_JDK"
23236  new_path=`$CYGPATH -u "$path"`
23237
23238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23241  # "foo.exe" is OK but "foo" is an error.
23242  #
23243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23244  # It is also a way to make sure we got the proper file name for the real test later on.
23245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23246  if test "x$test_shortpath" = x; then
23247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23248$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23249    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23250  fi
23251
23252  # Call helper function which possibly converts this using DOS-style short mode.
23253  # If so, the updated path is stored in $new_path.
23254
23255  input_path="$new_path"
23256  # Check if we need to convert this using DOS-style short mode. If the path
23257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23258  # take no chances and rewrite it.
23259  # Note: m4 eats our [], so we need to use [ and ] instead.
23260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23261  if test "x$has_forbidden_chars" != x; then
23262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23266      # Going to short mode and back again did indeed matter. Since short mode is
23267      # case insensitive, let's make it lowercase to improve readability.
23268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23269      # Now convert it back to Unix-style (cygpath)
23270      input_path=`$CYGPATH -u "$shortmode_path"`
23271      new_path="$input_path"
23272    fi
23273  fi
23274
23275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23276  if test "x$test_cygdrive_prefix" = x; then
23277    # As a simple fix, exclude /usr/bin since it's not a real path.
23278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23280      # a path prefixed by /cygdrive for fixpath to work.
23281      new_path="$CYGWIN_ROOT_PATH$input_path"
23282    fi
23283  fi
23284
23285
23286  if test "x$path" != "x$new_path"; then
23287    BOOT_JDK="$new_path"
23288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23290  fi
23291
23292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23293
23294  path="$BOOT_JDK"
23295  has_colon=`$ECHO $path | $GREP ^.:`
23296  new_path="$path"
23297  if test "x$has_colon" = x; then
23298    # Not in mixed or Windows style, start by that.
23299    new_path=`cmd //c echo $path`
23300  fi
23301
23302
23303  input_path="$new_path"
23304  # Check if we need to convert this using DOS-style short mode. If the path
23305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23306  # take no chances and rewrite it.
23307  # Note: m4 eats our [], so we need to use [ and ] instead.
23308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23309  if test "x$has_forbidden_chars" != x; then
23310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23312  fi
23313
23314
23315  windows_path="$new_path"
23316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23317    unix_path=`$CYGPATH -u "$windows_path"`
23318    new_path="$unix_path"
23319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23321    new_path="$unix_path"
23322  fi
23323
23324  if test "x$path" != "x$new_path"; then
23325    BOOT_JDK="$new_path"
23326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23328  fi
23329
23330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23332
23333    else
23334      # We're on a unix platform. Hooray! :)
23335      path="$BOOT_JDK"
23336      has_space=`$ECHO "$path" | $GREP " "`
23337      if test "x$has_space" != x; then
23338        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23339$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23340        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23341      fi
23342
23343      # Use eval to expand a potential ~
23344      eval path="$path"
23345      if test ! -f "$path" && test ! -d "$path"; then
23346        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23347      fi
23348
23349      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23350    fi
23351  fi
23352
23353            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23354$as_echo_n "checking for Boot JDK... " >&6; }
23355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23356$as_echo "$BOOT_JDK" >&6; }
23357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23358$as_echo_n "checking Boot JDK version... " >&6; }
23359            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23361$as_echo "$BOOT_JDK_VERSION" >&6; }
23362          fi # end check jdk version
23363        fi # end check javac
23364      fi # end check java
23365    fi # end check boot jdk found
23366  fi
23367
23368  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23369    # Having specified an argument which is incorrect will produce an instant failure;
23370    # we should not go on looking
23371    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23372  fi
23373
23374  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23375
23376  if test "x$BOOT_JDK_FOUND" = xno; then
23377    # Now execute the test
23378
23379  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23380    # First check at user selected default
23381
23382  if test "x$BOOT_JDK_FOUND" = xno; then
23383    # Now execute the test
23384
23385  if test -x /usr/libexec/java_home; then
23386    BOOT_JDK=`/usr/libexec/java_home `
23387    BOOT_JDK_FOUND=maybe
23388    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23389$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23390  fi
23391
23392
23393    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23394    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23395      # Do we have a bin/java?
23396      if test ! -x "$BOOT_JDK/bin/java"; then
23397        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23399        BOOT_JDK_FOUND=no
23400      else
23401        # Do we have a bin/javac?
23402        if test ! -x "$BOOT_JDK/bin/javac"; then
23403          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23405          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23406$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23407          BOOT_JDK_FOUND=no
23408        else
23409          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23410          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23411
23412          # Extra M4 quote needed to protect [] in grep expression.
23413          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23414          if test "x$FOUND_CORRECT_VERSION" = x; then
23415            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23417            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23418$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23419            BOOT_JDK_FOUND=no
23420          else
23421            # We're done! :-)
23422            BOOT_JDK_FOUND=yes
23423
23424  # Only process if variable expands to non-empty
23425
23426  if test "x$BOOT_JDK" != x; then
23427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23428
23429  # Input might be given as Windows format, start by converting to
23430  # unix format.
23431  path="$BOOT_JDK"
23432  new_path=`$CYGPATH -u "$path"`
23433
23434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23437  # "foo.exe" is OK but "foo" is an error.
23438  #
23439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23440  # It is also a way to make sure we got the proper file name for the real test later on.
23441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23442  if test "x$test_shortpath" = x; then
23443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23445    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23446  fi
23447
23448  # Call helper function which possibly converts this using DOS-style short mode.
23449  # If so, the updated path is stored in $new_path.
23450
23451  input_path="$new_path"
23452  # Check if we need to convert this using DOS-style short mode. If the path
23453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23454  # take no chances and rewrite it.
23455  # Note: m4 eats our [], so we need to use [ and ] instead.
23456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23457  if test "x$has_forbidden_chars" != x; then
23458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23462      # Going to short mode and back again did indeed matter. Since short mode is
23463      # case insensitive, let's make it lowercase to improve readability.
23464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23465      # Now convert it back to Unix-style (cygpath)
23466      input_path=`$CYGPATH -u "$shortmode_path"`
23467      new_path="$input_path"
23468    fi
23469  fi
23470
23471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23472  if test "x$test_cygdrive_prefix" = x; then
23473    # As a simple fix, exclude /usr/bin since it's not a real path.
23474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23476      # a path prefixed by /cygdrive for fixpath to work.
23477      new_path="$CYGWIN_ROOT_PATH$input_path"
23478    fi
23479  fi
23480
23481
23482  if test "x$path" != "x$new_path"; then
23483    BOOT_JDK="$new_path"
23484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23486  fi
23487
23488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23489
23490  path="$BOOT_JDK"
23491  has_colon=`$ECHO $path | $GREP ^.:`
23492  new_path="$path"
23493  if test "x$has_colon" = x; then
23494    # Not in mixed or Windows style, start by that.
23495    new_path=`cmd //c echo $path`
23496  fi
23497
23498
23499  input_path="$new_path"
23500  # Check if we need to convert this using DOS-style short mode. If the path
23501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23502  # take no chances and rewrite it.
23503  # Note: m4 eats our [], so we need to use [ and ] instead.
23504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23505  if test "x$has_forbidden_chars" != x; then
23506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23508  fi
23509
23510
23511  windows_path="$new_path"
23512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23513    unix_path=`$CYGPATH -u "$windows_path"`
23514    new_path="$unix_path"
23515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23517    new_path="$unix_path"
23518  fi
23519
23520  if test "x$path" != "x$new_path"; then
23521    BOOT_JDK="$new_path"
23522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23523$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23524  fi
23525
23526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23528
23529    else
23530      # We're on a unix platform. Hooray! :)
23531      path="$BOOT_JDK"
23532      has_space=`$ECHO "$path" | $GREP " "`
23533      if test "x$has_space" != x; then
23534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23537      fi
23538
23539      # Use eval to expand a potential ~
23540      eval path="$path"
23541      if test ! -f "$path" && test ! -d "$path"; then
23542        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23543      fi
23544
23545      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23546    fi
23547  fi
23548
23549            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23550$as_echo_n "checking for Boot JDK... " >&6; }
23551            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23552$as_echo "$BOOT_JDK" >&6; }
23553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23554$as_echo_n "checking Boot JDK version... " >&6; }
23555            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23557$as_echo "$BOOT_JDK_VERSION" >&6; }
23558          fi # end check jdk version
23559        fi # end check javac
23560      fi # end check java
23561    fi # end check boot jdk found
23562  fi
23563
23564    # If that did not work out (e.g. too old), try explicit versions instead
23565
23566  if test "x$BOOT_JDK_FOUND" = xno; then
23567    # Now execute the test
23568
23569  if test -x /usr/libexec/java_home; then
23570    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23571    BOOT_JDK_FOUND=maybe
23572    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23573$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23574  fi
23575
23576
23577    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23578    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23579      # Do we have a bin/java?
23580      if test ! -x "$BOOT_JDK/bin/java"; then
23581        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23583        BOOT_JDK_FOUND=no
23584      else
23585        # Do we have a bin/javac?
23586        if test ! -x "$BOOT_JDK/bin/javac"; then
23587          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23589          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23590$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23591          BOOT_JDK_FOUND=no
23592        else
23593          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23594          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23595
23596          # Extra M4 quote needed to protect [] in grep expression.
23597          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23598          if test "x$FOUND_CORRECT_VERSION" = x; then
23599            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23601            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23602$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23603            BOOT_JDK_FOUND=no
23604          else
23605            # We're done! :-)
23606            BOOT_JDK_FOUND=yes
23607
23608  # Only process if variable expands to non-empty
23609
23610  if test "x$BOOT_JDK" != x; then
23611    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23612
23613  # Input might be given as Windows format, start by converting to
23614  # unix format.
23615  path="$BOOT_JDK"
23616  new_path=`$CYGPATH -u "$path"`
23617
23618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23621  # "foo.exe" is OK but "foo" is an error.
23622  #
23623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23624  # It is also a way to make sure we got the proper file name for the real test later on.
23625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23626  if test "x$test_shortpath" = x; then
23627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23629    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23630  fi
23631
23632  # Call helper function which possibly converts this using DOS-style short mode.
23633  # If so, the updated path is stored in $new_path.
23634
23635  input_path="$new_path"
23636  # Check if we need to convert this using DOS-style short mode. If the path
23637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23638  # take no chances and rewrite it.
23639  # Note: m4 eats our [], so we need to use [ and ] instead.
23640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23641  if test "x$has_forbidden_chars" != x; then
23642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23646      # Going to short mode and back again did indeed matter. Since short mode is
23647      # case insensitive, let's make it lowercase to improve readability.
23648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23649      # Now convert it back to Unix-style (cygpath)
23650      input_path=`$CYGPATH -u "$shortmode_path"`
23651      new_path="$input_path"
23652    fi
23653  fi
23654
23655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23656  if test "x$test_cygdrive_prefix" = x; then
23657    # As a simple fix, exclude /usr/bin since it's not a real path.
23658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23660      # a path prefixed by /cygdrive for fixpath to work.
23661      new_path="$CYGWIN_ROOT_PATH$input_path"
23662    fi
23663  fi
23664
23665
23666  if test "x$path" != "x$new_path"; then
23667    BOOT_JDK="$new_path"
23668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23670  fi
23671
23672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23673
23674  path="$BOOT_JDK"
23675  has_colon=`$ECHO $path | $GREP ^.:`
23676  new_path="$path"
23677  if test "x$has_colon" = x; then
23678    # Not in mixed or Windows style, start by that.
23679    new_path=`cmd //c echo $path`
23680  fi
23681
23682
23683  input_path="$new_path"
23684  # Check if we need to convert this using DOS-style short mode. If the path
23685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23686  # take no chances and rewrite it.
23687  # Note: m4 eats our [], so we need to use [ and ] instead.
23688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23689  if test "x$has_forbidden_chars" != x; then
23690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23692  fi
23693
23694
23695  windows_path="$new_path"
23696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23697    unix_path=`$CYGPATH -u "$windows_path"`
23698    new_path="$unix_path"
23699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23701    new_path="$unix_path"
23702  fi
23703
23704  if test "x$path" != "x$new_path"; then
23705    BOOT_JDK="$new_path"
23706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23708  fi
23709
23710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23712
23713    else
23714      # We're on a unix platform. Hooray! :)
23715      path="$BOOT_JDK"
23716      has_space=`$ECHO "$path" | $GREP " "`
23717      if test "x$has_space" != x; then
23718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23720        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23721      fi
23722
23723      # Use eval to expand a potential ~
23724      eval path="$path"
23725      if test ! -f "$path" && test ! -d "$path"; then
23726        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23727      fi
23728
23729      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23730    fi
23731  fi
23732
23733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23734$as_echo_n "checking for Boot JDK... " >&6; }
23735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23736$as_echo "$BOOT_JDK" >&6; }
23737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23738$as_echo_n "checking Boot JDK version... " >&6; }
23739            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23741$as_echo "$BOOT_JDK_VERSION" >&6; }
23742          fi # end check jdk version
23743        fi # end check javac
23744      fi # end check java
23745    fi # end check boot jdk found
23746  fi
23747
23748
23749  if test "x$BOOT_JDK_FOUND" = xno; then
23750    # Now execute the test
23751
23752  if test -x /usr/libexec/java_home; then
23753    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23754    BOOT_JDK_FOUND=maybe
23755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23756$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23757  fi
23758
23759
23760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23762      # Do we have a bin/java?
23763      if test ! -x "$BOOT_JDK/bin/java"; then
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23766        BOOT_JDK_FOUND=no
23767      else
23768        # Do we have a bin/javac?
23769        if test ! -x "$BOOT_JDK/bin/javac"; then
23770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23774          BOOT_JDK_FOUND=no
23775        else
23776          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23777          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23778
23779          # Extra M4 quote needed to protect [] in grep expression.
23780          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23781          if test "x$FOUND_CORRECT_VERSION" = x; then
23782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23784            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23785$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23786            BOOT_JDK_FOUND=no
23787          else
23788            # We're done! :-)
23789            BOOT_JDK_FOUND=yes
23790
23791  # Only process if variable expands to non-empty
23792
23793  if test "x$BOOT_JDK" != x; then
23794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23795
23796  # Input might be given as Windows format, start by converting to
23797  # unix format.
23798  path="$BOOT_JDK"
23799  new_path=`$CYGPATH -u "$path"`
23800
23801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23804  # "foo.exe" is OK but "foo" is an error.
23805  #
23806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23807  # It is also a way to make sure we got the proper file name for the real test later on.
23808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23809  if test "x$test_shortpath" = x; then
23810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23813  fi
23814
23815  # Call helper function which possibly converts this using DOS-style short mode.
23816  # If so, the updated path is stored in $new_path.
23817
23818  input_path="$new_path"
23819  # Check if we need to convert this using DOS-style short mode. If the path
23820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23821  # take no chances and rewrite it.
23822  # Note: m4 eats our [], so we need to use [ and ] instead.
23823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23824  if test "x$has_forbidden_chars" != x; then
23825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23829      # Going to short mode and back again did indeed matter. Since short mode is
23830      # case insensitive, let's make it lowercase to improve readability.
23831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23832      # Now convert it back to Unix-style (cygpath)
23833      input_path=`$CYGPATH -u "$shortmode_path"`
23834      new_path="$input_path"
23835    fi
23836  fi
23837
23838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23839  if test "x$test_cygdrive_prefix" = x; then
23840    # As a simple fix, exclude /usr/bin since it's not a real path.
23841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23843      # a path prefixed by /cygdrive for fixpath to work.
23844      new_path="$CYGWIN_ROOT_PATH$input_path"
23845    fi
23846  fi
23847
23848
23849  if test "x$path" != "x$new_path"; then
23850    BOOT_JDK="$new_path"
23851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23853  fi
23854
23855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23856
23857  path="$BOOT_JDK"
23858  has_colon=`$ECHO $path | $GREP ^.:`
23859  new_path="$path"
23860  if test "x$has_colon" = x; then
23861    # Not in mixed or Windows style, start by that.
23862    new_path=`cmd //c echo $path`
23863  fi
23864
23865
23866  input_path="$new_path"
23867  # Check if we need to convert this using DOS-style short mode. If the path
23868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23869  # take no chances and rewrite it.
23870  # Note: m4 eats our [], so we need to use [ and ] instead.
23871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23872  if test "x$has_forbidden_chars" != x; then
23873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23875  fi
23876
23877
23878  windows_path="$new_path"
23879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23880    unix_path=`$CYGPATH -u "$windows_path"`
23881    new_path="$unix_path"
23882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23884    new_path="$unix_path"
23885  fi
23886
23887  if test "x$path" != "x$new_path"; then
23888    BOOT_JDK="$new_path"
23889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23891  fi
23892
23893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23895
23896    else
23897      # We're on a unix platform. Hooray! :)
23898      path="$BOOT_JDK"
23899      has_space=`$ECHO "$path" | $GREP " "`
23900      if test "x$has_space" != x; then
23901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23904      fi
23905
23906      # Use eval to expand a potential ~
23907      eval path="$path"
23908      if test ! -f "$path" && test ! -d "$path"; then
23909        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23910      fi
23911
23912      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23913    fi
23914  fi
23915
23916            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23917$as_echo_n "checking for Boot JDK... " >&6; }
23918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23919$as_echo "$BOOT_JDK" >&6; }
23920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23921$as_echo_n "checking Boot JDK version... " >&6; }
23922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23924$as_echo "$BOOT_JDK_VERSION" >&6; }
23925          fi # end check jdk version
23926        fi # end check javac
23927      fi # end check java
23928    fi # end check boot jdk found
23929  fi
23930
23931
23932  if test "x$BOOT_JDK_FOUND" = xno; then
23933    # Now execute the test
23934
23935  if test -x /usr/libexec/java_home; then
23936    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23937    BOOT_JDK_FOUND=maybe
23938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23939$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23940  fi
23941
23942
23943    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23944    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23945      # Do we have a bin/java?
23946      if test ! -x "$BOOT_JDK/bin/java"; then
23947        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23949        BOOT_JDK_FOUND=no
23950      else
23951        # Do we have a bin/javac?
23952        if test ! -x "$BOOT_JDK/bin/javac"; then
23953          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23955          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23956$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23957          BOOT_JDK_FOUND=no
23958        else
23959          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23960          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23961
23962          # Extra M4 quote needed to protect [] in grep expression.
23963          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23964          if test "x$FOUND_CORRECT_VERSION" = x; then
23965            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23967            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23968$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23969            BOOT_JDK_FOUND=no
23970          else
23971            # We're done! :-)
23972            BOOT_JDK_FOUND=yes
23973
23974  # Only process if variable expands to non-empty
23975
23976  if test "x$BOOT_JDK" != x; then
23977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23978
23979  # Input might be given as Windows format, start by converting to
23980  # unix format.
23981  path="$BOOT_JDK"
23982  new_path=`$CYGPATH -u "$path"`
23983
23984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23987  # "foo.exe" is OK but "foo" is an error.
23988  #
23989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23990  # It is also a way to make sure we got the proper file name for the real test later on.
23991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23992  if test "x$test_shortpath" = x; then
23993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23995    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23996  fi
23997
23998  # Call helper function which possibly converts this using DOS-style short mode.
23999  # If so, the updated path is stored in $new_path.
24000
24001  input_path="$new_path"
24002  # Check if we need to convert this using DOS-style short mode. If the path
24003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24004  # take no chances and rewrite it.
24005  # Note: m4 eats our [], so we need to use [ and ] instead.
24006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24007  if test "x$has_forbidden_chars" != x; then
24008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24012      # Going to short mode and back again did indeed matter. Since short mode is
24013      # case insensitive, let's make it lowercase to improve readability.
24014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24015      # Now convert it back to Unix-style (cygpath)
24016      input_path=`$CYGPATH -u "$shortmode_path"`
24017      new_path="$input_path"
24018    fi
24019  fi
24020
24021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24022  if test "x$test_cygdrive_prefix" = x; then
24023    # As a simple fix, exclude /usr/bin since it's not a real path.
24024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24026      # a path prefixed by /cygdrive for fixpath to work.
24027      new_path="$CYGWIN_ROOT_PATH$input_path"
24028    fi
24029  fi
24030
24031
24032  if test "x$path" != "x$new_path"; then
24033    BOOT_JDK="$new_path"
24034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24036  fi
24037
24038    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24039
24040  path="$BOOT_JDK"
24041  has_colon=`$ECHO $path | $GREP ^.:`
24042  new_path="$path"
24043  if test "x$has_colon" = x; then
24044    # Not in mixed or Windows style, start by that.
24045    new_path=`cmd //c echo $path`
24046  fi
24047
24048
24049  input_path="$new_path"
24050  # Check if we need to convert this using DOS-style short mode. If the path
24051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24052  # take no chances and rewrite it.
24053  # Note: m4 eats our [], so we need to use [ and ] instead.
24054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24055  if test "x$has_forbidden_chars" != x; then
24056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24058  fi
24059
24060
24061  windows_path="$new_path"
24062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24063    unix_path=`$CYGPATH -u "$windows_path"`
24064    new_path="$unix_path"
24065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24067    new_path="$unix_path"
24068  fi
24069
24070  if test "x$path" != "x$new_path"; then
24071    BOOT_JDK="$new_path"
24072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24074  fi
24075
24076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24078
24079    else
24080      # We're on a unix platform. Hooray! :)
24081      path="$BOOT_JDK"
24082      has_space=`$ECHO "$path" | $GREP " "`
24083      if test "x$has_space" != x; then
24084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24085$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24086        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24087      fi
24088
24089      # Use eval to expand a potential ~
24090      eval path="$path"
24091      if test ! -f "$path" && test ! -d "$path"; then
24092        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24093      fi
24094
24095      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24096    fi
24097  fi
24098
24099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24100$as_echo_n "checking for Boot JDK... " >&6; }
24101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24102$as_echo "$BOOT_JDK" >&6; }
24103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24104$as_echo_n "checking Boot JDK version... " >&6; }
24105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24107$as_echo "$BOOT_JDK_VERSION" >&6; }
24108          fi # end check jdk version
24109        fi # end check javac
24110      fi # end check java
24111    fi # end check boot jdk found
24112  fi
24113
24114  fi
24115
24116
24117    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24118    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24119      # Do we have a bin/java?
24120      if test ! -x "$BOOT_JDK/bin/java"; then
24121        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24123        BOOT_JDK_FOUND=no
24124      else
24125        # Do we have a bin/javac?
24126        if test ! -x "$BOOT_JDK/bin/javac"; then
24127          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24129          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24130$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24131          BOOT_JDK_FOUND=no
24132        else
24133          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24134          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24135
24136          # Extra M4 quote needed to protect [] in grep expression.
24137          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24138          if test "x$FOUND_CORRECT_VERSION" = x; then
24139            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24141            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24142$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24143            BOOT_JDK_FOUND=no
24144          else
24145            # We're done! :-)
24146            BOOT_JDK_FOUND=yes
24147
24148  # Only process if variable expands to non-empty
24149
24150  if test "x$BOOT_JDK" != x; then
24151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24152
24153  # Input might be given as Windows format, start by converting to
24154  # unix format.
24155  path="$BOOT_JDK"
24156  new_path=`$CYGPATH -u "$path"`
24157
24158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24161  # "foo.exe" is OK but "foo" is an error.
24162  #
24163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24164  # It is also a way to make sure we got the proper file name for the real test later on.
24165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24166  if test "x$test_shortpath" = x; then
24167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24169    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24170  fi
24171
24172  # Call helper function which possibly converts this using DOS-style short mode.
24173  # If so, the updated path is stored in $new_path.
24174
24175  input_path="$new_path"
24176  # Check if we need to convert this using DOS-style short mode. If the path
24177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24178  # take no chances and rewrite it.
24179  # Note: m4 eats our [], so we need to use [ and ] instead.
24180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24181  if test "x$has_forbidden_chars" != x; then
24182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24186      # Going to short mode and back again did indeed matter. Since short mode is
24187      # case insensitive, let's make it lowercase to improve readability.
24188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24189      # Now convert it back to Unix-style (cygpath)
24190      input_path=`$CYGPATH -u "$shortmode_path"`
24191      new_path="$input_path"
24192    fi
24193  fi
24194
24195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24196  if test "x$test_cygdrive_prefix" = x; then
24197    # As a simple fix, exclude /usr/bin since it's not a real path.
24198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24200      # a path prefixed by /cygdrive for fixpath to work.
24201      new_path="$CYGWIN_ROOT_PATH$input_path"
24202    fi
24203  fi
24204
24205
24206  if test "x$path" != "x$new_path"; then
24207    BOOT_JDK="$new_path"
24208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24210  fi
24211
24212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24213
24214  path="$BOOT_JDK"
24215  has_colon=`$ECHO $path | $GREP ^.:`
24216  new_path="$path"
24217  if test "x$has_colon" = x; then
24218    # Not in mixed or Windows style, start by that.
24219    new_path=`cmd //c echo $path`
24220  fi
24221
24222
24223  input_path="$new_path"
24224  # Check if we need to convert this using DOS-style short mode. If the path
24225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24226  # take no chances and rewrite it.
24227  # Note: m4 eats our [], so we need to use [ and ] instead.
24228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24229  if test "x$has_forbidden_chars" != x; then
24230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24232  fi
24233
24234
24235  windows_path="$new_path"
24236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24237    unix_path=`$CYGPATH -u "$windows_path"`
24238    new_path="$unix_path"
24239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24241    new_path="$unix_path"
24242  fi
24243
24244  if test "x$path" != "x$new_path"; then
24245    BOOT_JDK="$new_path"
24246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24248  fi
24249
24250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24252
24253    else
24254      # We're on a unix platform. Hooray! :)
24255      path="$BOOT_JDK"
24256      has_space=`$ECHO "$path" | $GREP " "`
24257      if test "x$has_space" != x; then
24258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24261      fi
24262
24263      # Use eval to expand a potential ~
24264      eval path="$path"
24265      if test ! -f "$path" && test ! -d "$path"; then
24266        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24267      fi
24268
24269      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24270    fi
24271  fi
24272
24273            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24274$as_echo_n "checking for Boot JDK... " >&6; }
24275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24276$as_echo "$BOOT_JDK" >&6; }
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24278$as_echo_n "checking Boot JDK version... " >&6; }
24279            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24281$as_echo "$BOOT_JDK_VERSION" >&6; }
24282          fi # end check jdk version
24283        fi # end check javac
24284      fi # end check java
24285    fi # end check boot jdk found
24286  fi
24287
24288
24289  # Test: Is $JAVA_HOME set?
24290
24291  if test "x$BOOT_JDK_FOUND" = xno; then
24292    # Now execute the test
24293
24294  if test "x$JAVA_HOME" != x; then
24295    JAVA_HOME_PROCESSED="$JAVA_HOME"
24296
24297  # Only process if variable expands to non-empty
24298
24299  if test "x$JAVA_HOME_PROCESSED" != x; then
24300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24301
24302  # Input might be given as Windows format, start by converting to
24303  # unix format.
24304  path="$JAVA_HOME_PROCESSED"
24305  new_path=`$CYGPATH -u "$path"`
24306
24307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24310  # "foo.exe" is OK but "foo" is an error.
24311  #
24312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24313  # It is also a way to make sure we got the proper file name for the real test later on.
24314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24315  if test "x$test_shortpath" = x; then
24316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24317$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24318    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24319  fi
24320
24321  # Call helper function which possibly converts this using DOS-style short mode.
24322  # If so, the updated path is stored in $new_path.
24323
24324  input_path="$new_path"
24325  # Check if we need to convert this using DOS-style short mode. If the path
24326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24327  # take no chances and rewrite it.
24328  # Note: m4 eats our [], so we need to use [ and ] instead.
24329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24330  if test "x$has_forbidden_chars" != x; then
24331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24335      # Going to short mode and back again did indeed matter. Since short mode is
24336      # case insensitive, let's make it lowercase to improve readability.
24337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24338      # Now convert it back to Unix-style (cygpath)
24339      input_path=`$CYGPATH -u "$shortmode_path"`
24340      new_path="$input_path"
24341    fi
24342  fi
24343
24344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24345  if test "x$test_cygdrive_prefix" = x; then
24346    # As a simple fix, exclude /usr/bin since it's not a real path.
24347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24349      # a path prefixed by /cygdrive for fixpath to work.
24350      new_path="$CYGWIN_ROOT_PATH$input_path"
24351    fi
24352  fi
24353
24354
24355  if test "x$path" != "x$new_path"; then
24356    JAVA_HOME_PROCESSED="$new_path"
24357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24358$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24359  fi
24360
24361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24362
24363  path="$JAVA_HOME_PROCESSED"
24364  has_colon=`$ECHO $path | $GREP ^.:`
24365  new_path="$path"
24366  if test "x$has_colon" = x; then
24367    # Not in mixed or Windows style, start by that.
24368    new_path=`cmd //c echo $path`
24369  fi
24370
24371
24372  input_path="$new_path"
24373  # Check if we need to convert this using DOS-style short mode. If the path
24374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24375  # take no chances and rewrite it.
24376  # Note: m4 eats our [], so we need to use [ and ] instead.
24377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24378  if test "x$has_forbidden_chars" != x; then
24379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24381  fi
24382
24383
24384  windows_path="$new_path"
24385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24386    unix_path=`$CYGPATH -u "$windows_path"`
24387    new_path="$unix_path"
24388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24390    new_path="$unix_path"
24391  fi
24392
24393  if test "x$path" != "x$new_path"; then
24394    JAVA_HOME_PROCESSED="$new_path"
24395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24396$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24397  fi
24398
24399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24401
24402    else
24403      # We're on a unix platform. Hooray! :)
24404      path="$JAVA_HOME_PROCESSED"
24405      has_space=`$ECHO "$path" | $GREP " "`
24406      if test "x$has_space" != x; then
24407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24408$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24410      fi
24411
24412      # Use eval to expand a potential ~
24413      eval path="$path"
24414      if test ! -f "$path" && test ! -d "$path"; then
24415        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24416      fi
24417
24418      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24419    fi
24420  fi
24421
24422    if test ! -d "$JAVA_HOME_PROCESSED"; then
24423      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24424$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24425    else
24426      # Aha, the user has set a JAVA_HOME
24427      # let us use that as the Boot JDK.
24428      BOOT_JDK="$JAVA_HOME_PROCESSED"
24429      BOOT_JDK_FOUND=maybe
24430      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24431$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24432    fi
24433  fi
24434
24435
24436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24438      # Do we have a bin/java?
24439      if test ! -x "$BOOT_JDK/bin/java"; then
24440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24442        BOOT_JDK_FOUND=no
24443      else
24444        # Do we have a bin/javac?
24445        if test ! -x "$BOOT_JDK/bin/javac"; then
24446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24450          BOOT_JDK_FOUND=no
24451        else
24452          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24453          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24454
24455          # Extra M4 quote needed to protect [] in grep expression.
24456          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24457          if test "x$FOUND_CORRECT_VERSION" = x; then
24458            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24460            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24461$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24462            BOOT_JDK_FOUND=no
24463          else
24464            # We're done! :-)
24465            BOOT_JDK_FOUND=yes
24466
24467  # Only process if variable expands to non-empty
24468
24469  if test "x$BOOT_JDK" != x; then
24470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24471
24472  # Input might be given as Windows format, start by converting to
24473  # unix format.
24474  path="$BOOT_JDK"
24475  new_path=`$CYGPATH -u "$path"`
24476
24477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24480  # "foo.exe" is OK but "foo" is an error.
24481  #
24482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24483  # It is also a way to make sure we got the proper file name for the real test later on.
24484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24485  if test "x$test_shortpath" = x; then
24486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24488    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24489  fi
24490
24491  # Call helper function which possibly converts this using DOS-style short mode.
24492  # If so, the updated path is stored in $new_path.
24493
24494  input_path="$new_path"
24495  # Check if we need to convert this using DOS-style short mode. If the path
24496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24497  # take no chances and rewrite it.
24498  # Note: m4 eats our [], so we need to use [ and ] instead.
24499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24500  if test "x$has_forbidden_chars" != x; then
24501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24505      # Going to short mode and back again did indeed matter. Since short mode is
24506      # case insensitive, let's make it lowercase to improve readability.
24507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24508      # Now convert it back to Unix-style (cygpath)
24509      input_path=`$CYGPATH -u "$shortmode_path"`
24510      new_path="$input_path"
24511    fi
24512  fi
24513
24514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24515  if test "x$test_cygdrive_prefix" = x; then
24516    # As a simple fix, exclude /usr/bin since it's not a real path.
24517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24519      # a path prefixed by /cygdrive for fixpath to work.
24520      new_path="$CYGWIN_ROOT_PATH$input_path"
24521    fi
24522  fi
24523
24524
24525  if test "x$path" != "x$new_path"; then
24526    BOOT_JDK="$new_path"
24527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24529  fi
24530
24531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24532
24533  path="$BOOT_JDK"
24534  has_colon=`$ECHO $path | $GREP ^.:`
24535  new_path="$path"
24536  if test "x$has_colon" = x; then
24537    # Not in mixed or Windows style, start by that.
24538    new_path=`cmd //c echo $path`
24539  fi
24540
24541
24542  input_path="$new_path"
24543  # Check if we need to convert this using DOS-style short mode. If the path
24544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24545  # take no chances and rewrite it.
24546  # Note: m4 eats our [], so we need to use [ and ] instead.
24547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24548  if test "x$has_forbidden_chars" != x; then
24549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24551  fi
24552
24553
24554  windows_path="$new_path"
24555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24556    unix_path=`$CYGPATH -u "$windows_path"`
24557    new_path="$unix_path"
24558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24560    new_path="$unix_path"
24561  fi
24562
24563  if test "x$path" != "x$new_path"; then
24564    BOOT_JDK="$new_path"
24565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24567  fi
24568
24569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24571
24572    else
24573      # We're on a unix platform. Hooray! :)
24574      path="$BOOT_JDK"
24575      has_space=`$ECHO "$path" | $GREP " "`
24576      if test "x$has_space" != x; then
24577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24580      fi
24581
24582      # Use eval to expand a potential ~
24583      eval path="$path"
24584      if test ! -f "$path" && test ! -d "$path"; then
24585        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24586      fi
24587
24588      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24589    fi
24590  fi
24591
24592            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24593$as_echo_n "checking for Boot JDK... " >&6; }
24594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24595$as_echo "$BOOT_JDK" >&6; }
24596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24597$as_echo_n "checking Boot JDK version... " >&6; }
24598            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24600$as_echo "$BOOT_JDK_VERSION" >&6; }
24601          fi # end check jdk version
24602        fi # end check javac
24603      fi # end check java
24604    fi # end check boot jdk found
24605  fi
24606
24607
24608  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24609
24610  if test "x$BOOT_JDK_FOUND" = xno; then
24611    # Now execute the test
24612
24613  # Extract the first word of "javac", so it can be a program name with args.
24614set dummy javac; ac_word=$2
24615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24616$as_echo_n "checking for $ac_word... " >&6; }
24617if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24618  $as_echo_n "(cached) " >&6
24619else
24620  case $JAVAC_CHECK in
24621  [\\/]* | ?:[\\/]*)
24622  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24623  ;;
24624  *)
24625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24626for as_dir in $PATH
24627do
24628  IFS=$as_save_IFS
24629  test -z "$as_dir" && as_dir=.
24630    for ac_exec_ext in '' $ac_executable_extensions; do
24631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24632    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24634    break 2
24635  fi
24636done
24637  done
24638IFS=$as_save_IFS
24639
24640  ;;
24641esac
24642fi
24643JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24644if test -n "$JAVAC_CHECK"; then
24645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24646$as_echo "$JAVAC_CHECK" >&6; }
24647else
24648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24649$as_echo "no" >&6; }
24650fi
24651
24652
24653  # Extract the first word of "java", so it can be a program name with args.
24654set dummy java; ac_word=$2
24655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24656$as_echo_n "checking for $ac_word... " >&6; }
24657if ${ac_cv_path_JAVA_CHECK+:} false; then :
24658  $as_echo_n "(cached) " >&6
24659else
24660  case $JAVA_CHECK in
24661  [\\/]* | ?:[\\/]*)
24662  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24663  ;;
24664  *)
24665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24666for as_dir in $PATH
24667do
24668  IFS=$as_save_IFS
24669  test -z "$as_dir" && as_dir=.
24670    for ac_exec_ext in '' $ac_executable_extensions; do
24671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24672    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24674    break 2
24675  fi
24676done
24677  done
24678IFS=$as_save_IFS
24679
24680  ;;
24681esac
24682fi
24683JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24684if test -n "$JAVA_CHECK"; then
24685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24686$as_echo "$JAVA_CHECK" >&6; }
24687else
24688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24689$as_echo "no" >&6; }
24690fi
24691
24692
24693  BINARY="$JAVAC_CHECK"
24694  if test "x$JAVAC_CHECK" = x; then
24695    BINARY="$JAVA_CHECK"
24696  fi
24697  if test "x$BINARY" != x; then
24698    # So there is a java(c) binary, it might be part of a JDK.
24699    # Lets find the JDK/JRE directory by following symbolic links.
24700    # Linux/GNU systems often have links from /usr/bin/java to
24701    # /etc/alternatives/java to the real JDK binary.
24702
24703  if test "x$OPENJDK_BUILD_OS" != xwindows; then
24704    # Follow a chain of symbolic links. Use readlink
24705    # where it exists, else fall back to horribly
24706    # complicated shell code.
24707    if test "x$READLINK_TESTED" != yes; then
24708      # On MacOSX there is a readlink tool with a different
24709      # purpose than the GNU readlink tool. Check the found readlink.
24710      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24711      if test "x$ISGNU" = x; then
24712        # A readlink that we do not know how to use.
24713        # Are there other non-GNU readlinks out there?
24714        READLINK_TESTED=yes
24715        READLINK=
24716      fi
24717    fi
24718
24719    if test "x$READLINK" != x; then
24720      BINARY=`$READLINK -f $BINARY`
24721    else
24722      # Save the current directory for restoring afterwards
24723      STARTDIR=$PWD
24724      COUNTER=0
24725      sym_link_dir=`$DIRNAME $BINARY`
24726      sym_link_file=`$BASENAME $BINARY`
24727      cd $sym_link_dir
24728      # Use -P flag to resolve symlinks in directories.
24729      cd `$THEPWDCMD -P`
24730      sym_link_dir=`$THEPWDCMD -P`
24731      # Resolve file symlinks
24732      while test $COUNTER -lt 20; do
24733        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24734        if test "x$ISLINK" == x; then
24735          # This is not a symbolic link! We are done!
24736          break
24737        fi
24738        # Again resolve directory symlinks since the target of the just found
24739        # link could be in a different directory
24740        cd `$DIRNAME $ISLINK`
24741        sym_link_dir=`$THEPWDCMD -P`
24742        sym_link_file=`$BASENAME $ISLINK`
24743        let COUNTER=COUNTER+1
24744      done
24745      cd $STARTDIR
24746      BINARY=$sym_link_dir/$sym_link_file
24747    fi
24748  fi
24749
24750    BOOT_JDK=`dirname "$BINARY"`
24751    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24752    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24753      # Looks like we found ourselves an JDK
24754      BOOT_JDK_FOUND=maybe
24755      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24756$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24757    fi
24758  fi
24759
24760
24761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24763      # Do we have a bin/java?
24764      if test ! -x "$BOOT_JDK/bin/java"; then
24765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24767        BOOT_JDK_FOUND=no
24768      else
24769        # Do we have a bin/javac?
24770        if test ! -x "$BOOT_JDK/bin/javac"; then
24771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24775          BOOT_JDK_FOUND=no
24776        else
24777          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24778          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24779
24780          # Extra M4 quote needed to protect [] in grep expression.
24781          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24782          if test "x$FOUND_CORRECT_VERSION" = x; then
24783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24785            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24786$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24787            BOOT_JDK_FOUND=no
24788          else
24789            # We're done! :-)
24790            BOOT_JDK_FOUND=yes
24791
24792  # Only process if variable expands to non-empty
24793
24794  if test "x$BOOT_JDK" != x; then
24795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24796
24797  # Input might be given as Windows format, start by converting to
24798  # unix format.
24799  path="$BOOT_JDK"
24800  new_path=`$CYGPATH -u "$path"`
24801
24802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24805  # "foo.exe" is OK but "foo" is an error.
24806  #
24807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24808  # It is also a way to make sure we got the proper file name for the real test later on.
24809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24810  if test "x$test_shortpath" = x; then
24811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24814  fi
24815
24816  # Call helper function which possibly converts this using DOS-style short mode.
24817  # If so, the updated path is stored in $new_path.
24818
24819  input_path="$new_path"
24820  # Check if we need to convert this using DOS-style short mode. If the path
24821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24822  # take no chances and rewrite it.
24823  # Note: m4 eats our [], so we need to use [ and ] instead.
24824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24825  if test "x$has_forbidden_chars" != x; then
24826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24830      # Going to short mode and back again did indeed matter. Since short mode is
24831      # case insensitive, let's make it lowercase to improve readability.
24832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24833      # Now convert it back to Unix-style (cygpath)
24834      input_path=`$CYGPATH -u "$shortmode_path"`
24835      new_path="$input_path"
24836    fi
24837  fi
24838
24839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24840  if test "x$test_cygdrive_prefix" = x; then
24841    # As a simple fix, exclude /usr/bin since it's not a real path.
24842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24844      # a path prefixed by /cygdrive for fixpath to work.
24845      new_path="$CYGWIN_ROOT_PATH$input_path"
24846    fi
24847  fi
24848
24849
24850  if test "x$path" != "x$new_path"; then
24851    BOOT_JDK="$new_path"
24852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24854  fi
24855
24856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24857
24858  path="$BOOT_JDK"
24859  has_colon=`$ECHO $path | $GREP ^.:`
24860  new_path="$path"
24861  if test "x$has_colon" = x; then
24862    # Not in mixed or Windows style, start by that.
24863    new_path=`cmd //c echo $path`
24864  fi
24865
24866
24867  input_path="$new_path"
24868  # Check if we need to convert this using DOS-style short mode. If the path
24869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24870  # take no chances and rewrite it.
24871  # Note: m4 eats our [], so we need to use [ and ] instead.
24872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24873  if test "x$has_forbidden_chars" != x; then
24874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24876  fi
24877
24878
24879  windows_path="$new_path"
24880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24881    unix_path=`$CYGPATH -u "$windows_path"`
24882    new_path="$unix_path"
24883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24885    new_path="$unix_path"
24886  fi
24887
24888  if test "x$path" != "x$new_path"; then
24889    BOOT_JDK="$new_path"
24890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24892  fi
24893
24894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24896
24897    else
24898      # We're on a unix platform. Hooray! :)
24899      path="$BOOT_JDK"
24900      has_space=`$ECHO "$path" | $GREP " "`
24901      if test "x$has_space" != x; then
24902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24905      fi
24906
24907      # Use eval to expand a potential ~
24908      eval path="$path"
24909      if test ! -f "$path" && test ! -d "$path"; then
24910        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24911      fi
24912
24913      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24914    fi
24915  fi
24916
24917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24918$as_echo_n "checking for Boot JDK... " >&6; }
24919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24920$as_echo "$BOOT_JDK" >&6; }
24921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24922$as_echo_n "checking Boot JDK version... " >&6; }
24923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24925$as_echo "$BOOT_JDK_VERSION" >&6; }
24926          fi # end check jdk version
24927        fi # end check javac
24928      fi # end check java
24929    fi # end check boot jdk found
24930  fi
24931
24932
24933  # Test: Is there a JDK installed in default, well-known locations?
24934
24935  if test "x$BOOT_JDK_FOUND" = xno; then
24936    # Now execute the test
24937
24938  if test "x$OPENJDK_TARGET_OS" = xwindows; then
24939
24940  if test "x$BOOT_JDK_FOUND" = xno; then
24941    # Now execute the test
24942
24943  if test "x$ProgramW6432" != x; then
24944    VIRTUAL_DIR="$ProgramW6432/Java"
24945
24946  windows_path="$VIRTUAL_DIR"
24947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24948    unix_path=`$CYGPATH -u "$windows_path"`
24949    VIRTUAL_DIR="$unix_path"
24950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24952    VIRTUAL_DIR="$unix_path"
24953  fi
24954
24955
24956  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24957  BOOT_JDK_SUFFIX=""
24958  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24959  if test "x$ALL_JDKS_FOUND" != x; then
24960    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24961
24962  if test "x$BOOT_JDK_FOUND" = xno; then
24963    # Now execute the test
24964
24965        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24966        if test -d "$BOOT_JDK"; then
24967          BOOT_JDK_FOUND=maybe
24968          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24969$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24970        fi
24971
24972
24973    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24974    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24975      # Do we have a bin/java?
24976      if test ! -x "$BOOT_JDK/bin/java"; then
24977        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24979        BOOT_JDK_FOUND=no
24980      else
24981        # Do we have a bin/javac?
24982        if test ! -x "$BOOT_JDK/bin/javac"; then
24983          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24986$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24987          BOOT_JDK_FOUND=no
24988        else
24989          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24990          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24991
24992          # Extra M4 quote needed to protect [] in grep expression.
24993          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24994          if test "x$FOUND_CORRECT_VERSION" = x; then
24995            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24998$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24999            BOOT_JDK_FOUND=no
25000          else
25001            # We're done! :-)
25002            BOOT_JDK_FOUND=yes
25003
25004  # Only process if variable expands to non-empty
25005
25006  if test "x$BOOT_JDK" != x; then
25007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25008
25009  # Input might be given as Windows format, start by converting to
25010  # unix format.
25011  path="$BOOT_JDK"
25012  new_path=`$CYGPATH -u "$path"`
25013
25014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25017  # "foo.exe" is OK but "foo" is an error.
25018  #
25019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25020  # It is also a way to make sure we got the proper file name for the real test later on.
25021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25022  if test "x$test_shortpath" = x; then
25023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25024$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25025    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25026  fi
25027
25028  # Call helper function which possibly converts this using DOS-style short mode.
25029  # If so, the updated path is stored in $new_path.
25030
25031  input_path="$new_path"
25032  # Check if we need to convert this using DOS-style short mode. If the path
25033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25034  # take no chances and rewrite it.
25035  # Note: m4 eats our [], so we need to use [ and ] instead.
25036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25037  if test "x$has_forbidden_chars" != x; then
25038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25042      # Going to short mode and back again did indeed matter. Since short mode is
25043      # case insensitive, let's make it lowercase to improve readability.
25044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25045      # Now convert it back to Unix-style (cygpath)
25046      input_path=`$CYGPATH -u "$shortmode_path"`
25047      new_path="$input_path"
25048    fi
25049  fi
25050
25051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25052  if test "x$test_cygdrive_prefix" = x; then
25053    # As a simple fix, exclude /usr/bin since it's not a real path.
25054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25056      # a path prefixed by /cygdrive for fixpath to work.
25057      new_path="$CYGWIN_ROOT_PATH$input_path"
25058    fi
25059  fi
25060
25061
25062  if test "x$path" != "x$new_path"; then
25063    BOOT_JDK="$new_path"
25064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25065$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25066  fi
25067
25068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25069
25070  path="$BOOT_JDK"
25071  has_colon=`$ECHO $path | $GREP ^.:`
25072  new_path="$path"
25073  if test "x$has_colon" = x; then
25074    # Not in mixed or Windows style, start by that.
25075    new_path=`cmd //c echo $path`
25076  fi
25077
25078
25079  input_path="$new_path"
25080  # Check if we need to convert this using DOS-style short mode. If the path
25081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25082  # take no chances and rewrite it.
25083  # Note: m4 eats our [], so we need to use [ and ] instead.
25084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25085  if test "x$has_forbidden_chars" != x; then
25086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25088  fi
25089
25090
25091  windows_path="$new_path"
25092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25093    unix_path=`$CYGPATH -u "$windows_path"`
25094    new_path="$unix_path"
25095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25097    new_path="$unix_path"
25098  fi
25099
25100  if test "x$path" != "x$new_path"; then
25101    BOOT_JDK="$new_path"
25102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25104  fi
25105
25106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25108
25109    else
25110      # We're on a unix platform. Hooray! :)
25111      path="$BOOT_JDK"
25112      has_space=`$ECHO "$path" | $GREP " "`
25113      if test "x$has_space" != x; then
25114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25117      fi
25118
25119      # Use eval to expand a potential ~
25120      eval path="$path"
25121      if test ! -f "$path" && test ! -d "$path"; then
25122        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25123      fi
25124
25125      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25126    fi
25127  fi
25128
25129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25130$as_echo_n "checking for Boot JDK... " >&6; }
25131            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25132$as_echo "$BOOT_JDK" >&6; }
25133            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25134$as_echo_n "checking Boot JDK version... " >&6; }
25135            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25137$as_echo "$BOOT_JDK_VERSION" >&6; }
25138          fi # end check jdk version
25139        fi # end check javac
25140      fi # end check java
25141    fi # end check boot jdk found
25142  fi
25143
25144    done
25145  fi
25146
25147  fi
25148
25149
25150    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25151    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25152      # Do we have a bin/java?
25153      if test ! -x "$BOOT_JDK/bin/java"; then
25154        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25156        BOOT_JDK_FOUND=no
25157      else
25158        # Do we have a bin/javac?
25159        if test ! -x "$BOOT_JDK/bin/javac"; then
25160          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25162          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25163$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25164          BOOT_JDK_FOUND=no
25165        else
25166          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25167          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25168
25169          # Extra M4 quote needed to protect [] in grep expression.
25170          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25171          if test "x$FOUND_CORRECT_VERSION" = x; then
25172            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25174            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25175$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25176            BOOT_JDK_FOUND=no
25177          else
25178            # We're done! :-)
25179            BOOT_JDK_FOUND=yes
25180
25181  # Only process if variable expands to non-empty
25182
25183  if test "x$BOOT_JDK" != x; then
25184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25185
25186  # Input might be given as Windows format, start by converting to
25187  # unix format.
25188  path="$BOOT_JDK"
25189  new_path=`$CYGPATH -u "$path"`
25190
25191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25194  # "foo.exe" is OK but "foo" is an error.
25195  #
25196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25197  # It is also a way to make sure we got the proper file name for the real test later on.
25198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25199  if test "x$test_shortpath" = x; then
25200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25203  fi
25204
25205  # Call helper function which possibly converts this using DOS-style short mode.
25206  # If so, the updated path is stored in $new_path.
25207
25208  input_path="$new_path"
25209  # Check if we need to convert this using DOS-style short mode. If the path
25210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25211  # take no chances and rewrite it.
25212  # Note: m4 eats our [], so we need to use [ and ] instead.
25213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25214  if test "x$has_forbidden_chars" != x; then
25215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25219      # Going to short mode and back again did indeed matter. Since short mode is
25220      # case insensitive, let's make it lowercase to improve readability.
25221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25222      # Now convert it back to Unix-style (cygpath)
25223      input_path=`$CYGPATH -u "$shortmode_path"`
25224      new_path="$input_path"
25225    fi
25226  fi
25227
25228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25229  if test "x$test_cygdrive_prefix" = x; then
25230    # As a simple fix, exclude /usr/bin since it's not a real path.
25231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25233      # a path prefixed by /cygdrive for fixpath to work.
25234      new_path="$CYGWIN_ROOT_PATH$input_path"
25235    fi
25236  fi
25237
25238
25239  if test "x$path" != "x$new_path"; then
25240    BOOT_JDK="$new_path"
25241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25243  fi
25244
25245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25246
25247  path="$BOOT_JDK"
25248  has_colon=`$ECHO $path | $GREP ^.:`
25249  new_path="$path"
25250  if test "x$has_colon" = x; then
25251    # Not in mixed or Windows style, start by that.
25252    new_path=`cmd //c echo $path`
25253  fi
25254
25255
25256  input_path="$new_path"
25257  # Check if we need to convert this using DOS-style short mode. If the path
25258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25259  # take no chances and rewrite it.
25260  # Note: m4 eats our [], so we need to use [ and ] instead.
25261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25262  if test "x$has_forbidden_chars" != x; then
25263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25265  fi
25266
25267
25268  windows_path="$new_path"
25269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25270    unix_path=`$CYGPATH -u "$windows_path"`
25271    new_path="$unix_path"
25272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25274    new_path="$unix_path"
25275  fi
25276
25277  if test "x$path" != "x$new_path"; then
25278    BOOT_JDK="$new_path"
25279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25281  fi
25282
25283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25285
25286    else
25287      # We're on a unix platform. Hooray! :)
25288      path="$BOOT_JDK"
25289      has_space=`$ECHO "$path" | $GREP " "`
25290      if test "x$has_space" != x; then
25291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25294      fi
25295
25296      # Use eval to expand a potential ~
25297      eval path="$path"
25298      if test ! -f "$path" && test ! -d "$path"; then
25299        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25300      fi
25301
25302      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25303    fi
25304  fi
25305
25306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25307$as_echo_n "checking for Boot JDK... " >&6; }
25308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25309$as_echo "$BOOT_JDK" >&6; }
25310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25311$as_echo_n "checking Boot JDK version... " >&6; }
25312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25314$as_echo "$BOOT_JDK_VERSION" >&6; }
25315          fi # end check jdk version
25316        fi # end check javac
25317      fi # end check java
25318    fi # end check boot jdk found
25319  fi
25320
25321
25322  if test "x$BOOT_JDK_FOUND" = xno; then
25323    # Now execute the test
25324
25325  if test "x$PROGRAMW6432" != x; then
25326    VIRTUAL_DIR="$PROGRAMW6432/Java"
25327
25328  windows_path="$VIRTUAL_DIR"
25329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25330    unix_path=`$CYGPATH -u "$windows_path"`
25331    VIRTUAL_DIR="$unix_path"
25332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25334    VIRTUAL_DIR="$unix_path"
25335  fi
25336
25337
25338  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25339  BOOT_JDK_SUFFIX=""
25340  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25341  if test "x$ALL_JDKS_FOUND" != x; then
25342    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25343
25344  if test "x$BOOT_JDK_FOUND" = xno; then
25345    # Now execute the test
25346
25347        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25348        if test -d "$BOOT_JDK"; then
25349          BOOT_JDK_FOUND=maybe
25350          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25351$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25352        fi
25353
25354
25355    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25356    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25357      # Do we have a bin/java?
25358      if test ! -x "$BOOT_JDK/bin/java"; then
25359        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25361        BOOT_JDK_FOUND=no
25362      else
25363        # Do we have a bin/javac?
25364        if test ! -x "$BOOT_JDK/bin/javac"; then
25365          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25367          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25368$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25369          BOOT_JDK_FOUND=no
25370        else
25371          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25372          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25373
25374          # Extra M4 quote needed to protect [] in grep expression.
25375          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25376          if test "x$FOUND_CORRECT_VERSION" = x; then
25377            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25379            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25380$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25381            BOOT_JDK_FOUND=no
25382          else
25383            # We're done! :-)
25384            BOOT_JDK_FOUND=yes
25385
25386  # Only process if variable expands to non-empty
25387
25388  if test "x$BOOT_JDK" != x; then
25389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25390
25391  # Input might be given as Windows format, start by converting to
25392  # unix format.
25393  path="$BOOT_JDK"
25394  new_path=`$CYGPATH -u "$path"`
25395
25396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25399  # "foo.exe" is OK but "foo" is an error.
25400  #
25401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25402  # It is also a way to make sure we got the proper file name for the real test later on.
25403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25404  if test "x$test_shortpath" = x; then
25405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25407    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25408  fi
25409
25410  # Call helper function which possibly converts this using DOS-style short mode.
25411  # If so, the updated path is stored in $new_path.
25412
25413  input_path="$new_path"
25414  # Check if we need to convert this using DOS-style short mode. If the path
25415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25416  # take no chances and rewrite it.
25417  # Note: m4 eats our [], so we need to use [ and ] instead.
25418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25419  if test "x$has_forbidden_chars" != x; then
25420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25424      # Going to short mode and back again did indeed matter. Since short mode is
25425      # case insensitive, let's make it lowercase to improve readability.
25426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25427      # Now convert it back to Unix-style (cygpath)
25428      input_path=`$CYGPATH -u "$shortmode_path"`
25429      new_path="$input_path"
25430    fi
25431  fi
25432
25433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25434  if test "x$test_cygdrive_prefix" = x; then
25435    # As a simple fix, exclude /usr/bin since it's not a real path.
25436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25438      # a path prefixed by /cygdrive for fixpath to work.
25439      new_path="$CYGWIN_ROOT_PATH$input_path"
25440    fi
25441  fi
25442
25443
25444  if test "x$path" != "x$new_path"; then
25445    BOOT_JDK="$new_path"
25446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25448  fi
25449
25450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451
25452  path="$BOOT_JDK"
25453  has_colon=`$ECHO $path | $GREP ^.:`
25454  new_path="$path"
25455  if test "x$has_colon" = x; then
25456    # Not in mixed or Windows style, start by that.
25457    new_path=`cmd //c echo $path`
25458  fi
25459
25460
25461  input_path="$new_path"
25462  # Check if we need to convert this using DOS-style short mode. If the path
25463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25464  # take no chances and rewrite it.
25465  # Note: m4 eats our [], so we need to use [ and ] instead.
25466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25467  if test "x$has_forbidden_chars" != x; then
25468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25470  fi
25471
25472
25473  windows_path="$new_path"
25474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25475    unix_path=`$CYGPATH -u "$windows_path"`
25476    new_path="$unix_path"
25477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25479    new_path="$unix_path"
25480  fi
25481
25482  if test "x$path" != "x$new_path"; then
25483    BOOT_JDK="$new_path"
25484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25485$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25486  fi
25487
25488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25490
25491    else
25492      # We're on a unix platform. Hooray! :)
25493      path="$BOOT_JDK"
25494      has_space=`$ECHO "$path" | $GREP " "`
25495      if test "x$has_space" != x; then
25496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25497$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25499      fi
25500
25501      # Use eval to expand a potential ~
25502      eval path="$path"
25503      if test ! -f "$path" && test ! -d "$path"; then
25504        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25505      fi
25506
25507      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25508    fi
25509  fi
25510
25511            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25512$as_echo_n "checking for Boot JDK... " >&6; }
25513            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25514$as_echo "$BOOT_JDK" >&6; }
25515            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25516$as_echo_n "checking Boot JDK version... " >&6; }
25517            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25519$as_echo "$BOOT_JDK_VERSION" >&6; }
25520          fi # end check jdk version
25521        fi # end check javac
25522      fi # end check java
25523    fi # end check boot jdk found
25524  fi
25525
25526    done
25527  fi
25528
25529  fi
25530
25531
25532    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25533    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25534      # Do we have a bin/java?
25535      if test ! -x "$BOOT_JDK/bin/java"; then
25536        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25538        BOOT_JDK_FOUND=no
25539      else
25540        # Do we have a bin/javac?
25541        if test ! -x "$BOOT_JDK/bin/javac"; then
25542          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25544          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25545$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25546          BOOT_JDK_FOUND=no
25547        else
25548          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25549          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25550
25551          # Extra M4 quote needed to protect [] in grep expression.
25552          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25553          if test "x$FOUND_CORRECT_VERSION" = x; then
25554            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25556            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25557$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25558            BOOT_JDK_FOUND=no
25559          else
25560            # We're done! :-)
25561            BOOT_JDK_FOUND=yes
25562
25563  # Only process if variable expands to non-empty
25564
25565  if test "x$BOOT_JDK" != x; then
25566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25567
25568  # Input might be given as Windows format, start by converting to
25569  # unix format.
25570  path="$BOOT_JDK"
25571  new_path=`$CYGPATH -u "$path"`
25572
25573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25576  # "foo.exe" is OK but "foo" is an error.
25577  #
25578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25579  # It is also a way to make sure we got the proper file name for the real test later on.
25580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25581  if test "x$test_shortpath" = x; then
25582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25584    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25585  fi
25586
25587  # Call helper function which possibly converts this using DOS-style short mode.
25588  # If so, the updated path is stored in $new_path.
25589
25590  input_path="$new_path"
25591  # Check if we need to convert this using DOS-style short mode. If the path
25592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25593  # take no chances and rewrite it.
25594  # Note: m4 eats our [], so we need to use [ and ] instead.
25595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25596  if test "x$has_forbidden_chars" != x; then
25597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25601      # Going to short mode and back again did indeed matter. Since short mode is
25602      # case insensitive, let's make it lowercase to improve readability.
25603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25604      # Now convert it back to Unix-style (cygpath)
25605      input_path=`$CYGPATH -u "$shortmode_path"`
25606      new_path="$input_path"
25607    fi
25608  fi
25609
25610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25611  if test "x$test_cygdrive_prefix" = x; then
25612    # As a simple fix, exclude /usr/bin since it's not a real path.
25613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25615      # a path prefixed by /cygdrive for fixpath to work.
25616      new_path="$CYGWIN_ROOT_PATH$input_path"
25617    fi
25618  fi
25619
25620
25621  if test "x$path" != "x$new_path"; then
25622    BOOT_JDK="$new_path"
25623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25625  fi
25626
25627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25628
25629  path="$BOOT_JDK"
25630  has_colon=`$ECHO $path | $GREP ^.:`
25631  new_path="$path"
25632  if test "x$has_colon" = x; then
25633    # Not in mixed or Windows style, start by that.
25634    new_path=`cmd //c echo $path`
25635  fi
25636
25637
25638  input_path="$new_path"
25639  # Check if we need to convert this using DOS-style short mode. If the path
25640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25641  # take no chances and rewrite it.
25642  # Note: m4 eats our [], so we need to use [ and ] instead.
25643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25644  if test "x$has_forbidden_chars" != x; then
25645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25647  fi
25648
25649
25650  windows_path="$new_path"
25651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25652    unix_path=`$CYGPATH -u "$windows_path"`
25653    new_path="$unix_path"
25654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25656    new_path="$unix_path"
25657  fi
25658
25659  if test "x$path" != "x$new_path"; then
25660    BOOT_JDK="$new_path"
25661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25663  fi
25664
25665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25667
25668    else
25669      # We're on a unix platform. Hooray! :)
25670      path="$BOOT_JDK"
25671      has_space=`$ECHO "$path" | $GREP " "`
25672      if test "x$has_space" != x; then
25673        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25675        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25676      fi
25677
25678      # Use eval to expand a potential ~
25679      eval path="$path"
25680      if test ! -f "$path" && test ! -d "$path"; then
25681        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25682      fi
25683
25684      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25685    fi
25686  fi
25687
25688            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25689$as_echo_n "checking for Boot JDK... " >&6; }
25690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25691$as_echo "$BOOT_JDK" >&6; }
25692            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25693$as_echo_n "checking Boot JDK version... " >&6; }
25694            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25695            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25696$as_echo "$BOOT_JDK_VERSION" >&6; }
25697          fi # end check jdk version
25698        fi # end check javac
25699      fi # end check java
25700    fi # end check boot jdk found
25701  fi
25702
25703
25704  if test "x$BOOT_JDK_FOUND" = xno; then
25705    # Now execute the test
25706
25707  if test "x$PROGRAMFILES" != x; then
25708    VIRTUAL_DIR="$PROGRAMFILES/Java"
25709
25710  windows_path="$VIRTUAL_DIR"
25711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25712    unix_path=`$CYGPATH -u "$windows_path"`
25713    VIRTUAL_DIR="$unix_path"
25714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25716    VIRTUAL_DIR="$unix_path"
25717  fi
25718
25719
25720  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25721  BOOT_JDK_SUFFIX=""
25722  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25723  if test "x$ALL_JDKS_FOUND" != x; then
25724    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25725
25726  if test "x$BOOT_JDK_FOUND" = xno; then
25727    # Now execute the test
25728
25729        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25730        if test -d "$BOOT_JDK"; then
25731          BOOT_JDK_FOUND=maybe
25732          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25733$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25734        fi
25735
25736
25737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25739      # Do we have a bin/java?
25740      if test ! -x "$BOOT_JDK/bin/java"; then
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25743        BOOT_JDK_FOUND=no
25744      else
25745        # Do we have a bin/javac?
25746        if test ! -x "$BOOT_JDK/bin/javac"; then
25747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25751          BOOT_JDK_FOUND=no
25752        else
25753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25755
25756          # Extra M4 quote needed to protect [] in grep expression.
25757          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25758          if test "x$FOUND_CORRECT_VERSION" = x; then
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25763            BOOT_JDK_FOUND=no
25764          else
25765            # We're done! :-)
25766            BOOT_JDK_FOUND=yes
25767
25768  # Only process if variable expands to non-empty
25769
25770  if test "x$BOOT_JDK" != x; then
25771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25772
25773  # Input might be given as Windows format, start by converting to
25774  # unix format.
25775  path="$BOOT_JDK"
25776  new_path=`$CYGPATH -u "$path"`
25777
25778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25781  # "foo.exe" is OK but "foo" is an error.
25782  #
25783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25784  # It is also a way to make sure we got the proper file name for the real test later on.
25785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25786  if test "x$test_shortpath" = x; then
25787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25790  fi
25791
25792  # Call helper function which possibly converts this using DOS-style short mode.
25793  # If so, the updated path is stored in $new_path.
25794
25795  input_path="$new_path"
25796  # Check if we need to convert this using DOS-style short mode. If the path
25797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25798  # take no chances and rewrite it.
25799  # Note: m4 eats our [], so we need to use [ and ] instead.
25800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25801  if test "x$has_forbidden_chars" != x; then
25802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25806      # Going to short mode and back again did indeed matter. Since short mode is
25807      # case insensitive, let's make it lowercase to improve readability.
25808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25809      # Now convert it back to Unix-style (cygpath)
25810      input_path=`$CYGPATH -u "$shortmode_path"`
25811      new_path="$input_path"
25812    fi
25813  fi
25814
25815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25816  if test "x$test_cygdrive_prefix" = x; then
25817    # As a simple fix, exclude /usr/bin since it's not a real path.
25818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25820      # a path prefixed by /cygdrive for fixpath to work.
25821      new_path="$CYGWIN_ROOT_PATH$input_path"
25822    fi
25823  fi
25824
25825
25826  if test "x$path" != "x$new_path"; then
25827    BOOT_JDK="$new_path"
25828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25830  fi
25831
25832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25833
25834  path="$BOOT_JDK"
25835  has_colon=`$ECHO $path | $GREP ^.:`
25836  new_path="$path"
25837  if test "x$has_colon" = x; then
25838    # Not in mixed or Windows style, start by that.
25839    new_path=`cmd //c echo $path`
25840  fi
25841
25842
25843  input_path="$new_path"
25844  # Check if we need to convert this using DOS-style short mode. If the path
25845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25846  # take no chances and rewrite it.
25847  # Note: m4 eats our [], so we need to use [ and ] instead.
25848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25849  if test "x$has_forbidden_chars" != x; then
25850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25852  fi
25853
25854
25855  windows_path="$new_path"
25856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25857    unix_path=`$CYGPATH -u "$windows_path"`
25858    new_path="$unix_path"
25859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25861    new_path="$unix_path"
25862  fi
25863
25864  if test "x$path" != "x$new_path"; then
25865    BOOT_JDK="$new_path"
25866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25868  fi
25869
25870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25872
25873    else
25874      # We're on a unix platform. Hooray! :)
25875      path="$BOOT_JDK"
25876      has_space=`$ECHO "$path" | $GREP " "`
25877      if test "x$has_space" != x; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25881      fi
25882
25883      # Use eval to expand a potential ~
25884      eval path="$path"
25885      if test ! -f "$path" && test ! -d "$path"; then
25886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25887      fi
25888
25889      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25890    fi
25891  fi
25892
25893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25894$as_echo_n "checking for Boot JDK... " >&6; }
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25896$as_echo "$BOOT_JDK" >&6; }
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25898$as_echo_n "checking Boot JDK version... " >&6; }
25899            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25901$as_echo "$BOOT_JDK_VERSION" >&6; }
25902          fi # end check jdk version
25903        fi # end check javac
25904      fi # end check java
25905    fi # end check boot jdk found
25906  fi
25907
25908    done
25909  fi
25910
25911  fi
25912
25913
25914    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25915    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25916      # Do we have a bin/java?
25917      if test ! -x "$BOOT_JDK/bin/java"; then
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25920        BOOT_JDK_FOUND=no
25921      else
25922        # Do we have a bin/javac?
25923        if test ! -x "$BOOT_JDK/bin/javac"; then
25924          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25925$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25926          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25927$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25928          BOOT_JDK_FOUND=no
25929        else
25930          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25931          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25932
25933          # Extra M4 quote needed to protect [] in grep expression.
25934          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25935          if test "x$FOUND_CORRECT_VERSION" = x; then
25936            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25938            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25939$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25940            BOOT_JDK_FOUND=no
25941          else
25942            # We're done! :-)
25943            BOOT_JDK_FOUND=yes
25944
25945  # Only process if variable expands to non-empty
25946
25947  if test "x$BOOT_JDK" != x; then
25948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25949
25950  # Input might be given as Windows format, start by converting to
25951  # unix format.
25952  path="$BOOT_JDK"
25953  new_path=`$CYGPATH -u "$path"`
25954
25955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25958  # "foo.exe" is OK but "foo" is an error.
25959  #
25960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25961  # It is also a way to make sure we got the proper file name for the real test later on.
25962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25963  if test "x$test_shortpath" = x; then
25964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25965$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25966    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25967  fi
25968
25969  # Call helper function which possibly converts this using DOS-style short mode.
25970  # If so, the updated path is stored in $new_path.
25971
25972  input_path="$new_path"
25973  # Check if we need to convert this using DOS-style short mode. If the path
25974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25975  # take no chances and rewrite it.
25976  # Note: m4 eats our [], so we need to use [ and ] instead.
25977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25978  if test "x$has_forbidden_chars" != x; then
25979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25983      # Going to short mode and back again did indeed matter. Since short mode is
25984      # case insensitive, let's make it lowercase to improve readability.
25985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25986      # Now convert it back to Unix-style (cygpath)
25987      input_path=`$CYGPATH -u "$shortmode_path"`
25988      new_path="$input_path"
25989    fi
25990  fi
25991
25992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25993  if test "x$test_cygdrive_prefix" = x; then
25994    # As a simple fix, exclude /usr/bin since it's not a real path.
25995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25997      # a path prefixed by /cygdrive for fixpath to work.
25998      new_path="$CYGWIN_ROOT_PATH$input_path"
25999    fi
26000  fi
26001
26002
26003  if test "x$path" != "x$new_path"; then
26004    BOOT_JDK="$new_path"
26005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26006$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26007  fi
26008
26009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26010
26011  path="$BOOT_JDK"
26012  has_colon=`$ECHO $path | $GREP ^.:`
26013  new_path="$path"
26014  if test "x$has_colon" = x; then
26015    # Not in mixed or Windows style, start by that.
26016    new_path=`cmd //c echo $path`
26017  fi
26018
26019
26020  input_path="$new_path"
26021  # Check if we need to convert this using DOS-style short mode. If the path
26022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26023  # take no chances and rewrite it.
26024  # Note: m4 eats our [], so we need to use [ and ] instead.
26025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26026  if test "x$has_forbidden_chars" != x; then
26027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26029  fi
26030
26031
26032  windows_path="$new_path"
26033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26034    unix_path=`$CYGPATH -u "$windows_path"`
26035    new_path="$unix_path"
26036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26038    new_path="$unix_path"
26039  fi
26040
26041  if test "x$path" != "x$new_path"; then
26042    BOOT_JDK="$new_path"
26043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26045  fi
26046
26047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26049
26050    else
26051      # We're on a unix platform. Hooray! :)
26052      path="$BOOT_JDK"
26053      has_space=`$ECHO "$path" | $GREP " "`
26054      if test "x$has_space" != x; then
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26058      fi
26059
26060      # Use eval to expand a potential ~
26061      eval path="$path"
26062      if test ! -f "$path" && test ! -d "$path"; then
26063        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26064      fi
26065
26066      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26067    fi
26068  fi
26069
26070            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26071$as_echo_n "checking for Boot JDK... " >&6; }
26072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26073$as_echo "$BOOT_JDK" >&6; }
26074            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26075$as_echo_n "checking Boot JDK version... " >&6; }
26076            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26078$as_echo "$BOOT_JDK_VERSION" >&6; }
26079          fi # end check jdk version
26080        fi # end check javac
26081      fi # end check java
26082    fi # end check boot jdk found
26083  fi
26084
26085
26086  if test "x$BOOT_JDK_FOUND" = xno; then
26087    # Now execute the test
26088
26089  if test "x$ProgramFiles" != x; then
26090    VIRTUAL_DIR="$ProgramFiles/Java"
26091
26092  windows_path="$VIRTUAL_DIR"
26093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26094    unix_path=`$CYGPATH -u "$windows_path"`
26095    VIRTUAL_DIR="$unix_path"
26096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26098    VIRTUAL_DIR="$unix_path"
26099  fi
26100
26101
26102  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26103  BOOT_JDK_SUFFIX=""
26104  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26105  if test "x$ALL_JDKS_FOUND" != x; then
26106    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26107
26108  if test "x$BOOT_JDK_FOUND" = xno; then
26109    # Now execute the test
26110
26111        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26112        if test -d "$BOOT_JDK"; then
26113          BOOT_JDK_FOUND=maybe
26114          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26115$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26116        fi
26117
26118
26119    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26120    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26121      # Do we have a bin/java?
26122      if test ! -x "$BOOT_JDK/bin/java"; then
26123        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26125        BOOT_JDK_FOUND=no
26126      else
26127        # Do we have a bin/javac?
26128        if test ! -x "$BOOT_JDK/bin/javac"; then
26129          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26130$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26131          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26132$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26133          BOOT_JDK_FOUND=no
26134        else
26135          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26136          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26137
26138          # Extra M4 quote needed to protect [] in grep expression.
26139          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26140          if test "x$FOUND_CORRECT_VERSION" = x; then
26141            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26143            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26144$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26145            BOOT_JDK_FOUND=no
26146          else
26147            # We're done! :-)
26148            BOOT_JDK_FOUND=yes
26149
26150  # Only process if variable expands to non-empty
26151
26152  if test "x$BOOT_JDK" != x; then
26153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26154
26155  # Input might be given as Windows format, start by converting to
26156  # unix format.
26157  path="$BOOT_JDK"
26158  new_path=`$CYGPATH -u "$path"`
26159
26160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26163  # "foo.exe" is OK but "foo" is an error.
26164  #
26165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26166  # It is also a way to make sure we got the proper file name for the real test later on.
26167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26168  if test "x$test_shortpath" = x; then
26169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26171    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26172  fi
26173
26174  # Call helper function which possibly converts this using DOS-style short mode.
26175  # If so, the updated path is stored in $new_path.
26176
26177  input_path="$new_path"
26178  # Check if we need to convert this using DOS-style short mode. If the path
26179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26180  # take no chances and rewrite it.
26181  # Note: m4 eats our [], so we need to use [ and ] instead.
26182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26183  if test "x$has_forbidden_chars" != x; then
26184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26188      # Going to short mode and back again did indeed matter. Since short mode is
26189      # case insensitive, let's make it lowercase to improve readability.
26190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26191      # Now convert it back to Unix-style (cygpath)
26192      input_path=`$CYGPATH -u "$shortmode_path"`
26193      new_path="$input_path"
26194    fi
26195  fi
26196
26197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26198  if test "x$test_cygdrive_prefix" = x; then
26199    # As a simple fix, exclude /usr/bin since it's not a real path.
26200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26202      # a path prefixed by /cygdrive for fixpath to work.
26203      new_path="$CYGWIN_ROOT_PATH$input_path"
26204    fi
26205  fi
26206
26207
26208  if test "x$path" != "x$new_path"; then
26209    BOOT_JDK="$new_path"
26210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26211$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26212  fi
26213
26214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26215
26216  path="$BOOT_JDK"
26217  has_colon=`$ECHO $path | $GREP ^.:`
26218  new_path="$path"
26219  if test "x$has_colon" = x; then
26220    # Not in mixed or Windows style, start by that.
26221    new_path=`cmd //c echo $path`
26222  fi
26223
26224
26225  input_path="$new_path"
26226  # Check if we need to convert this using DOS-style short mode. If the path
26227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26228  # take no chances and rewrite it.
26229  # Note: m4 eats our [], so we need to use [ and ] instead.
26230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26231  if test "x$has_forbidden_chars" != x; then
26232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26234  fi
26235
26236
26237  windows_path="$new_path"
26238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26239    unix_path=`$CYGPATH -u "$windows_path"`
26240    new_path="$unix_path"
26241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26243    new_path="$unix_path"
26244  fi
26245
26246  if test "x$path" != "x$new_path"; then
26247    BOOT_JDK="$new_path"
26248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26250  fi
26251
26252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26254
26255    else
26256      # We're on a unix platform. Hooray! :)
26257      path="$BOOT_JDK"
26258      has_space=`$ECHO "$path" | $GREP " "`
26259      if test "x$has_space" != x; then
26260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26261$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26263      fi
26264
26265      # Use eval to expand a potential ~
26266      eval path="$path"
26267      if test ! -f "$path" && test ! -d "$path"; then
26268        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26269      fi
26270
26271      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26272    fi
26273  fi
26274
26275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26276$as_echo_n "checking for Boot JDK... " >&6; }
26277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26278$as_echo "$BOOT_JDK" >&6; }
26279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26280$as_echo_n "checking Boot JDK version... " >&6; }
26281            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26283$as_echo "$BOOT_JDK_VERSION" >&6; }
26284          fi # end check jdk version
26285        fi # end check javac
26286      fi # end check java
26287    fi # end check boot jdk found
26288  fi
26289
26290    done
26291  fi
26292
26293  fi
26294
26295
26296    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26297    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26298      # Do we have a bin/java?
26299      if test ! -x "$BOOT_JDK/bin/java"; then
26300        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26302        BOOT_JDK_FOUND=no
26303      else
26304        # Do we have a bin/javac?
26305        if test ! -x "$BOOT_JDK/bin/javac"; then
26306          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26308          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26309$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26310          BOOT_JDK_FOUND=no
26311        else
26312          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26313          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26314
26315          # Extra M4 quote needed to protect [] in grep expression.
26316          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26317          if test "x$FOUND_CORRECT_VERSION" = x; then
26318            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26320            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26321$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26322            BOOT_JDK_FOUND=no
26323          else
26324            # We're done! :-)
26325            BOOT_JDK_FOUND=yes
26326
26327  # Only process if variable expands to non-empty
26328
26329  if test "x$BOOT_JDK" != x; then
26330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26331
26332  # Input might be given as Windows format, start by converting to
26333  # unix format.
26334  path="$BOOT_JDK"
26335  new_path=`$CYGPATH -u "$path"`
26336
26337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26340  # "foo.exe" is OK but "foo" is an error.
26341  #
26342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26343  # It is also a way to make sure we got the proper file name for the real test later on.
26344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26345  if test "x$test_shortpath" = x; then
26346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26348    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26349  fi
26350
26351  # Call helper function which possibly converts this using DOS-style short mode.
26352  # If so, the updated path is stored in $new_path.
26353
26354  input_path="$new_path"
26355  # Check if we need to convert this using DOS-style short mode. If the path
26356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26357  # take no chances and rewrite it.
26358  # Note: m4 eats our [], so we need to use [ and ] instead.
26359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26360  if test "x$has_forbidden_chars" != x; then
26361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26365      # Going to short mode and back again did indeed matter. Since short mode is
26366      # case insensitive, let's make it lowercase to improve readability.
26367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26368      # Now convert it back to Unix-style (cygpath)
26369      input_path=`$CYGPATH -u "$shortmode_path"`
26370      new_path="$input_path"
26371    fi
26372  fi
26373
26374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26375  if test "x$test_cygdrive_prefix" = x; then
26376    # As a simple fix, exclude /usr/bin since it's not a real path.
26377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26379      # a path prefixed by /cygdrive for fixpath to work.
26380      new_path="$CYGWIN_ROOT_PATH$input_path"
26381    fi
26382  fi
26383
26384
26385  if test "x$path" != "x$new_path"; then
26386    BOOT_JDK="$new_path"
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26389  fi
26390
26391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26392
26393  path="$BOOT_JDK"
26394  has_colon=`$ECHO $path | $GREP ^.:`
26395  new_path="$path"
26396  if test "x$has_colon" = x; then
26397    # Not in mixed or Windows style, start by that.
26398    new_path=`cmd //c echo $path`
26399  fi
26400
26401
26402  input_path="$new_path"
26403  # Check if we need to convert this using DOS-style short mode. If the path
26404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26405  # take no chances and rewrite it.
26406  # Note: m4 eats our [], so we need to use [ and ] instead.
26407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26408  if test "x$has_forbidden_chars" != x; then
26409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26411  fi
26412
26413
26414  windows_path="$new_path"
26415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26416    unix_path=`$CYGPATH -u "$windows_path"`
26417    new_path="$unix_path"
26418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26420    new_path="$unix_path"
26421  fi
26422
26423  if test "x$path" != "x$new_path"; then
26424    BOOT_JDK="$new_path"
26425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26427  fi
26428
26429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26431
26432    else
26433      # We're on a unix platform. Hooray! :)
26434      path="$BOOT_JDK"
26435      has_space=`$ECHO "$path" | $GREP " "`
26436      if test "x$has_space" != x; then
26437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26440      fi
26441
26442      # Use eval to expand a potential ~
26443      eval path="$path"
26444      if test ! -f "$path" && test ! -d "$path"; then
26445        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26446      fi
26447
26448      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26449    fi
26450  fi
26451
26452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26453$as_echo_n "checking for Boot JDK... " >&6; }
26454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26455$as_echo "$BOOT_JDK" >&6; }
26456            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26457$as_echo_n "checking Boot JDK version... " >&6; }
26458            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26460$as_echo "$BOOT_JDK_VERSION" >&6; }
26461          fi # end check jdk version
26462        fi # end check javac
26463      fi # end check java
26464    fi # end check boot jdk found
26465  fi
26466
26467
26468  if test "x$BOOT_JDK_FOUND" = xno; then
26469    # Now execute the test
26470
26471  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26472  BOOT_JDK_SUFFIX=""
26473  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26474  if test "x$ALL_JDKS_FOUND" != x; then
26475    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26476
26477  if test "x$BOOT_JDK_FOUND" = xno; then
26478    # Now execute the test
26479
26480        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26481        if test -d "$BOOT_JDK"; then
26482          BOOT_JDK_FOUND=maybe
26483          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26484$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26485        fi
26486
26487
26488    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26489    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26490      # Do we have a bin/java?
26491      if test ! -x "$BOOT_JDK/bin/java"; then
26492        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26494        BOOT_JDK_FOUND=no
26495      else
26496        # Do we have a bin/javac?
26497        if test ! -x "$BOOT_JDK/bin/javac"; then
26498          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26500          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26501$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26502          BOOT_JDK_FOUND=no
26503        else
26504          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26505          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26506
26507          # Extra M4 quote needed to protect [] in grep expression.
26508          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26509          if test "x$FOUND_CORRECT_VERSION" = x; then
26510            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26512            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26513$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26514            BOOT_JDK_FOUND=no
26515          else
26516            # We're done! :-)
26517            BOOT_JDK_FOUND=yes
26518
26519  # Only process if variable expands to non-empty
26520
26521  if test "x$BOOT_JDK" != x; then
26522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26523
26524  # Input might be given as Windows format, start by converting to
26525  # unix format.
26526  path="$BOOT_JDK"
26527  new_path=`$CYGPATH -u "$path"`
26528
26529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26532  # "foo.exe" is OK but "foo" is an error.
26533  #
26534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26535  # It is also a way to make sure we got the proper file name for the real test later on.
26536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26537  if test "x$test_shortpath" = x; then
26538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26540    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26541  fi
26542
26543  # Call helper function which possibly converts this using DOS-style short mode.
26544  # If so, the updated path is stored in $new_path.
26545
26546  input_path="$new_path"
26547  # Check if we need to convert this using DOS-style short mode. If the path
26548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26549  # take no chances and rewrite it.
26550  # Note: m4 eats our [], so we need to use [ and ] instead.
26551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26552  if test "x$has_forbidden_chars" != x; then
26553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26557      # Going to short mode and back again did indeed matter. Since short mode is
26558      # case insensitive, let's make it lowercase to improve readability.
26559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26560      # Now convert it back to Unix-style (cygpath)
26561      input_path=`$CYGPATH -u "$shortmode_path"`
26562      new_path="$input_path"
26563    fi
26564  fi
26565
26566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26567  if test "x$test_cygdrive_prefix" = x; then
26568    # As a simple fix, exclude /usr/bin since it's not a real path.
26569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26571      # a path prefixed by /cygdrive for fixpath to work.
26572      new_path="$CYGWIN_ROOT_PATH$input_path"
26573    fi
26574  fi
26575
26576
26577  if test "x$path" != "x$new_path"; then
26578    BOOT_JDK="$new_path"
26579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26581  fi
26582
26583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26584
26585  path="$BOOT_JDK"
26586  has_colon=`$ECHO $path | $GREP ^.:`
26587  new_path="$path"
26588  if test "x$has_colon" = x; then
26589    # Not in mixed or Windows style, start by that.
26590    new_path=`cmd //c echo $path`
26591  fi
26592
26593
26594  input_path="$new_path"
26595  # Check if we need to convert this using DOS-style short mode. If the path
26596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26597  # take no chances and rewrite it.
26598  # Note: m4 eats our [], so we need to use [ and ] instead.
26599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26600  if test "x$has_forbidden_chars" != x; then
26601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26603  fi
26604
26605
26606  windows_path="$new_path"
26607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26608    unix_path=`$CYGPATH -u "$windows_path"`
26609    new_path="$unix_path"
26610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26612    new_path="$unix_path"
26613  fi
26614
26615  if test "x$path" != "x$new_path"; then
26616    BOOT_JDK="$new_path"
26617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26619  fi
26620
26621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26623
26624    else
26625      # We're on a unix platform. Hooray! :)
26626      path="$BOOT_JDK"
26627      has_space=`$ECHO "$path" | $GREP " "`
26628      if test "x$has_space" != x; then
26629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26632      fi
26633
26634      # Use eval to expand a potential ~
26635      eval path="$path"
26636      if test ! -f "$path" && test ! -d "$path"; then
26637        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26638      fi
26639
26640      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26641    fi
26642  fi
26643
26644            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26645$as_echo_n "checking for Boot JDK... " >&6; }
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26647$as_echo "$BOOT_JDK" >&6; }
26648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26649$as_echo_n "checking Boot JDK version... " >&6; }
26650            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26652$as_echo "$BOOT_JDK_VERSION" >&6; }
26653          fi # end check jdk version
26654        fi # end check javac
26655      fi # end check java
26656    fi # end check boot jdk found
26657  fi
26658
26659    done
26660  fi
26661
26662
26663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26664    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26665      # Do we have a bin/java?
26666      if test ! -x "$BOOT_JDK/bin/java"; then
26667        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26669        BOOT_JDK_FOUND=no
26670      else
26671        # Do we have a bin/javac?
26672        if test ! -x "$BOOT_JDK/bin/javac"; then
26673          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26675          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26676$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26677          BOOT_JDK_FOUND=no
26678        else
26679          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26680          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26681
26682          # Extra M4 quote needed to protect [] in grep expression.
26683          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26684          if test "x$FOUND_CORRECT_VERSION" = x; then
26685            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26687            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26688$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26689            BOOT_JDK_FOUND=no
26690          else
26691            # We're done! :-)
26692            BOOT_JDK_FOUND=yes
26693
26694  # Only process if variable expands to non-empty
26695
26696  if test "x$BOOT_JDK" != x; then
26697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26698
26699  # Input might be given as Windows format, start by converting to
26700  # unix format.
26701  path="$BOOT_JDK"
26702  new_path=`$CYGPATH -u "$path"`
26703
26704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26707  # "foo.exe" is OK but "foo" is an error.
26708  #
26709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26710  # It is also a way to make sure we got the proper file name for the real test later on.
26711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26712  if test "x$test_shortpath" = x; then
26713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26715    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26716  fi
26717
26718  # Call helper function which possibly converts this using DOS-style short mode.
26719  # If so, the updated path is stored in $new_path.
26720
26721  input_path="$new_path"
26722  # Check if we need to convert this using DOS-style short mode. If the path
26723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26724  # take no chances and rewrite it.
26725  # Note: m4 eats our [], so we need to use [ and ] instead.
26726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26727  if test "x$has_forbidden_chars" != x; then
26728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26732      # Going to short mode and back again did indeed matter. Since short mode is
26733      # case insensitive, let's make it lowercase to improve readability.
26734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26735      # Now convert it back to Unix-style (cygpath)
26736      input_path=`$CYGPATH -u "$shortmode_path"`
26737      new_path="$input_path"
26738    fi
26739  fi
26740
26741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26742  if test "x$test_cygdrive_prefix" = x; then
26743    # As a simple fix, exclude /usr/bin since it's not a real path.
26744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26746      # a path prefixed by /cygdrive for fixpath to work.
26747      new_path="$CYGWIN_ROOT_PATH$input_path"
26748    fi
26749  fi
26750
26751
26752  if test "x$path" != "x$new_path"; then
26753    BOOT_JDK="$new_path"
26754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26756  fi
26757
26758    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26759
26760  path="$BOOT_JDK"
26761  has_colon=`$ECHO $path | $GREP ^.:`
26762  new_path="$path"
26763  if test "x$has_colon" = x; then
26764    # Not in mixed or Windows style, start by that.
26765    new_path=`cmd //c echo $path`
26766  fi
26767
26768
26769  input_path="$new_path"
26770  # Check if we need to convert this using DOS-style short mode. If the path
26771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26772  # take no chances and rewrite it.
26773  # Note: m4 eats our [], so we need to use [ and ] instead.
26774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26775  if test "x$has_forbidden_chars" != x; then
26776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26778  fi
26779
26780
26781  windows_path="$new_path"
26782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26783    unix_path=`$CYGPATH -u "$windows_path"`
26784    new_path="$unix_path"
26785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26787    new_path="$unix_path"
26788  fi
26789
26790  if test "x$path" != "x$new_path"; then
26791    BOOT_JDK="$new_path"
26792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26794  fi
26795
26796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26798
26799    else
26800      # We're on a unix platform. Hooray! :)
26801      path="$BOOT_JDK"
26802      has_space=`$ECHO "$path" | $GREP " "`
26803      if test "x$has_space" != x; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26806        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26807      fi
26808
26809      # Use eval to expand a potential ~
26810      eval path="$path"
26811      if test ! -f "$path" && test ! -d "$path"; then
26812        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26813      fi
26814
26815      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26816    fi
26817  fi
26818
26819            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26820$as_echo_n "checking for Boot JDK... " >&6; }
26821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26822$as_echo "$BOOT_JDK" >&6; }
26823            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26824$as_echo_n "checking Boot JDK version... " >&6; }
26825            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26827$as_echo "$BOOT_JDK_VERSION" >&6; }
26828          fi # end check jdk version
26829        fi # end check javac
26830      fi # end check java
26831    fi # end check boot jdk found
26832  fi
26833
26834  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26835
26836  if test "x$BOOT_JDK_FOUND" = xno; then
26837    # Now execute the test
26838
26839  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26840  BOOT_JDK_SUFFIX="/Contents/Home"
26841  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26842  if test "x$ALL_JDKS_FOUND" != x; then
26843    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26844
26845  if test "x$BOOT_JDK_FOUND" = xno; then
26846    # Now execute the test
26847
26848        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26849        if test -d "$BOOT_JDK"; then
26850          BOOT_JDK_FOUND=maybe
26851          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26852$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26853        fi
26854
26855
26856    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26857    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26858      # Do we have a bin/java?
26859      if test ! -x "$BOOT_JDK/bin/java"; then
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26862        BOOT_JDK_FOUND=no
26863      else
26864        # Do we have a bin/javac?
26865        if test ! -x "$BOOT_JDK/bin/javac"; then
26866          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26868          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26869$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26870          BOOT_JDK_FOUND=no
26871        else
26872          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26873          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26874
26875          # Extra M4 quote needed to protect [] in grep expression.
26876          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26877          if test "x$FOUND_CORRECT_VERSION" = x; then
26878            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26880            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26881$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26882            BOOT_JDK_FOUND=no
26883          else
26884            # We're done! :-)
26885            BOOT_JDK_FOUND=yes
26886
26887  # Only process if variable expands to non-empty
26888
26889  if test "x$BOOT_JDK" != x; then
26890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26891
26892  # Input might be given as Windows format, start by converting to
26893  # unix format.
26894  path="$BOOT_JDK"
26895  new_path=`$CYGPATH -u "$path"`
26896
26897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26900  # "foo.exe" is OK but "foo" is an error.
26901  #
26902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26903  # It is also a way to make sure we got the proper file name for the real test later on.
26904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26905  if test "x$test_shortpath" = x; then
26906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26908    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26909  fi
26910
26911  # Call helper function which possibly converts this using DOS-style short mode.
26912  # If so, the updated path is stored in $new_path.
26913
26914  input_path="$new_path"
26915  # Check if we need to convert this using DOS-style short mode. If the path
26916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26917  # take no chances and rewrite it.
26918  # Note: m4 eats our [], so we need to use [ and ] instead.
26919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26920  if test "x$has_forbidden_chars" != x; then
26921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26925      # Going to short mode and back again did indeed matter. Since short mode is
26926      # case insensitive, let's make it lowercase to improve readability.
26927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26928      # Now convert it back to Unix-style (cygpath)
26929      input_path=`$CYGPATH -u "$shortmode_path"`
26930      new_path="$input_path"
26931    fi
26932  fi
26933
26934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26935  if test "x$test_cygdrive_prefix" = x; then
26936    # As a simple fix, exclude /usr/bin since it's not a real path.
26937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26939      # a path prefixed by /cygdrive for fixpath to work.
26940      new_path="$CYGWIN_ROOT_PATH$input_path"
26941    fi
26942  fi
26943
26944
26945  if test "x$path" != "x$new_path"; then
26946    BOOT_JDK="$new_path"
26947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26949  fi
26950
26951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26952
26953  path="$BOOT_JDK"
26954  has_colon=`$ECHO $path | $GREP ^.:`
26955  new_path="$path"
26956  if test "x$has_colon" = x; then
26957    # Not in mixed or Windows style, start by that.
26958    new_path=`cmd //c echo $path`
26959  fi
26960
26961
26962  input_path="$new_path"
26963  # Check if we need to convert this using DOS-style short mode. If the path
26964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26965  # take no chances and rewrite it.
26966  # Note: m4 eats our [], so we need to use [ and ] instead.
26967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26968  if test "x$has_forbidden_chars" != x; then
26969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26971  fi
26972
26973
26974  windows_path="$new_path"
26975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976    unix_path=`$CYGPATH -u "$windows_path"`
26977    new_path="$unix_path"
26978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980    new_path="$unix_path"
26981  fi
26982
26983  if test "x$path" != "x$new_path"; then
26984    BOOT_JDK="$new_path"
26985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26987  fi
26988
26989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26991
26992    else
26993      # We're on a unix platform. Hooray! :)
26994      path="$BOOT_JDK"
26995      has_space=`$ECHO "$path" | $GREP " "`
26996      if test "x$has_space" != x; then
26997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26998$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27000      fi
27001
27002      # Use eval to expand a potential ~
27003      eval path="$path"
27004      if test ! -f "$path" && test ! -d "$path"; then
27005        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27006      fi
27007
27008      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27009    fi
27010  fi
27011
27012            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27013$as_echo_n "checking for Boot JDK... " >&6; }
27014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27015$as_echo "$BOOT_JDK" >&6; }
27016            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27017$as_echo_n "checking Boot JDK version... " >&6; }
27018            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27019            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27020$as_echo "$BOOT_JDK_VERSION" >&6; }
27021          fi # end check jdk version
27022        fi # end check javac
27023      fi # end check java
27024    fi # end check boot jdk found
27025  fi
27026
27027    done
27028  fi
27029
27030
27031    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27032    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27033      # Do we have a bin/java?
27034      if test ! -x "$BOOT_JDK/bin/java"; then
27035        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27037        BOOT_JDK_FOUND=no
27038      else
27039        # Do we have a bin/javac?
27040        if test ! -x "$BOOT_JDK/bin/javac"; then
27041          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27043          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27044$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27045          BOOT_JDK_FOUND=no
27046        else
27047          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27048          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27049
27050          # Extra M4 quote needed to protect [] in grep expression.
27051          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27052          if test "x$FOUND_CORRECT_VERSION" = x; then
27053            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27055            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27056$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27057            BOOT_JDK_FOUND=no
27058          else
27059            # We're done! :-)
27060            BOOT_JDK_FOUND=yes
27061
27062  # Only process if variable expands to non-empty
27063
27064  if test "x$BOOT_JDK" != x; then
27065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27066
27067  # Input might be given as Windows format, start by converting to
27068  # unix format.
27069  path="$BOOT_JDK"
27070  new_path=`$CYGPATH -u "$path"`
27071
27072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27075  # "foo.exe" is OK but "foo" is an error.
27076  #
27077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27078  # It is also a way to make sure we got the proper file name for the real test later on.
27079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27080  if test "x$test_shortpath" = x; then
27081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27084  fi
27085
27086  # Call helper function which possibly converts this using DOS-style short mode.
27087  # If so, the updated path is stored in $new_path.
27088
27089  input_path="$new_path"
27090  # Check if we need to convert this using DOS-style short mode. If the path
27091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27092  # take no chances and rewrite it.
27093  # Note: m4 eats our [], so we need to use [ and ] instead.
27094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27095  if test "x$has_forbidden_chars" != x; then
27096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27100      # Going to short mode and back again did indeed matter. Since short mode is
27101      # case insensitive, let's make it lowercase to improve readability.
27102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27103      # Now convert it back to Unix-style (cygpath)
27104      input_path=`$CYGPATH -u "$shortmode_path"`
27105      new_path="$input_path"
27106    fi
27107  fi
27108
27109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27110  if test "x$test_cygdrive_prefix" = x; then
27111    # As a simple fix, exclude /usr/bin since it's not a real path.
27112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27114      # a path prefixed by /cygdrive for fixpath to work.
27115      new_path="$CYGWIN_ROOT_PATH$input_path"
27116    fi
27117  fi
27118
27119
27120  if test "x$path" != "x$new_path"; then
27121    BOOT_JDK="$new_path"
27122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27124  fi
27125
27126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27127
27128  path="$BOOT_JDK"
27129  has_colon=`$ECHO $path | $GREP ^.:`
27130  new_path="$path"
27131  if test "x$has_colon" = x; then
27132    # Not in mixed or Windows style, start by that.
27133    new_path=`cmd //c echo $path`
27134  fi
27135
27136
27137  input_path="$new_path"
27138  # Check if we need to convert this using DOS-style short mode. If the path
27139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27140  # take no chances and rewrite it.
27141  # Note: m4 eats our [], so we need to use [ and ] instead.
27142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27143  if test "x$has_forbidden_chars" != x; then
27144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27146  fi
27147
27148
27149  windows_path="$new_path"
27150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27151    unix_path=`$CYGPATH -u "$windows_path"`
27152    new_path="$unix_path"
27153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27155    new_path="$unix_path"
27156  fi
27157
27158  if test "x$path" != "x$new_path"; then
27159    BOOT_JDK="$new_path"
27160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27162  fi
27163
27164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27166
27167    else
27168      # We're on a unix platform. Hooray! :)
27169      path="$BOOT_JDK"
27170      has_space=`$ECHO "$path" | $GREP " "`
27171      if test "x$has_space" != x; then
27172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27175      fi
27176
27177      # Use eval to expand a potential ~
27178      eval path="$path"
27179      if test ! -f "$path" && test ! -d "$path"; then
27180        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27181      fi
27182
27183      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27184    fi
27185  fi
27186
27187            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27188$as_echo_n "checking for Boot JDK... " >&6; }
27189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27190$as_echo "$BOOT_JDK" >&6; }
27191            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27192$as_echo_n "checking Boot JDK version... " >&6; }
27193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27195$as_echo "$BOOT_JDK_VERSION" >&6; }
27196          fi # end check jdk version
27197        fi # end check javac
27198      fi # end check java
27199    fi # end check boot jdk found
27200  fi
27201
27202
27203  if test "x$BOOT_JDK_FOUND" = xno; then
27204    # Now execute the test
27205
27206  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27207  BOOT_JDK_SUFFIX="/Contents/Home"
27208  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27209  if test "x$ALL_JDKS_FOUND" != x; then
27210    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27211
27212  if test "x$BOOT_JDK_FOUND" = xno; then
27213    # Now execute the test
27214
27215        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27216        if test -d "$BOOT_JDK"; then
27217          BOOT_JDK_FOUND=maybe
27218          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27219$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27220        fi
27221
27222
27223    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27224    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27225      # Do we have a bin/java?
27226      if test ! -x "$BOOT_JDK/bin/java"; then
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27229        BOOT_JDK_FOUND=no
27230      else
27231        # Do we have a bin/javac?
27232        if test ! -x "$BOOT_JDK/bin/javac"; then
27233          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27235          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27236$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27237          BOOT_JDK_FOUND=no
27238        else
27239          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27240          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27241
27242          # Extra M4 quote needed to protect [] in grep expression.
27243          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27244          if test "x$FOUND_CORRECT_VERSION" = x; then
27245            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27247            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27248$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27249            BOOT_JDK_FOUND=no
27250          else
27251            # We're done! :-)
27252            BOOT_JDK_FOUND=yes
27253
27254  # Only process if variable expands to non-empty
27255
27256  if test "x$BOOT_JDK" != x; then
27257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27258
27259  # Input might be given as Windows format, start by converting to
27260  # unix format.
27261  path="$BOOT_JDK"
27262  new_path=`$CYGPATH -u "$path"`
27263
27264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27267  # "foo.exe" is OK but "foo" is an error.
27268  #
27269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27270  # It is also a way to make sure we got the proper file name for the real test later on.
27271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27272  if test "x$test_shortpath" = x; then
27273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27274$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27275    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27276  fi
27277
27278  # Call helper function which possibly converts this using DOS-style short mode.
27279  # If so, the updated path is stored in $new_path.
27280
27281  input_path="$new_path"
27282  # Check if we need to convert this using DOS-style short mode. If the path
27283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27284  # take no chances and rewrite it.
27285  # Note: m4 eats our [], so we need to use [ and ] instead.
27286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27287  if test "x$has_forbidden_chars" != x; then
27288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27292      # Going to short mode and back again did indeed matter. Since short mode is
27293      # case insensitive, let's make it lowercase to improve readability.
27294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27295      # Now convert it back to Unix-style (cygpath)
27296      input_path=`$CYGPATH -u "$shortmode_path"`
27297      new_path="$input_path"
27298    fi
27299  fi
27300
27301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27302  if test "x$test_cygdrive_prefix" = x; then
27303    # As a simple fix, exclude /usr/bin since it's not a real path.
27304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27306      # a path prefixed by /cygdrive for fixpath to work.
27307      new_path="$CYGWIN_ROOT_PATH$input_path"
27308    fi
27309  fi
27310
27311
27312  if test "x$path" != "x$new_path"; then
27313    BOOT_JDK="$new_path"
27314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27316  fi
27317
27318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27319
27320  path="$BOOT_JDK"
27321  has_colon=`$ECHO $path | $GREP ^.:`
27322  new_path="$path"
27323  if test "x$has_colon" = x; then
27324    # Not in mixed or Windows style, start by that.
27325    new_path=`cmd //c echo $path`
27326  fi
27327
27328
27329  input_path="$new_path"
27330  # Check if we need to convert this using DOS-style short mode. If the path
27331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27332  # take no chances and rewrite it.
27333  # Note: m4 eats our [], so we need to use [ and ] instead.
27334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27335  if test "x$has_forbidden_chars" != x; then
27336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27338  fi
27339
27340
27341  windows_path="$new_path"
27342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27343    unix_path=`$CYGPATH -u "$windows_path"`
27344    new_path="$unix_path"
27345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27347    new_path="$unix_path"
27348  fi
27349
27350  if test "x$path" != "x$new_path"; then
27351    BOOT_JDK="$new_path"
27352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27353$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27354  fi
27355
27356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27358
27359    else
27360      # We're on a unix platform. Hooray! :)
27361      path="$BOOT_JDK"
27362      has_space=`$ECHO "$path" | $GREP " "`
27363      if test "x$has_space" != x; then
27364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27366        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27367      fi
27368
27369      # Use eval to expand a potential ~
27370      eval path="$path"
27371      if test ! -f "$path" && test ! -d "$path"; then
27372        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27373      fi
27374
27375      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27376    fi
27377  fi
27378
27379            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27380$as_echo_n "checking for Boot JDK... " >&6; }
27381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27382$as_echo "$BOOT_JDK" >&6; }
27383            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27384$as_echo_n "checking Boot JDK version... " >&6; }
27385            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27387$as_echo "$BOOT_JDK_VERSION" >&6; }
27388          fi # end check jdk version
27389        fi # end check javac
27390      fi # end check java
27391    fi # end check boot jdk found
27392  fi
27393
27394    done
27395  fi
27396
27397
27398    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27399    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27400      # Do we have a bin/java?
27401      if test ! -x "$BOOT_JDK/bin/java"; then
27402        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27404        BOOT_JDK_FOUND=no
27405      else
27406        # Do we have a bin/javac?
27407        if test ! -x "$BOOT_JDK/bin/javac"; then
27408          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27410          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27411$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27412          BOOT_JDK_FOUND=no
27413        else
27414          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27415          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27416
27417          # Extra M4 quote needed to protect [] in grep expression.
27418          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27419          if test "x$FOUND_CORRECT_VERSION" = x; then
27420            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27422            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27423$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27424            BOOT_JDK_FOUND=no
27425          else
27426            # We're done! :-)
27427            BOOT_JDK_FOUND=yes
27428
27429  # Only process if variable expands to non-empty
27430
27431  if test "x$BOOT_JDK" != x; then
27432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27433
27434  # Input might be given as Windows format, start by converting to
27435  # unix format.
27436  path="$BOOT_JDK"
27437  new_path=`$CYGPATH -u "$path"`
27438
27439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27442  # "foo.exe" is OK but "foo" is an error.
27443  #
27444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27445  # It is also a way to make sure we got the proper file name for the real test later on.
27446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27447  if test "x$test_shortpath" = x; then
27448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27450    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27451  fi
27452
27453  # Call helper function which possibly converts this using DOS-style short mode.
27454  # If so, the updated path is stored in $new_path.
27455
27456  input_path="$new_path"
27457  # Check if we need to convert this using DOS-style short mode. If the path
27458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27459  # take no chances and rewrite it.
27460  # Note: m4 eats our [], so we need to use [ and ] instead.
27461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27462  if test "x$has_forbidden_chars" != x; then
27463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27467      # Going to short mode and back again did indeed matter. Since short mode is
27468      # case insensitive, let's make it lowercase to improve readability.
27469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27470      # Now convert it back to Unix-style (cygpath)
27471      input_path=`$CYGPATH -u "$shortmode_path"`
27472      new_path="$input_path"
27473    fi
27474  fi
27475
27476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27477  if test "x$test_cygdrive_prefix" = x; then
27478    # As a simple fix, exclude /usr/bin since it's not a real path.
27479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27481      # a path prefixed by /cygdrive for fixpath to work.
27482      new_path="$CYGWIN_ROOT_PATH$input_path"
27483    fi
27484  fi
27485
27486
27487  if test "x$path" != "x$new_path"; then
27488    BOOT_JDK="$new_path"
27489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27491  fi
27492
27493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27494
27495  path="$BOOT_JDK"
27496  has_colon=`$ECHO $path | $GREP ^.:`
27497  new_path="$path"
27498  if test "x$has_colon" = x; then
27499    # Not in mixed or Windows style, start by that.
27500    new_path=`cmd //c echo $path`
27501  fi
27502
27503
27504  input_path="$new_path"
27505  # Check if we need to convert this using DOS-style short mode. If the path
27506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27507  # take no chances and rewrite it.
27508  # Note: m4 eats our [], so we need to use [ and ] instead.
27509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27510  if test "x$has_forbidden_chars" != x; then
27511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27513  fi
27514
27515
27516  windows_path="$new_path"
27517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27518    unix_path=`$CYGPATH -u "$windows_path"`
27519    new_path="$unix_path"
27520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27522    new_path="$unix_path"
27523  fi
27524
27525  if test "x$path" != "x$new_path"; then
27526    BOOT_JDK="$new_path"
27527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27529  fi
27530
27531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27533
27534    else
27535      # We're on a unix platform. Hooray! :)
27536      path="$BOOT_JDK"
27537      has_space=`$ECHO "$path" | $GREP " "`
27538      if test "x$has_space" != x; then
27539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27542      fi
27543
27544      # Use eval to expand a potential ~
27545      eval path="$path"
27546      if test ! -f "$path" && test ! -d "$path"; then
27547        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27548      fi
27549
27550      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27551    fi
27552  fi
27553
27554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27555$as_echo_n "checking for Boot JDK... " >&6; }
27556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27557$as_echo "$BOOT_JDK" >&6; }
27558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27559$as_echo_n "checking Boot JDK version... " >&6; }
27560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27562$as_echo "$BOOT_JDK_VERSION" >&6; }
27563          fi # end check jdk version
27564        fi # end check javac
27565      fi # end check java
27566    fi # end check boot jdk found
27567  fi
27568
27569  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27570
27571  if test "x$BOOT_JDK_FOUND" = xno; then
27572    # Now execute the test
27573
27574  BOOT_JDK_PREFIX="/usr/lib/jvm"
27575  BOOT_JDK_SUFFIX=""
27576  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27577  if test "x$ALL_JDKS_FOUND" != x; then
27578    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27579
27580  if test "x$BOOT_JDK_FOUND" = xno; then
27581    # Now execute the test
27582
27583        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27584        if test -d "$BOOT_JDK"; then
27585          BOOT_JDK_FOUND=maybe
27586          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27587$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27588        fi
27589
27590
27591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27593      # Do we have a bin/java?
27594      if test ! -x "$BOOT_JDK/bin/java"; then
27595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27597        BOOT_JDK_FOUND=no
27598      else
27599        # Do we have a bin/javac?
27600        if test ! -x "$BOOT_JDK/bin/javac"; then
27601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27605          BOOT_JDK_FOUND=no
27606        else
27607          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27608          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27609
27610          # Extra M4 quote needed to protect [] in grep expression.
27611          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27612          if test "x$FOUND_CORRECT_VERSION" = x; then
27613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27615            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27616$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27617            BOOT_JDK_FOUND=no
27618          else
27619            # We're done! :-)
27620            BOOT_JDK_FOUND=yes
27621
27622  # Only process if variable expands to non-empty
27623
27624  if test "x$BOOT_JDK" != x; then
27625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27626
27627  # Input might be given as Windows format, start by converting to
27628  # unix format.
27629  path="$BOOT_JDK"
27630  new_path=`$CYGPATH -u "$path"`
27631
27632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27635  # "foo.exe" is OK but "foo" is an error.
27636  #
27637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27638  # It is also a way to make sure we got the proper file name for the real test later on.
27639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27640  if test "x$test_shortpath" = x; then
27641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27644  fi
27645
27646  # Call helper function which possibly converts this using DOS-style short mode.
27647  # If so, the updated path is stored in $new_path.
27648
27649  input_path="$new_path"
27650  # Check if we need to convert this using DOS-style short mode. If the path
27651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27652  # take no chances and rewrite it.
27653  # Note: m4 eats our [], so we need to use [ and ] instead.
27654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27655  if test "x$has_forbidden_chars" != x; then
27656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27660      # Going to short mode and back again did indeed matter. Since short mode is
27661      # case insensitive, let's make it lowercase to improve readability.
27662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27663      # Now convert it back to Unix-style (cygpath)
27664      input_path=`$CYGPATH -u "$shortmode_path"`
27665      new_path="$input_path"
27666    fi
27667  fi
27668
27669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27670  if test "x$test_cygdrive_prefix" = x; then
27671    # As a simple fix, exclude /usr/bin since it's not a real path.
27672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27674      # a path prefixed by /cygdrive for fixpath to work.
27675      new_path="$CYGWIN_ROOT_PATH$input_path"
27676    fi
27677  fi
27678
27679
27680  if test "x$path" != "x$new_path"; then
27681    BOOT_JDK="$new_path"
27682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27684  fi
27685
27686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27687
27688  path="$BOOT_JDK"
27689  has_colon=`$ECHO $path | $GREP ^.:`
27690  new_path="$path"
27691  if test "x$has_colon" = x; then
27692    # Not in mixed or Windows style, start by that.
27693    new_path=`cmd //c echo $path`
27694  fi
27695
27696
27697  input_path="$new_path"
27698  # Check if we need to convert this using DOS-style short mode. If the path
27699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27700  # take no chances and rewrite it.
27701  # Note: m4 eats our [], so we need to use [ and ] instead.
27702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27703  if test "x$has_forbidden_chars" != x; then
27704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27706  fi
27707
27708
27709  windows_path="$new_path"
27710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27711    unix_path=`$CYGPATH -u "$windows_path"`
27712    new_path="$unix_path"
27713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27715    new_path="$unix_path"
27716  fi
27717
27718  if test "x$path" != "x$new_path"; then
27719    BOOT_JDK="$new_path"
27720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27722  fi
27723
27724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27726
27727    else
27728      # We're on a unix platform. Hooray! :)
27729      path="$BOOT_JDK"
27730      has_space=`$ECHO "$path" | $GREP " "`
27731      if test "x$has_space" != x; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27735      fi
27736
27737      # Use eval to expand a potential ~
27738      eval path="$path"
27739      if test ! -f "$path" && test ! -d "$path"; then
27740        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27741      fi
27742
27743      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27744    fi
27745  fi
27746
27747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27748$as_echo_n "checking for Boot JDK... " >&6; }
27749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27750$as_echo "$BOOT_JDK" >&6; }
27751            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27752$as_echo_n "checking Boot JDK version... " >&6; }
27753            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27755$as_echo "$BOOT_JDK_VERSION" >&6; }
27756          fi # end check jdk version
27757        fi # end check javac
27758      fi # end check java
27759    fi # end check boot jdk found
27760  fi
27761
27762    done
27763  fi
27764
27765
27766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27768      # Do we have a bin/java?
27769      if test ! -x "$BOOT_JDK/bin/java"; then
27770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27772        BOOT_JDK_FOUND=no
27773      else
27774        # Do we have a bin/javac?
27775        if test ! -x "$BOOT_JDK/bin/javac"; then
27776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27780          BOOT_JDK_FOUND=no
27781        else
27782          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27783          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27784
27785          # Extra M4 quote needed to protect [] in grep expression.
27786          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27787          if test "x$FOUND_CORRECT_VERSION" = x; then
27788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27790            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27791$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27792            BOOT_JDK_FOUND=no
27793          else
27794            # We're done! :-)
27795            BOOT_JDK_FOUND=yes
27796
27797  # Only process if variable expands to non-empty
27798
27799  if test "x$BOOT_JDK" != x; then
27800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27801
27802  # Input might be given as Windows format, start by converting to
27803  # unix format.
27804  path="$BOOT_JDK"
27805  new_path=`$CYGPATH -u "$path"`
27806
27807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27810  # "foo.exe" is OK but "foo" is an error.
27811  #
27812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27813  # It is also a way to make sure we got the proper file name for the real test later on.
27814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27815  if test "x$test_shortpath" = x; then
27816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27819  fi
27820
27821  # Call helper function which possibly converts this using DOS-style short mode.
27822  # If so, the updated path is stored in $new_path.
27823
27824  input_path="$new_path"
27825  # Check if we need to convert this using DOS-style short mode. If the path
27826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27827  # take no chances and rewrite it.
27828  # Note: m4 eats our [], so we need to use [ and ] instead.
27829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27830  if test "x$has_forbidden_chars" != x; then
27831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27835      # Going to short mode and back again did indeed matter. Since short mode is
27836      # case insensitive, let's make it lowercase to improve readability.
27837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27838      # Now convert it back to Unix-style (cygpath)
27839      input_path=`$CYGPATH -u "$shortmode_path"`
27840      new_path="$input_path"
27841    fi
27842  fi
27843
27844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27845  if test "x$test_cygdrive_prefix" = x; then
27846    # As a simple fix, exclude /usr/bin since it's not a real path.
27847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27849      # a path prefixed by /cygdrive for fixpath to work.
27850      new_path="$CYGWIN_ROOT_PATH$input_path"
27851    fi
27852  fi
27853
27854
27855  if test "x$path" != "x$new_path"; then
27856    BOOT_JDK="$new_path"
27857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27859  fi
27860
27861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27862
27863  path="$BOOT_JDK"
27864  has_colon=`$ECHO $path | $GREP ^.:`
27865  new_path="$path"
27866  if test "x$has_colon" = x; then
27867    # Not in mixed or Windows style, start by that.
27868    new_path=`cmd //c echo $path`
27869  fi
27870
27871
27872  input_path="$new_path"
27873  # Check if we need to convert this using DOS-style short mode. If the path
27874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27875  # take no chances and rewrite it.
27876  # Note: m4 eats our [], so we need to use [ and ] instead.
27877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27878  if test "x$has_forbidden_chars" != x; then
27879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27881  fi
27882
27883
27884  windows_path="$new_path"
27885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27886    unix_path=`$CYGPATH -u "$windows_path"`
27887    new_path="$unix_path"
27888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27890    new_path="$unix_path"
27891  fi
27892
27893  if test "x$path" != "x$new_path"; then
27894    BOOT_JDK="$new_path"
27895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27897  fi
27898
27899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27901
27902    else
27903      # We're on a unix platform. Hooray! :)
27904      path="$BOOT_JDK"
27905      has_space=`$ECHO "$path" | $GREP " "`
27906      if test "x$has_space" != x; then
27907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27910      fi
27911
27912      # Use eval to expand a potential ~
27913      eval path="$path"
27914      if test ! -f "$path" && test ! -d "$path"; then
27915        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27916      fi
27917
27918      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27919    fi
27920  fi
27921
27922            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27923$as_echo_n "checking for Boot JDK... " >&6; }
27924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27925$as_echo "$BOOT_JDK" >&6; }
27926            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27927$as_echo_n "checking Boot JDK version... " >&6; }
27928            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27930$as_echo "$BOOT_JDK_VERSION" >&6; }
27931          fi # end check jdk version
27932        fi # end check javac
27933      fi # end check java
27934    fi # end check boot jdk found
27935  fi
27936
27937  fi
27938
27939
27940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27942      # Do we have a bin/java?
27943      if test ! -x "$BOOT_JDK/bin/java"; then
27944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27946        BOOT_JDK_FOUND=no
27947      else
27948        # Do we have a bin/javac?
27949        if test ! -x "$BOOT_JDK/bin/javac"; then
27950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27954          BOOT_JDK_FOUND=no
27955        else
27956          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27957          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27958
27959          # Extra M4 quote needed to protect [] in grep expression.
27960          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27961          if test "x$FOUND_CORRECT_VERSION" = x; then
27962            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27965$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27966            BOOT_JDK_FOUND=no
27967          else
27968            # We're done! :-)
27969            BOOT_JDK_FOUND=yes
27970
27971  # Only process if variable expands to non-empty
27972
27973  if test "x$BOOT_JDK" != x; then
27974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27975
27976  # Input might be given as Windows format, start by converting to
27977  # unix format.
27978  path="$BOOT_JDK"
27979  new_path=`$CYGPATH -u "$path"`
27980
27981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27984  # "foo.exe" is OK but "foo" is an error.
27985  #
27986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27987  # It is also a way to make sure we got the proper file name for the real test later on.
27988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27989  if test "x$test_shortpath" = x; then
27990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27992    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27993  fi
27994
27995  # Call helper function which possibly converts this using DOS-style short mode.
27996  # If so, the updated path is stored in $new_path.
27997
27998  input_path="$new_path"
27999  # Check if we need to convert this using DOS-style short mode. If the path
28000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28001  # take no chances and rewrite it.
28002  # Note: m4 eats our [], so we need to use [ and ] instead.
28003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28004  if test "x$has_forbidden_chars" != x; then
28005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28009      # Going to short mode and back again did indeed matter. Since short mode is
28010      # case insensitive, let's make it lowercase to improve readability.
28011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28012      # Now convert it back to Unix-style (cygpath)
28013      input_path=`$CYGPATH -u "$shortmode_path"`
28014      new_path="$input_path"
28015    fi
28016  fi
28017
28018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28019  if test "x$test_cygdrive_prefix" = x; then
28020    # As a simple fix, exclude /usr/bin since it's not a real path.
28021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28023      # a path prefixed by /cygdrive for fixpath to work.
28024      new_path="$CYGWIN_ROOT_PATH$input_path"
28025    fi
28026  fi
28027
28028
28029  if test "x$path" != "x$new_path"; then
28030    BOOT_JDK="$new_path"
28031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28033  fi
28034
28035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28036
28037  path="$BOOT_JDK"
28038  has_colon=`$ECHO $path | $GREP ^.:`
28039  new_path="$path"
28040  if test "x$has_colon" = x; then
28041    # Not in mixed or Windows style, start by that.
28042    new_path=`cmd //c echo $path`
28043  fi
28044
28045
28046  input_path="$new_path"
28047  # Check if we need to convert this using DOS-style short mode. If the path
28048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28049  # take no chances and rewrite it.
28050  # Note: m4 eats our [], so we need to use [ and ] instead.
28051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28052  if test "x$has_forbidden_chars" != x; then
28053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28055  fi
28056
28057
28058  windows_path="$new_path"
28059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28060    unix_path=`$CYGPATH -u "$windows_path"`
28061    new_path="$unix_path"
28062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28064    new_path="$unix_path"
28065  fi
28066
28067  if test "x$path" != "x$new_path"; then
28068    BOOT_JDK="$new_path"
28069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28071  fi
28072
28073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28075
28076    else
28077      # We're on a unix platform. Hooray! :)
28078      path="$BOOT_JDK"
28079      has_space=`$ECHO "$path" | $GREP " "`
28080      if test "x$has_space" != x; then
28081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28084      fi
28085
28086      # Use eval to expand a potential ~
28087      eval path="$path"
28088      if test ! -f "$path" && test ! -d "$path"; then
28089        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28090      fi
28091
28092      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28093    fi
28094  fi
28095
28096            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28097$as_echo_n "checking for Boot JDK... " >&6; }
28098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28099$as_echo "$BOOT_JDK" >&6; }
28100            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28101$as_echo_n "checking Boot JDK version... " >&6; }
28102            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28104$as_echo "$BOOT_JDK_VERSION" >&6; }
28105          fi # end check jdk version
28106        fi # end check javac
28107      fi # end check java
28108    fi # end check boot jdk found
28109  fi
28110
28111
28112  # If we haven't found anything yet, we've truly lost. Give up.
28113  if test "x$BOOT_JDK_FOUND" = xno; then
28114
28115  # Print a helpful message on how to acquire the necessary build dependency.
28116  # openjdk is the help tag: freetype, cups, alsa etc
28117  MISSING_DEPENDENCY=openjdk
28118
28119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28120    cygwin_help $MISSING_DEPENDENCY
28121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28122    msys_help $MISSING_DEPENDENCY
28123  else
28124    PKGHANDLER_COMMAND=
28125
28126    case $PKGHANDLER in
28127      apt-get)
28128        apt_help     $MISSING_DEPENDENCY ;;
28129      yum)
28130        yum_help     $MISSING_DEPENDENCY ;;
28131      port)
28132        port_help    $MISSING_DEPENDENCY ;;
28133      pkgutil)
28134        pkgutil_help $MISSING_DEPENDENCY ;;
28135      pkgadd)
28136        pkgadd_help  $MISSING_DEPENDENCY ;;
28137    esac
28138
28139    if test "x$PKGHANDLER_COMMAND" != x; then
28140      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28141    fi
28142  fi
28143
28144    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28145$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28146    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28147$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28148    as_fn_error $? "Cannot continue" "$LINENO" 5
28149  fi
28150
28151
28152
28153  # Setup tools from the Boot JDK.
28154
28155  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28156
28157  # Publish this variable in the help.
28158
28159
28160  if [ -z "${JAVA+x}" ]; then
28161    # The variable is not set by user, try to locate tool using the code snippet
28162
28163      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28164$as_echo_n "checking for java in Boot JDK... " >&6; }
28165      JAVA=$BOOT_JDK/bin/java
28166      if test ! -x $JAVA; then
28167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28168$as_echo "not found" >&6; }
28169        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28170$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28171        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28172      fi
28173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28174$as_echo "ok" >&6; }
28175
28176
28177  else
28178    # The variable is set, but is it from the command line or the environment?
28179
28180    # Try to remove the string !JAVA! from our list.
28181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28183      # If it failed, the variable was not from the command line. Ignore it,
28184      # but warn the user (except for BASH, which is always set by the calling BASH).
28185      if test "xJAVA" != xBASH; then
28186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28187$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28188      fi
28189      # Try to locate tool using the code snippet
28190
28191      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28192$as_echo_n "checking for java in Boot JDK... " >&6; }
28193      JAVA=$BOOT_JDK/bin/java
28194      if test ! -x $JAVA; then
28195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28196$as_echo "not found" >&6; }
28197        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28198$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28199        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28200      fi
28201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28202$as_echo "ok" >&6; }
28203
28204
28205    else
28206      # If it succeeded, then it was overridden by the user. We will use it
28207      # for the tool.
28208
28209      # First remove it from the list of overridden variables, so we can test
28210      # for unknown variables in the end.
28211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28212
28213      # Check if we try to supply an empty value
28214      if test "x$JAVA" = x; then
28215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28216$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28218$as_echo_n "checking for JAVA... " >&6; }
28219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28220$as_echo "disabled" >&6; }
28221      else
28222        # Check if the provided tool contains a complete path.
28223        tool_specified="$JAVA"
28224        tool_basename="${tool_specified##*/}"
28225        if test "x$tool_basename" = "x$tool_specified"; then
28226          # A command without a complete path is provided, search $PATH.
28227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28228$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28229          # Extract the first word of "$tool_basename", so it can be a program name with args.
28230set dummy $tool_basename; ac_word=$2
28231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28232$as_echo_n "checking for $ac_word... " >&6; }
28233if ${ac_cv_path_JAVA+:} false; then :
28234  $as_echo_n "(cached) " >&6
28235else
28236  case $JAVA in
28237  [\\/]* | ?:[\\/]*)
28238  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28239  ;;
28240  *)
28241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28242for as_dir in $PATH
28243do
28244  IFS=$as_save_IFS
28245  test -z "$as_dir" && as_dir=.
28246    for ac_exec_ext in '' $ac_executable_extensions; do
28247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28248    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28250    break 2
28251  fi
28252done
28253  done
28254IFS=$as_save_IFS
28255
28256  ;;
28257esac
28258fi
28259JAVA=$ac_cv_path_JAVA
28260if test -n "$JAVA"; then
28261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28262$as_echo "$JAVA" >&6; }
28263else
28264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28265$as_echo "no" >&6; }
28266fi
28267
28268
28269          if test "x$JAVA" = x; then
28270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28271          fi
28272        else
28273          # Otherwise we believe it is a complete path. Use it as it is.
28274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28275$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28277$as_echo_n "checking for JAVA... " >&6; }
28278          if test ! -x "$tool_specified"; then
28279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28280$as_echo "not found" >&6; }
28281            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28282          fi
28283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28284$as_echo "$tool_specified" >&6; }
28285        fi
28286      fi
28287    fi
28288
28289  fi
28290
28291
28292
28293  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28294
28295  # Publish this variable in the help.
28296
28297
28298  if [ -z "${JAVAC+x}" ]; then
28299    # The variable is not set by user, try to locate tool using the code snippet
28300
28301      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28302$as_echo_n "checking for javac in Boot JDK... " >&6; }
28303      JAVAC=$BOOT_JDK/bin/javac
28304      if test ! -x $JAVAC; then
28305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28306$as_echo "not found" >&6; }
28307        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28308$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28309        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28310      fi
28311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28312$as_echo "ok" >&6; }
28313
28314
28315  else
28316    # The variable is set, but is it from the command line or the environment?
28317
28318    # Try to remove the string !JAVAC! from our list.
28319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28321      # If it failed, the variable was not from the command line. Ignore it,
28322      # but warn the user (except for BASH, which is always set by the calling BASH).
28323      if test "xJAVAC" != xBASH; then
28324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28325$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28326      fi
28327      # Try to locate tool using the code snippet
28328
28329      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28330$as_echo_n "checking for javac in Boot JDK... " >&6; }
28331      JAVAC=$BOOT_JDK/bin/javac
28332      if test ! -x $JAVAC; then
28333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28334$as_echo "not found" >&6; }
28335        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28336$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28337        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28338      fi
28339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28340$as_echo "ok" >&6; }
28341
28342
28343    else
28344      # If it succeeded, then it was overridden by the user. We will use it
28345      # for the tool.
28346
28347      # First remove it from the list of overridden variables, so we can test
28348      # for unknown variables in the end.
28349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28350
28351      # Check if we try to supply an empty value
28352      if test "x$JAVAC" = x; then
28353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28354$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28356$as_echo_n "checking for JAVAC... " >&6; }
28357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28358$as_echo "disabled" >&6; }
28359      else
28360        # Check if the provided tool contains a complete path.
28361        tool_specified="$JAVAC"
28362        tool_basename="${tool_specified##*/}"
28363        if test "x$tool_basename" = "x$tool_specified"; then
28364          # A command without a complete path is provided, search $PATH.
28365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28366$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28367          # Extract the first word of "$tool_basename", so it can be a program name with args.
28368set dummy $tool_basename; ac_word=$2
28369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28370$as_echo_n "checking for $ac_word... " >&6; }
28371if ${ac_cv_path_JAVAC+:} false; then :
28372  $as_echo_n "(cached) " >&6
28373else
28374  case $JAVAC in
28375  [\\/]* | ?:[\\/]*)
28376  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28377  ;;
28378  *)
28379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28380for as_dir in $PATH
28381do
28382  IFS=$as_save_IFS
28383  test -z "$as_dir" && as_dir=.
28384    for ac_exec_ext in '' $ac_executable_extensions; do
28385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28386    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28388    break 2
28389  fi
28390done
28391  done
28392IFS=$as_save_IFS
28393
28394  ;;
28395esac
28396fi
28397JAVAC=$ac_cv_path_JAVAC
28398if test -n "$JAVAC"; then
28399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28400$as_echo "$JAVAC" >&6; }
28401else
28402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28403$as_echo "no" >&6; }
28404fi
28405
28406
28407          if test "x$JAVAC" = x; then
28408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28409          fi
28410        else
28411          # Otherwise we believe it is a complete path. Use it as it is.
28412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28413$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28415$as_echo_n "checking for JAVAC... " >&6; }
28416          if test ! -x "$tool_specified"; then
28417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28418$as_echo "not found" >&6; }
28419            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28420          fi
28421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28422$as_echo "$tool_specified" >&6; }
28423        fi
28424      fi
28425    fi
28426
28427  fi
28428
28429
28430
28431  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28432
28433  # Publish this variable in the help.
28434
28435
28436  if [ -z "${JAVAH+x}" ]; then
28437    # The variable is not set by user, try to locate tool using the code snippet
28438
28439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28440$as_echo_n "checking for javah in Boot JDK... " >&6; }
28441      JAVAH=$BOOT_JDK/bin/javah
28442      if test ! -x $JAVAH; then
28443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28444$as_echo "not found" >&6; }
28445        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28446$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28447        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28448      fi
28449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28450$as_echo "ok" >&6; }
28451
28452
28453  else
28454    # The variable is set, but is it from the command line or the environment?
28455
28456    # Try to remove the string !JAVAH! from our list.
28457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28459      # If it failed, the variable was not from the command line. Ignore it,
28460      # but warn the user (except for BASH, which is always set by the calling BASH).
28461      if test "xJAVAH" != xBASH; then
28462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28463$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28464      fi
28465      # Try to locate tool using the code snippet
28466
28467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28468$as_echo_n "checking for javah in Boot JDK... " >&6; }
28469      JAVAH=$BOOT_JDK/bin/javah
28470      if test ! -x $JAVAH; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28472$as_echo "not found" >&6; }
28473        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28474$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28475        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28476      fi
28477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28478$as_echo "ok" >&6; }
28479
28480
28481    else
28482      # If it succeeded, then it was overridden by the user. We will use it
28483      # for the tool.
28484
28485      # First remove it from the list of overridden variables, so we can test
28486      # for unknown variables in the end.
28487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28488
28489      # Check if we try to supply an empty value
28490      if test "x$JAVAH" = x; then
28491        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28492$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28494$as_echo_n "checking for JAVAH... " >&6; }
28495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28496$as_echo "disabled" >&6; }
28497      else
28498        # Check if the provided tool contains a complete path.
28499        tool_specified="$JAVAH"
28500        tool_basename="${tool_specified##*/}"
28501        if test "x$tool_basename" = "x$tool_specified"; then
28502          # A command without a complete path is provided, search $PATH.
28503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28504$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28505          # Extract the first word of "$tool_basename", so it can be a program name with args.
28506set dummy $tool_basename; ac_word=$2
28507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28508$as_echo_n "checking for $ac_word... " >&6; }
28509if ${ac_cv_path_JAVAH+:} false; then :
28510  $as_echo_n "(cached) " >&6
28511else
28512  case $JAVAH in
28513  [\\/]* | ?:[\\/]*)
28514  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28515  ;;
28516  *)
28517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28518for as_dir in $PATH
28519do
28520  IFS=$as_save_IFS
28521  test -z "$as_dir" && as_dir=.
28522    for ac_exec_ext in '' $ac_executable_extensions; do
28523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28524    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28526    break 2
28527  fi
28528done
28529  done
28530IFS=$as_save_IFS
28531
28532  ;;
28533esac
28534fi
28535JAVAH=$ac_cv_path_JAVAH
28536if test -n "$JAVAH"; then
28537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28538$as_echo "$JAVAH" >&6; }
28539else
28540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28541$as_echo "no" >&6; }
28542fi
28543
28544
28545          if test "x$JAVAH" = x; then
28546            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28547          fi
28548        else
28549          # Otherwise we believe it is a complete path. Use it as it is.
28550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28551$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28553$as_echo_n "checking for JAVAH... " >&6; }
28554          if test ! -x "$tool_specified"; then
28555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28556$as_echo "not found" >&6; }
28557            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28558          fi
28559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28560$as_echo "$tool_specified" >&6; }
28561        fi
28562      fi
28563    fi
28564
28565  fi
28566
28567
28568
28569  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28570
28571  # Publish this variable in the help.
28572
28573
28574  if [ -z "${JAR+x}" ]; then
28575    # The variable is not set by user, try to locate tool using the code snippet
28576
28577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28578$as_echo_n "checking for jar in Boot JDK... " >&6; }
28579      JAR=$BOOT_JDK/bin/jar
28580      if test ! -x $JAR; then
28581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28582$as_echo "not found" >&6; }
28583        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28584$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28585        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28586      fi
28587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28588$as_echo "ok" >&6; }
28589
28590
28591  else
28592    # The variable is set, but is it from the command line or the environment?
28593
28594    # Try to remove the string !JAR! from our list.
28595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28597      # If it failed, the variable was not from the command line. Ignore it,
28598      # but warn the user (except for BASH, which is always set by the calling BASH).
28599      if test "xJAR" != xBASH; then
28600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28601$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28602      fi
28603      # Try to locate tool using the code snippet
28604
28605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28606$as_echo_n "checking for jar in Boot JDK... " >&6; }
28607      JAR=$BOOT_JDK/bin/jar
28608      if test ! -x $JAR; then
28609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28610$as_echo "not found" >&6; }
28611        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28612$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28613        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28614      fi
28615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28616$as_echo "ok" >&6; }
28617
28618
28619    else
28620      # If it succeeded, then it was overridden by the user. We will use it
28621      # for the tool.
28622
28623      # First remove it from the list of overridden variables, so we can test
28624      # for unknown variables in the end.
28625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28626
28627      # Check if we try to supply an empty value
28628      if test "x$JAR" = x; then
28629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28630$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28632$as_echo_n "checking for JAR... " >&6; }
28633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28634$as_echo "disabled" >&6; }
28635      else
28636        # Check if the provided tool contains a complete path.
28637        tool_specified="$JAR"
28638        tool_basename="${tool_specified##*/}"
28639        if test "x$tool_basename" = "x$tool_specified"; then
28640          # A command without a complete path is provided, search $PATH.
28641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28642$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28643          # Extract the first word of "$tool_basename", so it can be a program name with args.
28644set dummy $tool_basename; ac_word=$2
28645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28646$as_echo_n "checking for $ac_word... " >&6; }
28647if ${ac_cv_path_JAR+:} false; then :
28648  $as_echo_n "(cached) " >&6
28649else
28650  case $JAR in
28651  [\\/]* | ?:[\\/]*)
28652  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28653  ;;
28654  *)
28655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28656for as_dir in $PATH
28657do
28658  IFS=$as_save_IFS
28659  test -z "$as_dir" && as_dir=.
28660    for ac_exec_ext in '' $ac_executable_extensions; do
28661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28662    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28664    break 2
28665  fi
28666done
28667  done
28668IFS=$as_save_IFS
28669
28670  ;;
28671esac
28672fi
28673JAR=$ac_cv_path_JAR
28674if test -n "$JAR"; then
28675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28676$as_echo "$JAR" >&6; }
28677else
28678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28679$as_echo "no" >&6; }
28680fi
28681
28682
28683          if test "x$JAR" = x; then
28684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28685          fi
28686        else
28687          # Otherwise we believe it is a complete path. Use it as it is.
28688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28689$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28691$as_echo_n "checking for JAR... " >&6; }
28692          if test ! -x "$tool_specified"; then
28693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28694$as_echo "not found" >&6; }
28695            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28696          fi
28697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28698$as_echo "$tool_specified" >&6; }
28699        fi
28700      fi
28701    fi
28702
28703  fi
28704
28705
28706
28707  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28708
28709  # Publish this variable in the help.
28710
28711
28712  if [ -z "${JARSIGNER+x}" ]; then
28713    # The variable is not set by user, try to locate tool using the code snippet
28714
28715      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28716$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28717      JARSIGNER=$BOOT_JDK/bin/jarsigner
28718      if test ! -x $JARSIGNER; then
28719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28720$as_echo "not found" >&6; }
28721        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28722$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28723        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28724      fi
28725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28726$as_echo "ok" >&6; }
28727
28728
28729  else
28730    # The variable is set, but is it from the command line or the environment?
28731
28732    # Try to remove the string !JARSIGNER! from our list.
28733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28735      # If it failed, the variable was not from the command line. Ignore it,
28736      # but warn the user (except for BASH, which is always set by the calling BASH).
28737      if test "xJARSIGNER" != xBASH; then
28738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28739$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28740      fi
28741      # Try to locate tool using the code snippet
28742
28743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28744$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28745      JARSIGNER=$BOOT_JDK/bin/jarsigner
28746      if test ! -x $JARSIGNER; then
28747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28748$as_echo "not found" >&6; }
28749        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28750$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28751        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28752      fi
28753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28754$as_echo "ok" >&6; }
28755
28756
28757    else
28758      # If it succeeded, then it was overridden by the user. We will use it
28759      # for the tool.
28760
28761      # First remove it from the list of overridden variables, so we can test
28762      # for unknown variables in the end.
28763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28764
28765      # Check if we try to supply an empty value
28766      if test "x$JARSIGNER" = x; then
28767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28768$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28770$as_echo_n "checking for JARSIGNER... " >&6; }
28771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28772$as_echo "disabled" >&6; }
28773      else
28774        # Check if the provided tool contains a complete path.
28775        tool_specified="$JARSIGNER"
28776        tool_basename="${tool_specified##*/}"
28777        if test "x$tool_basename" = "x$tool_specified"; then
28778          # A command without a complete path is provided, search $PATH.
28779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28780$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28781          # Extract the first word of "$tool_basename", so it can be a program name with args.
28782set dummy $tool_basename; ac_word=$2
28783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28784$as_echo_n "checking for $ac_word... " >&6; }
28785if ${ac_cv_path_JARSIGNER+:} false; then :
28786  $as_echo_n "(cached) " >&6
28787else
28788  case $JARSIGNER in
28789  [\\/]* | ?:[\\/]*)
28790  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28791  ;;
28792  *)
28793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28794for as_dir in $PATH
28795do
28796  IFS=$as_save_IFS
28797  test -z "$as_dir" && as_dir=.
28798    for ac_exec_ext in '' $ac_executable_extensions; do
28799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28800    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28802    break 2
28803  fi
28804done
28805  done
28806IFS=$as_save_IFS
28807
28808  ;;
28809esac
28810fi
28811JARSIGNER=$ac_cv_path_JARSIGNER
28812if test -n "$JARSIGNER"; then
28813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28814$as_echo "$JARSIGNER" >&6; }
28815else
28816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28817$as_echo "no" >&6; }
28818fi
28819
28820
28821          if test "x$JARSIGNER" = x; then
28822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28823          fi
28824        else
28825          # Otherwise we believe it is a complete path. Use it as it is.
28826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28827$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28829$as_echo_n "checking for JARSIGNER... " >&6; }
28830          if test ! -x "$tool_specified"; then
28831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28832$as_echo "not found" >&6; }
28833            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28834          fi
28835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28836$as_echo "$tool_specified" >&6; }
28837        fi
28838      fi
28839    fi
28840
28841  fi
28842
28843
28844
28845  # Finally, set some other options...
28846
28847  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28848  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28849
28850
28851
28852  # Check if the boot jdk is 32 or 64 bit
28853  if "$JAVA" -d64 -version > /dev/null 2>&1; then
28854    BOOT_JDK_BITS="64"
28855  else
28856    BOOT_JDK_BITS="32"
28857  fi
28858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28859$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28861$as_echo "$BOOT_JDK_BITS" >&6; }
28862
28863
28864
28865###############################################################################
28866#
28867# Configure the sources to use. We can add or override individual directories.
28868#
28869###############################################################################
28870
28871
28872  # Where are the sources.
28873  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28874  CORBA_TOPDIR="$SRC_ROOT/corba"
28875  JAXP_TOPDIR="$SRC_ROOT/jaxp"
28876  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28877  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28878  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28879  JDK_TOPDIR="$SRC_ROOT/jdk"
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889  # This feature is no longer supported.
28890
28891
28892
28893# Check whether --with-add-source-root was given.
28894if test "${with_add_source_root+set}" = set; then :
28895  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
28896$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28897fi
28898
28899
28900
28901
28902# Check whether --with-override-source-root was given.
28903if test "${with_override_source_root+set}" = set; then :
28904  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
28905$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28906fi
28907
28908
28909
28910
28911# Check whether --with-adds-and-overrides was given.
28912if test "${with_adds_and_overrides+set}" = set; then :
28913  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
28914$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28915fi
28916
28917
28918
28919
28920# Check whether --with-override-langtools was given.
28921if test "${with_override_langtools+set}" = set; then :
28922  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28923$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28924fi
28925
28926
28927
28928
28929# Check whether --with-override-corba was given.
28930if test "${with_override_corba+set}" = set; then :
28931  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28932$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28933fi
28934
28935
28936
28937
28938# Check whether --with-override-jaxp was given.
28939if test "${with_override_jaxp+set}" = set; then :
28940  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28941$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28942fi
28943
28944
28945
28946
28947# Check whether --with-override-jaxws was given.
28948if test "${with_override_jaxws+set}" = set; then :
28949  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
28950$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
28951fi
28952
28953
28954
28955
28956# Check whether --with-override-hotspot was given.
28957if test "${with_override_hotspot+set}" = set; then :
28958  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
28959$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
28960fi
28961
28962
28963
28964
28965# Check whether --with-override-nashorn was given.
28966if test "${with_override_nashorn+set}" = set; then :
28967  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
28968$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
28969fi
28970
28971
28972
28973
28974# Check whether --with-override-jdk was given.
28975if test "${with_override_jdk+set}" = set; then :
28976  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
28977$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
28978fi
28979
28980
28981
28982
28983  BUILD_OUTPUT="$OUTPUT_ROOT"
28984
28985
28986  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
28987  BUILD_HOTSPOT=true
28988
28989
28990
28991# Check whether --with-import-hotspot was given.
28992if test "${with_import_hotspot+set}" = set; then :
28993  withval=$with_import_hotspot;
28994fi
28995
28996  if test "x$with_import_hotspot" != x; then
28997    CURDIR="$PWD"
28998    cd "$with_import_hotspot"
28999    HOTSPOT_DIST="`pwd`"
29000    cd "$CURDIR"
29001    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29002      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29003    fi
29004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29005$as_echo_n "checking if hotspot should be imported... " >&6; }
29006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29007$as_echo "yes from $HOTSPOT_DIST" >&6; }
29008    BUILD_HOTSPOT=false
29009  fi
29010
29011  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29012
29013
29014###############################################################################
29015#
29016# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29017# native code.
29018#
29019###############################################################################
29020
29021# First determine the toolchain type (compiler family)
29022
29023
29024# Check whether --with-toolchain-type was given.
29025if test "${with_toolchain_type+set}" = set; then :
29026  withval=$with_toolchain_type;
29027fi
29028
29029
29030  # Use indirect variable referencing
29031  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29032  VALID_TOOLCHAINS=${!toolchain_var_name}
29033
29034  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29035    if test -n "$XCODEBUILD"; then
29036      # On Mac OS X, default toolchain to clang after Xcode 5
29037      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29038      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29039      if test $? -ne 0; then
29040        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29041      fi
29042      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29043          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29044          $CUT -f 1 -d .`
29045      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29046$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29047      if test $XCODE_MAJOR_VERSION -ge 5; then
29048          DEFAULT_TOOLCHAIN="clang"
29049      else
29050          DEFAULT_TOOLCHAIN="gcc"
29051      fi
29052    else
29053      # If Xcode is not installed, but the command line tools are
29054      # then we can't run xcodebuild. On these systems we should
29055      # default to clang
29056      DEFAULT_TOOLCHAIN="clang"
29057    fi
29058  else
29059    # First toolchain type in the list is the default
29060    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29061  fi
29062
29063  if test "x$with_toolchain_type" = xlist; then
29064    # List all toolchains
29065    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29066$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29067    for toolchain in $VALID_TOOLCHAINS; do
29068      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29069      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29070      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29071    done
29072
29073    exit 0
29074  elif test "x$with_toolchain_type" != x; then
29075    # User override; check that it is valid
29076    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29077      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29078$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29079      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29080$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29081      as_fn_error $? "Cannot continue." "$LINENO" 5
29082    fi
29083    TOOLCHAIN_TYPE=$with_toolchain_type
29084  else
29085    # No flag given, use default
29086    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29087  fi
29088
29089
29090  TOOLCHAIN_CC_BINARY_clang="clang"
29091  TOOLCHAIN_CC_BINARY_gcc="gcc"
29092  TOOLCHAIN_CC_BINARY_microsoft="cl"
29093  TOOLCHAIN_CC_BINARY_solstudio="cc"
29094  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29095
29096  TOOLCHAIN_CXX_BINARY_clang="clang++"
29097  TOOLCHAIN_CXX_BINARY_gcc="g++"
29098  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29099  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29100  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29101
29102  # Use indirect variable referencing
29103  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29104  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29105  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29106  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29107  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29108  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29109
29110
29111  # Define filename patterns
29112  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29113    LIBRARY_PREFIX=
29114    SHARED_LIBRARY_SUFFIX='.dll'
29115    STATIC_LIBRARY_SUFFIX='.lib'
29116    SHARED_LIBRARY='$1.dll'
29117    STATIC_LIBRARY='$1.lib'
29118    OBJ_SUFFIX='.obj'
29119    EXE_SUFFIX='.exe'
29120  else
29121    LIBRARY_PREFIX=lib
29122    SHARED_LIBRARY_SUFFIX='.so'
29123    STATIC_LIBRARY_SUFFIX='.a'
29124    SHARED_LIBRARY='lib$1.so'
29125    STATIC_LIBRARY='lib$1.a'
29126    OBJ_SUFFIX='.o'
29127    EXE_SUFFIX=''
29128    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29129      SHARED_LIBRARY='lib$1.dylib'
29130      SHARED_LIBRARY_SUFFIX='.dylib'
29131    fi
29132  fi
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29144    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29145$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29146  else
29147    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29148$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29149  fi
29150
29151
29152# User supplied flags should be used when configure detects compilers
29153
29154  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29155    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29156$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29157  fi
29158
29159  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29161$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29162  fi
29163
29164  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29165    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29166$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29167  fi
29168
29169
29170# Check whether --with-extra-cflags was given.
29171if test "${with_extra_cflags+set}" = set; then :
29172  withval=$with_extra_cflags;
29173fi
29174
29175
29176
29177# Check whether --with-extra-cxxflags was given.
29178if test "${with_extra_cxxflags+set}" = set; then :
29179  withval=$with_extra_cxxflags;
29180fi
29181
29182
29183
29184# Check whether --with-extra-ldflags was given.
29185if test "${with_extra_ldflags+set}" = set; then :
29186  withval=$with_extra_ldflags;
29187fi
29188
29189
29190  EXTRA_CFLAGS="$with_extra_cflags"
29191  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29192  EXTRA_LDFLAGS="$with_extra_ldflags"
29193
29194  # Hotspot needs these set in their legacy form
29195  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29196  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29197  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29198
29199
29200
29201
29202
29203  # The global CFLAGS and LDLAGS variables are used by configure tests and
29204  # should include the extra parameters
29205  CFLAGS="$EXTRA_CFLAGS"
29206  CXXFLAGS="$EXTRA_CXXFLAGS"
29207  LDFLAGS="$EXTRA_LDFLAGS"
29208  CPPFLAGS=""
29209
29210# The sysroot cflags are needed for configure to be able to run the compilers
29211
29212  if test "x$SYSROOT" != "x"; then
29213    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29214      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29215        # Solaris Studio does not have a concept of sysroot. Instead we must
29216        # make sure the default include and lib dirs are appended to each
29217        # compile and link command line.
29218        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29219        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29220            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29221            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29222      fi
29223    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29224      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29225      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29226    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29227      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29228      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29229    fi
29230    # Propagate the sysroot args to hotspot
29231    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29232    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29233    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29234    # The global CFLAGS and LDFLAGS variables need these for configure to function
29235    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29236    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29237    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29238    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29239  fi
29240
29241  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29242    # We also need -iframework<path>/System/Library/Frameworks
29243    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29244    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29245    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29246    # set this here so it doesn't have to be peppered throughout the forest
29247    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29248    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29249  fi
29250
29251
29252
29253
29254
29255# Then detect the actual binaries needed
29256
29257  # FIXME: Is this needed?
29258  ac_ext=cpp
29259ac_cpp='$CXXCPP $CPPFLAGS'
29260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29263
29264
29265  # Store the CFLAGS etc passed to the configure script.
29266  ORG_CFLAGS="$CFLAGS"
29267  ORG_CXXFLAGS="$CXXFLAGS"
29268
29269  # autoconf magic only relies on PATH, so update it if tools dir is specified
29270  OLD_PATH="$PATH"
29271
29272  # On Windows, we need to detect the visual studio installation first.
29273  # This will change the PATH, but we need to keep that new PATH even
29274  # after toolchain detection is done, since the compiler (on x86) uses
29275  # it for DLL resolution in runtime.
29276  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29277      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29278
29279  # Store path to cygwin link.exe to help excluding it when searching for
29280  # VS linker. This must be done before changing the PATH when looking for VS.
29281  # Extract the first word of "link", so it can be a program name with args.
29282set dummy link; ac_word=$2
29283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29284$as_echo_n "checking for $ac_word... " >&6; }
29285if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29286  $as_echo_n "(cached) " >&6
29287else
29288  case $CYGWIN_LINK in
29289  [\\/]* | ?:[\\/]*)
29290  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29291  ;;
29292  *)
29293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29294for as_dir in $PATH
29295do
29296  IFS=$as_save_IFS
29297  test -z "$as_dir" && as_dir=.
29298    for ac_exec_ext in '' $ac_executable_extensions; do
29299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29300    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29302    break 2
29303  fi
29304done
29305  done
29306IFS=$as_save_IFS
29307
29308  ;;
29309esac
29310fi
29311CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29312if test -n "$CYGWIN_LINK"; then
29313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29314$as_echo "$CYGWIN_LINK" >&6; }
29315else
29316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29317$as_echo "no" >&6; }
29318fi
29319
29320
29321  if test "x$CYGWIN_LINK" != x; then
29322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29323$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29324    "$CYGWIN_LINK" --version > /dev/null
29325    if test $? -eq 0 ; then
29326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29327$as_echo "yes" >&6; }
29328    else
29329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29330$as_echo "no" >&6; }
29331      # This might be the VS linker. Don't exclude it later on.
29332      CYGWIN_LINK=""
29333    fi
29334  fi
29335
29336  # First-hand choice is to locate and run the vsvars bat file.
29337
29338
29339# Check whether --with-toolchain-version was given.
29340if test "${with_toolchain_version+set}" = set; then :
29341  withval=$with_toolchain_version;
29342fi
29343
29344
29345  if test "x$with_toolchain_version" = xlist; then
29346    # List all toolchains
29347    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29348$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29349    for version in $VALID_VS_VERSIONS; do
29350      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29351      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29352    done
29353
29354    exit 0
29355  elif test "x$DEVKIT_VS_VERSION" != x; then
29356    VS_VERSION=$DEVKIT_VS_VERSION
29357    TOOLCHAIN_VERSION=$VS_VERSION
29358    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29359    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29360    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29361    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29362    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29363    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29364
29365    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29366    # can still be exported as INCLUDE for compiler invocations without
29367    # SYSROOT_CFLAGS
29368    OLDIFS="$IFS"
29369    IFS=";"
29370    for i in $DEVKIT_VS_INCLUDE; do
29371      ipath=$i
29372
29373  unix_path="$ipath"
29374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29375    windows_path=`$CYGPATH -m "$unix_path"`
29376    ipath="$windows_path"
29377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29378    windows_path=`cmd //c echo $unix_path`
29379    ipath="$windows_path"
29380  fi
29381
29382      VS_INCLUDE="$VS_INCLUDE;$ipath"
29383    done
29384    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29385    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29386    for i in $DEVKIT_VS_LIB; do
29387      libpath=$i
29388
29389  unix_path="$libpath"
29390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29391    windows_path=`$CYGPATH -m "$unix_path"`
29392    libpath="$windows_path"
29393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29394    windows_path=`cmd //c echo $unix_path`
29395    libpath="$windows_path"
29396  fi
29397
29398      VS_LIB="$VS_LIB;$libpath"
29399    done
29400    IFS="$OLDIFS"
29401
29402    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29403$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29404
29405  elif test "x$with_toolchain_version" != x; then
29406    # User override; check that it is valid
29407    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29408      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29409$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29410      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29411$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29412      as_fn_error $? "Cannot continue." "$LINENO" 5
29413    fi
29414    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29415  else
29416    # No flag given, use default
29417    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29418  fi
29419
29420  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29421
29422  VS_VERSION="$VS_VERSION"
29423  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29424  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29425  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29426  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29427
29428  # When using --with-tools-dir, assume it points to the correct and default
29429  # version of Visual Studio or that --with-toolchain-version was also set.
29430  if test "x$with_tools_dir" != x; then
29431
29432  if test "x$VS_ENV_CMD" = x; then
29433    VS_VERSION="${VS_VERSION}"
29434    VS_BASE="$with_tools_dir/../.."
29435    METHOD="--with-tools-dir"
29436
29437    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29438      VCVARSFILE="vc/bin/vcvars32.bat"
29439    else
29440      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29441    fi
29442
29443
29444  windows_path="$VS_BASE"
29445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29446    unix_path=`$CYGPATH -u "$windows_path"`
29447    VS_BASE="$unix_path"
29448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29450    VS_BASE="$unix_path"
29451  fi
29452
29453    if test -d "$VS_BASE"; then
29454      if test -f "$VS_BASE/$VCVARSFILE"; then
29455        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29456$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29457        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29458        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29459        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29460        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29461      else
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29463$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29464        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29465$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29466      fi
29467    fi
29468  fi
29469
29470
29471  if test "x$VS_ENV_CMD" = x; then
29472    VS_VERSION="${VS_VERSION}"
29473    VS_BASE="$with_tools_dir/../../.."
29474    METHOD="--with-tools-dir"
29475
29476    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29477      VCVARSFILE="vc/bin/vcvars32.bat"
29478    else
29479      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29480    fi
29481
29482
29483  windows_path="$VS_BASE"
29484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29485    unix_path=`$CYGPATH -u "$windows_path"`
29486    VS_BASE="$unix_path"
29487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29489    VS_BASE="$unix_path"
29490  fi
29491
29492    if test -d "$VS_BASE"; then
29493      if test -f "$VS_BASE/$VCVARSFILE"; then
29494        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29495$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29496        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29497        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29498        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29499        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29500      else
29501        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29502$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29503        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29504$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29505      fi
29506    fi
29507  fi
29508
29509    if test "x$VS_ENV_CMD" = x; then
29510      # Having specified an argument which is incorrect will produce an instant failure;
29511      # we should not go on looking
29512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29513$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29514      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29515$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29516      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29517$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29518      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29519    fi
29520  fi
29521
29522  VS_ENV_CMD=""
29523  VS_ENV_ARGS=""
29524
29525  if test "x$VS_COMNTOOLS" != x; then
29526
29527  if test "x$VS_ENV_CMD" = x; then
29528    VS_VERSION="${VS_VERSION}"
29529    VS_BASE="$VS_COMNTOOLS/../.."
29530    METHOD="$VS_COMNTOOLS_VAR variable"
29531
29532    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29533      VCVARSFILE="vc/bin/vcvars32.bat"
29534    else
29535      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29536    fi
29537
29538
29539  windows_path="$VS_BASE"
29540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29541    unix_path=`$CYGPATH -u "$windows_path"`
29542    VS_BASE="$unix_path"
29543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29545    VS_BASE="$unix_path"
29546  fi
29547
29548    if test -d "$VS_BASE"; then
29549      if test -f "$VS_BASE/$VCVARSFILE"; then
29550        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29551$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29552        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29553        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29554        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29555        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29556      else
29557        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29558$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29559        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29560$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29561      fi
29562    fi
29563  fi
29564
29565  fi
29566  if test "x$PROGRAMFILES" != x; then
29567
29568  if test "x$VS_ENV_CMD" = x; then
29569    VS_VERSION="${VS_VERSION}"
29570    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29571    METHOD="well-known name"
29572
29573    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29574      VCVARSFILE="vc/bin/vcvars32.bat"
29575    else
29576      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29577    fi
29578
29579
29580  windows_path="$VS_BASE"
29581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29582    unix_path=`$CYGPATH -u "$windows_path"`
29583    VS_BASE="$unix_path"
29584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29586    VS_BASE="$unix_path"
29587  fi
29588
29589    if test -d "$VS_BASE"; then
29590      if test -f "$VS_BASE/$VCVARSFILE"; then
29591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29592$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29593        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29594        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29595        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29596        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29597      else
29598        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29599$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29600        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29601$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29602      fi
29603    fi
29604  fi
29605
29606  fi
29607  # Work around the insanely named ProgramFiles(x86) env variable
29608  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29609  if test "x$PROGRAMFILES_X86" != x; then
29610
29611  if test "x$VS_ENV_CMD" = x; then
29612    VS_VERSION="${VS_VERSION}"
29613    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29614    METHOD="well-known name"
29615
29616    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29617      VCVARSFILE="vc/bin/vcvars32.bat"
29618    else
29619      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29620    fi
29621
29622
29623  windows_path="$VS_BASE"
29624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29625    unix_path=`$CYGPATH -u "$windows_path"`
29626    VS_BASE="$unix_path"
29627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29629    VS_BASE="$unix_path"
29630  fi
29631
29632    if test -d "$VS_BASE"; then
29633      if test -f "$VS_BASE/$VCVARSFILE"; then
29634        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29635$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29636        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29637        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29638        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29639        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29640      else
29641        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29642$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29643        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29644$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29645      fi
29646    fi
29647  fi
29648
29649  fi
29650
29651  if test "x$VS_ENV_CMD" = x; then
29652    VS_VERSION="${VS_VERSION}"
29653    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29654    METHOD="well-known name"
29655
29656    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29657      VCVARSFILE="vc/bin/vcvars32.bat"
29658    else
29659      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29660    fi
29661
29662
29663  windows_path="$VS_BASE"
29664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29665    unix_path=`$CYGPATH -u "$windows_path"`
29666    VS_BASE="$unix_path"
29667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29669    VS_BASE="$unix_path"
29670  fi
29671
29672    if test -d "$VS_BASE"; then
29673      if test -f "$VS_BASE/$VCVARSFILE"; then
29674        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29675$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29676        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29677        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29678        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29679        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29680      else
29681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29682$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29683        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29684$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29685      fi
29686    fi
29687  fi
29688
29689
29690  if test "x$VS_ENV_CMD" = x; then
29691    VS_VERSION="${VS_VERSION}"
29692    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29693    METHOD="well-known name"
29694
29695    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29696      VCVARSFILE="vc/bin/vcvars32.bat"
29697    else
29698      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29699    fi
29700
29701
29702  windows_path="$VS_BASE"
29703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29704    unix_path=`$CYGPATH -u "$windows_path"`
29705    VS_BASE="$unix_path"
29706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29708    VS_BASE="$unix_path"
29709  fi
29710
29711    if test -d "$VS_BASE"; then
29712      if test -f "$VS_BASE/$VCVARSFILE"; then
29713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29714$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29715        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29716        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29717        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29718        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29719      else
29720        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29721$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29723$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29724      fi
29725    fi
29726  fi
29727
29728
29729  if test "x$SDK_INSTALL_DIR" != x; then
29730    if test "x$ProgramW6432" != x; then
29731
29732  if test "x$VS_ENV_CMD" = x; then
29733    VS_VERSION="${VS_VERSION}"
29734    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29735    METHOD="well-known name"
29736
29737  windows_path="$WIN_SDK_BASE"
29738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29739    unix_path=`$CYGPATH -u "$windows_path"`
29740    WIN_SDK_BASE="$unix_path"
29741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29743    WIN_SDK_BASE="$unix_path"
29744  fi
29745
29746    if test -d "$WIN_SDK_BASE"; then
29747      # There have been cases of partial or broken SDK installations. A missing
29748      # lib dir is not going to work.
29749      if test ! -d "$WIN_SDK_BASE/lib"; then
29750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29751$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29752        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29753$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29754      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29756$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29757        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29758        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29759          VS_ENV_ARGS="/x86"
29760        else
29761          VS_ENV_ARGS="/x64"
29762        fi
29763        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29764        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29765        # TODO: improve detection for other versions of SDK
29766        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29767      else
29768        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29769$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29770        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29771$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29772      fi
29773    fi
29774  fi
29775
29776    fi
29777    if test "x$PROGRAMW6432" != x; then
29778
29779  if test "x$VS_ENV_CMD" = x; then
29780    VS_VERSION="${VS_VERSION}"
29781    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29782    METHOD="well-known name"
29783
29784  windows_path="$WIN_SDK_BASE"
29785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29786    unix_path=`$CYGPATH -u "$windows_path"`
29787    WIN_SDK_BASE="$unix_path"
29788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29790    WIN_SDK_BASE="$unix_path"
29791  fi
29792
29793    if test -d "$WIN_SDK_BASE"; then
29794      # There have been cases of partial or broken SDK installations. A missing
29795      # lib dir is not going to work.
29796      if test ! -d "$WIN_SDK_BASE/lib"; then
29797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29798$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29799        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29800$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29801      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29803$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29804        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29805        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29806          VS_ENV_ARGS="/x86"
29807        else
29808          VS_ENV_ARGS="/x64"
29809        fi
29810        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29811        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29812        # TODO: improve detection for other versions of SDK
29813        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29814      else
29815        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29816$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29817        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29818$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29819      fi
29820    fi
29821  fi
29822
29823    fi
29824    if test "x$PROGRAMFILES" != x; then
29825
29826  if test "x$VS_ENV_CMD" = x; then
29827    VS_VERSION="${VS_VERSION}"
29828    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29829    METHOD="well-known name"
29830
29831  windows_path="$WIN_SDK_BASE"
29832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29833    unix_path=`$CYGPATH -u "$windows_path"`
29834    WIN_SDK_BASE="$unix_path"
29835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29837    WIN_SDK_BASE="$unix_path"
29838  fi
29839
29840    if test -d "$WIN_SDK_BASE"; then
29841      # There have been cases of partial or broken SDK installations. A missing
29842      # lib dir is not going to work.
29843      if test ! -d "$WIN_SDK_BASE/lib"; then
29844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29845$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29846        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29847$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29848      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29849        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29850$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29851        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29852        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29853          VS_ENV_ARGS="/x86"
29854        else
29855          VS_ENV_ARGS="/x64"
29856        fi
29857        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29858        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29859        # TODO: improve detection for other versions of SDK
29860        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29861      else
29862        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29863$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29864        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29865$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29866      fi
29867    fi
29868  fi
29869
29870    fi
29871
29872  if test "x$VS_ENV_CMD" = x; then
29873    VS_VERSION="${VS_VERSION}"
29874    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29875    METHOD="well-known name"
29876
29877  windows_path="$WIN_SDK_BASE"
29878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29879    unix_path=`$CYGPATH -u "$windows_path"`
29880    WIN_SDK_BASE="$unix_path"
29881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29883    WIN_SDK_BASE="$unix_path"
29884  fi
29885
29886    if test -d "$WIN_SDK_BASE"; then
29887      # There have been cases of partial or broken SDK installations. A missing
29888      # lib dir is not going to work.
29889      if test ! -d "$WIN_SDK_BASE/lib"; then
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29891$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29892        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29893$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29894      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29895        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29896$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29897        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29898        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29899          VS_ENV_ARGS="/x86"
29900        else
29901          VS_ENV_ARGS="/x64"
29902        fi
29903        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29904        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29905        # TODO: improve detection for other versions of SDK
29906        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29907      else
29908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29909$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29910        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29911$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29912      fi
29913    fi
29914  fi
29915
29916
29917  if test "x$VS_ENV_CMD" = x; then
29918    VS_VERSION="${VS_VERSION}"
29919    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
29920    METHOD="well-known name"
29921
29922  windows_path="$WIN_SDK_BASE"
29923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29924    unix_path=`$CYGPATH -u "$windows_path"`
29925    WIN_SDK_BASE="$unix_path"
29926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29928    WIN_SDK_BASE="$unix_path"
29929  fi
29930
29931    if test -d "$WIN_SDK_BASE"; then
29932      # There have been cases of partial or broken SDK installations. A missing
29933      # lib dir is not going to work.
29934      if test ! -d "$WIN_SDK_BASE/lib"; then
29935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29936$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29938$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29939      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29941$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29942        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29943        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29944          VS_ENV_ARGS="/x86"
29945        else
29946          VS_ENV_ARGS="/x64"
29947        fi
29948        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29949        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29950        # TODO: improve detection for other versions of SDK
29951        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29952      else
29953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29956$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29957      fi
29958    fi
29959  fi
29960
29961  fi
29962
29963    if test "x$VS_ENV_CMD" != x; then
29964      TOOLCHAIN_VERSION=$VS_VERSION
29965      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29966      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29967      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29968      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29969      # The rest of the variables are already evaled while probing
29970      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
29971$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
29972      break
29973    fi
29974  done
29975
29976
29977  # If we have a devkit, skip all of the below.
29978  if test "x$DEVKIT_VS_VERSION" = x; then
29979    if test "x$VS_ENV_CMD" != x; then
29980      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
29981
29982  # Only process if variable expands to non-empty
29983
29984  if test "x$VS_ENV_CMD" != x; then
29985    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29986
29987  # First separate the path from the arguments. This will split at the first
29988  # space.
29989  complete="$VS_ENV_CMD"
29990  path="${complete%% *}"
29991  tmp="$complete EOL"
29992  arguments="${tmp#* }"
29993
29994  # Input might be given as Windows format, start by converting to
29995  # unix format.
29996  new_path=`$CYGPATH -u "$path"`
29997
29998  # Now try to locate executable using which
29999  new_path=`$WHICH "$new_path" 2> /dev/null`
30000  # bat and cmd files are not always considered executable in cygwin causing which
30001  # to not find them
30002  if test "x$new_path" = x \
30003      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30004      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30005    new_path=`$CYGPATH -u "$path"`
30006  fi
30007  if test "x$new_path" = x; then
30008    # Oops. Which didn't find the executable.
30009    # The splitting of arguments from the executable at a space might have been incorrect,
30010    # since paths with space are more likely in Windows. Give it another try with the whole
30011    # argument.
30012    path="$complete"
30013    arguments="EOL"
30014    new_path=`$CYGPATH -u "$path"`
30015    new_path=`$WHICH "$new_path" 2> /dev/null`
30016    # bat and cmd files are not always considered executable in cygwin causing which
30017    # to not find them
30018    if test "x$new_path" = x \
30019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30021      new_path=`$CYGPATH -u "$path"`
30022    fi
30023    if test "x$new_path" = x; then
30024      # It's still not found. Now this is an unrecoverable error.
30025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30026$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30027      has_space=`$ECHO "$complete" | $GREP " "`
30028      if test "x$has_space" != x; then
30029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30031      fi
30032      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30033    fi
30034  fi
30035
30036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30039  # "foo.exe" is OK but "foo" is an error.
30040  #
30041  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30042  # It is also a way to make sure we got the proper file name for the real test later on.
30043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30044  if test "x$test_shortpath" = x; then
30045    # Short path failed, file does not exist as specified.
30046    # Try adding .exe or .cmd
30047    if test -f "${new_path}.exe"; then
30048      input_to_shortpath="${new_path}.exe"
30049    elif test -f "${new_path}.cmd"; then
30050      input_to_shortpath="${new_path}.cmd"
30051    else
30052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30053$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30054      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30055$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30056      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30057    fi
30058  else
30059    input_to_shortpath="$new_path"
30060  fi
30061
30062  # Call helper function which possibly converts this using DOS-style short mode.
30063  # If so, the updated path is stored in $new_path.
30064  new_path="$input_to_shortpath"
30065
30066  input_path="$input_to_shortpath"
30067  # Check if we need to convert this using DOS-style short mode. If the path
30068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30069  # take no chances and rewrite it.
30070  # Note: m4 eats our [], so we need to use [ and ] instead.
30071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30072  if test "x$has_forbidden_chars" != x; then
30073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30077      # Going to short mode and back again did indeed matter. Since short mode is
30078      # case insensitive, let's make it lowercase to improve readability.
30079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30080      # Now convert it back to Unix-style (cygpath)
30081      input_path=`$CYGPATH -u "$shortmode_path"`
30082      new_path="$input_path"
30083    fi
30084  fi
30085
30086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30087  if test "x$test_cygdrive_prefix" = x; then
30088    # As a simple fix, exclude /usr/bin since it's not a real path.
30089    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30091      # a path prefixed by /cygdrive for fixpath to work.
30092      new_path="$CYGWIN_ROOT_PATH$input_path"
30093    fi
30094  fi
30095
30096  # remove trailing .exe if any
30097  new_path="${new_path/%.exe/}"
30098
30099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30100
30101  # First separate the path from the arguments. This will split at the first
30102  # space.
30103  complete="$VS_ENV_CMD"
30104  path="${complete%% *}"
30105  tmp="$complete EOL"
30106  arguments="${tmp#* }"
30107
30108  # Input might be given as Windows format, start by converting to
30109  # unix format.
30110  new_path="$path"
30111
30112  windows_path="$new_path"
30113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30114    unix_path=`$CYGPATH -u "$windows_path"`
30115    new_path="$unix_path"
30116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30118    new_path="$unix_path"
30119  fi
30120
30121
30122  # Now try to locate executable using which
30123  new_path=`$WHICH "$new_path" 2> /dev/null`
30124
30125  if test "x$new_path" = x; then
30126    # Oops. Which didn't find the executable.
30127    # The splitting of arguments from the executable at a space might have been incorrect,
30128    # since paths with space are more likely in Windows. Give it another try with the whole
30129    # argument.
30130    path="$complete"
30131    arguments="EOL"
30132    new_path="$path"
30133
30134  windows_path="$new_path"
30135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30136    unix_path=`$CYGPATH -u "$windows_path"`
30137    new_path="$unix_path"
30138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30140    new_path="$unix_path"
30141  fi
30142
30143
30144    new_path=`$WHICH "$new_path" 2> /dev/null`
30145    # bat and cmd files are not always considered executable in MSYS causing which
30146    # to not find them
30147    if test "x$new_path" = x \
30148        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30149        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30150      new_path="$path"
30151
30152  windows_path="$new_path"
30153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30154    unix_path=`$CYGPATH -u "$windows_path"`
30155    new_path="$unix_path"
30156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30158    new_path="$unix_path"
30159  fi
30160
30161    fi
30162
30163    if test "x$new_path" = x; then
30164      # It's still not found. Now this is an unrecoverable error.
30165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30166$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30167      has_space=`$ECHO "$complete" | $GREP " "`
30168      if test "x$has_space" != x; then
30169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30171      fi
30172      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30173    fi
30174  fi
30175
30176  # Now new_path has a complete unix path to the binary
30177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30178    # Keep paths in /bin as-is, but remove trailing .exe if any
30179    new_path="${new_path/%.exe/}"
30180    # Do not save /bin paths to all_fixpath_prefixes!
30181  else
30182    # Not in mixed or Windows style, start by that.
30183    new_path=`cmd //c echo $new_path`
30184
30185  input_path="$new_path"
30186  # Check if we need to convert this using DOS-style short mode. If the path
30187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30188  # take no chances and rewrite it.
30189  # Note: m4 eats our [], so we need to use [ and ] instead.
30190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30191  if test "x$has_forbidden_chars" != x; then
30192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30194  fi
30195
30196    # Output is in $new_path
30197
30198  windows_path="$new_path"
30199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30200    unix_path=`$CYGPATH -u "$windows_path"`
30201    new_path="$unix_path"
30202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30204    new_path="$unix_path"
30205  fi
30206
30207    # remove trailing .exe if any
30208    new_path="${new_path/%.exe/}"
30209
30210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30212  fi
30213
30214    else
30215      # We're on a unix platform. Hooray! :)
30216      # First separate the path from the arguments. This will split at the first
30217      # space.
30218      complete="$VS_ENV_CMD"
30219      path="${complete%% *}"
30220      tmp="$complete EOL"
30221      arguments="${tmp#* }"
30222
30223      # Cannot rely on the command "which" here since it doesn't always work.
30224      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30225      if test -z "$is_absolute_path"; then
30226        # Path to executable is not absolute. Find it.
30227        IFS_save="$IFS"
30228        IFS=:
30229        for p in $PATH; do
30230          if test -f "$p/$path" && test -x "$p/$path"; then
30231            new_path="$p/$path"
30232            break
30233          fi
30234        done
30235        IFS="$IFS_save"
30236      else
30237        # This is an absolute path, we can use it without further modifications.
30238        new_path="$path"
30239      fi
30240
30241      if test "x$new_path" = x; then
30242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30243$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30244        has_space=`$ECHO "$complete" | $GREP " "`
30245        if test "x$has_space" != x; then
30246          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30247$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30248        fi
30249        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30250      fi
30251    fi
30252
30253    # Now join together the path and the arguments once again
30254    if test "x$arguments" != xEOL; then
30255      new_complete="$new_path ${arguments% *}"
30256    else
30257      new_complete="$new_path"
30258    fi
30259
30260    if test "x$complete" != "x$new_complete"; then
30261      VS_ENV_CMD="$new_complete"
30262      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30263$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30264    fi
30265  fi
30266
30267
30268      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30269      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30270$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30271
30272      # We need to create a couple of temporary files.
30273      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30274      $MKDIR -p $VS_ENV_TMP_DIR
30275
30276      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30277      # Instead create a shell script which will set the relevant variables when run.
30278      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30279
30280  unix_path="$WINPATH_VS_ENV_CMD"
30281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30282    windows_path=`$CYGPATH -m "$unix_path"`
30283    WINPATH_VS_ENV_CMD="$windows_path"
30284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30285    windows_path=`cmd //c echo $unix_path`
30286    WINPATH_VS_ENV_CMD="$windows_path"
30287  fi
30288
30289      WINPATH_BASH="$BASH"
30290
30291  unix_path="$WINPATH_BASH"
30292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30293    windows_path=`$CYGPATH -m "$unix_path"`
30294    WINPATH_BASH="$windows_path"
30295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30296    windows_path=`cmd //c echo $unix_path`
30297    WINPATH_BASH="$windows_path"
30298  fi
30299
30300
30301      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30302      # script (executable by bash) that will setup the important variables.
30303      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30304      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30305      # This will end up something like:
30306      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30307      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30308      # These will end up something like:
30309      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30310      # The trailing space for everyone except PATH is no typo, but is needed due
30311      # to trailing \ in the Windows paths. These will be stripped later.
30312      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30313          >> $EXTRACT_VC_ENV_BAT_FILE
30314      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30315          >> $EXTRACT_VC_ENV_BAT_FILE
30316      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30317          >> $EXTRACT_VC_ENV_BAT_FILE
30318      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30319          >> $EXTRACT_VC_ENV_BAT_FILE
30320      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30321          >> $EXTRACT_VC_ENV_BAT_FILE
30322      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30323          >> $EXTRACT_VC_ENV_BAT_FILE
30324
30325      # Now execute the newly created bat file.
30326      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30327      # Change directory so we don't need to mess with Windows paths in redirects.
30328      cd $VS_ENV_TMP_DIR
30329      cmd /c extract-vs-env.bat | $CAT
30330      cd $CURDIR
30331
30332      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30333        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30334$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30335        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30336$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30338$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30339        as_fn_error $? "Cannot continue" "$LINENO" 5
30340      fi
30341
30342      # Now set all paths and other env variables. This will allow the rest of
30343      # the configure script to find and run the compiler in the proper way.
30344      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30345$as_echo "$as_me: Setting extracted environment variables" >&6;}
30346      . $VS_ENV_TMP_DIR/set-vs-env.sh
30347      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30348      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30349    else
30350      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30352$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30353    fi
30354  fi
30355
30356  # At this point, we should have correct variables in the environment, or we can't continue.
30357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30358$as_echo_n "checking for Visual Studio variables... " >&6; }
30359
30360  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30361      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30362    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30364$as_echo "present but broken" >&6; }
30365      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30366    else
30367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30368$as_echo "ok" >&6; }
30369      # Remove any trailing "\" ";" and " " from the variables.
30370      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30371      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30372      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30373      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30374      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30375      # Remove any paths containing # (typically F#) as that messes up make. This
30376      # is needed if visual studio was installed with F# support.
30377      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30378
30379
30380
30381
30382
30383      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30384      OLDIFS="$IFS"
30385      IFS=";"
30386      for i in $VS_INCLUDE; do
30387        ipath=$i
30388        # Only process non-empty elements
30389        if test "x$ipath" != x; then
30390          IFS="$OLDIFS"
30391          # Check that directory exists before calling fixup_path
30392          testpath=$ipath
30393
30394  windows_path="$testpath"
30395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30396    unix_path=`$CYGPATH -u "$windows_path"`
30397    testpath="$unix_path"
30398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30400    testpath="$unix_path"
30401  fi
30402
30403          if test -d "$testpath"; then
30404
30405  # Only process if variable expands to non-empty
30406
30407  if test "x$ipath" != x; then
30408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30409
30410  # Input might be given as Windows format, start by converting to
30411  # unix format.
30412  path="$ipath"
30413  new_path=`$CYGPATH -u "$path"`
30414
30415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30418  # "foo.exe" is OK but "foo" is an error.
30419  #
30420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30421  # It is also a way to make sure we got the proper file name for the real test later on.
30422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30423  if test "x$test_shortpath" = x; then
30424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30425$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30426    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30427  fi
30428
30429  # Call helper function which possibly converts this using DOS-style short mode.
30430  # If so, the updated path is stored in $new_path.
30431
30432  input_path="$new_path"
30433  # Check if we need to convert this using DOS-style short mode. If the path
30434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30435  # take no chances and rewrite it.
30436  # Note: m4 eats our [], so we need to use [ and ] instead.
30437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30438  if test "x$has_forbidden_chars" != x; then
30439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30443      # Going to short mode and back again did indeed matter. Since short mode is
30444      # case insensitive, let's make it lowercase to improve readability.
30445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30446      # Now convert it back to Unix-style (cygpath)
30447      input_path=`$CYGPATH -u "$shortmode_path"`
30448      new_path="$input_path"
30449    fi
30450  fi
30451
30452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30453  if test "x$test_cygdrive_prefix" = x; then
30454    # As a simple fix, exclude /usr/bin since it's not a real path.
30455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30457      # a path prefixed by /cygdrive for fixpath to work.
30458      new_path="$CYGWIN_ROOT_PATH$input_path"
30459    fi
30460  fi
30461
30462
30463  if test "x$path" != "x$new_path"; then
30464    ipath="$new_path"
30465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30466$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30467  fi
30468
30469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30470
30471  path="$ipath"
30472  has_colon=`$ECHO $path | $GREP ^.:`
30473  new_path="$path"
30474  if test "x$has_colon" = x; then
30475    # Not in mixed or Windows style, start by that.
30476    new_path=`cmd //c echo $path`
30477  fi
30478
30479
30480  input_path="$new_path"
30481  # Check if we need to convert this using DOS-style short mode. If the path
30482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30483  # take no chances and rewrite it.
30484  # Note: m4 eats our [], so we need to use [ and ] instead.
30485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30486  if test "x$has_forbidden_chars" != x; then
30487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30489  fi
30490
30491
30492  windows_path="$new_path"
30493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30494    unix_path=`$CYGPATH -u "$windows_path"`
30495    new_path="$unix_path"
30496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30498    new_path="$unix_path"
30499  fi
30500
30501  if test "x$path" != "x$new_path"; then
30502    ipath="$new_path"
30503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30504$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30505  fi
30506
30507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30509
30510    else
30511      # We're on a unix platform. Hooray! :)
30512      path="$ipath"
30513      has_space=`$ECHO "$path" | $GREP " "`
30514      if test "x$has_space" != x; then
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30516$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30517        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30518      fi
30519
30520      # Use eval to expand a potential ~
30521      eval path="$path"
30522      if test ! -f "$path" && test ! -d "$path"; then
30523        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30524      fi
30525
30526      ipath="`cd "$path"; $THEPWDCMD -L`"
30527    fi
30528  fi
30529
30530            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30531          fi
30532          IFS=";"
30533        fi
30534      done
30535      # Convert VS_LIB into SYSROOT_LDFLAGS
30536      for i in $VS_LIB; do
30537        libpath=$i
30538        # Only process non-empty elements
30539        if test "x$libpath" != x; then
30540          IFS="$OLDIFS"
30541          # Check that directory exists before calling fixup_path
30542          testpath=$libpath
30543
30544  windows_path="$testpath"
30545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30546    unix_path=`$CYGPATH -u "$windows_path"`
30547    testpath="$unix_path"
30548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30550    testpath="$unix_path"
30551  fi
30552
30553          if test -d "$testpath"; then
30554
30555  # Only process if variable expands to non-empty
30556
30557  if test "x$libpath" != x; then
30558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30559
30560  # Input might be given as Windows format, start by converting to
30561  # unix format.
30562  path="$libpath"
30563  new_path=`$CYGPATH -u "$path"`
30564
30565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30568  # "foo.exe" is OK but "foo" is an error.
30569  #
30570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30571  # It is also a way to make sure we got the proper file name for the real test later on.
30572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30573  if test "x$test_shortpath" = x; then
30574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30575$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30576    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30577  fi
30578
30579  # Call helper function which possibly converts this using DOS-style short mode.
30580  # If so, the updated path is stored in $new_path.
30581
30582  input_path="$new_path"
30583  # Check if we need to convert this using DOS-style short mode. If the path
30584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30585  # take no chances and rewrite it.
30586  # Note: m4 eats our [], so we need to use [ and ] instead.
30587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30588  if test "x$has_forbidden_chars" != x; then
30589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30593      # Going to short mode and back again did indeed matter. Since short mode is
30594      # case insensitive, let's make it lowercase to improve readability.
30595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30596      # Now convert it back to Unix-style (cygpath)
30597      input_path=`$CYGPATH -u "$shortmode_path"`
30598      new_path="$input_path"
30599    fi
30600  fi
30601
30602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30603  if test "x$test_cygdrive_prefix" = x; then
30604    # As a simple fix, exclude /usr/bin since it's not a real path.
30605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30607      # a path prefixed by /cygdrive for fixpath to work.
30608      new_path="$CYGWIN_ROOT_PATH$input_path"
30609    fi
30610  fi
30611
30612
30613  if test "x$path" != "x$new_path"; then
30614    libpath="$new_path"
30615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30616$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30617  fi
30618
30619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30620
30621  path="$libpath"
30622  has_colon=`$ECHO $path | $GREP ^.:`
30623  new_path="$path"
30624  if test "x$has_colon" = x; then
30625    # Not in mixed or Windows style, start by that.
30626    new_path=`cmd //c echo $path`
30627  fi
30628
30629
30630  input_path="$new_path"
30631  # Check if we need to convert this using DOS-style short mode. If the path
30632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30633  # take no chances and rewrite it.
30634  # Note: m4 eats our [], so we need to use [ and ] instead.
30635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30636  if test "x$has_forbidden_chars" != x; then
30637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30639  fi
30640
30641
30642  windows_path="$new_path"
30643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30644    unix_path=`$CYGPATH -u "$windows_path"`
30645    new_path="$unix_path"
30646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30648    new_path="$unix_path"
30649  fi
30650
30651  if test "x$path" != "x$new_path"; then
30652    libpath="$new_path"
30653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30654$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30655  fi
30656
30657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30659
30660    else
30661      # We're on a unix platform. Hooray! :)
30662      path="$libpath"
30663      has_space=`$ECHO "$path" | $GREP " "`
30664      if test "x$has_space" != x; then
30665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30666$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30668      fi
30669
30670      # Use eval to expand a potential ~
30671      eval path="$path"
30672      if test ! -f "$path" && test ! -d "$path"; then
30673        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30674      fi
30675
30676      libpath="`cd "$path"; $THEPWDCMD -L`"
30677    fi
30678  fi
30679
30680            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30681          fi
30682          IFS=";"
30683        fi
30684      done
30685      IFS="$OLDIFS"
30686    fi
30687  else
30688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30689$as_echo "not found" >&6; }
30690
30691    if test "x$VS_ENV_CMD" = x; then
30692      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30693$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30694      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30695$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30696    else
30697      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30698$as_echo "$as_me: Running the extraction script failed." >&6;}
30699    fi
30700    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30701$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30702    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30703$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30704    as_fn_error $? "Cannot continue" "$LINENO" 5
30705  fi
30706
30707    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30708    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30709    PATH="$VS_PATH"
30710    # The microsoft toolchain also requires INCLUDE and LIB to be set.
30711    export INCLUDE="$VS_INCLUDE"
30712    export LIB="$VS_LIB"
30713  fi
30714
30715  # For solaris we really need solaris tools, and not the GNU equivalent.
30716  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30717  # so add that to path before starting to probe.
30718  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30719  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30720    PATH="/usr/ccs/bin:$PATH"
30721  fi
30722
30723  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30724  # override all other locations.
30725  if test "x$TOOLCHAIN_PATH" != x; then
30726    PATH=$TOOLCHAIN_PATH:$PATH
30727  fi
30728
30729
30730  #
30731  # Setup the compilers (CC and CXX)
30732  #
30733
30734  COMPILER_NAME=C
30735  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30736
30737  if test "x$CC" != x; then
30738    # User has supplied compiler name already, always let that override.
30739    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30740$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30741    if test "x`basename $CC`" = "x$CC"; then
30742      # A command without a complete path is provided, search $PATH.
30743
30744      for ac_prog in $CC
30745do
30746  # Extract the first word of "$ac_prog", so it can be a program name with args.
30747set dummy $ac_prog; ac_word=$2
30748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30749$as_echo_n "checking for $ac_word... " >&6; }
30750if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30751  $as_echo_n "(cached) " >&6
30752else
30753  case $POTENTIAL_CC in
30754  [\\/]* | ?:[\\/]*)
30755  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30756  ;;
30757  *)
30758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30759for as_dir in $PATH
30760do
30761  IFS=$as_save_IFS
30762  test -z "$as_dir" && as_dir=.
30763    for ac_exec_ext in '' $ac_executable_extensions; do
30764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30765    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30767    break 2
30768  fi
30769done
30770  done
30771IFS=$as_save_IFS
30772
30773  ;;
30774esac
30775fi
30776POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30777if test -n "$POTENTIAL_CC"; then
30778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30779$as_echo "$POTENTIAL_CC" >&6; }
30780else
30781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30782$as_echo "no" >&6; }
30783fi
30784
30785
30786  test -n "$POTENTIAL_CC" && break
30787done
30788
30789      if test "x$POTENTIAL_CC" != x; then
30790        CC=$POTENTIAL_CC
30791      else
30792        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30793      fi
30794    else
30795      # Otherwise it might already be a complete path
30796      if test ! -x "$CC"; then
30797        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30798      fi
30799    fi
30800  else
30801    # No user supplied value. Locate compiler ourselves.
30802
30803    # If we are cross compiling, assume cross compilation tools follows the
30804    # cross compilation standard where they are prefixed with the autoconf
30805    # standard name for the target. For example the binary
30806    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30807    # If we are not cross compiling, then the default compiler name will be
30808    # used.
30809
30810    CC=
30811    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30812    # before checking the rest of the PATH.
30813    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30814    # step, this should not be necessary.
30815    if test -n "$TOOLCHAIN_PATH"; then
30816      PATH_save="$PATH"
30817      PATH="$TOOLCHAIN_PATH"
30818      for ac_prog in $SEARCH_LIST
30819do
30820  # Extract the first word of "$ac_prog", so it can be a program name with args.
30821set dummy $ac_prog; ac_word=$2
30822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30823$as_echo_n "checking for $ac_word... " >&6; }
30824if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30825  $as_echo_n "(cached) " >&6
30826else
30827  case $TOOLCHAIN_PATH_CC in
30828  [\\/]* | ?:[\\/]*)
30829  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30830  ;;
30831  *)
30832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30833for as_dir in $PATH
30834do
30835  IFS=$as_save_IFS
30836  test -z "$as_dir" && as_dir=.
30837    for ac_exec_ext in '' $ac_executable_extensions; do
30838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30839    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30841    break 2
30842  fi
30843done
30844  done
30845IFS=$as_save_IFS
30846
30847  ;;
30848esac
30849fi
30850TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30851if test -n "$TOOLCHAIN_PATH_CC"; then
30852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30853$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30854else
30855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30856$as_echo "no" >&6; }
30857fi
30858
30859
30860  test -n "$TOOLCHAIN_PATH_CC" && break
30861done
30862
30863      CC=$TOOLCHAIN_PATH_CC
30864      PATH="$PATH_save"
30865    fi
30866
30867    # AC_PATH_PROGS can't be run multiple times with the same variable,
30868    # so create a new name for this run.
30869    if test "x$CC" = x; then
30870      for ac_prog in $SEARCH_LIST
30871do
30872  # Extract the first word of "$ac_prog", so it can be a program name with args.
30873set dummy $ac_prog; ac_word=$2
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30875$as_echo_n "checking for $ac_word... " >&6; }
30876if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30877  $as_echo_n "(cached) " >&6
30878else
30879  case $POTENTIAL_CC in
30880  [\\/]* | ?:[\\/]*)
30881  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30882  ;;
30883  *)
30884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30885for as_dir in $PATH
30886do
30887  IFS=$as_save_IFS
30888  test -z "$as_dir" && as_dir=.
30889    for ac_exec_ext in '' $ac_executable_extensions; do
30890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30891    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30893    break 2
30894  fi
30895done
30896  done
30897IFS=$as_save_IFS
30898
30899  ;;
30900esac
30901fi
30902POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30903if test -n "$POTENTIAL_CC"; then
30904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30905$as_echo "$POTENTIAL_CC" >&6; }
30906else
30907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30908$as_echo "no" >&6; }
30909fi
30910
30911
30912  test -n "$POTENTIAL_CC" && break
30913done
30914
30915      CC=$POTENTIAL_CC
30916    fi
30917
30918    if test "x$CC" = x; then
30919
30920  # Print a helpful message on how to acquire the necessary build dependency.
30921  # devkit is the help tag: freetype, cups, alsa etc
30922  MISSING_DEPENDENCY=devkit
30923
30924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30925    cygwin_help $MISSING_DEPENDENCY
30926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30927    msys_help $MISSING_DEPENDENCY
30928  else
30929    PKGHANDLER_COMMAND=
30930
30931    case $PKGHANDLER in
30932      apt-get)
30933        apt_help     $MISSING_DEPENDENCY ;;
30934      yum)
30935        yum_help     $MISSING_DEPENDENCY ;;
30936      port)
30937        port_help    $MISSING_DEPENDENCY ;;
30938      pkgutil)
30939        pkgutil_help $MISSING_DEPENDENCY ;;
30940      pkgadd)
30941        pkgadd_help  $MISSING_DEPENDENCY ;;
30942    esac
30943
30944    if test "x$PKGHANDLER_COMMAND" != x; then
30945      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30946    fi
30947  fi
30948
30949      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30950    fi
30951  fi
30952
30953  # Now we have a compiler binary in CC. Make sure it's okay.
30954
30955  # Only process if variable expands to non-empty
30956
30957  if test "x$CC" != x; then
30958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30959
30960  # First separate the path from the arguments. This will split at the first
30961  # space.
30962  complete="$CC"
30963  path="${complete%% *}"
30964  tmp="$complete EOL"
30965  arguments="${tmp#* }"
30966
30967  # Input might be given as Windows format, start by converting to
30968  # unix format.
30969  new_path=`$CYGPATH -u "$path"`
30970
30971  # Now try to locate executable using which
30972  new_path=`$WHICH "$new_path" 2> /dev/null`
30973  # bat and cmd files are not always considered executable in cygwin causing which
30974  # to not find them
30975  if test "x$new_path" = x \
30976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30978    new_path=`$CYGPATH -u "$path"`
30979  fi
30980  if test "x$new_path" = x; then
30981    # Oops. Which didn't find the executable.
30982    # The splitting of arguments from the executable at a space might have been incorrect,
30983    # since paths with space are more likely in Windows. Give it another try with the whole
30984    # argument.
30985    path="$complete"
30986    arguments="EOL"
30987    new_path=`$CYGPATH -u "$path"`
30988    new_path=`$WHICH "$new_path" 2> /dev/null`
30989    # bat and cmd files are not always considered executable in cygwin causing which
30990    # to not find them
30991    if test "x$new_path" = x \
30992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30994      new_path=`$CYGPATH -u "$path"`
30995    fi
30996    if test "x$new_path" = x; then
30997      # It's still not found. Now this is an unrecoverable error.
30998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
30999$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31000      has_space=`$ECHO "$complete" | $GREP " "`
31001      if test "x$has_space" != x; then
31002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31004      fi
31005      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31006    fi
31007  fi
31008
31009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31012  # "foo.exe" is OK but "foo" is an error.
31013  #
31014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31015  # It is also a way to make sure we got the proper file name for the real test later on.
31016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31017  if test "x$test_shortpath" = x; then
31018    # Short path failed, file does not exist as specified.
31019    # Try adding .exe or .cmd
31020    if test -f "${new_path}.exe"; then
31021      input_to_shortpath="${new_path}.exe"
31022    elif test -f "${new_path}.cmd"; then
31023      input_to_shortpath="${new_path}.cmd"
31024    else
31025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31026$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31029      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31030    fi
31031  else
31032    input_to_shortpath="$new_path"
31033  fi
31034
31035  # Call helper function which possibly converts this using DOS-style short mode.
31036  # If so, the updated path is stored in $new_path.
31037  new_path="$input_to_shortpath"
31038
31039  input_path="$input_to_shortpath"
31040  # Check if we need to convert this using DOS-style short mode. If the path
31041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31042  # take no chances and rewrite it.
31043  # Note: m4 eats our [], so we need to use [ and ] instead.
31044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31045  if test "x$has_forbidden_chars" != x; then
31046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31050      # Going to short mode and back again did indeed matter. Since short mode is
31051      # case insensitive, let's make it lowercase to improve readability.
31052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31053      # Now convert it back to Unix-style (cygpath)
31054      input_path=`$CYGPATH -u "$shortmode_path"`
31055      new_path="$input_path"
31056    fi
31057  fi
31058
31059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31060  if test "x$test_cygdrive_prefix" = x; then
31061    # As a simple fix, exclude /usr/bin since it's not a real path.
31062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31064      # a path prefixed by /cygdrive for fixpath to work.
31065      new_path="$CYGWIN_ROOT_PATH$input_path"
31066    fi
31067  fi
31068
31069  # remove trailing .exe if any
31070  new_path="${new_path/%.exe/}"
31071
31072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31073
31074  # First separate the path from the arguments. This will split at the first
31075  # space.
31076  complete="$CC"
31077  path="${complete%% *}"
31078  tmp="$complete EOL"
31079  arguments="${tmp#* }"
31080
31081  # Input might be given as Windows format, start by converting to
31082  # unix format.
31083  new_path="$path"
31084
31085  windows_path="$new_path"
31086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31087    unix_path=`$CYGPATH -u "$windows_path"`
31088    new_path="$unix_path"
31089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31091    new_path="$unix_path"
31092  fi
31093
31094
31095  # Now try to locate executable using which
31096  new_path=`$WHICH "$new_path" 2> /dev/null`
31097
31098  if test "x$new_path" = x; then
31099    # Oops. Which didn't find the executable.
31100    # The splitting of arguments from the executable at a space might have been incorrect,
31101    # since paths with space are more likely in Windows. Give it another try with the whole
31102    # argument.
31103    path="$complete"
31104    arguments="EOL"
31105    new_path="$path"
31106
31107  windows_path="$new_path"
31108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31109    unix_path=`$CYGPATH -u "$windows_path"`
31110    new_path="$unix_path"
31111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31113    new_path="$unix_path"
31114  fi
31115
31116
31117    new_path=`$WHICH "$new_path" 2> /dev/null`
31118    # bat and cmd files are not always considered executable in MSYS causing which
31119    # to not find them
31120    if test "x$new_path" = x \
31121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31123      new_path="$path"
31124
31125  windows_path="$new_path"
31126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31127    unix_path=`$CYGPATH -u "$windows_path"`
31128    new_path="$unix_path"
31129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31131    new_path="$unix_path"
31132  fi
31133
31134    fi
31135
31136    if test "x$new_path" = x; then
31137      # It's still not found. Now this is an unrecoverable error.
31138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31139$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31140      has_space=`$ECHO "$complete" | $GREP " "`
31141      if test "x$has_space" != x; then
31142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31144      fi
31145      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31146    fi
31147  fi
31148
31149  # Now new_path has a complete unix path to the binary
31150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31151    # Keep paths in /bin as-is, but remove trailing .exe if any
31152    new_path="${new_path/%.exe/}"
31153    # Do not save /bin paths to all_fixpath_prefixes!
31154  else
31155    # Not in mixed or Windows style, start by that.
31156    new_path=`cmd //c echo $new_path`
31157
31158  input_path="$new_path"
31159  # Check if we need to convert this using DOS-style short mode. If the path
31160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31161  # take no chances and rewrite it.
31162  # Note: m4 eats our [], so we need to use [ and ] instead.
31163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31164  if test "x$has_forbidden_chars" != x; then
31165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31167  fi
31168
31169    # Output is in $new_path
31170
31171  windows_path="$new_path"
31172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31173    unix_path=`$CYGPATH -u "$windows_path"`
31174    new_path="$unix_path"
31175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31177    new_path="$unix_path"
31178  fi
31179
31180    # remove trailing .exe if any
31181    new_path="${new_path/%.exe/}"
31182
31183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31185  fi
31186
31187    else
31188      # We're on a unix platform. Hooray! :)
31189      # First separate the path from the arguments. This will split at the first
31190      # space.
31191      complete="$CC"
31192      path="${complete%% *}"
31193      tmp="$complete EOL"
31194      arguments="${tmp#* }"
31195
31196      # Cannot rely on the command "which" here since it doesn't always work.
31197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31198      if test -z "$is_absolute_path"; then
31199        # Path to executable is not absolute. Find it.
31200        IFS_save="$IFS"
31201        IFS=:
31202        for p in $PATH; do
31203          if test -f "$p/$path" && test -x "$p/$path"; then
31204            new_path="$p/$path"
31205            break
31206          fi
31207        done
31208        IFS="$IFS_save"
31209      else
31210        # This is an absolute path, we can use it without further modifications.
31211        new_path="$path"
31212      fi
31213
31214      if test "x$new_path" = x; then
31215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31216$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31217        has_space=`$ECHO "$complete" | $GREP " "`
31218        if test "x$has_space" != x; then
31219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31221        fi
31222        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31223      fi
31224    fi
31225
31226    # Now join together the path and the arguments once again
31227    if test "x$arguments" != xEOL; then
31228      new_complete="$new_path ${arguments% *}"
31229    else
31230      new_complete="$new_path"
31231    fi
31232
31233    if test "x$complete" != "x$new_complete"; then
31234      CC="$new_complete"
31235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31236$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31237    fi
31238  fi
31239
31240  TEST_COMPILER="$CC"
31241  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31242  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31243  if test "x$OPENJDK_BUILD_OS" != xaix; then
31244    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31246$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31247
31248  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31249    # Follow a chain of symbolic links. Use readlink
31250    # where it exists, else fall back to horribly
31251    # complicated shell code.
31252    if test "x$READLINK_TESTED" != yes; then
31253      # On MacOSX there is a readlink tool with a different
31254      # purpose than the GNU readlink tool. Check the found readlink.
31255      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31256      if test "x$ISGNU" = x; then
31257        # A readlink that we do not know how to use.
31258        # Are there other non-GNU readlinks out there?
31259        READLINK_TESTED=yes
31260        READLINK=
31261      fi
31262    fi
31263
31264    if test "x$READLINK" != x; then
31265      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31266    else
31267      # Save the current directory for restoring afterwards
31268      STARTDIR=$PWD
31269      COUNTER=0
31270      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31271      sym_link_file=`$BASENAME $TEST_COMPILER`
31272      cd $sym_link_dir
31273      # Use -P flag to resolve symlinks in directories.
31274      cd `$THEPWDCMD -P`
31275      sym_link_dir=`$THEPWDCMD -P`
31276      # Resolve file symlinks
31277      while test $COUNTER -lt 20; do
31278        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31279        if test "x$ISLINK" == x; then
31280          # This is not a symbolic link! We are done!
31281          break
31282        fi
31283        # Again resolve directory symlinks since the target of the just found
31284        # link could be in a different directory
31285        cd `$DIRNAME $ISLINK`
31286        sym_link_dir=`$THEPWDCMD -P`
31287        sym_link_file=`$BASENAME $ISLINK`
31288        let COUNTER=COUNTER+1
31289      done
31290      cd $STARTDIR
31291      TEST_COMPILER=$sym_link_dir/$sym_link_file
31292    fi
31293  fi
31294
31295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31296$as_echo "$TEST_COMPILER" >&6; }
31297  fi
31298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31299$as_echo_n "checking if CC is disguised ccache... " >&6; }
31300
31301  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31302  if test "x$COMPILER_BASENAME" = "xccache"; then
31303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31304$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31305    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31306    # We want to control ccache invocation ourselves, so ignore this cc and try
31307    # searching again.
31308
31309    # Remove the path to the fake ccache cc from the PATH
31310    RETRY_COMPILER_SAVED_PATH="$PATH"
31311    COMPILER_DIRNAME=`$DIRNAME $CC`
31312    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31313
31314    # Try again looking for our compiler
31315    if test -n "$ac_tool_prefix"; then
31316  for ac_prog in $TOOLCHAIN_CC_BINARY
31317  do
31318    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31319set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31321$as_echo_n "checking for $ac_word... " >&6; }
31322if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31323  $as_echo_n "(cached) " >&6
31324else
31325  if test -n "$PROPER_COMPILER_CC"; then
31326  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31327else
31328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31329for as_dir in $PATH
31330do
31331  IFS=$as_save_IFS
31332  test -z "$as_dir" && as_dir=.
31333    for ac_exec_ext in '' $ac_executable_extensions; do
31334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31335    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31337    break 2
31338  fi
31339done
31340  done
31341IFS=$as_save_IFS
31342
31343fi
31344fi
31345PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31346if test -n "$PROPER_COMPILER_CC"; then
31347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31348$as_echo "$PROPER_COMPILER_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 "$PROPER_COMPILER_CC" && break
31356  done
31357fi
31358if test -z "$PROPER_COMPILER_CC"; then
31359  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31360  for ac_prog in $TOOLCHAIN_CC_BINARY
31361do
31362  # Extract the first word of "$ac_prog", so it can be a program name with args.
31363set dummy $ac_prog; ac_word=$2
31364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31365$as_echo_n "checking for $ac_word... " >&6; }
31366if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31367  $as_echo_n "(cached) " >&6
31368else
31369  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31370  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31371else
31372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31373for as_dir in $PATH
31374do
31375  IFS=$as_save_IFS
31376  test -z "$as_dir" && as_dir=.
31377    for ac_exec_ext in '' $ac_executable_extensions; do
31378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31379    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31381    break 2
31382  fi
31383done
31384  done
31385IFS=$as_save_IFS
31386
31387fi
31388fi
31389ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31390if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31392$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31393else
31394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31395$as_echo "no" >&6; }
31396fi
31397
31398
31399  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31400done
31401
31402  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31403    PROPER_COMPILER_CC=""
31404  else
31405    case $cross_compiling:$ac_tool_warned in
31406yes:)
31407{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31408$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31409ac_tool_warned=yes ;;
31410esac
31411    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31412  fi
31413fi
31414
31415
31416  # Only process if variable expands to non-empty
31417
31418  if test "x$PROPER_COMPILER_CC" != x; then
31419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31420
31421  # First separate the path from the arguments. This will split at the first
31422  # space.
31423  complete="$PROPER_COMPILER_CC"
31424  path="${complete%% *}"
31425  tmp="$complete EOL"
31426  arguments="${tmp#* }"
31427
31428  # Input might be given as Windows format, start by converting to
31429  # unix format.
31430  new_path=`$CYGPATH -u "$path"`
31431
31432  # Now try to locate executable using which
31433  new_path=`$WHICH "$new_path" 2> /dev/null`
31434  # bat and cmd files are not always considered executable in cygwin causing which
31435  # to not find them
31436  if test "x$new_path" = x \
31437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31439    new_path=`$CYGPATH -u "$path"`
31440  fi
31441  if test "x$new_path" = x; then
31442    # Oops. Which didn't find the executable.
31443    # The splitting of arguments from the executable at a space might have been incorrect,
31444    # since paths with space are more likely in Windows. Give it another try with the whole
31445    # argument.
31446    path="$complete"
31447    arguments="EOL"
31448    new_path=`$CYGPATH -u "$path"`
31449    new_path=`$WHICH "$new_path" 2> /dev/null`
31450    # bat and cmd files are not always considered executable in cygwin causing which
31451    # to not find them
31452    if test "x$new_path" = x \
31453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31455      new_path=`$CYGPATH -u "$path"`
31456    fi
31457    if test "x$new_path" = x; then
31458      # It's still not found. Now this is an unrecoverable error.
31459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31460$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31461      has_space=`$ECHO "$complete" | $GREP " "`
31462      if test "x$has_space" != x; then
31463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31465      fi
31466      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31467    fi
31468  fi
31469
31470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31473  # "foo.exe" is OK but "foo" is an error.
31474  #
31475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31476  # It is also a way to make sure we got the proper file name for the real test later on.
31477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31478  if test "x$test_shortpath" = x; then
31479    # Short path failed, file does not exist as specified.
31480    # Try adding .exe or .cmd
31481    if test -f "${new_path}.exe"; then
31482      input_to_shortpath="${new_path}.exe"
31483    elif test -f "${new_path}.cmd"; then
31484      input_to_shortpath="${new_path}.cmd"
31485    else
31486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31487$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31490      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31491    fi
31492  else
31493    input_to_shortpath="$new_path"
31494  fi
31495
31496  # Call helper function which possibly converts this using DOS-style short mode.
31497  # If so, the updated path is stored in $new_path.
31498  new_path="$input_to_shortpath"
31499
31500  input_path="$input_to_shortpath"
31501  # Check if we need to convert this using DOS-style short mode. If the path
31502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31503  # take no chances and rewrite it.
31504  # Note: m4 eats our [], so we need to use [ and ] instead.
31505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31506  if test "x$has_forbidden_chars" != x; then
31507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31511      # Going to short mode and back again did indeed matter. Since short mode is
31512      # case insensitive, let's make it lowercase to improve readability.
31513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31514      # Now convert it back to Unix-style (cygpath)
31515      input_path=`$CYGPATH -u "$shortmode_path"`
31516      new_path="$input_path"
31517    fi
31518  fi
31519
31520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31521  if test "x$test_cygdrive_prefix" = x; then
31522    # As a simple fix, exclude /usr/bin since it's not a real path.
31523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31525      # a path prefixed by /cygdrive for fixpath to work.
31526      new_path="$CYGWIN_ROOT_PATH$input_path"
31527    fi
31528  fi
31529
31530  # remove trailing .exe if any
31531  new_path="${new_path/%.exe/}"
31532
31533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534
31535  # First separate the path from the arguments. This will split at the first
31536  # space.
31537  complete="$PROPER_COMPILER_CC"
31538  path="${complete%% *}"
31539  tmp="$complete EOL"
31540  arguments="${tmp#* }"
31541
31542  # Input might be given as Windows format, start by converting to
31543  # unix format.
31544  new_path="$path"
31545
31546  windows_path="$new_path"
31547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548    unix_path=`$CYGPATH -u "$windows_path"`
31549    new_path="$unix_path"
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552    new_path="$unix_path"
31553  fi
31554
31555
31556  # Now try to locate executable using which
31557  new_path=`$WHICH "$new_path" 2> /dev/null`
31558
31559  if test "x$new_path" = x; then
31560    # Oops. Which didn't find the executable.
31561    # The splitting of arguments from the executable at a space might have been incorrect,
31562    # since paths with space are more likely in Windows. Give it another try with the whole
31563    # argument.
31564    path="$complete"
31565    arguments="EOL"
31566    new_path="$path"
31567
31568  windows_path="$new_path"
31569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31570    unix_path=`$CYGPATH -u "$windows_path"`
31571    new_path="$unix_path"
31572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31574    new_path="$unix_path"
31575  fi
31576
31577
31578    new_path=`$WHICH "$new_path" 2> /dev/null`
31579    # bat and cmd files are not always considered executable in MSYS causing which
31580    # to not find them
31581    if test "x$new_path" = x \
31582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31584      new_path="$path"
31585
31586  windows_path="$new_path"
31587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31588    unix_path=`$CYGPATH -u "$windows_path"`
31589    new_path="$unix_path"
31590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31592    new_path="$unix_path"
31593  fi
31594
31595    fi
31596
31597    if test "x$new_path" = x; then
31598      # It's still not found. Now this is an unrecoverable error.
31599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31600$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31601      has_space=`$ECHO "$complete" | $GREP " "`
31602      if test "x$has_space" != x; then
31603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31605      fi
31606      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31607    fi
31608  fi
31609
31610  # Now new_path has a complete unix path to the binary
31611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31612    # Keep paths in /bin as-is, but remove trailing .exe if any
31613    new_path="${new_path/%.exe/}"
31614    # Do not save /bin paths to all_fixpath_prefixes!
31615  else
31616    # Not in mixed or Windows style, start by that.
31617    new_path=`cmd //c echo $new_path`
31618
31619  input_path="$new_path"
31620  # Check if we need to convert this using DOS-style short mode. If the path
31621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31622  # take no chances and rewrite it.
31623  # Note: m4 eats our [], so we need to use [ and ] instead.
31624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31625  if test "x$has_forbidden_chars" != x; then
31626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31628  fi
31629
31630    # Output is in $new_path
31631
31632  windows_path="$new_path"
31633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31634    unix_path=`$CYGPATH -u "$windows_path"`
31635    new_path="$unix_path"
31636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31638    new_path="$unix_path"
31639  fi
31640
31641    # remove trailing .exe if any
31642    new_path="${new_path/%.exe/}"
31643
31644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31646  fi
31647
31648    else
31649      # We're on a unix platform. Hooray! :)
31650      # First separate the path from the arguments. This will split at the first
31651      # space.
31652      complete="$PROPER_COMPILER_CC"
31653      path="${complete%% *}"
31654      tmp="$complete EOL"
31655      arguments="${tmp#* }"
31656
31657      # Cannot rely on the command "which" here since it doesn't always work.
31658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31659      if test -z "$is_absolute_path"; then
31660        # Path to executable is not absolute. Find it.
31661        IFS_save="$IFS"
31662        IFS=:
31663        for p in $PATH; do
31664          if test -f "$p/$path" && test -x "$p/$path"; then
31665            new_path="$p/$path"
31666            break
31667          fi
31668        done
31669        IFS="$IFS_save"
31670      else
31671        # This is an absolute path, we can use it without further modifications.
31672        new_path="$path"
31673      fi
31674
31675      if test "x$new_path" = x; then
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31677$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31678        has_space=`$ECHO "$complete" | $GREP " "`
31679        if test "x$has_space" != x; then
31680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31682        fi
31683        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31684      fi
31685    fi
31686
31687    # Now join together the path and the arguments once again
31688    if test "x$arguments" != xEOL; then
31689      new_complete="$new_path ${arguments% *}"
31690    else
31691      new_complete="$new_path"
31692    fi
31693
31694    if test "x$complete" != "x$new_complete"; then
31695      PROPER_COMPILER_CC="$new_complete"
31696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31697$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31698    fi
31699  fi
31700
31701    PATH="$RETRY_COMPILER_SAVED_PATH"
31702
31703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31704$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31705
31706  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31707    # Follow a chain of symbolic links. Use readlink
31708    # where it exists, else fall back to horribly
31709    # complicated shell code.
31710    if test "x$READLINK_TESTED" != yes; then
31711      # On MacOSX there is a readlink tool with a different
31712      # purpose than the GNU readlink tool. Check the found readlink.
31713      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31714      if test "x$ISGNU" = x; then
31715        # A readlink that we do not know how to use.
31716        # Are there other non-GNU readlinks out there?
31717        READLINK_TESTED=yes
31718        READLINK=
31719      fi
31720    fi
31721
31722    if test "x$READLINK" != x; then
31723      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31724    else
31725      # Save the current directory for restoring afterwards
31726      STARTDIR=$PWD
31727      COUNTER=0
31728      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31729      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31730      cd $sym_link_dir
31731      # Use -P flag to resolve symlinks in directories.
31732      cd `$THEPWDCMD -P`
31733      sym_link_dir=`$THEPWDCMD -P`
31734      # Resolve file symlinks
31735      while test $COUNTER -lt 20; do
31736        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31737        if test "x$ISLINK" == x; then
31738          # This is not a symbolic link! We are done!
31739          break
31740        fi
31741        # Again resolve directory symlinks since the target of the just found
31742        # link could be in a different directory
31743        cd `$DIRNAME $ISLINK`
31744        sym_link_dir=`$THEPWDCMD -P`
31745        sym_link_file=`$BASENAME $ISLINK`
31746        let COUNTER=COUNTER+1
31747      done
31748      cd $STARTDIR
31749      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31750    fi
31751  fi
31752
31753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31754$as_echo "$PROPER_COMPILER_CC" >&6; }
31755    CC="$PROPER_COMPILER_CC"
31756  else
31757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31758$as_echo "no, keeping CC" >&6; }
31759  fi
31760
31761
31762  COMPILER=$CC
31763  COMPILER_NAME=$COMPILER_NAME
31764
31765  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31766    # cc -V output typically looks like
31767    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31768    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31769    # Check that this is likely to be the Solaris Studio cc.
31770    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31771    if test $? -ne 0; then
31772      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31773      { $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
31774$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31775      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31776$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31777      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31778$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31779      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31780    fi
31781    # Remove usage instructions (if present), and
31782    # collapse compiler output into a single line
31783    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31784        $SED -e 's/ *[Uu]sage:.*//'`
31785    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31786        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31787  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31788    # xlc -qversion output typically looks like
31789    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31790    #     Version: 11.01.0000.0015
31791    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31792    # Check that this is likely to be the IBM XL C compiler.
31793    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31794    if test $? -ne 0; then
31795      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31796      { $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
31797$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31798      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31799$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31800      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31801$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31802      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31803    fi
31804    # Collapse compiler output into a single line
31805    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31806    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31807        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31808  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31809    # There is no specific version flag, but all output starts with a version string.
31810    # First line typically looks something like:
31811    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31812    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31813    # Check that this is likely to be Microsoft CL.EXE.
31814    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31815    if test $? -ne 0; then
31816      { $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
31817$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31818      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31819$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31820      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31821    fi
31822    # Collapse compiler output into a single line
31823    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31824    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31825        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31826  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31827    # gcc --version output typically looks like
31828    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31829    #     Copyright (C) 2013 Free Software Foundation, Inc.
31830    #     This is free software; see the source for copying conditions.  There is NO
31831    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31832    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31833    # Check that this is likely to be GCC.
31834    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31835    if test $? -ne 0; then
31836      { $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
31837$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31838      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31839$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31840      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31841    fi
31842    # Remove Copyright and legalese from version string, and
31843    # collapse into a single line
31844    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31845        $SED -e 's/ *Copyright .*//'`
31846    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31847        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31848  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31849    # clang --version output typically looks like
31850    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31851    #    clang version 3.3 (tags/RELEASE_33/final)
31852    # or
31853    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31854    #    Target: x86_64-pc-linux-gnu
31855    #    Thread model: posix
31856    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31857    # Check that this is likely to be clang
31858    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31859    if test $? -ne 0; then
31860      { $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
31861$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31862      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31863$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31864      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31865    fi
31866    # Collapse compiler output into a single line
31867    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31868    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31869        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31870  else
31871      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31872  fi
31873  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31874  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31875  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31876  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31877
31878  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31879$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31880
31881
31882  # Now that we have resolved CC ourself, let autoconf have its go at it
31883  ac_ext=c
31884ac_cpp='$CPP $CPPFLAGS'
31885ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31887ac_compiler_gnu=$ac_cv_c_compiler_gnu
31888if test -n "$ac_tool_prefix"; then
31889  for ac_prog in $CC
31890  do
31891    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31892set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31894$as_echo_n "checking for $ac_word... " >&6; }
31895if ${ac_cv_prog_CC+:} false; then :
31896  $as_echo_n "(cached) " >&6
31897else
31898  if test -n "$CC"; then
31899  ac_cv_prog_CC="$CC" # Let the user override the test.
31900else
31901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31902for as_dir in $PATH
31903do
31904  IFS=$as_save_IFS
31905  test -z "$as_dir" && as_dir=.
31906    for ac_exec_ext in '' $ac_executable_extensions; do
31907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31908    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
31909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31910    break 2
31911  fi
31912done
31913  done
31914IFS=$as_save_IFS
31915
31916fi
31917fi
31918CC=$ac_cv_prog_CC
31919if test -n "$CC"; then
31920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
31921$as_echo "$CC" >&6; }
31922else
31923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31924$as_echo "no" >&6; }
31925fi
31926
31927
31928    test -n "$CC" && break
31929  done
31930fi
31931if test -z "$CC"; then
31932  ac_ct_CC=$CC
31933  for ac_prog in $CC
31934do
31935  # Extract the first word of "$ac_prog", so it can be a program name with args.
31936set dummy $ac_prog; ac_word=$2
31937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31938$as_echo_n "checking for $ac_word... " >&6; }
31939if ${ac_cv_prog_ac_ct_CC+:} false; then :
31940  $as_echo_n "(cached) " >&6
31941else
31942  if test -n "$ac_ct_CC"; then
31943  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
31944else
31945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31946for as_dir in $PATH
31947do
31948  IFS=$as_save_IFS
31949  test -z "$as_dir" && as_dir=.
31950    for ac_exec_ext in '' $ac_executable_extensions; do
31951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31952    ac_cv_prog_ac_ct_CC="$ac_prog"
31953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31954    break 2
31955  fi
31956done
31957  done
31958IFS=$as_save_IFS
31959
31960fi
31961fi
31962ac_ct_CC=$ac_cv_prog_ac_ct_CC
31963if test -n "$ac_ct_CC"; then
31964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
31965$as_echo "$ac_ct_CC" >&6; }
31966else
31967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31968$as_echo "no" >&6; }
31969fi
31970
31971
31972  test -n "$ac_ct_CC" && break
31973done
31974
31975  if test "x$ac_ct_CC" = x; then
31976    CC=""
31977  else
31978    case $cross_compiling:$ac_tool_warned in
31979yes:)
31980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31982ac_tool_warned=yes ;;
31983esac
31984    CC=$ac_ct_CC
31985  fi
31986fi
31987
31988
31989test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31991as_fn_error $? "no acceptable C compiler found in \$PATH
31992See \`config.log' for more details" "$LINENO" 5; }
31993
31994# Provide some information about the compiler.
31995$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
31996set X $ac_compile
31997ac_compiler=$2
31998for ac_option in --version -v -V -qversion; do
31999  { { ac_try="$ac_compiler $ac_option >&5"
32000case "(($ac_try" in
32001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32002  *) ac_try_echo=$ac_try;;
32003esac
32004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32005$as_echo "$ac_try_echo"; } >&5
32006  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32007  ac_status=$?
32008  if test -s conftest.err; then
32009    sed '10a\
32010... rest of stderr output deleted ...
32011         10q' conftest.err >conftest.er1
32012    cat conftest.er1 >&5
32013  fi
32014  rm -f conftest.er1 conftest.err
32015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32016  test $ac_status = 0; }
32017done
32018
32019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32020/* end confdefs.h.  */
32021
32022int
32023main ()
32024{
32025
32026  ;
32027  return 0;
32028}
32029_ACEOF
32030ac_clean_files_save=$ac_clean_files
32031ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32032# Try to create an executable without -o first, disregard a.out.
32033# It will help us diagnose broken compilers, and finding out an intuition
32034# of exeext.
32035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32036$as_echo_n "checking whether the C compiler works... " >&6; }
32037ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32038
32039# The possible output files:
32040ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32041
32042ac_rmfiles=
32043for ac_file in $ac_files
32044do
32045  case $ac_file in
32046    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32047    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32048  esac
32049done
32050rm -f $ac_rmfiles
32051
32052if { { ac_try="$ac_link_default"
32053case "(($ac_try" in
32054  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32055  *) ac_try_echo=$ac_try;;
32056esac
32057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32058$as_echo "$ac_try_echo"; } >&5
32059  (eval "$ac_link_default") 2>&5
32060  ac_status=$?
32061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32062  test $ac_status = 0; }; then :
32063  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32064# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32065# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32066# so that the user can short-circuit this test for compilers unknown to
32067# Autoconf.
32068for ac_file in $ac_files ''
32069do
32070  test -f "$ac_file" || continue
32071  case $ac_file in
32072    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32073	;;
32074    [ab].out )
32075	# We found the default executable, but exeext='' is most
32076	# certainly right.
32077	break;;
32078    *.* )
32079	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32080	then :; else
32081	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32082	fi
32083	# We set ac_cv_exeext here because the later test for it is not
32084	# safe: cross compilers may not add the suffix if given an `-o'
32085	# argument, so we may need to know it at that point already.
32086	# Even if this section looks crufty: it has the advantage of
32087	# actually working.
32088	break;;
32089    * )
32090	break;;
32091  esac
32092done
32093test "$ac_cv_exeext" = no && ac_cv_exeext=
32094
32095else
32096  ac_file=''
32097fi
32098if test -z "$ac_file"; then :
32099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32100$as_echo "no" >&6; }
32101$as_echo "$as_me: failed program was:" >&5
32102sed 's/^/| /' conftest.$ac_ext >&5
32103
32104{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32106as_fn_error 77 "C compiler cannot create executables
32107See \`config.log' for more details" "$LINENO" 5; }
32108else
32109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32110$as_echo "yes" >&6; }
32111fi
32112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32113$as_echo_n "checking for C compiler default output file name... " >&6; }
32114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32115$as_echo "$ac_file" >&6; }
32116ac_exeext=$ac_cv_exeext
32117
32118rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32119ac_clean_files=$ac_clean_files_save
32120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32121$as_echo_n "checking for suffix of executables... " >&6; }
32122if { { ac_try="$ac_link"
32123case "(($ac_try" in
32124  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32125  *) ac_try_echo=$ac_try;;
32126esac
32127eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32128$as_echo "$ac_try_echo"; } >&5
32129  (eval "$ac_link") 2>&5
32130  ac_status=$?
32131  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32132  test $ac_status = 0; }; then :
32133  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32134# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32135# work properly (i.e., refer to `conftest.exe'), while it won't with
32136# `rm'.
32137for ac_file in conftest.exe conftest conftest.*; do
32138  test -f "$ac_file" || continue
32139  case $ac_file in
32140    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32141    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32142	  break;;
32143    * ) break;;
32144  esac
32145done
32146else
32147  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32149as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32150See \`config.log' for more details" "$LINENO" 5; }
32151fi
32152rm -f conftest conftest$ac_cv_exeext
32153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32154$as_echo "$ac_cv_exeext" >&6; }
32155
32156rm -f conftest.$ac_ext
32157EXEEXT=$ac_cv_exeext
32158ac_exeext=$EXEEXT
32159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32160/* end confdefs.h.  */
32161#include <stdio.h>
32162int
32163main ()
32164{
32165FILE *f = fopen ("conftest.out", "w");
32166 return ferror (f) || fclose (f) != 0;
32167
32168  ;
32169  return 0;
32170}
32171_ACEOF
32172ac_clean_files="$ac_clean_files conftest.out"
32173# Check that the compiler produces executables we can run.  If not, either
32174# the compiler is broken, or we cross compile.
32175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32176$as_echo_n "checking whether we are cross compiling... " >&6; }
32177if test "$cross_compiling" != yes; then
32178  { { ac_try="$ac_link"
32179case "(($ac_try" in
32180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32181  *) ac_try_echo=$ac_try;;
32182esac
32183eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32184$as_echo "$ac_try_echo"; } >&5
32185  (eval "$ac_link") 2>&5
32186  ac_status=$?
32187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32188  test $ac_status = 0; }
32189  if { ac_try='./conftest$ac_cv_exeext'
32190  { { case "(($ac_try" in
32191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32192  *) ac_try_echo=$ac_try;;
32193esac
32194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32195$as_echo "$ac_try_echo"; } >&5
32196  (eval "$ac_try") 2>&5
32197  ac_status=$?
32198  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32199  test $ac_status = 0; }; }; then
32200    cross_compiling=no
32201  else
32202    if test "$cross_compiling" = maybe; then
32203	cross_compiling=yes
32204    else
32205	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32207as_fn_error $? "cannot run C compiled programs.
32208If you meant to cross compile, use \`--host'.
32209See \`config.log' for more details" "$LINENO" 5; }
32210    fi
32211  fi
32212fi
32213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32214$as_echo "$cross_compiling" >&6; }
32215
32216rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32217ac_clean_files=$ac_clean_files_save
32218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32219$as_echo_n "checking for suffix of object files... " >&6; }
32220if ${ac_cv_objext+:} false; then :
32221  $as_echo_n "(cached) " >&6
32222else
32223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32224/* end confdefs.h.  */
32225
32226int
32227main ()
32228{
32229
32230  ;
32231  return 0;
32232}
32233_ACEOF
32234rm -f conftest.o conftest.obj
32235if { { ac_try="$ac_compile"
32236case "(($ac_try" in
32237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32238  *) ac_try_echo=$ac_try;;
32239esac
32240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32241$as_echo "$ac_try_echo"; } >&5
32242  (eval "$ac_compile") 2>&5
32243  ac_status=$?
32244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32245  test $ac_status = 0; }; then :
32246  for ac_file in conftest.o conftest.obj conftest.*; do
32247  test -f "$ac_file" || continue;
32248  case $ac_file in
32249    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32250    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32251       break;;
32252  esac
32253done
32254else
32255  $as_echo "$as_me: failed program was:" >&5
32256sed 's/^/| /' conftest.$ac_ext >&5
32257
32258{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32260as_fn_error $? "cannot compute suffix of object files: cannot compile
32261See \`config.log' for more details" "$LINENO" 5; }
32262fi
32263rm -f conftest.$ac_cv_objext conftest.$ac_ext
32264fi
32265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32266$as_echo "$ac_cv_objext" >&6; }
32267OBJEXT=$ac_cv_objext
32268ac_objext=$OBJEXT
32269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32270$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32271if ${ac_cv_c_compiler_gnu+:} false; then :
32272  $as_echo_n "(cached) " >&6
32273else
32274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32275/* end confdefs.h.  */
32276
32277int
32278main ()
32279{
32280#ifndef __GNUC__
32281       choke me
32282#endif
32283
32284  ;
32285  return 0;
32286}
32287_ACEOF
32288if ac_fn_c_try_compile "$LINENO"; then :
32289  ac_compiler_gnu=yes
32290else
32291  ac_compiler_gnu=no
32292fi
32293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32294ac_cv_c_compiler_gnu=$ac_compiler_gnu
32295
32296fi
32297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32298$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32299if test $ac_compiler_gnu = yes; then
32300  GCC=yes
32301else
32302  GCC=
32303fi
32304ac_test_CFLAGS=${CFLAGS+set}
32305ac_save_CFLAGS=$CFLAGS
32306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32307$as_echo_n "checking whether $CC accepts -g... " >&6; }
32308if ${ac_cv_prog_cc_g+:} false; then :
32309  $as_echo_n "(cached) " >&6
32310else
32311  ac_save_c_werror_flag=$ac_c_werror_flag
32312   ac_c_werror_flag=yes
32313   ac_cv_prog_cc_g=no
32314   CFLAGS="-g"
32315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32316/* end confdefs.h.  */
32317
32318int
32319main ()
32320{
32321
32322  ;
32323  return 0;
32324}
32325_ACEOF
32326if ac_fn_c_try_compile "$LINENO"; then :
32327  ac_cv_prog_cc_g=yes
32328else
32329  CFLAGS=""
32330      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32331/* end confdefs.h.  */
32332
32333int
32334main ()
32335{
32336
32337  ;
32338  return 0;
32339}
32340_ACEOF
32341if ac_fn_c_try_compile "$LINENO"; then :
32342
32343else
32344  ac_c_werror_flag=$ac_save_c_werror_flag
32345	 CFLAGS="-g"
32346	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32347/* end confdefs.h.  */
32348
32349int
32350main ()
32351{
32352
32353  ;
32354  return 0;
32355}
32356_ACEOF
32357if ac_fn_c_try_compile "$LINENO"; then :
32358  ac_cv_prog_cc_g=yes
32359fi
32360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32361fi
32362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32363fi
32364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32365   ac_c_werror_flag=$ac_save_c_werror_flag
32366fi
32367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32368$as_echo "$ac_cv_prog_cc_g" >&6; }
32369if test "$ac_test_CFLAGS" = set; then
32370  CFLAGS=$ac_save_CFLAGS
32371elif test $ac_cv_prog_cc_g = yes; then
32372  if test "$GCC" = yes; then
32373    CFLAGS="-g -O2"
32374  else
32375    CFLAGS="-g"
32376  fi
32377else
32378  if test "$GCC" = yes; then
32379    CFLAGS="-O2"
32380  else
32381    CFLAGS=
32382  fi
32383fi
32384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32385$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32386if ${ac_cv_prog_cc_c89+:} false; then :
32387  $as_echo_n "(cached) " >&6
32388else
32389  ac_cv_prog_cc_c89=no
32390ac_save_CC=$CC
32391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32392/* end confdefs.h.  */
32393#include <stdarg.h>
32394#include <stdio.h>
32395struct stat;
32396/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32397struct buf { int x; };
32398FILE * (*rcsopen) (struct buf *, struct stat *, int);
32399static char *e (p, i)
32400     char **p;
32401     int i;
32402{
32403  return p[i];
32404}
32405static char *f (char * (*g) (char **, int), char **p, ...)
32406{
32407  char *s;
32408  va_list v;
32409  va_start (v,p);
32410  s = g (p, va_arg (v,int));
32411  va_end (v);
32412  return s;
32413}
32414
32415/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32416   function prototypes and stuff, but not '\xHH' hex character constants.
32417   These don't provoke an error unfortunately, instead are silently treated
32418   as 'x'.  The following induces an error, until -std is added to get
32419   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32420   array size at least.  It's necessary to write '\x00'==0 to get something
32421   that's true only with -std.  */
32422int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32423
32424/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32425   inside strings and character constants.  */
32426#define FOO(x) 'x'
32427int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32428
32429int test (int i, double x);
32430struct s1 {int (*f) (int a);};
32431struct s2 {int (*f) (double a);};
32432int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32433int argc;
32434char **argv;
32435int
32436main ()
32437{
32438return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32439  ;
32440  return 0;
32441}
32442_ACEOF
32443for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32444	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32445do
32446  CC="$ac_save_CC $ac_arg"
32447  if ac_fn_c_try_compile "$LINENO"; then :
32448  ac_cv_prog_cc_c89=$ac_arg
32449fi
32450rm -f core conftest.err conftest.$ac_objext
32451  test "x$ac_cv_prog_cc_c89" != "xno" && break
32452done
32453rm -f conftest.$ac_ext
32454CC=$ac_save_CC
32455
32456fi
32457# AC_CACHE_VAL
32458case "x$ac_cv_prog_cc_c89" in
32459  x)
32460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32461$as_echo "none needed" >&6; } ;;
32462  xno)
32463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32464$as_echo "unsupported" >&6; } ;;
32465  *)
32466    CC="$CC $ac_cv_prog_cc_c89"
32467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32468$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32469esac
32470if test "x$ac_cv_prog_cc_c89" != xno; then :
32471
32472fi
32473
32474ac_ext=cpp
32475ac_cpp='$CXXCPP $CPPFLAGS'
32476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32479
32480
32481
32482  COMPILER_NAME=C++
32483  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32484
32485  if test "x$CXX" != x; then
32486    # User has supplied compiler name already, always let that override.
32487    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32488$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32489    if test "x`basename $CXX`" = "x$CXX"; then
32490      # A command without a complete path is provided, search $PATH.
32491
32492      for ac_prog in $CXX
32493do
32494  # Extract the first word of "$ac_prog", so it can be a program name with args.
32495set dummy $ac_prog; ac_word=$2
32496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32497$as_echo_n "checking for $ac_word... " >&6; }
32498if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32499  $as_echo_n "(cached) " >&6
32500else
32501  case $POTENTIAL_CXX in
32502  [\\/]* | ?:[\\/]*)
32503  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32504  ;;
32505  *)
32506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32507for as_dir in $PATH
32508do
32509  IFS=$as_save_IFS
32510  test -z "$as_dir" && as_dir=.
32511    for ac_exec_ext in '' $ac_executable_extensions; do
32512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32513    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32515    break 2
32516  fi
32517done
32518  done
32519IFS=$as_save_IFS
32520
32521  ;;
32522esac
32523fi
32524POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32525if test -n "$POTENTIAL_CXX"; then
32526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32527$as_echo "$POTENTIAL_CXX" >&6; }
32528else
32529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32530$as_echo "no" >&6; }
32531fi
32532
32533
32534  test -n "$POTENTIAL_CXX" && break
32535done
32536
32537      if test "x$POTENTIAL_CXX" != x; then
32538        CXX=$POTENTIAL_CXX
32539      else
32540        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32541      fi
32542    else
32543      # Otherwise it might already be a complete path
32544      if test ! -x "$CXX"; then
32545        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32546      fi
32547    fi
32548  else
32549    # No user supplied value. Locate compiler ourselves.
32550
32551    # If we are cross compiling, assume cross compilation tools follows the
32552    # cross compilation standard where they are prefixed with the autoconf
32553    # standard name for the target. For example the binary
32554    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32555    # If we are not cross compiling, then the default compiler name will be
32556    # used.
32557
32558    CXX=
32559    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32560    # before checking the rest of the PATH.
32561    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32562    # step, this should not be necessary.
32563    if test -n "$TOOLCHAIN_PATH"; then
32564      PATH_save="$PATH"
32565      PATH="$TOOLCHAIN_PATH"
32566      for ac_prog in $SEARCH_LIST
32567do
32568  # Extract the first word of "$ac_prog", so it can be a program name with args.
32569set dummy $ac_prog; ac_word=$2
32570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32571$as_echo_n "checking for $ac_word... " >&6; }
32572if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32573  $as_echo_n "(cached) " >&6
32574else
32575  case $TOOLCHAIN_PATH_CXX in
32576  [\\/]* | ?:[\\/]*)
32577  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32578  ;;
32579  *)
32580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32581for as_dir in $PATH
32582do
32583  IFS=$as_save_IFS
32584  test -z "$as_dir" && as_dir=.
32585    for ac_exec_ext in '' $ac_executable_extensions; do
32586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32587    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32589    break 2
32590  fi
32591done
32592  done
32593IFS=$as_save_IFS
32594
32595  ;;
32596esac
32597fi
32598TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32599if test -n "$TOOLCHAIN_PATH_CXX"; then
32600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32601$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32602else
32603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32604$as_echo "no" >&6; }
32605fi
32606
32607
32608  test -n "$TOOLCHAIN_PATH_CXX" && break
32609done
32610
32611      CXX=$TOOLCHAIN_PATH_CXX
32612      PATH="$PATH_save"
32613    fi
32614
32615    # AC_PATH_PROGS can't be run multiple times with the same variable,
32616    # so create a new name for this run.
32617    if test "x$CXX" = x; then
32618      for ac_prog in $SEARCH_LIST
32619do
32620  # Extract the first word of "$ac_prog", so it can be a program name with args.
32621set dummy $ac_prog; ac_word=$2
32622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32623$as_echo_n "checking for $ac_word... " >&6; }
32624if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32625  $as_echo_n "(cached) " >&6
32626else
32627  case $POTENTIAL_CXX in
32628  [\\/]* | ?:[\\/]*)
32629  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32630  ;;
32631  *)
32632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32633for as_dir in $PATH
32634do
32635  IFS=$as_save_IFS
32636  test -z "$as_dir" && as_dir=.
32637    for ac_exec_ext in '' $ac_executable_extensions; do
32638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32639    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32641    break 2
32642  fi
32643done
32644  done
32645IFS=$as_save_IFS
32646
32647  ;;
32648esac
32649fi
32650POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32651if test -n "$POTENTIAL_CXX"; then
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32653$as_echo "$POTENTIAL_CXX" >&6; }
32654else
32655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32656$as_echo "no" >&6; }
32657fi
32658
32659
32660  test -n "$POTENTIAL_CXX" && break
32661done
32662
32663      CXX=$POTENTIAL_CXX
32664    fi
32665
32666    if test "x$CXX" = x; then
32667
32668  # Print a helpful message on how to acquire the necessary build dependency.
32669  # devkit is the help tag: freetype, cups, alsa etc
32670  MISSING_DEPENDENCY=devkit
32671
32672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32673    cygwin_help $MISSING_DEPENDENCY
32674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32675    msys_help $MISSING_DEPENDENCY
32676  else
32677    PKGHANDLER_COMMAND=
32678
32679    case $PKGHANDLER in
32680      apt-get)
32681        apt_help     $MISSING_DEPENDENCY ;;
32682      yum)
32683        yum_help     $MISSING_DEPENDENCY ;;
32684      port)
32685        port_help    $MISSING_DEPENDENCY ;;
32686      pkgutil)
32687        pkgutil_help $MISSING_DEPENDENCY ;;
32688      pkgadd)
32689        pkgadd_help  $MISSING_DEPENDENCY ;;
32690    esac
32691
32692    if test "x$PKGHANDLER_COMMAND" != x; then
32693      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32694    fi
32695  fi
32696
32697      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32698    fi
32699  fi
32700
32701  # Now we have a compiler binary in CXX. Make sure it's okay.
32702
32703  # Only process if variable expands to non-empty
32704
32705  if test "x$CXX" != x; then
32706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32707
32708  # First separate the path from the arguments. This will split at the first
32709  # space.
32710  complete="$CXX"
32711  path="${complete%% *}"
32712  tmp="$complete EOL"
32713  arguments="${tmp#* }"
32714
32715  # Input might be given as Windows format, start by converting to
32716  # unix format.
32717  new_path=`$CYGPATH -u "$path"`
32718
32719  # Now try to locate executable using which
32720  new_path=`$WHICH "$new_path" 2> /dev/null`
32721  # bat and cmd files are not always considered executable in cygwin causing which
32722  # to not find them
32723  if test "x$new_path" = x \
32724      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32725      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32726    new_path=`$CYGPATH -u "$path"`
32727  fi
32728  if test "x$new_path" = x; then
32729    # Oops. Which didn't find the executable.
32730    # The splitting of arguments from the executable at a space might have been incorrect,
32731    # since paths with space are more likely in Windows. Give it another try with the whole
32732    # argument.
32733    path="$complete"
32734    arguments="EOL"
32735    new_path=`$CYGPATH -u "$path"`
32736    new_path=`$WHICH "$new_path" 2> /dev/null`
32737    # bat and cmd files are not always considered executable in cygwin causing which
32738    # to not find them
32739    if test "x$new_path" = x \
32740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32742      new_path=`$CYGPATH -u "$path"`
32743    fi
32744    if test "x$new_path" = x; then
32745      # It's still not found. Now this is an unrecoverable error.
32746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32747$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32748      has_space=`$ECHO "$complete" | $GREP " "`
32749      if test "x$has_space" != x; then
32750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32752      fi
32753      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32754    fi
32755  fi
32756
32757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32760  # "foo.exe" is OK but "foo" is an error.
32761  #
32762  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32763  # It is also a way to make sure we got the proper file name for the real test later on.
32764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32765  if test "x$test_shortpath" = x; then
32766    # Short path failed, file does not exist as specified.
32767    # Try adding .exe or .cmd
32768    if test -f "${new_path}.exe"; then
32769      input_to_shortpath="${new_path}.exe"
32770    elif test -f "${new_path}.cmd"; then
32771      input_to_shortpath="${new_path}.cmd"
32772    else
32773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32774$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32777      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32778    fi
32779  else
32780    input_to_shortpath="$new_path"
32781  fi
32782
32783  # Call helper function which possibly converts this using DOS-style short mode.
32784  # If so, the updated path is stored in $new_path.
32785  new_path="$input_to_shortpath"
32786
32787  input_path="$input_to_shortpath"
32788  # Check if we need to convert this using DOS-style short mode. If the path
32789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32790  # take no chances and rewrite it.
32791  # Note: m4 eats our [], so we need to use [ and ] instead.
32792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32793  if test "x$has_forbidden_chars" != x; then
32794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32798      # Going to short mode and back again did indeed matter. Since short mode is
32799      # case insensitive, let's make it lowercase to improve readability.
32800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32801      # Now convert it back to Unix-style (cygpath)
32802      input_path=`$CYGPATH -u "$shortmode_path"`
32803      new_path="$input_path"
32804    fi
32805  fi
32806
32807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32808  if test "x$test_cygdrive_prefix" = x; then
32809    # As a simple fix, exclude /usr/bin since it's not a real path.
32810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32812      # a path prefixed by /cygdrive for fixpath to work.
32813      new_path="$CYGWIN_ROOT_PATH$input_path"
32814    fi
32815  fi
32816
32817  # remove trailing .exe if any
32818  new_path="${new_path/%.exe/}"
32819
32820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32821
32822  # First separate the path from the arguments. This will split at the first
32823  # space.
32824  complete="$CXX"
32825  path="${complete%% *}"
32826  tmp="$complete EOL"
32827  arguments="${tmp#* }"
32828
32829  # Input might be given as Windows format, start by converting to
32830  # unix format.
32831  new_path="$path"
32832
32833  windows_path="$new_path"
32834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32835    unix_path=`$CYGPATH -u "$windows_path"`
32836    new_path="$unix_path"
32837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32839    new_path="$unix_path"
32840  fi
32841
32842
32843  # Now try to locate executable using which
32844  new_path=`$WHICH "$new_path" 2> /dev/null`
32845
32846  if test "x$new_path" = x; then
32847    # Oops. Which didn't find the executable.
32848    # The splitting of arguments from the executable at a space might have been incorrect,
32849    # since paths with space are more likely in Windows. Give it another try with the whole
32850    # argument.
32851    path="$complete"
32852    arguments="EOL"
32853    new_path="$path"
32854
32855  windows_path="$new_path"
32856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32857    unix_path=`$CYGPATH -u "$windows_path"`
32858    new_path="$unix_path"
32859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32861    new_path="$unix_path"
32862  fi
32863
32864
32865    new_path=`$WHICH "$new_path" 2> /dev/null`
32866    # bat and cmd files are not always considered executable in MSYS causing which
32867    # to not find them
32868    if test "x$new_path" = x \
32869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32871      new_path="$path"
32872
32873  windows_path="$new_path"
32874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32875    unix_path=`$CYGPATH -u "$windows_path"`
32876    new_path="$unix_path"
32877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32879    new_path="$unix_path"
32880  fi
32881
32882    fi
32883
32884    if test "x$new_path" = x; then
32885      # It's still not found. Now this is an unrecoverable error.
32886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32887$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32888      has_space=`$ECHO "$complete" | $GREP " "`
32889      if test "x$has_space" != x; then
32890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32892      fi
32893      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32894    fi
32895  fi
32896
32897  # Now new_path has a complete unix path to the binary
32898  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32899    # Keep paths in /bin as-is, but remove trailing .exe if any
32900    new_path="${new_path/%.exe/}"
32901    # Do not save /bin paths to all_fixpath_prefixes!
32902  else
32903    # Not in mixed or Windows style, start by that.
32904    new_path=`cmd //c echo $new_path`
32905
32906  input_path="$new_path"
32907  # Check if we need to convert this using DOS-style short mode. If the path
32908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32909  # take no chances and rewrite it.
32910  # Note: m4 eats our [], so we need to use [ and ] instead.
32911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32912  if test "x$has_forbidden_chars" != x; then
32913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32915  fi
32916
32917    # Output is in $new_path
32918
32919  windows_path="$new_path"
32920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32921    unix_path=`$CYGPATH -u "$windows_path"`
32922    new_path="$unix_path"
32923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32925    new_path="$unix_path"
32926  fi
32927
32928    # remove trailing .exe if any
32929    new_path="${new_path/%.exe/}"
32930
32931    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32932    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32933  fi
32934
32935    else
32936      # We're on a unix platform. Hooray! :)
32937      # First separate the path from the arguments. This will split at the first
32938      # space.
32939      complete="$CXX"
32940      path="${complete%% *}"
32941      tmp="$complete EOL"
32942      arguments="${tmp#* }"
32943
32944      # Cannot rely on the command "which" here since it doesn't always work.
32945      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32946      if test -z "$is_absolute_path"; then
32947        # Path to executable is not absolute. Find it.
32948        IFS_save="$IFS"
32949        IFS=:
32950        for p in $PATH; do
32951          if test -f "$p/$path" && test -x "$p/$path"; then
32952            new_path="$p/$path"
32953            break
32954          fi
32955        done
32956        IFS="$IFS_save"
32957      else
32958        # This is an absolute path, we can use it without further modifications.
32959        new_path="$path"
32960      fi
32961
32962      if test "x$new_path" = x; then
32963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32964$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32965        has_space=`$ECHO "$complete" | $GREP " "`
32966        if test "x$has_space" != x; then
32967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32969        fi
32970        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32971      fi
32972    fi
32973
32974    # Now join together the path and the arguments once again
32975    if test "x$arguments" != xEOL; then
32976      new_complete="$new_path ${arguments% *}"
32977    else
32978      new_complete="$new_path"
32979    fi
32980
32981    if test "x$complete" != "x$new_complete"; then
32982      CXX="$new_complete"
32983      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
32984$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
32985    fi
32986  fi
32987
32988  TEST_COMPILER="$CXX"
32989  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
32990  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
32991  if test "x$OPENJDK_BUILD_OS" != xaix; then
32992    # FIXME: This test should not be needed anymore; we don't do that for any platform.
32993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
32994$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
32995
32996  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32997    # Follow a chain of symbolic links. Use readlink
32998    # where it exists, else fall back to horribly
32999    # complicated shell code.
33000    if test "x$READLINK_TESTED" != yes; then
33001      # On MacOSX there is a readlink tool with a different
33002      # purpose than the GNU readlink tool. Check the found readlink.
33003      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33004      if test "x$ISGNU" = x; then
33005        # A readlink that we do not know how to use.
33006        # Are there other non-GNU readlinks out there?
33007        READLINK_TESTED=yes
33008        READLINK=
33009      fi
33010    fi
33011
33012    if test "x$READLINK" != x; then
33013      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33014    else
33015      # Save the current directory for restoring afterwards
33016      STARTDIR=$PWD
33017      COUNTER=0
33018      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33019      sym_link_file=`$BASENAME $TEST_COMPILER`
33020      cd $sym_link_dir
33021      # Use -P flag to resolve symlinks in directories.
33022      cd `$THEPWDCMD -P`
33023      sym_link_dir=`$THEPWDCMD -P`
33024      # Resolve file symlinks
33025      while test $COUNTER -lt 20; do
33026        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33027        if test "x$ISLINK" == x; then
33028          # This is not a symbolic link! We are done!
33029          break
33030        fi
33031        # Again resolve directory symlinks since the target of the just found
33032        # link could be in a different directory
33033        cd `$DIRNAME $ISLINK`
33034        sym_link_dir=`$THEPWDCMD -P`
33035        sym_link_file=`$BASENAME $ISLINK`
33036        let COUNTER=COUNTER+1
33037      done
33038      cd $STARTDIR
33039      TEST_COMPILER=$sym_link_dir/$sym_link_file
33040    fi
33041  fi
33042
33043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33044$as_echo "$TEST_COMPILER" >&6; }
33045  fi
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33047$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33048
33049  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33050  if test "x$COMPILER_BASENAME" = "xccache"; then
33051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33052$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33053    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33054    # We want to control ccache invocation ourselves, so ignore this cc and try
33055    # searching again.
33056
33057    # Remove the path to the fake ccache cc from the PATH
33058    RETRY_COMPILER_SAVED_PATH="$PATH"
33059    COMPILER_DIRNAME=`$DIRNAME $CXX`
33060    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33061
33062    # Try again looking for our compiler
33063    if test -n "$ac_tool_prefix"; then
33064  for ac_prog in $TOOLCHAIN_CXX_BINARY
33065  do
33066    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33067set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33069$as_echo_n "checking for $ac_word... " >&6; }
33070if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33071  $as_echo_n "(cached) " >&6
33072else
33073  if test -n "$PROPER_COMPILER_CXX"; then
33074  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33075else
33076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33077for as_dir in $PATH
33078do
33079  IFS=$as_save_IFS
33080  test -z "$as_dir" && as_dir=.
33081    for ac_exec_ext in '' $ac_executable_extensions; do
33082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33083    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33085    break 2
33086  fi
33087done
33088  done
33089IFS=$as_save_IFS
33090
33091fi
33092fi
33093PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33094if test -n "$PROPER_COMPILER_CXX"; then
33095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33096$as_echo "$PROPER_COMPILER_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 "$PROPER_COMPILER_CXX" && break
33104  done
33105fi
33106if test -z "$PROPER_COMPILER_CXX"; then
33107  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33108  for ac_prog in $TOOLCHAIN_CXX_BINARY
33109do
33110  # Extract the first word of "$ac_prog", so it can be a program name with args.
33111set dummy $ac_prog; ac_word=$2
33112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33113$as_echo_n "checking for $ac_word... " >&6; }
33114if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33115  $as_echo_n "(cached) " >&6
33116else
33117  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33118  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33119else
33120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33121for as_dir in $PATH
33122do
33123  IFS=$as_save_IFS
33124  test -z "$as_dir" && as_dir=.
33125    for ac_exec_ext in '' $ac_executable_extensions; do
33126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33127    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33129    break 2
33130  fi
33131done
33132  done
33133IFS=$as_save_IFS
33134
33135fi
33136fi
33137ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33138if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33140$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33141else
33142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33143$as_echo "no" >&6; }
33144fi
33145
33146
33147  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33148done
33149
33150  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33151    PROPER_COMPILER_CXX=""
33152  else
33153    case $cross_compiling:$ac_tool_warned in
33154yes:)
33155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33157ac_tool_warned=yes ;;
33158esac
33159    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33160  fi
33161fi
33162
33163
33164  # Only process if variable expands to non-empty
33165
33166  if test "x$PROPER_COMPILER_CXX" != x; then
33167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33168
33169  # First separate the path from the arguments. This will split at the first
33170  # space.
33171  complete="$PROPER_COMPILER_CXX"
33172  path="${complete%% *}"
33173  tmp="$complete EOL"
33174  arguments="${tmp#* }"
33175
33176  # Input might be given as Windows format, start by converting to
33177  # unix format.
33178  new_path=`$CYGPATH -u "$path"`
33179
33180  # Now try to locate executable using which
33181  new_path=`$WHICH "$new_path" 2> /dev/null`
33182  # bat and cmd files are not always considered executable in cygwin causing which
33183  # to not find them
33184  if test "x$new_path" = x \
33185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33187    new_path=`$CYGPATH -u "$path"`
33188  fi
33189  if test "x$new_path" = x; then
33190    # Oops. Which didn't find the executable.
33191    # The splitting of arguments from the executable at a space might have been incorrect,
33192    # since paths with space are more likely in Windows. Give it another try with the whole
33193    # argument.
33194    path="$complete"
33195    arguments="EOL"
33196    new_path=`$CYGPATH -u "$path"`
33197    new_path=`$WHICH "$new_path" 2> /dev/null`
33198    # bat and cmd files are not always considered executable in cygwin causing which
33199    # to not find them
33200    if test "x$new_path" = x \
33201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33203      new_path=`$CYGPATH -u "$path"`
33204    fi
33205    if test "x$new_path" = x; then
33206      # It's still not found. Now this is an unrecoverable error.
33207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33208$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33209      has_space=`$ECHO "$complete" | $GREP " "`
33210      if test "x$has_space" != x; then
33211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33213      fi
33214      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33215    fi
33216  fi
33217
33218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33221  # "foo.exe" is OK but "foo" is an error.
33222  #
33223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33224  # It is also a way to make sure we got the proper file name for the real test later on.
33225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33226  if test "x$test_shortpath" = x; then
33227    # Short path failed, file does not exist as specified.
33228    # Try adding .exe or .cmd
33229    if test -f "${new_path}.exe"; then
33230      input_to_shortpath="${new_path}.exe"
33231    elif test -f "${new_path}.cmd"; then
33232      input_to_shortpath="${new_path}.cmd"
33233    else
33234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33235$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33238      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33239    fi
33240  else
33241    input_to_shortpath="$new_path"
33242  fi
33243
33244  # Call helper function which possibly converts this using DOS-style short mode.
33245  # If so, the updated path is stored in $new_path.
33246  new_path="$input_to_shortpath"
33247
33248  input_path="$input_to_shortpath"
33249  # Check if we need to convert this using DOS-style short mode. If the path
33250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33251  # take no chances and rewrite it.
33252  # Note: m4 eats our [], so we need to use [ and ] instead.
33253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33254  if test "x$has_forbidden_chars" != x; then
33255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33259      # Going to short mode and back again did indeed matter. Since short mode is
33260      # case insensitive, let's make it lowercase to improve readability.
33261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33262      # Now convert it back to Unix-style (cygpath)
33263      input_path=`$CYGPATH -u "$shortmode_path"`
33264      new_path="$input_path"
33265    fi
33266  fi
33267
33268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33269  if test "x$test_cygdrive_prefix" = x; then
33270    # As a simple fix, exclude /usr/bin since it's not a real path.
33271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33273      # a path prefixed by /cygdrive for fixpath to work.
33274      new_path="$CYGWIN_ROOT_PATH$input_path"
33275    fi
33276  fi
33277
33278  # remove trailing .exe if any
33279  new_path="${new_path/%.exe/}"
33280
33281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33282
33283  # First separate the path from the arguments. This will split at the first
33284  # space.
33285  complete="$PROPER_COMPILER_CXX"
33286  path="${complete%% *}"
33287  tmp="$complete EOL"
33288  arguments="${tmp#* }"
33289
33290  # Input might be given as Windows format, start by converting to
33291  # unix format.
33292  new_path="$path"
33293
33294  windows_path="$new_path"
33295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33296    unix_path=`$CYGPATH -u "$windows_path"`
33297    new_path="$unix_path"
33298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33300    new_path="$unix_path"
33301  fi
33302
33303
33304  # Now try to locate executable using which
33305  new_path=`$WHICH "$new_path" 2> /dev/null`
33306
33307  if test "x$new_path" = x; then
33308    # Oops. Which didn't find the executable.
33309    # The splitting of arguments from the executable at a space might have been incorrect,
33310    # since paths with space are more likely in Windows. Give it another try with the whole
33311    # argument.
33312    path="$complete"
33313    arguments="EOL"
33314    new_path="$path"
33315
33316  windows_path="$new_path"
33317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33318    unix_path=`$CYGPATH -u "$windows_path"`
33319    new_path="$unix_path"
33320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33322    new_path="$unix_path"
33323  fi
33324
33325
33326    new_path=`$WHICH "$new_path" 2> /dev/null`
33327    # bat and cmd files are not always considered executable in MSYS causing which
33328    # to not find them
33329    if test "x$new_path" = x \
33330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33332      new_path="$path"
33333
33334  windows_path="$new_path"
33335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33336    unix_path=`$CYGPATH -u "$windows_path"`
33337    new_path="$unix_path"
33338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33340    new_path="$unix_path"
33341  fi
33342
33343    fi
33344
33345    if test "x$new_path" = x; then
33346      # It's still not found. Now this is an unrecoverable error.
33347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33348$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33349      has_space=`$ECHO "$complete" | $GREP " "`
33350      if test "x$has_space" != x; then
33351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33353      fi
33354      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33355    fi
33356  fi
33357
33358  # Now new_path has a complete unix path to the binary
33359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33360    # Keep paths in /bin as-is, but remove trailing .exe if any
33361    new_path="${new_path/%.exe/}"
33362    # Do not save /bin paths to all_fixpath_prefixes!
33363  else
33364    # Not in mixed or Windows style, start by that.
33365    new_path=`cmd //c echo $new_path`
33366
33367  input_path="$new_path"
33368  # Check if we need to convert this using DOS-style short mode. If the path
33369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33370  # take no chances and rewrite it.
33371  # Note: m4 eats our [], so we need to use [ and ] instead.
33372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33373  if test "x$has_forbidden_chars" != x; then
33374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33376  fi
33377
33378    # Output is in $new_path
33379
33380  windows_path="$new_path"
33381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33382    unix_path=`$CYGPATH -u "$windows_path"`
33383    new_path="$unix_path"
33384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33386    new_path="$unix_path"
33387  fi
33388
33389    # remove trailing .exe if any
33390    new_path="${new_path/%.exe/}"
33391
33392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33394  fi
33395
33396    else
33397      # We're on a unix platform. Hooray! :)
33398      # First separate the path from the arguments. This will split at the first
33399      # space.
33400      complete="$PROPER_COMPILER_CXX"
33401      path="${complete%% *}"
33402      tmp="$complete EOL"
33403      arguments="${tmp#* }"
33404
33405      # Cannot rely on the command "which" here since it doesn't always work.
33406      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33407      if test -z "$is_absolute_path"; then
33408        # Path to executable is not absolute. Find it.
33409        IFS_save="$IFS"
33410        IFS=:
33411        for p in $PATH; do
33412          if test -f "$p/$path" && test -x "$p/$path"; then
33413            new_path="$p/$path"
33414            break
33415          fi
33416        done
33417        IFS="$IFS_save"
33418      else
33419        # This is an absolute path, we can use it without further modifications.
33420        new_path="$path"
33421      fi
33422
33423      if test "x$new_path" = x; then
33424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33425$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33426        has_space=`$ECHO "$complete" | $GREP " "`
33427        if test "x$has_space" != x; then
33428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33430        fi
33431        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33432      fi
33433    fi
33434
33435    # Now join together the path and the arguments once again
33436    if test "x$arguments" != xEOL; then
33437      new_complete="$new_path ${arguments% *}"
33438    else
33439      new_complete="$new_path"
33440    fi
33441
33442    if test "x$complete" != "x$new_complete"; then
33443      PROPER_COMPILER_CXX="$new_complete"
33444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33445$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33446    fi
33447  fi
33448
33449    PATH="$RETRY_COMPILER_SAVED_PATH"
33450
33451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33452$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33453
33454  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33455    # Follow a chain of symbolic links. Use readlink
33456    # where it exists, else fall back to horribly
33457    # complicated shell code.
33458    if test "x$READLINK_TESTED" != yes; then
33459      # On MacOSX there is a readlink tool with a different
33460      # purpose than the GNU readlink tool. Check the found readlink.
33461      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33462      if test "x$ISGNU" = x; then
33463        # A readlink that we do not know how to use.
33464        # Are there other non-GNU readlinks out there?
33465        READLINK_TESTED=yes
33466        READLINK=
33467      fi
33468    fi
33469
33470    if test "x$READLINK" != x; then
33471      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33472    else
33473      # Save the current directory for restoring afterwards
33474      STARTDIR=$PWD
33475      COUNTER=0
33476      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33477      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33478      cd $sym_link_dir
33479      # Use -P flag to resolve symlinks in directories.
33480      cd `$THEPWDCMD -P`
33481      sym_link_dir=`$THEPWDCMD -P`
33482      # Resolve file symlinks
33483      while test $COUNTER -lt 20; do
33484        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33485        if test "x$ISLINK" == x; then
33486          # This is not a symbolic link! We are done!
33487          break
33488        fi
33489        # Again resolve directory symlinks since the target of the just found
33490        # link could be in a different directory
33491        cd `$DIRNAME $ISLINK`
33492        sym_link_dir=`$THEPWDCMD -P`
33493        sym_link_file=`$BASENAME $ISLINK`
33494        let COUNTER=COUNTER+1
33495      done
33496      cd $STARTDIR
33497      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33498    fi
33499  fi
33500
33501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33502$as_echo "$PROPER_COMPILER_CXX" >&6; }
33503    CXX="$PROPER_COMPILER_CXX"
33504  else
33505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33506$as_echo "no, keeping CXX" >&6; }
33507  fi
33508
33509
33510  COMPILER=$CXX
33511  COMPILER_NAME=$COMPILER_NAME
33512
33513  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33514    # cc -V output typically looks like
33515    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33516    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33517    # Check that this is likely to be the Solaris Studio cc.
33518    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33519    if test $? -ne 0; then
33520      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33521      { $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
33522$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33523      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33524$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33525      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33526$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33527      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33528    fi
33529    # Remove usage instructions (if present), and
33530    # collapse compiler output into a single line
33531    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33532        $SED -e 's/ *[Uu]sage:.*//'`
33533    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33534        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33535  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33536    # xlc -qversion output typically looks like
33537    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33538    #     Version: 11.01.0000.0015
33539    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33540    # Check that this is likely to be the IBM XL C compiler.
33541    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33542    if test $? -ne 0; then
33543      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33544      { $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
33545$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33546      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33547$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33548      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33549$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33550      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33551    fi
33552    # Collapse compiler output into a single line
33553    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33554    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33555        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33556  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33557    # There is no specific version flag, but all output starts with a version string.
33558    # First line typically looks something like:
33559    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33560    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33561    # Check that this is likely to be Microsoft CL.EXE.
33562    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33563    if test $? -ne 0; then
33564      { $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
33565$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33566      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33567$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33568      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33569    fi
33570    # Collapse compiler output into a single line
33571    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33572    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33573        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33574  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33575    # gcc --version output typically looks like
33576    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33577    #     Copyright (C) 2013 Free Software Foundation, Inc.
33578    #     This is free software; see the source for copying conditions.  There is NO
33579    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33580    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33581    # Check that this is likely to be GCC.
33582    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33583    if test $? -ne 0; then
33584      { $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
33585$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33587$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33588      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33589    fi
33590    # Remove Copyright and legalese from version string, and
33591    # collapse into a single line
33592    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33593        $SED -e 's/ *Copyright .*//'`
33594    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33595        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33596  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33597    # clang --version output typically looks like
33598    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33599    #    clang version 3.3 (tags/RELEASE_33/final)
33600    # or
33601    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33602    #    Target: x86_64-pc-linux-gnu
33603    #    Thread model: posix
33604    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33605    # Check that this is likely to be clang
33606    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33607    if test $? -ne 0; then
33608      { $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
33609$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33611$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33612      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33613    fi
33614    # Collapse compiler output into a single line
33615    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33616    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33617        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33618  else
33619      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33620  fi
33621  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33622  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33623  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33624  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33625
33626  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33627$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33628
33629
33630  # Now that we have resolved CXX ourself, let autoconf have its go at it
33631  ac_ext=cpp
33632ac_cpp='$CXXCPP $CPPFLAGS'
33633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33636if test -z "$CXX"; then
33637  if test -n "$CCC"; then
33638    CXX=$CCC
33639  else
33640    if test -n "$ac_tool_prefix"; then
33641  for ac_prog in $CXX
33642  do
33643    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33644set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33646$as_echo_n "checking for $ac_word... " >&6; }
33647if ${ac_cv_prog_CXX+:} false; then :
33648  $as_echo_n "(cached) " >&6
33649else
33650  if test -n "$CXX"; then
33651  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33652else
33653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33654for as_dir in $PATH
33655do
33656  IFS=$as_save_IFS
33657  test -z "$as_dir" && as_dir=.
33658    for ac_exec_ext in '' $ac_executable_extensions; do
33659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33660    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33662    break 2
33663  fi
33664done
33665  done
33666IFS=$as_save_IFS
33667
33668fi
33669fi
33670CXX=$ac_cv_prog_CXX
33671if test -n "$CXX"; then
33672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33673$as_echo "$CXX" >&6; }
33674else
33675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33676$as_echo "no" >&6; }
33677fi
33678
33679
33680    test -n "$CXX" && break
33681  done
33682fi
33683if test -z "$CXX"; then
33684  ac_ct_CXX=$CXX
33685  for ac_prog in $CXX
33686do
33687  # Extract the first word of "$ac_prog", so it can be a program name with args.
33688set dummy $ac_prog; ac_word=$2
33689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33690$as_echo_n "checking for $ac_word... " >&6; }
33691if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33692  $as_echo_n "(cached) " >&6
33693else
33694  if test -n "$ac_ct_CXX"; then
33695  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33696else
33697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33698for as_dir in $PATH
33699do
33700  IFS=$as_save_IFS
33701  test -z "$as_dir" && as_dir=.
33702    for ac_exec_ext in '' $ac_executable_extensions; do
33703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33704    ac_cv_prog_ac_ct_CXX="$ac_prog"
33705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33706    break 2
33707  fi
33708done
33709  done
33710IFS=$as_save_IFS
33711
33712fi
33713fi
33714ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33715if test -n "$ac_ct_CXX"; then
33716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33717$as_echo "$ac_ct_CXX" >&6; }
33718else
33719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33720$as_echo "no" >&6; }
33721fi
33722
33723
33724  test -n "$ac_ct_CXX" && break
33725done
33726
33727  if test "x$ac_ct_CXX" = x; then
33728    CXX="g++"
33729  else
33730    case $cross_compiling:$ac_tool_warned in
33731yes:)
33732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33734ac_tool_warned=yes ;;
33735esac
33736    CXX=$ac_ct_CXX
33737  fi
33738fi
33739
33740  fi
33741fi
33742# Provide some information about the compiler.
33743$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33744set X $ac_compile
33745ac_compiler=$2
33746for ac_option in --version -v -V -qversion; do
33747  { { ac_try="$ac_compiler $ac_option >&5"
33748case "(($ac_try" in
33749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33750  *) ac_try_echo=$ac_try;;
33751esac
33752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33753$as_echo "$ac_try_echo"; } >&5
33754  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33755  ac_status=$?
33756  if test -s conftest.err; then
33757    sed '10a\
33758... rest of stderr output deleted ...
33759         10q' conftest.err >conftest.er1
33760    cat conftest.er1 >&5
33761  fi
33762  rm -f conftest.er1 conftest.err
33763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33764  test $ac_status = 0; }
33765done
33766
33767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33768$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33769if ${ac_cv_cxx_compiler_gnu+:} false; then :
33770  $as_echo_n "(cached) " >&6
33771else
33772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33773/* end confdefs.h.  */
33774
33775int
33776main ()
33777{
33778#ifndef __GNUC__
33779       choke me
33780#endif
33781
33782  ;
33783  return 0;
33784}
33785_ACEOF
33786if ac_fn_cxx_try_compile "$LINENO"; then :
33787  ac_compiler_gnu=yes
33788else
33789  ac_compiler_gnu=no
33790fi
33791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33792ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33793
33794fi
33795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33796$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33797if test $ac_compiler_gnu = yes; then
33798  GXX=yes
33799else
33800  GXX=
33801fi
33802ac_test_CXXFLAGS=${CXXFLAGS+set}
33803ac_save_CXXFLAGS=$CXXFLAGS
33804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33805$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33806if ${ac_cv_prog_cxx_g+:} false; then :
33807  $as_echo_n "(cached) " >&6
33808else
33809  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33810   ac_cxx_werror_flag=yes
33811   ac_cv_prog_cxx_g=no
33812   CXXFLAGS="-g"
33813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33814/* end confdefs.h.  */
33815
33816int
33817main ()
33818{
33819
33820  ;
33821  return 0;
33822}
33823_ACEOF
33824if ac_fn_cxx_try_compile "$LINENO"; then :
33825  ac_cv_prog_cxx_g=yes
33826else
33827  CXXFLAGS=""
33828      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33829/* end confdefs.h.  */
33830
33831int
33832main ()
33833{
33834
33835  ;
33836  return 0;
33837}
33838_ACEOF
33839if ac_fn_cxx_try_compile "$LINENO"; then :
33840
33841else
33842  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33843	 CXXFLAGS="-g"
33844	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33845/* end confdefs.h.  */
33846
33847int
33848main ()
33849{
33850
33851  ;
33852  return 0;
33853}
33854_ACEOF
33855if ac_fn_cxx_try_compile "$LINENO"; then :
33856  ac_cv_prog_cxx_g=yes
33857fi
33858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33859fi
33860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33861fi
33862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33863   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33864fi
33865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33866$as_echo "$ac_cv_prog_cxx_g" >&6; }
33867if test "$ac_test_CXXFLAGS" = set; then
33868  CXXFLAGS=$ac_save_CXXFLAGS
33869elif test $ac_cv_prog_cxx_g = yes; then
33870  if test "$GXX" = yes; then
33871    CXXFLAGS="-g -O2"
33872  else
33873    CXXFLAGS="-g"
33874  fi
33875else
33876  if test "$GXX" = yes; then
33877    CXXFLAGS="-O2"
33878  else
33879    CXXFLAGS=
33880  fi
33881fi
33882ac_ext=cpp
33883ac_cpp='$CXXCPP $CPPFLAGS'
33884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33887
33888
33889  #
33890  # Setup the preprocessor (CPP and CXXCPP)
33891  #
33892  ac_ext=c
33893ac_cpp='$CPP $CPPFLAGS'
33894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33896ac_compiler_gnu=$ac_cv_c_compiler_gnu
33897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33898$as_echo_n "checking how to run the C preprocessor... " >&6; }
33899# On Suns, sometimes $CPP names a directory.
33900if test -n "$CPP" && test -d "$CPP"; then
33901  CPP=
33902fi
33903if test -z "$CPP"; then
33904  if ${ac_cv_prog_CPP+:} false; then :
33905  $as_echo_n "(cached) " >&6
33906else
33907      # Double quotes because CPP needs to be expanded
33908    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33909    do
33910      ac_preproc_ok=false
33911for ac_c_preproc_warn_flag in '' yes
33912do
33913  # Use a header file that comes with gcc, so configuring glibc
33914  # with a fresh cross-compiler works.
33915  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33916  # <limits.h> exists even on freestanding compilers.
33917  # On the NeXT, cc -E runs the code through the compiler's parser,
33918  # not just through cpp. "Syntax error" is here to catch this case.
33919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33920/* end confdefs.h.  */
33921#ifdef __STDC__
33922# include <limits.h>
33923#else
33924# include <assert.h>
33925#endif
33926		     Syntax error
33927_ACEOF
33928if ac_fn_c_try_cpp "$LINENO"; then :
33929
33930else
33931  # Broken: fails on valid input.
33932continue
33933fi
33934rm -f conftest.err conftest.i conftest.$ac_ext
33935
33936  # OK, works on sane cases.  Now check whether nonexistent headers
33937  # can be detected and how.
33938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33939/* end confdefs.h.  */
33940#include <ac_nonexistent.h>
33941_ACEOF
33942if ac_fn_c_try_cpp "$LINENO"; then :
33943  # Broken: success on invalid input.
33944continue
33945else
33946  # Passes both tests.
33947ac_preproc_ok=:
33948break
33949fi
33950rm -f conftest.err conftest.i conftest.$ac_ext
33951
33952done
33953# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33954rm -f conftest.i conftest.err conftest.$ac_ext
33955if $ac_preproc_ok; then :
33956  break
33957fi
33958
33959    done
33960    ac_cv_prog_CPP=$CPP
33961
33962fi
33963  CPP=$ac_cv_prog_CPP
33964else
33965  ac_cv_prog_CPP=$CPP
33966fi
33967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
33968$as_echo "$CPP" >&6; }
33969ac_preproc_ok=false
33970for ac_c_preproc_warn_flag in '' yes
33971do
33972  # Use a header file that comes with gcc, so configuring glibc
33973  # with a fresh cross-compiler works.
33974  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33975  # <limits.h> exists even on freestanding compilers.
33976  # On the NeXT, cc -E runs the code through the compiler's parser,
33977  # not just through cpp. "Syntax error" is here to catch this case.
33978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33979/* end confdefs.h.  */
33980#ifdef __STDC__
33981# include <limits.h>
33982#else
33983# include <assert.h>
33984#endif
33985		     Syntax error
33986_ACEOF
33987if ac_fn_c_try_cpp "$LINENO"; then :
33988
33989else
33990  # Broken: fails on valid input.
33991continue
33992fi
33993rm -f conftest.err conftest.i conftest.$ac_ext
33994
33995  # OK, works on sane cases.  Now check whether nonexistent headers
33996  # can be detected and how.
33997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33998/* end confdefs.h.  */
33999#include <ac_nonexistent.h>
34000_ACEOF
34001if ac_fn_c_try_cpp "$LINENO"; then :
34002  # Broken: success on invalid input.
34003continue
34004else
34005  # Passes both tests.
34006ac_preproc_ok=:
34007break
34008fi
34009rm -f conftest.err conftest.i conftest.$ac_ext
34010
34011done
34012# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34013rm -f conftest.i conftest.err conftest.$ac_ext
34014if $ac_preproc_ok; then :
34015
34016else
34017  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34019as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34020See \`config.log' for more details" "$LINENO" 5; }
34021fi
34022
34023ac_ext=cpp
34024ac_cpp='$CXXCPP $CPPFLAGS'
34025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34028
34029
34030  # Only process if variable expands to non-empty
34031
34032  if test "x$CPP" != x; then
34033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34034
34035  # First separate the path from the arguments. This will split at the first
34036  # space.
34037  complete="$CPP"
34038  path="${complete%% *}"
34039  tmp="$complete EOL"
34040  arguments="${tmp#* }"
34041
34042  # Input might be given as Windows format, start by converting to
34043  # unix format.
34044  new_path=`$CYGPATH -u "$path"`
34045
34046  # Now try to locate executable using which
34047  new_path=`$WHICH "$new_path" 2> /dev/null`
34048  # bat and cmd files are not always considered executable in cygwin causing which
34049  # to not find them
34050  if test "x$new_path" = x \
34051      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34052      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34053    new_path=`$CYGPATH -u "$path"`
34054  fi
34055  if test "x$new_path" = x; then
34056    # Oops. Which didn't find the executable.
34057    # The splitting of arguments from the executable at a space might have been incorrect,
34058    # since paths with space are more likely in Windows. Give it another try with the whole
34059    # argument.
34060    path="$complete"
34061    arguments="EOL"
34062    new_path=`$CYGPATH -u "$path"`
34063    new_path=`$WHICH "$new_path" 2> /dev/null`
34064    # bat and cmd files are not always considered executable in cygwin causing which
34065    # to not find them
34066    if test "x$new_path" = x \
34067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34069      new_path=`$CYGPATH -u "$path"`
34070    fi
34071    if test "x$new_path" = x; then
34072      # It's still not found. Now this is an unrecoverable error.
34073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34074$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34075      has_space=`$ECHO "$complete" | $GREP " "`
34076      if test "x$has_space" != x; then
34077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34079      fi
34080      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34081    fi
34082  fi
34083
34084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34087  # "foo.exe" is OK but "foo" is an error.
34088  #
34089  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34090  # It is also a way to make sure we got the proper file name for the real test later on.
34091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34092  if test "x$test_shortpath" = x; then
34093    # Short path failed, file does not exist as specified.
34094    # Try adding .exe or .cmd
34095    if test -f "${new_path}.exe"; then
34096      input_to_shortpath="${new_path}.exe"
34097    elif test -f "${new_path}.cmd"; then
34098      input_to_shortpath="${new_path}.cmd"
34099    else
34100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34101$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34104      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34105    fi
34106  else
34107    input_to_shortpath="$new_path"
34108  fi
34109
34110  # Call helper function which possibly converts this using DOS-style short mode.
34111  # If so, the updated path is stored in $new_path.
34112  new_path="$input_to_shortpath"
34113
34114  input_path="$input_to_shortpath"
34115  # Check if we need to convert this using DOS-style short mode. If the path
34116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34117  # take no chances and rewrite it.
34118  # Note: m4 eats our [], so we need to use [ and ] instead.
34119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34120  if test "x$has_forbidden_chars" != x; then
34121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34125      # Going to short mode and back again did indeed matter. Since short mode is
34126      # case insensitive, let's make it lowercase to improve readability.
34127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34128      # Now convert it back to Unix-style (cygpath)
34129      input_path=`$CYGPATH -u "$shortmode_path"`
34130      new_path="$input_path"
34131    fi
34132  fi
34133
34134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34135  if test "x$test_cygdrive_prefix" = x; then
34136    # As a simple fix, exclude /usr/bin since it's not a real path.
34137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34139      # a path prefixed by /cygdrive for fixpath to work.
34140      new_path="$CYGWIN_ROOT_PATH$input_path"
34141    fi
34142  fi
34143
34144  # remove trailing .exe if any
34145  new_path="${new_path/%.exe/}"
34146
34147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34148
34149  # First separate the path from the arguments. This will split at the first
34150  # space.
34151  complete="$CPP"
34152  path="${complete%% *}"
34153  tmp="$complete EOL"
34154  arguments="${tmp#* }"
34155
34156  # Input might be given as Windows format, start by converting to
34157  # unix format.
34158  new_path="$path"
34159
34160  windows_path="$new_path"
34161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34162    unix_path=`$CYGPATH -u "$windows_path"`
34163    new_path="$unix_path"
34164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34166    new_path="$unix_path"
34167  fi
34168
34169
34170  # Now try to locate executable using which
34171  new_path=`$WHICH "$new_path" 2> /dev/null`
34172
34173  if test "x$new_path" = x; then
34174    # Oops. Which didn't find the executable.
34175    # The splitting of arguments from the executable at a space might have been incorrect,
34176    # since paths with space are more likely in Windows. Give it another try with the whole
34177    # argument.
34178    path="$complete"
34179    arguments="EOL"
34180    new_path="$path"
34181
34182  windows_path="$new_path"
34183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34184    unix_path=`$CYGPATH -u "$windows_path"`
34185    new_path="$unix_path"
34186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34188    new_path="$unix_path"
34189  fi
34190
34191
34192    new_path=`$WHICH "$new_path" 2> /dev/null`
34193    # bat and cmd files are not always considered executable in MSYS causing which
34194    # to not find them
34195    if test "x$new_path" = x \
34196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34198      new_path="$path"
34199
34200  windows_path="$new_path"
34201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34202    unix_path=`$CYGPATH -u "$windows_path"`
34203    new_path="$unix_path"
34204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34206    new_path="$unix_path"
34207  fi
34208
34209    fi
34210
34211    if test "x$new_path" = x; then
34212      # It's still not found. Now this is an unrecoverable error.
34213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34214$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34215      has_space=`$ECHO "$complete" | $GREP " "`
34216      if test "x$has_space" != x; then
34217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34219      fi
34220      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34221    fi
34222  fi
34223
34224  # Now new_path has a complete unix path to the binary
34225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34226    # Keep paths in /bin as-is, but remove trailing .exe if any
34227    new_path="${new_path/%.exe/}"
34228    # Do not save /bin paths to all_fixpath_prefixes!
34229  else
34230    # Not in mixed or Windows style, start by that.
34231    new_path=`cmd //c echo $new_path`
34232
34233  input_path="$new_path"
34234  # Check if we need to convert this using DOS-style short mode. If the path
34235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34236  # take no chances and rewrite it.
34237  # Note: m4 eats our [], so we need to use [ and ] instead.
34238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34239  if test "x$has_forbidden_chars" != x; then
34240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34242  fi
34243
34244    # Output is in $new_path
34245
34246  windows_path="$new_path"
34247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34248    unix_path=`$CYGPATH -u "$windows_path"`
34249    new_path="$unix_path"
34250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34252    new_path="$unix_path"
34253  fi
34254
34255    # remove trailing .exe if any
34256    new_path="${new_path/%.exe/}"
34257
34258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34260  fi
34261
34262    else
34263      # We're on a unix platform. Hooray! :)
34264      # First separate the path from the arguments. This will split at the first
34265      # space.
34266      complete="$CPP"
34267      path="${complete%% *}"
34268      tmp="$complete EOL"
34269      arguments="${tmp#* }"
34270
34271      # Cannot rely on the command "which" here since it doesn't always work.
34272      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34273      if test -z "$is_absolute_path"; then
34274        # Path to executable is not absolute. Find it.
34275        IFS_save="$IFS"
34276        IFS=:
34277        for p in $PATH; do
34278          if test -f "$p/$path" && test -x "$p/$path"; then
34279            new_path="$p/$path"
34280            break
34281          fi
34282        done
34283        IFS="$IFS_save"
34284      else
34285        # This is an absolute path, we can use it without further modifications.
34286        new_path="$path"
34287      fi
34288
34289      if test "x$new_path" = x; then
34290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34291$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34292        has_space=`$ECHO "$complete" | $GREP " "`
34293        if test "x$has_space" != x; then
34294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34296        fi
34297        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34298      fi
34299    fi
34300
34301    # Now join together the path and the arguments once again
34302    if test "x$arguments" != xEOL; then
34303      new_complete="$new_path ${arguments% *}"
34304    else
34305      new_complete="$new_path"
34306    fi
34307
34308    if test "x$complete" != "x$new_complete"; then
34309      CPP="$new_complete"
34310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34311$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34312    fi
34313  fi
34314
34315  ac_ext=cpp
34316ac_cpp='$CXXCPP $CPPFLAGS'
34317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34321$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34322if test -z "$CXXCPP"; then
34323  if ${ac_cv_prog_CXXCPP+:} false; then :
34324  $as_echo_n "(cached) " >&6
34325else
34326      # Double quotes because CXXCPP needs to be expanded
34327    for CXXCPP in "$CXX -E" "/lib/cpp"
34328    do
34329      ac_preproc_ok=false
34330for ac_cxx_preproc_warn_flag in '' yes
34331do
34332  # Use a header file that comes with gcc, so configuring glibc
34333  # with a fresh cross-compiler works.
34334  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34335  # <limits.h> exists even on freestanding compilers.
34336  # On the NeXT, cc -E runs the code through the compiler's parser,
34337  # not just through cpp. "Syntax error" is here to catch this case.
34338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34339/* end confdefs.h.  */
34340#ifdef __STDC__
34341# include <limits.h>
34342#else
34343# include <assert.h>
34344#endif
34345		     Syntax error
34346_ACEOF
34347if ac_fn_cxx_try_cpp "$LINENO"; then :
34348
34349else
34350  # Broken: fails on valid input.
34351continue
34352fi
34353rm -f conftest.err conftest.i conftest.$ac_ext
34354
34355  # OK, works on sane cases.  Now check whether nonexistent headers
34356  # can be detected and how.
34357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34358/* end confdefs.h.  */
34359#include <ac_nonexistent.h>
34360_ACEOF
34361if ac_fn_cxx_try_cpp "$LINENO"; then :
34362  # Broken: success on invalid input.
34363continue
34364else
34365  # Passes both tests.
34366ac_preproc_ok=:
34367break
34368fi
34369rm -f conftest.err conftest.i conftest.$ac_ext
34370
34371done
34372# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34373rm -f conftest.i conftest.err conftest.$ac_ext
34374if $ac_preproc_ok; then :
34375  break
34376fi
34377
34378    done
34379    ac_cv_prog_CXXCPP=$CXXCPP
34380
34381fi
34382  CXXCPP=$ac_cv_prog_CXXCPP
34383else
34384  ac_cv_prog_CXXCPP=$CXXCPP
34385fi
34386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34387$as_echo "$CXXCPP" >&6; }
34388ac_preproc_ok=false
34389for ac_cxx_preproc_warn_flag in '' yes
34390do
34391  # Use a header file that comes with gcc, so configuring glibc
34392  # with a fresh cross-compiler works.
34393  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34394  # <limits.h> exists even on freestanding compilers.
34395  # On the NeXT, cc -E runs the code through the compiler's parser,
34396  # not just through cpp. "Syntax error" is here to catch this case.
34397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34398/* end confdefs.h.  */
34399#ifdef __STDC__
34400# include <limits.h>
34401#else
34402# include <assert.h>
34403#endif
34404		     Syntax error
34405_ACEOF
34406if ac_fn_cxx_try_cpp "$LINENO"; then :
34407
34408else
34409  # Broken: fails on valid input.
34410continue
34411fi
34412rm -f conftest.err conftest.i conftest.$ac_ext
34413
34414  # OK, works on sane cases.  Now check whether nonexistent headers
34415  # can be detected and how.
34416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34417/* end confdefs.h.  */
34418#include <ac_nonexistent.h>
34419_ACEOF
34420if ac_fn_cxx_try_cpp "$LINENO"; then :
34421  # Broken: success on invalid input.
34422continue
34423else
34424  # Passes both tests.
34425ac_preproc_ok=:
34426break
34427fi
34428rm -f conftest.err conftest.i conftest.$ac_ext
34429
34430done
34431# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34432rm -f conftest.i conftest.err conftest.$ac_ext
34433if $ac_preproc_ok; then :
34434
34435else
34436  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34438as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34439See \`config.log' for more details" "$LINENO" 5; }
34440fi
34441
34442ac_ext=cpp
34443ac_cpp='$CXXCPP $CPPFLAGS'
34444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34447
34448
34449  # Only process if variable expands to non-empty
34450
34451  if test "x$CXXCPP" != x; then
34452    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34453
34454  # First separate the path from the arguments. This will split at the first
34455  # space.
34456  complete="$CXXCPP"
34457  path="${complete%% *}"
34458  tmp="$complete EOL"
34459  arguments="${tmp#* }"
34460
34461  # Input might be given as Windows format, start by converting to
34462  # unix format.
34463  new_path=`$CYGPATH -u "$path"`
34464
34465  # Now try to locate executable using which
34466  new_path=`$WHICH "$new_path" 2> /dev/null`
34467  # bat and cmd files are not always considered executable in cygwin causing which
34468  # to not find them
34469  if test "x$new_path" = x \
34470      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34471      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34472    new_path=`$CYGPATH -u "$path"`
34473  fi
34474  if test "x$new_path" = x; then
34475    # Oops. Which didn't find the executable.
34476    # The splitting of arguments from the executable at a space might have been incorrect,
34477    # since paths with space are more likely in Windows. Give it another try with the whole
34478    # argument.
34479    path="$complete"
34480    arguments="EOL"
34481    new_path=`$CYGPATH -u "$path"`
34482    new_path=`$WHICH "$new_path" 2> /dev/null`
34483    # bat and cmd files are not always considered executable in cygwin causing which
34484    # to not find them
34485    if test "x$new_path" = x \
34486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34488      new_path=`$CYGPATH -u "$path"`
34489    fi
34490    if test "x$new_path" = x; then
34491      # It's still not found. Now this is an unrecoverable error.
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34493$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34494      has_space=`$ECHO "$complete" | $GREP " "`
34495      if test "x$has_space" != x; then
34496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34498      fi
34499      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34500    fi
34501  fi
34502
34503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34506  # "foo.exe" is OK but "foo" is an error.
34507  #
34508  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34509  # It is also a way to make sure we got the proper file name for the real test later on.
34510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34511  if test "x$test_shortpath" = x; then
34512    # Short path failed, file does not exist as specified.
34513    # Try adding .exe or .cmd
34514    if test -f "${new_path}.exe"; then
34515      input_to_shortpath="${new_path}.exe"
34516    elif test -f "${new_path}.cmd"; then
34517      input_to_shortpath="${new_path}.cmd"
34518    else
34519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34520$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34521      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34522$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34523      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34524    fi
34525  else
34526    input_to_shortpath="$new_path"
34527  fi
34528
34529  # Call helper function which possibly converts this using DOS-style short mode.
34530  # If so, the updated path is stored in $new_path.
34531  new_path="$input_to_shortpath"
34532
34533  input_path="$input_to_shortpath"
34534  # Check if we need to convert this using DOS-style short mode. If the path
34535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34536  # take no chances and rewrite it.
34537  # Note: m4 eats our [], so we need to use [ and ] instead.
34538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34539  if test "x$has_forbidden_chars" != x; then
34540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34544      # Going to short mode and back again did indeed matter. Since short mode is
34545      # case insensitive, let's make it lowercase to improve readability.
34546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34547      # Now convert it back to Unix-style (cygpath)
34548      input_path=`$CYGPATH -u "$shortmode_path"`
34549      new_path="$input_path"
34550    fi
34551  fi
34552
34553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34554  if test "x$test_cygdrive_prefix" = x; then
34555    # As a simple fix, exclude /usr/bin since it's not a real path.
34556    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34558      # a path prefixed by /cygdrive for fixpath to work.
34559      new_path="$CYGWIN_ROOT_PATH$input_path"
34560    fi
34561  fi
34562
34563  # remove trailing .exe if any
34564  new_path="${new_path/%.exe/}"
34565
34566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34567
34568  # First separate the path from the arguments. This will split at the first
34569  # space.
34570  complete="$CXXCPP"
34571  path="${complete%% *}"
34572  tmp="$complete EOL"
34573  arguments="${tmp#* }"
34574
34575  # Input might be given as Windows format, start by converting to
34576  # unix format.
34577  new_path="$path"
34578
34579  windows_path="$new_path"
34580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34581    unix_path=`$CYGPATH -u "$windows_path"`
34582    new_path="$unix_path"
34583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34585    new_path="$unix_path"
34586  fi
34587
34588
34589  # Now try to locate executable using which
34590  new_path=`$WHICH "$new_path" 2> /dev/null`
34591
34592  if test "x$new_path" = x; then
34593    # Oops. Which didn't find the executable.
34594    # The splitting of arguments from the executable at a space might have been incorrect,
34595    # since paths with space are more likely in Windows. Give it another try with the whole
34596    # argument.
34597    path="$complete"
34598    arguments="EOL"
34599    new_path="$path"
34600
34601  windows_path="$new_path"
34602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34603    unix_path=`$CYGPATH -u "$windows_path"`
34604    new_path="$unix_path"
34605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34607    new_path="$unix_path"
34608  fi
34609
34610
34611    new_path=`$WHICH "$new_path" 2> /dev/null`
34612    # bat and cmd files are not always considered executable in MSYS causing which
34613    # to not find them
34614    if test "x$new_path" = x \
34615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34617      new_path="$path"
34618
34619  windows_path="$new_path"
34620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34621    unix_path=`$CYGPATH -u "$windows_path"`
34622    new_path="$unix_path"
34623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34625    new_path="$unix_path"
34626  fi
34627
34628    fi
34629
34630    if test "x$new_path" = x; then
34631      # It's still not found. Now this is an unrecoverable error.
34632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34633$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34634      has_space=`$ECHO "$complete" | $GREP " "`
34635      if test "x$has_space" != x; then
34636        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34637$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34638      fi
34639      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34640    fi
34641  fi
34642
34643  # Now new_path has a complete unix path to the binary
34644  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34645    # Keep paths in /bin as-is, but remove trailing .exe if any
34646    new_path="${new_path/%.exe/}"
34647    # Do not save /bin paths to all_fixpath_prefixes!
34648  else
34649    # Not in mixed or Windows style, start by that.
34650    new_path=`cmd //c echo $new_path`
34651
34652  input_path="$new_path"
34653  # Check if we need to convert this using DOS-style short mode. If the path
34654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34655  # take no chances and rewrite it.
34656  # Note: m4 eats our [], so we need to use [ and ] instead.
34657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34658  if test "x$has_forbidden_chars" != x; then
34659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34661  fi
34662
34663    # Output is in $new_path
34664
34665  windows_path="$new_path"
34666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34667    unix_path=`$CYGPATH -u "$windows_path"`
34668    new_path="$unix_path"
34669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34671    new_path="$unix_path"
34672  fi
34673
34674    # remove trailing .exe if any
34675    new_path="${new_path/%.exe/}"
34676
34677    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34678    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34679  fi
34680
34681    else
34682      # We're on a unix platform. Hooray! :)
34683      # First separate the path from the arguments. This will split at the first
34684      # space.
34685      complete="$CXXCPP"
34686      path="${complete%% *}"
34687      tmp="$complete EOL"
34688      arguments="${tmp#* }"
34689
34690      # Cannot rely on the command "which" here since it doesn't always work.
34691      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34692      if test -z "$is_absolute_path"; then
34693        # Path to executable is not absolute. Find it.
34694        IFS_save="$IFS"
34695        IFS=:
34696        for p in $PATH; do
34697          if test -f "$p/$path" && test -x "$p/$path"; then
34698            new_path="$p/$path"
34699            break
34700          fi
34701        done
34702        IFS="$IFS_save"
34703      else
34704        # This is an absolute path, we can use it without further modifications.
34705        new_path="$path"
34706      fi
34707
34708      if test "x$new_path" = x; then
34709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34710$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34711        has_space=`$ECHO "$complete" | $GREP " "`
34712        if test "x$has_space" != x; then
34713          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34714$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34715        fi
34716        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34717      fi
34718    fi
34719
34720    # Now join together the path and the arguments once again
34721    if test "x$arguments" != xEOL; then
34722      new_complete="$new_path ${arguments% *}"
34723    else
34724      new_complete="$new_path"
34725    fi
34726
34727    if test "x$complete" != "x$new_complete"; then
34728      CXXCPP="$new_complete"
34729      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34730$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34731    fi
34732  fi
34733
34734
34735  #
34736  # Setup the linker (LD)
34737  #
34738  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34739    # In the Microsoft toolchain we have a separate LD command "link".
34740    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34741    # a cygwin program for something completely different.
34742    # Extract the first word of "link", so it can be a program name with args.
34743set dummy link; ac_word=$2
34744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34745$as_echo_n "checking for $ac_word... " >&6; }
34746if ${ac_cv_prog_LD+:} false; then :
34747  $as_echo_n "(cached) " >&6
34748else
34749  if test -n "$LD"; then
34750  ac_cv_prog_LD="$LD" # Let the user override the test.
34751else
34752  ac_prog_rejected=no
34753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34754for as_dir in $PATH
34755do
34756  IFS=$as_save_IFS
34757  test -z "$as_dir" && as_dir=.
34758    for ac_exec_ext in '' $ac_executable_extensions; do
34759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34760    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34761       ac_prog_rejected=yes
34762       continue
34763     fi
34764    ac_cv_prog_LD="link"
34765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34766    break 2
34767  fi
34768done
34769  done
34770IFS=$as_save_IFS
34771
34772if test $ac_prog_rejected = yes; then
34773  # We found a bogon in the path, so make sure we never use it.
34774  set dummy $ac_cv_prog_LD
34775  shift
34776  if test $# != 0; then
34777    # We chose a different compiler from the bogus one.
34778    # However, it has the same basename, so the bogon will be chosen
34779    # first if we set LD to just the basename; use the full file name.
34780    shift
34781    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34782  fi
34783fi
34784fi
34785fi
34786LD=$ac_cv_prog_LD
34787if test -n "$LD"; then
34788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34789$as_echo "$LD" >&6; }
34790else
34791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34792$as_echo "no" >&6; }
34793fi
34794
34795
34796
34797  # Only process if variable expands to non-empty
34798
34799  if test "x$LD" != x; then
34800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34801
34802  # First separate the path from the arguments. This will split at the first
34803  # space.
34804  complete="$LD"
34805  path="${complete%% *}"
34806  tmp="$complete EOL"
34807  arguments="${tmp#* }"
34808
34809  # Input might be given as Windows format, start by converting to
34810  # unix format.
34811  new_path=`$CYGPATH -u "$path"`
34812
34813  # Now try to locate executable using which
34814  new_path=`$WHICH "$new_path" 2> /dev/null`
34815  # bat and cmd files are not always considered executable in cygwin causing which
34816  # to not find them
34817  if test "x$new_path" = x \
34818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34820    new_path=`$CYGPATH -u "$path"`
34821  fi
34822  if test "x$new_path" = x; then
34823    # Oops. Which didn't find the executable.
34824    # The splitting of arguments from the executable at a space might have been incorrect,
34825    # since paths with space are more likely in Windows. Give it another try with the whole
34826    # argument.
34827    path="$complete"
34828    arguments="EOL"
34829    new_path=`$CYGPATH -u "$path"`
34830    new_path=`$WHICH "$new_path" 2> /dev/null`
34831    # bat and cmd files are not always considered executable in cygwin causing which
34832    # to not find them
34833    if test "x$new_path" = x \
34834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34836      new_path=`$CYGPATH -u "$path"`
34837    fi
34838    if test "x$new_path" = x; then
34839      # It's still not found. Now this is an unrecoverable error.
34840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34841$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34842      has_space=`$ECHO "$complete" | $GREP " "`
34843      if test "x$has_space" != x; then
34844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34846      fi
34847      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34848    fi
34849  fi
34850
34851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34854  # "foo.exe" is OK but "foo" is an error.
34855  #
34856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34857  # It is also a way to make sure we got the proper file name for the real test later on.
34858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34859  if test "x$test_shortpath" = x; then
34860    # Short path failed, file does not exist as specified.
34861    # Try adding .exe or .cmd
34862    if test -f "${new_path}.exe"; then
34863      input_to_shortpath="${new_path}.exe"
34864    elif test -f "${new_path}.cmd"; then
34865      input_to_shortpath="${new_path}.cmd"
34866    else
34867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34868$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34871      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34872    fi
34873  else
34874    input_to_shortpath="$new_path"
34875  fi
34876
34877  # Call helper function which possibly converts this using DOS-style short mode.
34878  # If so, the updated path is stored in $new_path.
34879  new_path="$input_to_shortpath"
34880
34881  input_path="$input_to_shortpath"
34882  # Check if we need to convert this using DOS-style short mode. If the path
34883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34884  # take no chances and rewrite it.
34885  # Note: m4 eats our [], so we need to use [ and ] instead.
34886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34887  if test "x$has_forbidden_chars" != x; then
34888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34892      # Going to short mode and back again did indeed matter. Since short mode is
34893      # case insensitive, let's make it lowercase to improve readability.
34894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34895      # Now convert it back to Unix-style (cygpath)
34896      input_path=`$CYGPATH -u "$shortmode_path"`
34897      new_path="$input_path"
34898    fi
34899  fi
34900
34901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34902  if test "x$test_cygdrive_prefix" = x; then
34903    # As a simple fix, exclude /usr/bin since it's not a real path.
34904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34906      # a path prefixed by /cygdrive for fixpath to work.
34907      new_path="$CYGWIN_ROOT_PATH$input_path"
34908    fi
34909  fi
34910
34911  # remove trailing .exe if any
34912  new_path="${new_path/%.exe/}"
34913
34914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34915
34916  # First separate the path from the arguments. This will split at the first
34917  # space.
34918  complete="$LD"
34919  path="${complete%% *}"
34920  tmp="$complete EOL"
34921  arguments="${tmp#* }"
34922
34923  # Input might be given as Windows format, start by converting to
34924  # unix format.
34925  new_path="$path"
34926
34927  windows_path="$new_path"
34928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34929    unix_path=`$CYGPATH -u "$windows_path"`
34930    new_path="$unix_path"
34931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34933    new_path="$unix_path"
34934  fi
34935
34936
34937  # Now try to locate executable using which
34938  new_path=`$WHICH "$new_path" 2> /dev/null`
34939
34940  if test "x$new_path" = x; then
34941    # Oops. Which didn't find the executable.
34942    # The splitting of arguments from the executable at a space might have been incorrect,
34943    # since paths with space are more likely in Windows. Give it another try with the whole
34944    # argument.
34945    path="$complete"
34946    arguments="EOL"
34947    new_path="$path"
34948
34949  windows_path="$new_path"
34950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34951    unix_path=`$CYGPATH -u "$windows_path"`
34952    new_path="$unix_path"
34953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34955    new_path="$unix_path"
34956  fi
34957
34958
34959    new_path=`$WHICH "$new_path" 2> /dev/null`
34960    # bat and cmd files are not always considered executable in MSYS causing which
34961    # to not find them
34962    if test "x$new_path" = x \
34963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34965      new_path="$path"
34966
34967  windows_path="$new_path"
34968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34969    unix_path=`$CYGPATH -u "$windows_path"`
34970    new_path="$unix_path"
34971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34973    new_path="$unix_path"
34974  fi
34975
34976    fi
34977
34978    if test "x$new_path" = x; then
34979      # It's still not found. Now this is an unrecoverable error.
34980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34981$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34982      has_space=`$ECHO "$complete" | $GREP " "`
34983      if test "x$has_space" != x; then
34984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34986      fi
34987      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34988    fi
34989  fi
34990
34991  # Now new_path has a complete unix path to the binary
34992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34993    # Keep paths in /bin as-is, but remove trailing .exe if any
34994    new_path="${new_path/%.exe/}"
34995    # Do not save /bin paths to all_fixpath_prefixes!
34996  else
34997    # Not in mixed or Windows style, start by that.
34998    new_path=`cmd //c echo $new_path`
34999
35000  input_path="$new_path"
35001  # Check if we need to convert this using DOS-style short mode. If the path
35002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35003  # take no chances and rewrite it.
35004  # Note: m4 eats our [], so we need to use [ and ] instead.
35005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35006  if test "x$has_forbidden_chars" != x; then
35007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35009  fi
35010
35011    # Output is in $new_path
35012
35013  windows_path="$new_path"
35014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35015    unix_path=`$CYGPATH -u "$windows_path"`
35016    new_path="$unix_path"
35017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35019    new_path="$unix_path"
35020  fi
35021
35022    # remove trailing .exe if any
35023    new_path="${new_path/%.exe/}"
35024
35025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35027  fi
35028
35029    else
35030      # We're on a unix platform. Hooray! :)
35031      # First separate the path from the arguments. This will split at the first
35032      # space.
35033      complete="$LD"
35034      path="${complete%% *}"
35035      tmp="$complete EOL"
35036      arguments="${tmp#* }"
35037
35038      # Cannot rely on the command "which" here since it doesn't always work.
35039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35040      if test -z "$is_absolute_path"; then
35041        # Path to executable is not absolute. Find it.
35042        IFS_save="$IFS"
35043        IFS=:
35044        for p in $PATH; do
35045          if test -f "$p/$path" && test -x "$p/$path"; then
35046            new_path="$p/$path"
35047            break
35048          fi
35049        done
35050        IFS="$IFS_save"
35051      else
35052        # This is an absolute path, we can use it without further modifications.
35053        new_path="$path"
35054      fi
35055
35056      if test "x$new_path" = x; then
35057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35058$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35059        has_space=`$ECHO "$complete" | $GREP " "`
35060        if test "x$has_space" != x; then
35061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35063        fi
35064        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35065      fi
35066    fi
35067
35068    # Now join together the path and the arguments once again
35069    if test "x$arguments" != xEOL; then
35070      new_complete="$new_path ${arguments% *}"
35071    else
35072      new_complete="$new_path"
35073    fi
35074
35075    if test "x$complete" != "x$new_complete"; then
35076      LD="$new_complete"
35077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35078$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35079    fi
35080  fi
35081
35082    # Verify that we indeed succeeded with this trick.
35083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35084$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35085    "$LD" --version > /dev/null
35086    if test $? -eq 0 ; then
35087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35088$as_echo "no" >&6; }
35089      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35090    else
35091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35092$as_echo "yes" >&6; }
35093    fi
35094    LDCXX="$LD"
35095  else
35096    # All other toolchains use the compiler to link.
35097    LD="$CC"
35098    LDCXX="$CXX"
35099  fi
35100
35101  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35102
35103
35104  #
35105  # Setup the assembler (AS)
35106  #
35107  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35108    # FIXME: should this really be solaris, or solstudio?
35109
35110
35111  # Publish this variable in the help.
35112
35113
35114  if [ -z "${AS+x}" ]; then
35115    # The variable is not set by user, try to locate tool using the code snippet
35116    for ac_prog in as
35117do
35118  # Extract the first word of "$ac_prog", so it can be a program name with args.
35119set dummy $ac_prog; ac_word=$2
35120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35121$as_echo_n "checking for $ac_word... " >&6; }
35122if ${ac_cv_path_AS+:} false; then :
35123  $as_echo_n "(cached) " >&6
35124else
35125  case $AS in
35126  [\\/]* | ?:[\\/]*)
35127  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35128  ;;
35129  *)
35130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35131for as_dir in $PATH
35132do
35133  IFS=$as_save_IFS
35134  test -z "$as_dir" && as_dir=.
35135    for ac_exec_ext in '' $ac_executable_extensions; do
35136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35137    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35139    break 2
35140  fi
35141done
35142  done
35143IFS=$as_save_IFS
35144
35145  ;;
35146esac
35147fi
35148AS=$ac_cv_path_AS
35149if test -n "$AS"; then
35150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35151$as_echo "$AS" >&6; }
35152else
35153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35154$as_echo "no" >&6; }
35155fi
35156
35157
35158  test -n "$AS" && break
35159done
35160
35161  else
35162    # The variable is set, but is it from the command line or the environment?
35163
35164    # Try to remove the string !AS! from our list.
35165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35167      # If it failed, the variable was not from the command line. Ignore it,
35168      # but warn the user (except for BASH, which is always set by the calling BASH).
35169      if test "xAS" != xBASH; then
35170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35171$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35172      fi
35173      # Try to locate tool using the code snippet
35174      for ac_prog in as
35175do
35176  # Extract the first word of "$ac_prog", so it can be a program name with args.
35177set dummy $ac_prog; ac_word=$2
35178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35179$as_echo_n "checking for $ac_word... " >&6; }
35180if ${ac_cv_path_AS+:} false; then :
35181  $as_echo_n "(cached) " >&6
35182else
35183  case $AS in
35184  [\\/]* | ?:[\\/]*)
35185  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35186  ;;
35187  *)
35188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35189for as_dir in $PATH
35190do
35191  IFS=$as_save_IFS
35192  test -z "$as_dir" && as_dir=.
35193    for ac_exec_ext in '' $ac_executable_extensions; do
35194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35195    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35197    break 2
35198  fi
35199done
35200  done
35201IFS=$as_save_IFS
35202
35203  ;;
35204esac
35205fi
35206AS=$ac_cv_path_AS
35207if test -n "$AS"; then
35208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35209$as_echo "$AS" >&6; }
35210else
35211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35212$as_echo "no" >&6; }
35213fi
35214
35215
35216  test -n "$AS" && break
35217done
35218
35219    else
35220      # If it succeeded, then it was overridden by the user. We will use it
35221      # for the tool.
35222
35223      # First remove it from the list of overridden variables, so we can test
35224      # for unknown variables in the end.
35225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35226
35227      # Check if we try to supply an empty value
35228      if test "x$AS" = x; then
35229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35230$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35232$as_echo_n "checking for AS... " >&6; }
35233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35234$as_echo "disabled" >&6; }
35235      else
35236        # Check if the provided tool contains a complete path.
35237        tool_specified="$AS"
35238        tool_basename="${tool_specified##*/}"
35239        if test "x$tool_basename" = "x$tool_specified"; then
35240          # A command without a complete path is provided, search $PATH.
35241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35242$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35243          # Extract the first word of "$tool_basename", so it can be a program name with args.
35244set dummy $tool_basename; ac_word=$2
35245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35246$as_echo_n "checking for $ac_word... " >&6; }
35247if ${ac_cv_path_AS+:} false; then :
35248  $as_echo_n "(cached) " >&6
35249else
35250  case $AS in
35251  [\\/]* | ?:[\\/]*)
35252  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35253  ;;
35254  *)
35255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35256for as_dir in $PATH
35257do
35258  IFS=$as_save_IFS
35259  test -z "$as_dir" && as_dir=.
35260    for ac_exec_ext in '' $ac_executable_extensions; do
35261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35262    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35264    break 2
35265  fi
35266done
35267  done
35268IFS=$as_save_IFS
35269
35270  ;;
35271esac
35272fi
35273AS=$ac_cv_path_AS
35274if test -n "$AS"; then
35275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35276$as_echo "$AS" >&6; }
35277else
35278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35279$as_echo "no" >&6; }
35280fi
35281
35282
35283          if test "x$AS" = x; then
35284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35285          fi
35286        else
35287          # Otherwise we believe it is a complete path. Use it as it is.
35288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35289$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35291$as_echo_n "checking for AS... " >&6; }
35292          if test ! -x "$tool_specified"; then
35293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35294$as_echo "not found" >&6; }
35295            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35296          fi
35297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35298$as_echo "$tool_specified" >&6; }
35299        fi
35300      fi
35301    fi
35302
35303  fi
35304
35305
35306
35307  # Only process if variable expands to non-empty
35308
35309  if test "x$AS" != x; then
35310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35311
35312  # First separate the path from the arguments. This will split at the first
35313  # space.
35314  complete="$AS"
35315  path="${complete%% *}"
35316  tmp="$complete EOL"
35317  arguments="${tmp#* }"
35318
35319  # Input might be given as Windows format, start by converting to
35320  # unix format.
35321  new_path=`$CYGPATH -u "$path"`
35322
35323  # Now try to locate executable using which
35324  new_path=`$WHICH "$new_path" 2> /dev/null`
35325  # bat and cmd files are not always considered executable in cygwin causing which
35326  # to not find them
35327  if test "x$new_path" = x \
35328      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35329      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35330    new_path=`$CYGPATH -u "$path"`
35331  fi
35332  if test "x$new_path" = x; then
35333    # Oops. Which didn't find the executable.
35334    # The splitting of arguments from the executable at a space might have been incorrect,
35335    # since paths with space are more likely in Windows. Give it another try with the whole
35336    # argument.
35337    path="$complete"
35338    arguments="EOL"
35339    new_path=`$CYGPATH -u "$path"`
35340    new_path=`$WHICH "$new_path" 2> /dev/null`
35341    # bat and cmd files are not always considered executable in cygwin causing which
35342    # to not find them
35343    if test "x$new_path" = x \
35344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35346      new_path=`$CYGPATH -u "$path"`
35347    fi
35348    if test "x$new_path" = x; then
35349      # It's still not found. Now this is an unrecoverable error.
35350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35351$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35352      has_space=`$ECHO "$complete" | $GREP " "`
35353      if test "x$has_space" != x; then
35354        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35355$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35356      fi
35357      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35358    fi
35359  fi
35360
35361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35364  # "foo.exe" is OK but "foo" is an error.
35365  #
35366  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35367  # It is also a way to make sure we got the proper file name for the real test later on.
35368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35369  if test "x$test_shortpath" = x; then
35370    # Short path failed, file does not exist as specified.
35371    # Try adding .exe or .cmd
35372    if test -f "${new_path}.exe"; then
35373      input_to_shortpath="${new_path}.exe"
35374    elif test -f "${new_path}.cmd"; then
35375      input_to_shortpath="${new_path}.cmd"
35376    else
35377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35378$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35379      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35380$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35381      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35382    fi
35383  else
35384    input_to_shortpath="$new_path"
35385  fi
35386
35387  # Call helper function which possibly converts this using DOS-style short mode.
35388  # If so, the updated path is stored in $new_path.
35389  new_path="$input_to_shortpath"
35390
35391  input_path="$input_to_shortpath"
35392  # Check if we need to convert this using DOS-style short mode. If the path
35393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35394  # take no chances and rewrite it.
35395  # Note: m4 eats our [], so we need to use [ and ] instead.
35396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35397  if test "x$has_forbidden_chars" != x; then
35398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35402      # Going to short mode and back again did indeed matter. Since short mode is
35403      # case insensitive, let's make it lowercase to improve readability.
35404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35405      # Now convert it back to Unix-style (cygpath)
35406      input_path=`$CYGPATH -u "$shortmode_path"`
35407      new_path="$input_path"
35408    fi
35409  fi
35410
35411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35412  if test "x$test_cygdrive_prefix" = x; then
35413    # As a simple fix, exclude /usr/bin since it's not a real path.
35414    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35416      # a path prefixed by /cygdrive for fixpath to work.
35417      new_path="$CYGWIN_ROOT_PATH$input_path"
35418    fi
35419  fi
35420
35421  # remove trailing .exe if any
35422  new_path="${new_path/%.exe/}"
35423
35424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35425
35426  # First separate the path from the arguments. This will split at the first
35427  # space.
35428  complete="$AS"
35429  path="${complete%% *}"
35430  tmp="$complete EOL"
35431  arguments="${tmp#* }"
35432
35433  # Input might be given as Windows format, start by converting to
35434  # unix format.
35435  new_path="$path"
35436
35437  windows_path="$new_path"
35438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35439    unix_path=`$CYGPATH -u "$windows_path"`
35440    new_path="$unix_path"
35441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35443    new_path="$unix_path"
35444  fi
35445
35446
35447  # Now try to locate executable using which
35448  new_path=`$WHICH "$new_path" 2> /dev/null`
35449
35450  if test "x$new_path" = x; then
35451    # Oops. Which didn't find the executable.
35452    # The splitting of arguments from the executable at a space might have been incorrect,
35453    # since paths with space are more likely in Windows. Give it another try with the whole
35454    # argument.
35455    path="$complete"
35456    arguments="EOL"
35457    new_path="$path"
35458
35459  windows_path="$new_path"
35460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35461    unix_path=`$CYGPATH -u "$windows_path"`
35462    new_path="$unix_path"
35463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35465    new_path="$unix_path"
35466  fi
35467
35468
35469    new_path=`$WHICH "$new_path" 2> /dev/null`
35470    # bat and cmd files are not always considered executable in MSYS causing which
35471    # to not find them
35472    if test "x$new_path" = x \
35473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35475      new_path="$path"
35476
35477  windows_path="$new_path"
35478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35479    unix_path=`$CYGPATH -u "$windows_path"`
35480    new_path="$unix_path"
35481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35483    new_path="$unix_path"
35484  fi
35485
35486    fi
35487
35488    if test "x$new_path" = x; then
35489      # It's still not found. Now this is an unrecoverable error.
35490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35491$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35492      has_space=`$ECHO "$complete" | $GREP " "`
35493      if test "x$has_space" != x; then
35494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35496      fi
35497      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35498    fi
35499  fi
35500
35501  # Now new_path has a complete unix path to the binary
35502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35503    # Keep paths in /bin as-is, but remove trailing .exe if any
35504    new_path="${new_path/%.exe/}"
35505    # Do not save /bin paths to all_fixpath_prefixes!
35506  else
35507    # Not in mixed or Windows style, start by that.
35508    new_path=`cmd //c echo $new_path`
35509
35510  input_path="$new_path"
35511  # Check if we need to convert this using DOS-style short mode. If the path
35512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35513  # take no chances and rewrite it.
35514  # Note: m4 eats our [], so we need to use [ and ] instead.
35515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35516  if test "x$has_forbidden_chars" != x; then
35517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35519  fi
35520
35521    # Output is in $new_path
35522
35523  windows_path="$new_path"
35524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35525    unix_path=`$CYGPATH -u "$windows_path"`
35526    new_path="$unix_path"
35527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35529    new_path="$unix_path"
35530  fi
35531
35532    # remove trailing .exe if any
35533    new_path="${new_path/%.exe/}"
35534
35535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35537  fi
35538
35539    else
35540      # We're on a unix platform. Hooray! :)
35541      # First separate the path from the arguments. This will split at the first
35542      # space.
35543      complete="$AS"
35544      path="${complete%% *}"
35545      tmp="$complete EOL"
35546      arguments="${tmp#* }"
35547
35548      # Cannot rely on the command "which" here since it doesn't always work.
35549      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35550      if test -z "$is_absolute_path"; then
35551        # Path to executable is not absolute. Find it.
35552        IFS_save="$IFS"
35553        IFS=:
35554        for p in $PATH; do
35555          if test -f "$p/$path" && test -x "$p/$path"; then
35556            new_path="$p/$path"
35557            break
35558          fi
35559        done
35560        IFS="$IFS_save"
35561      else
35562        # This is an absolute path, we can use it without further modifications.
35563        new_path="$path"
35564      fi
35565
35566      if test "x$new_path" = x; then
35567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35568$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35569        has_space=`$ECHO "$complete" | $GREP " "`
35570        if test "x$has_space" != x; then
35571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35573        fi
35574        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35575      fi
35576    fi
35577
35578    # Now join together the path and the arguments once again
35579    if test "x$arguments" != xEOL; then
35580      new_complete="$new_path ${arguments% *}"
35581    else
35582      new_complete="$new_path"
35583    fi
35584
35585    if test "x$complete" != "x$new_complete"; then
35586      AS="$new_complete"
35587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35588$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35589    fi
35590  fi
35591
35592  else
35593    # FIXME: is this correct for microsoft?
35594    AS="$CC -c"
35595  fi
35596
35597
35598  #
35599  # Setup the archiver (AR)
35600  #
35601  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35602    # The corresponding ar tool is lib.exe (used to create static libraries)
35603    # Extract the first word of "lib", so it can be a program name with args.
35604set dummy lib; ac_word=$2
35605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35606$as_echo_n "checking for $ac_word... " >&6; }
35607if ${ac_cv_prog_AR+:} false; then :
35608  $as_echo_n "(cached) " >&6
35609else
35610  if test -n "$AR"; then
35611  ac_cv_prog_AR="$AR" # Let the user override the test.
35612else
35613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35614for as_dir in $PATH
35615do
35616  IFS=$as_save_IFS
35617  test -z "$as_dir" && as_dir=.
35618    for ac_exec_ext in '' $ac_executable_extensions; do
35619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35620    ac_cv_prog_AR="lib"
35621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35622    break 2
35623  fi
35624done
35625  done
35626IFS=$as_save_IFS
35627
35628fi
35629fi
35630AR=$ac_cv_prog_AR
35631if test -n "$AR"; then
35632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35633$as_echo "$AR" >&6; }
35634else
35635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35636$as_echo "no" >&6; }
35637fi
35638
35639
35640  else
35641
35642
35643  # Publish this variable in the help.
35644
35645
35646  if [ -z "${AR+x}" ]; then
35647    # The variable is not set by user, try to locate tool using the code snippet
35648    if test -n "$ac_tool_prefix"; then
35649  for ac_prog in ar
35650  do
35651    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35654$as_echo_n "checking for $ac_word... " >&6; }
35655if ${ac_cv_prog_AR+:} false; then :
35656  $as_echo_n "(cached) " >&6
35657else
35658  if test -n "$AR"; then
35659  ac_cv_prog_AR="$AR" # Let the user override the test.
35660else
35661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35662for as_dir in $PATH
35663do
35664  IFS=$as_save_IFS
35665  test -z "$as_dir" && as_dir=.
35666    for ac_exec_ext in '' $ac_executable_extensions; do
35667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35668    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35670    break 2
35671  fi
35672done
35673  done
35674IFS=$as_save_IFS
35675
35676fi
35677fi
35678AR=$ac_cv_prog_AR
35679if test -n "$AR"; then
35680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35681$as_echo "$AR" >&6; }
35682else
35683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35684$as_echo "no" >&6; }
35685fi
35686
35687
35688    test -n "$AR" && break
35689  done
35690fi
35691if test -z "$AR"; then
35692  ac_ct_AR=$AR
35693  for ac_prog in ar
35694do
35695  # Extract the first word of "$ac_prog", so it can be a program name with args.
35696set dummy $ac_prog; ac_word=$2
35697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35698$as_echo_n "checking for $ac_word... " >&6; }
35699if ${ac_cv_prog_ac_ct_AR+:} false; then :
35700  $as_echo_n "(cached) " >&6
35701else
35702  if test -n "$ac_ct_AR"; then
35703  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35704else
35705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35706for as_dir in $PATH
35707do
35708  IFS=$as_save_IFS
35709  test -z "$as_dir" && as_dir=.
35710    for ac_exec_ext in '' $ac_executable_extensions; do
35711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35712    ac_cv_prog_ac_ct_AR="$ac_prog"
35713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35714    break 2
35715  fi
35716done
35717  done
35718IFS=$as_save_IFS
35719
35720fi
35721fi
35722ac_ct_AR=$ac_cv_prog_ac_ct_AR
35723if test -n "$ac_ct_AR"; then
35724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35725$as_echo "$ac_ct_AR" >&6; }
35726else
35727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35728$as_echo "no" >&6; }
35729fi
35730
35731
35732  test -n "$ac_ct_AR" && break
35733done
35734
35735  if test "x$ac_ct_AR" = x; then
35736    AR=""
35737  else
35738    case $cross_compiling:$ac_tool_warned in
35739yes:)
35740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35742ac_tool_warned=yes ;;
35743esac
35744    AR=$ac_ct_AR
35745  fi
35746fi
35747
35748  else
35749    # The variable is set, but is it from the command line or the environment?
35750
35751    # Try to remove the string !AR! from our list.
35752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35754      # If it failed, the variable was not from the command line. Ignore it,
35755      # but warn the user (except for BASH, which is always set by the calling BASH).
35756      if test "xAR" != xBASH; then
35757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35758$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35759      fi
35760      # Try to locate tool using the code snippet
35761      if test -n "$ac_tool_prefix"; then
35762  for ac_prog in ar
35763  do
35764    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35765set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35767$as_echo_n "checking for $ac_word... " >&6; }
35768if ${ac_cv_prog_AR+:} false; then :
35769  $as_echo_n "(cached) " >&6
35770else
35771  if test -n "$AR"; then
35772  ac_cv_prog_AR="$AR" # Let the user override the test.
35773else
35774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35775for as_dir in $PATH
35776do
35777  IFS=$as_save_IFS
35778  test -z "$as_dir" && as_dir=.
35779    for ac_exec_ext in '' $ac_executable_extensions; do
35780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35781    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35783    break 2
35784  fi
35785done
35786  done
35787IFS=$as_save_IFS
35788
35789fi
35790fi
35791AR=$ac_cv_prog_AR
35792if test -n "$AR"; then
35793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35794$as_echo "$AR" >&6; }
35795else
35796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35797$as_echo "no" >&6; }
35798fi
35799
35800
35801    test -n "$AR" && break
35802  done
35803fi
35804if test -z "$AR"; then
35805  ac_ct_AR=$AR
35806  for ac_prog in ar
35807do
35808  # Extract the first word of "$ac_prog", so it can be a program name with args.
35809set dummy $ac_prog; ac_word=$2
35810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35811$as_echo_n "checking for $ac_word... " >&6; }
35812if ${ac_cv_prog_ac_ct_AR+:} false; then :
35813  $as_echo_n "(cached) " >&6
35814else
35815  if test -n "$ac_ct_AR"; then
35816  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35817else
35818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35819for as_dir in $PATH
35820do
35821  IFS=$as_save_IFS
35822  test -z "$as_dir" && as_dir=.
35823    for ac_exec_ext in '' $ac_executable_extensions; do
35824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35825    ac_cv_prog_ac_ct_AR="$ac_prog"
35826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35827    break 2
35828  fi
35829done
35830  done
35831IFS=$as_save_IFS
35832
35833fi
35834fi
35835ac_ct_AR=$ac_cv_prog_ac_ct_AR
35836if test -n "$ac_ct_AR"; then
35837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35838$as_echo "$ac_ct_AR" >&6; }
35839else
35840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35841$as_echo "no" >&6; }
35842fi
35843
35844
35845  test -n "$ac_ct_AR" && break
35846done
35847
35848  if test "x$ac_ct_AR" = x; then
35849    AR=""
35850  else
35851    case $cross_compiling:$ac_tool_warned in
35852yes:)
35853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35855ac_tool_warned=yes ;;
35856esac
35857    AR=$ac_ct_AR
35858  fi
35859fi
35860
35861    else
35862      # If it succeeded, then it was overridden by the user. We will use it
35863      # for the tool.
35864
35865      # First remove it from the list of overridden variables, so we can test
35866      # for unknown variables in the end.
35867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35868
35869      # Check if we try to supply an empty value
35870      if test "x$AR" = x; then
35871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35872$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35874$as_echo_n "checking for AR... " >&6; }
35875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35876$as_echo "disabled" >&6; }
35877      else
35878        # Check if the provided tool contains a complete path.
35879        tool_specified="$AR"
35880        tool_basename="${tool_specified##*/}"
35881        if test "x$tool_basename" = "x$tool_specified"; then
35882          # A command without a complete path is provided, search $PATH.
35883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35884$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35885          # Extract the first word of "$tool_basename", so it can be a program name with args.
35886set dummy $tool_basename; ac_word=$2
35887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35888$as_echo_n "checking for $ac_word... " >&6; }
35889if ${ac_cv_path_AR+:} false; then :
35890  $as_echo_n "(cached) " >&6
35891else
35892  case $AR in
35893  [\\/]* | ?:[\\/]*)
35894  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35895  ;;
35896  *)
35897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35898for as_dir in $PATH
35899do
35900  IFS=$as_save_IFS
35901  test -z "$as_dir" && as_dir=.
35902    for ac_exec_ext in '' $ac_executable_extensions; do
35903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35904    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35906    break 2
35907  fi
35908done
35909  done
35910IFS=$as_save_IFS
35911
35912  ;;
35913esac
35914fi
35915AR=$ac_cv_path_AR
35916if test -n "$AR"; then
35917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35918$as_echo "$AR" >&6; }
35919else
35920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35921$as_echo "no" >&6; }
35922fi
35923
35924
35925          if test "x$AR" = x; then
35926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35927          fi
35928        else
35929          # Otherwise we believe it is a complete path. Use it as it is.
35930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35931$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35933$as_echo_n "checking for AR... " >&6; }
35934          if test ! -x "$tool_specified"; then
35935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35936$as_echo "not found" >&6; }
35937            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35938          fi
35939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35940$as_echo "$tool_specified" >&6; }
35941        fi
35942      fi
35943    fi
35944
35945  fi
35946
35947
35948  fi
35949
35950  # Only process if variable expands to non-empty
35951
35952  if test "x$AR" != x; then
35953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35954
35955  # First separate the path from the arguments. This will split at the first
35956  # space.
35957  complete="$AR"
35958  path="${complete%% *}"
35959  tmp="$complete EOL"
35960  arguments="${tmp#* }"
35961
35962  # Input might be given as Windows format, start by converting to
35963  # unix format.
35964  new_path=`$CYGPATH -u "$path"`
35965
35966  # Now try to locate executable using which
35967  new_path=`$WHICH "$new_path" 2> /dev/null`
35968  # bat and cmd files are not always considered executable in cygwin causing which
35969  # to not find them
35970  if test "x$new_path" = x \
35971      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35972      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35973    new_path=`$CYGPATH -u "$path"`
35974  fi
35975  if test "x$new_path" = x; then
35976    # Oops. Which didn't find the executable.
35977    # The splitting of arguments from the executable at a space might have been incorrect,
35978    # since paths with space are more likely in Windows. Give it another try with the whole
35979    # argument.
35980    path="$complete"
35981    arguments="EOL"
35982    new_path=`$CYGPATH -u "$path"`
35983    new_path=`$WHICH "$new_path" 2> /dev/null`
35984    # bat and cmd files are not always considered executable in cygwin causing which
35985    # to not find them
35986    if test "x$new_path" = x \
35987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35989      new_path=`$CYGPATH -u "$path"`
35990    fi
35991    if test "x$new_path" = x; then
35992      # It's still not found. Now this is an unrecoverable error.
35993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
35994$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
35995      has_space=`$ECHO "$complete" | $GREP " "`
35996      if test "x$has_space" != x; then
35997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35999      fi
36000      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36001    fi
36002  fi
36003
36004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36007  # "foo.exe" is OK but "foo" is an error.
36008  #
36009  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36010  # It is also a way to make sure we got the proper file name for the real test later on.
36011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36012  if test "x$test_shortpath" = x; then
36013    # Short path failed, file does not exist as specified.
36014    # Try adding .exe or .cmd
36015    if test -f "${new_path}.exe"; then
36016      input_to_shortpath="${new_path}.exe"
36017    elif test -f "${new_path}.cmd"; then
36018      input_to_shortpath="${new_path}.cmd"
36019    else
36020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36021$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36022      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36023$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36024      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36025    fi
36026  else
36027    input_to_shortpath="$new_path"
36028  fi
36029
36030  # Call helper function which possibly converts this using DOS-style short mode.
36031  # If so, the updated path is stored in $new_path.
36032  new_path="$input_to_shortpath"
36033
36034  input_path="$input_to_shortpath"
36035  # Check if we need to convert this using DOS-style short mode. If the path
36036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36037  # take no chances and rewrite it.
36038  # Note: m4 eats our [], so we need to use [ and ] instead.
36039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36040  if test "x$has_forbidden_chars" != x; then
36041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36045      # Going to short mode and back again did indeed matter. Since short mode is
36046      # case insensitive, let's make it lowercase to improve readability.
36047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36048      # Now convert it back to Unix-style (cygpath)
36049      input_path=`$CYGPATH -u "$shortmode_path"`
36050      new_path="$input_path"
36051    fi
36052  fi
36053
36054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36055  if test "x$test_cygdrive_prefix" = x; then
36056    # As a simple fix, exclude /usr/bin since it's not a real path.
36057    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36059      # a path prefixed by /cygdrive for fixpath to work.
36060      new_path="$CYGWIN_ROOT_PATH$input_path"
36061    fi
36062  fi
36063
36064  # remove trailing .exe if any
36065  new_path="${new_path/%.exe/}"
36066
36067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36068
36069  # First separate the path from the arguments. This will split at the first
36070  # space.
36071  complete="$AR"
36072  path="${complete%% *}"
36073  tmp="$complete EOL"
36074  arguments="${tmp#* }"
36075
36076  # Input might be given as Windows format, start by converting to
36077  # unix format.
36078  new_path="$path"
36079
36080  windows_path="$new_path"
36081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36082    unix_path=`$CYGPATH -u "$windows_path"`
36083    new_path="$unix_path"
36084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36086    new_path="$unix_path"
36087  fi
36088
36089
36090  # Now try to locate executable using which
36091  new_path=`$WHICH "$new_path" 2> /dev/null`
36092
36093  if test "x$new_path" = x; then
36094    # Oops. Which didn't find the executable.
36095    # The splitting of arguments from the executable at a space might have been incorrect,
36096    # since paths with space are more likely in Windows. Give it another try with the whole
36097    # argument.
36098    path="$complete"
36099    arguments="EOL"
36100    new_path="$path"
36101
36102  windows_path="$new_path"
36103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36104    unix_path=`$CYGPATH -u "$windows_path"`
36105    new_path="$unix_path"
36106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36108    new_path="$unix_path"
36109  fi
36110
36111
36112    new_path=`$WHICH "$new_path" 2> /dev/null`
36113    # bat and cmd files are not always considered executable in MSYS causing which
36114    # to not find them
36115    if test "x$new_path" = x \
36116        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36117        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36118      new_path="$path"
36119
36120  windows_path="$new_path"
36121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36122    unix_path=`$CYGPATH -u "$windows_path"`
36123    new_path="$unix_path"
36124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36126    new_path="$unix_path"
36127  fi
36128
36129    fi
36130
36131    if test "x$new_path" = x; then
36132      # It's still not found. Now this is an unrecoverable error.
36133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36134$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36135      has_space=`$ECHO "$complete" | $GREP " "`
36136      if test "x$has_space" != x; then
36137        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36138$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36139      fi
36140      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36141    fi
36142  fi
36143
36144  # Now new_path has a complete unix path to the binary
36145  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36146    # Keep paths in /bin as-is, but remove trailing .exe if any
36147    new_path="${new_path/%.exe/}"
36148    # Do not save /bin paths to all_fixpath_prefixes!
36149  else
36150    # Not in mixed or Windows style, start by that.
36151    new_path=`cmd //c echo $new_path`
36152
36153  input_path="$new_path"
36154  # Check if we need to convert this using DOS-style short mode. If the path
36155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36156  # take no chances and rewrite it.
36157  # Note: m4 eats our [], so we need to use [ and ] instead.
36158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36159  if test "x$has_forbidden_chars" != x; then
36160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36162  fi
36163
36164    # Output is in $new_path
36165
36166  windows_path="$new_path"
36167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36168    unix_path=`$CYGPATH -u "$windows_path"`
36169    new_path="$unix_path"
36170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36172    new_path="$unix_path"
36173  fi
36174
36175    # remove trailing .exe if any
36176    new_path="${new_path/%.exe/}"
36177
36178    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36179    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36180  fi
36181
36182    else
36183      # We're on a unix platform. Hooray! :)
36184      # First separate the path from the arguments. This will split at the first
36185      # space.
36186      complete="$AR"
36187      path="${complete%% *}"
36188      tmp="$complete EOL"
36189      arguments="${tmp#* }"
36190
36191      # Cannot rely on the command "which" here since it doesn't always work.
36192      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36193      if test -z "$is_absolute_path"; then
36194        # Path to executable is not absolute. Find it.
36195        IFS_save="$IFS"
36196        IFS=:
36197        for p in $PATH; do
36198          if test -f "$p/$path" && test -x "$p/$path"; then
36199            new_path="$p/$path"
36200            break
36201          fi
36202        done
36203        IFS="$IFS_save"
36204      else
36205        # This is an absolute path, we can use it without further modifications.
36206        new_path="$path"
36207      fi
36208
36209      if test "x$new_path" = x; then
36210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36211$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36212        has_space=`$ECHO "$complete" | $GREP " "`
36213        if test "x$has_space" != x; then
36214          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36216        fi
36217        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36218      fi
36219    fi
36220
36221    # Now join together the path and the arguments once again
36222    if test "x$arguments" != xEOL; then
36223      new_complete="$new_path ${arguments% *}"
36224    else
36225      new_complete="$new_path"
36226    fi
36227
36228    if test "x$complete" != "x$new_complete"; then
36229      AR="$new_complete"
36230      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36231$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36232    fi
36233  fi
36234
36235
36236
36237  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36238
36239
36240  # Publish this variable in the help.
36241
36242
36243  if [ -z "${LIPO+x}" ]; then
36244    # The variable is not set by user, try to locate tool using the code snippet
36245    for ac_prog in lipo
36246do
36247  # Extract the first word of "$ac_prog", so it can be a program name with args.
36248set dummy $ac_prog; ac_word=$2
36249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36250$as_echo_n "checking for $ac_word... " >&6; }
36251if ${ac_cv_path_LIPO+:} false; then :
36252  $as_echo_n "(cached) " >&6
36253else
36254  case $LIPO in
36255  [\\/]* | ?:[\\/]*)
36256  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36257  ;;
36258  *)
36259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36260for as_dir in $PATH
36261do
36262  IFS=$as_save_IFS
36263  test -z "$as_dir" && as_dir=.
36264    for ac_exec_ext in '' $ac_executable_extensions; do
36265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36266    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36268    break 2
36269  fi
36270done
36271  done
36272IFS=$as_save_IFS
36273
36274  ;;
36275esac
36276fi
36277LIPO=$ac_cv_path_LIPO
36278if test -n "$LIPO"; then
36279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36280$as_echo "$LIPO" >&6; }
36281else
36282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36283$as_echo "no" >&6; }
36284fi
36285
36286
36287  test -n "$LIPO" && break
36288done
36289
36290  else
36291    # The variable is set, but is it from the command line or the environment?
36292
36293    # Try to remove the string !LIPO! from our list.
36294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36296      # If it failed, the variable was not from the command line. Ignore it,
36297      # but warn the user (except for BASH, which is always set by the calling BASH).
36298      if test "xLIPO" != xBASH; then
36299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36300$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36301      fi
36302      # Try to locate tool using the code snippet
36303      for ac_prog in lipo
36304do
36305  # Extract the first word of "$ac_prog", so it can be a program name with args.
36306set dummy $ac_prog; ac_word=$2
36307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36308$as_echo_n "checking for $ac_word... " >&6; }
36309if ${ac_cv_path_LIPO+:} false; then :
36310  $as_echo_n "(cached) " >&6
36311else
36312  case $LIPO in
36313  [\\/]* | ?:[\\/]*)
36314  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36315  ;;
36316  *)
36317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36318for as_dir in $PATH
36319do
36320  IFS=$as_save_IFS
36321  test -z "$as_dir" && as_dir=.
36322    for ac_exec_ext in '' $ac_executable_extensions; do
36323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36324    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36326    break 2
36327  fi
36328done
36329  done
36330IFS=$as_save_IFS
36331
36332  ;;
36333esac
36334fi
36335LIPO=$ac_cv_path_LIPO
36336if test -n "$LIPO"; then
36337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36338$as_echo "$LIPO" >&6; }
36339else
36340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36341$as_echo "no" >&6; }
36342fi
36343
36344
36345  test -n "$LIPO" && break
36346done
36347
36348    else
36349      # If it succeeded, then it was overridden by the user. We will use it
36350      # for the tool.
36351
36352      # First remove it from the list of overridden variables, so we can test
36353      # for unknown variables in the end.
36354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36355
36356      # Check if we try to supply an empty value
36357      if test "x$LIPO" = x; then
36358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36359$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36361$as_echo_n "checking for LIPO... " >&6; }
36362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36363$as_echo "disabled" >&6; }
36364      else
36365        # Check if the provided tool contains a complete path.
36366        tool_specified="$LIPO"
36367        tool_basename="${tool_specified##*/}"
36368        if test "x$tool_basename" = "x$tool_specified"; then
36369          # A command without a complete path is provided, search $PATH.
36370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36371$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36372          # Extract the first word of "$tool_basename", so it can be a program name with args.
36373set dummy $tool_basename; ac_word=$2
36374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36375$as_echo_n "checking for $ac_word... " >&6; }
36376if ${ac_cv_path_LIPO+:} false; then :
36377  $as_echo_n "(cached) " >&6
36378else
36379  case $LIPO in
36380  [\\/]* | ?:[\\/]*)
36381  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36382  ;;
36383  *)
36384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36385for as_dir in $PATH
36386do
36387  IFS=$as_save_IFS
36388  test -z "$as_dir" && as_dir=.
36389    for ac_exec_ext in '' $ac_executable_extensions; do
36390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36391    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36393    break 2
36394  fi
36395done
36396  done
36397IFS=$as_save_IFS
36398
36399  ;;
36400esac
36401fi
36402LIPO=$ac_cv_path_LIPO
36403if test -n "$LIPO"; then
36404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36405$as_echo "$LIPO" >&6; }
36406else
36407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36408$as_echo "no" >&6; }
36409fi
36410
36411
36412          if test "x$LIPO" = x; then
36413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36414          fi
36415        else
36416          # Otherwise we believe it is a complete path. Use it as it is.
36417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36418$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36420$as_echo_n "checking for LIPO... " >&6; }
36421          if test ! -x "$tool_specified"; then
36422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36423$as_echo "not found" >&6; }
36424            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36425          fi
36426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36427$as_echo "$tool_specified" >&6; }
36428        fi
36429      fi
36430    fi
36431
36432  fi
36433
36434
36435
36436  # Only process if variable expands to non-empty
36437
36438  if test "x$LIPO" != x; then
36439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36440
36441  # First separate the path from the arguments. This will split at the first
36442  # space.
36443  complete="$LIPO"
36444  path="${complete%% *}"
36445  tmp="$complete EOL"
36446  arguments="${tmp#* }"
36447
36448  # Input might be given as Windows format, start by converting to
36449  # unix format.
36450  new_path=`$CYGPATH -u "$path"`
36451
36452  # Now try to locate executable using which
36453  new_path=`$WHICH "$new_path" 2> /dev/null`
36454  # bat and cmd files are not always considered executable in cygwin causing which
36455  # to not find them
36456  if test "x$new_path" = x \
36457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36459    new_path=`$CYGPATH -u "$path"`
36460  fi
36461  if test "x$new_path" = x; then
36462    # Oops. Which didn't find the executable.
36463    # The splitting of arguments from the executable at a space might have been incorrect,
36464    # since paths with space are more likely in Windows. Give it another try with the whole
36465    # argument.
36466    path="$complete"
36467    arguments="EOL"
36468    new_path=`$CYGPATH -u "$path"`
36469    new_path=`$WHICH "$new_path" 2> /dev/null`
36470    # bat and cmd files are not always considered executable in cygwin causing which
36471    # to not find them
36472    if test "x$new_path" = x \
36473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36475      new_path=`$CYGPATH -u "$path"`
36476    fi
36477    if test "x$new_path" = x; then
36478      # It's still not found. Now this is an unrecoverable error.
36479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36480$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36481      has_space=`$ECHO "$complete" | $GREP " "`
36482      if test "x$has_space" != x; then
36483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36485      fi
36486      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36487    fi
36488  fi
36489
36490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36493  # "foo.exe" is OK but "foo" is an error.
36494  #
36495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36496  # It is also a way to make sure we got the proper file name for the real test later on.
36497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36498  if test "x$test_shortpath" = x; then
36499    # Short path failed, file does not exist as specified.
36500    # Try adding .exe or .cmd
36501    if test -f "${new_path}.exe"; then
36502      input_to_shortpath="${new_path}.exe"
36503    elif test -f "${new_path}.cmd"; then
36504      input_to_shortpath="${new_path}.cmd"
36505    else
36506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36507$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36510      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36511    fi
36512  else
36513    input_to_shortpath="$new_path"
36514  fi
36515
36516  # Call helper function which possibly converts this using DOS-style short mode.
36517  # If so, the updated path is stored in $new_path.
36518  new_path="$input_to_shortpath"
36519
36520  input_path="$input_to_shortpath"
36521  # Check if we need to convert this using DOS-style short mode. If the path
36522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36523  # take no chances and rewrite it.
36524  # Note: m4 eats our [], so we need to use [ and ] instead.
36525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36526  if test "x$has_forbidden_chars" != x; then
36527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36531      # Going to short mode and back again did indeed matter. Since short mode is
36532      # case insensitive, let's make it lowercase to improve readability.
36533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36534      # Now convert it back to Unix-style (cygpath)
36535      input_path=`$CYGPATH -u "$shortmode_path"`
36536      new_path="$input_path"
36537    fi
36538  fi
36539
36540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36541  if test "x$test_cygdrive_prefix" = x; then
36542    # As a simple fix, exclude /usr/bin since it's not a real path.
36543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36545      # a path prefixed by /cygdrive for fixpath to work.
36546      new_path="$CYGWIN_ROOT_PATH$input_path"
36547    fi
36548  fi
36549
36550  # remove trailing .exe if any
36551  new_path="${new_path/%.exe/}"
36552
36553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36554
36555  # First separate the path from the arguments. This will split at the first
36556  # space.
36557  complete="$LIPO"
36558  path="${complete%% *}"
36559  tmp="$complete EOL"
36560  arguments="${tmp#* }"
36561
36562  # Input might be given as Windows format, start by converting to
36563  # unix format.
36564  new_path="$path"
36565
36566  windows_path="$new_path"
36567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36568    unix_path=`$CYGPATH -u "$windows_path"`
36569    new_path="$unix_path"
36570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36572    new_path="$unix_path"
36573  fi
36574
36575
36576  # Now try to locate executable using which
36577  new_path=`$WHICH "$new_path" 2> /dev/null`
36578
36579  if test "x$new_path" = x; then
36580    # Oops. Which didn't find the executable.
36581    # The splitting of arguments from the executable at a space might have been incorrect,
36582    # since paths with space are more likely in Windows. Give it another try with the whole
36583    # argument.
36584    path="$complete"
36585    arguments="EOL"
36586    new_path="$path"
36587
36588  windows_path="$new_path"
36589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36590    unix_path=`$CYGPATH -u "$windows_path"`
36591    new_path="$unix_path"
36592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36594    new_path="$unix_path"
36595  fi
36596
36597
36598    new_path=`$WHICH "$new_path" 2> /dev/null`
36599    # bat and cmd files are not always considered executable in MSYS causing which
36600    # to not find them
36601    if test "x$new_path" = x \
36602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36604      new_path="$path"
36605
36606  windows_path="$new_path"
36607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36608    unix_path=`$CYGPATH -u "$windows_path"`
36609    new_path="$unix_path"
36610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36612    new_path="$unix_path"
36613  fi
36614
36615    fi
36616
36617    if test "x$new_path" = x; then
36618      # It's still not found. Now this is an unrecoverable error.
36619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36620$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36621      has_space=`$ECHO "$complete" | $GREP " "`
36622      if test "x$has_space" != x; then
36623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36625      fi
36626      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36627    fi
36628  fi
36629
36630  # Now new_path has a complete unix path to the binary
36631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36632    # Keep paths in /bin as-is, but remove trailing .exe if any
36633    new_path="${new_path/%.exe/}"
36634    # Do not save /bin paths to all_fixpath_prefixes!
36635  else
36636    # Not in mixed or Windows style, start by that.
36637    new_path=`cmd //c echo $new_path`
36638
36639  input_path="$new_path"
36640  # Check if we need to convert this using DOS-style short mode. If the path
36641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36642  # take no chances and rewrite it.
36643  # Note: m4 eats our [], so we need to use [ and ] instead.
36644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36645  if test "x$has_forbidden_chars" != x; then
36646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36648  fi
36649
36650    # Output is in $new_path
36651
36652  windows_path="$new_path"
36653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36654    unix_path=`$CYGPATH -u "$windows_path"`
36655    new_path="$unix_path"
36656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36658    new_path="$unix_path"
36659  fi
36660
36661    # remove trailing .exe if any
36662    new_path="${new_path/%.exe/}"
36663
36664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36666  fi
36667
36668    else
36669      # We're on a unix platform. Hooray! :)
36670      # First separate the path from the arguments. This will split at the first
36671      # space.
36672      complete="$LIPO"
36673      path="${complete%% *}"
36674      tmp="$complete EOL"
36675      arguments="${tmp#* }"
36676
36677      # Cannot rely on the command "which" here since it doesn't always work.
36678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36679      if test -z "$is_absolute_path"; then
36680        # Path to executable is not absolute. Find it.
36681        IFS_save="$IFS"
36682        IFS=:
36683        for p in $PATH; do
36684          if test -f "$p/$path" && test -x "$p/$path"; then
36685            new_path="$p/$path"
36686            break
36687          fi
36688        done
36689        IFS="$IFS_save"
36690      else
36691        # This is an absolute path, we can use it without further modifications.
36692        new_path="$path"
36693      fi
36694
36695      if test "x$new_path" = x; then
36696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36697$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36698        has_space=`$ECHO "$complete" | $GREP " "`
36699        if test "x$has_space" != x; then
36700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36702        fi
36703        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36704      fi
36705    fi
36706
36707    # Now join together the path and the arguments once again
36708    if test "x$arguments" != xEOL; then
36709      new_complete="$new_path ${arguments% *}"
36710    else
36711      new_complete="$new_path"
36712    fi
36713
36714    if test "x$complete" != "x$new_complete"; then
36715      LIPO="$new_complete"
36716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
36717$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
36718    fi
36719  fi
36720
36721  fi
36722
36723  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36724    # Extract the first word of "mt", so it can be a program name with args.
36725set dummy mt; ac_word=$2
36726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36727$as_echo_n "checking for $ac_word... " >&6; }
36728if ${ac_cv_prog_MT+:} false; then :
36729  $as_echo_n "(cached) " >&6
36730else
36731  if test -n "$MT"; then
36732  ac_cv_prog_MT="$MT" # Let the user override the test.
36733else
36734  ac_prog_rejected=no
36735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36736for as_dir in $PATH
36737do
36738  IFS=$as_save_IFS
36739  test -z "$as_dir" && as_dir=.
36740    for ac_exec_ext in '' $ac_executable_extensions; do
36741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36742    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
36743       ac_prog_rejected=yes
36744       continue
36745     fi
36746    ac_cv_prog_MT="mt"
36747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36748    break 2
36749  fi
36750done
36751  done
36752IFS=$as_save_IFS
36753
36754if test $ac_prog_rejected = yes; then
36755  # We found a bogon in the path, so make sure we never use it.
36756  set dummy $ac_cv_prog_MT
36757  shift
36758  if test $# != 0; then
36759    # We chose a different compiler from the bogus one.
36760    # However, it has the same basename, so the bogon will be chosen
36761    # first if we set MT to just the basename; use the full file name.
36762    shift
36763    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
36764  fi
36765fi
36766fi
36767fi
36768MT=$ac_cv_prog_MT
36769if test -n "$MT"; then
36770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
36771$as_echo "$MT" >&6; }
36772else
36773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36774$as_echo "no" >&6; }
36775fi
36776
36777
36778
36779  # Only process if variable expands to non-empty
36780
36781  if test "x$MT" != x; then
36782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36783
36784  # First separate the path from the arguments. This will split at the first
36785  # space.
36786  complete="$MT"
36787  path="${complete%% *}"
36788  tmp="$complete EOL"
36789  arguments="${tmp#* }"
36790
36791  # Input might be given as Windows format, start by converting to
36792  # unix format.
36793  new_path=`$CYGPATH -u "$path"`
36794
36795  # Now try to locate executable using which
36796  new_path=`$WHICH "$new_path" 2> /dev/null`
36797  # bat and cmd files are not always considered executable in cygwin causing which
36798  # to not find them
36799  if test "x$new_path" = x \
36800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36802    new_path=`$CYGPATH -u "$path"`
36803  fi
36804  if test "x$new_path" = x; then
36805    # Oops. Which didn't find the executable.
36806    # The splitting of arguments from the executable at a space might have been incorrect,
36807    # since paths with space are more likely in Windows. Give it another try with the whole
36808    # argument.
36809    path="$complete"
36810    arguments="EOL"
36811    new_path=`$CYGPATH -u "$path"`
36812    new_path=`$WHICH "$new_path" 2> /dev/null`
36813    # bat and cmd files are not always considered executable in cygwin causing which
36814    # to not find them
36815    if test "x$new_path" = x \
36816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36818      new_path=`$CYGPATH -u "$path"`
36819    fi
36820    if test "x$new_path" = x; then
36821      # It's still not found. Now this is an unrecoverable error.
36822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36823$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
36824      has_space=`$ECHO "$complete" | $GREP " "`
36825      if test "x$has_space" != x; then
36826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36828      fi
36829      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36830    fi
36831  fi
36832
36833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36836  # "foo.exe" is OK but "foo" is an error.
36837  #
36838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36839  # It is also a way to make sure we got the proper file name for the real test later on.
36840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36841  if test "x$test_shortpath" = x; then
36842    # Short path failed, file does not exist as specified.
36843    # Try adding .exe or .cmd
36844    if test -f "${new_path}.exe"; then
36845      input_to_shortpath="${new_path}.exe"
36846    elif test -f "${new_path}.cmd"; then
36847      input_to_shortpath="${new_path}.cmd"
36848    else
36849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
36850$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
36851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36853      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36854    fi
36855  else
36856    input_to_shortpath="$new_path"
36857  fi
36858
36859  # Call helper function which possibly converts this using DOS-style short mode.
36860  # If so, the updated path is stored in $new_path.
36861  new_path="$input_to_shortpath"
36862
36863  input_path="$input_to_shortpath"
36864  # Check if we need to convert this using DOS-style short mode. If the path
36865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36866  # take no chances and rewrite it.
36867  # Note: m4 eats our [], so we need to use [ and ] instead.
36868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36869  if test "x$has_forbidden_chars" != x; then
36870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36874      # Going to short mode and back again did indeed matter. Since short mode is
36875      # case insensitive, let's make it lowercase to improve readability.
36876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36877      # Now convert it back to Unix-style (cygpath)
36878      input_path=`$CYGPATH -u "$shortmode_path"`
36879      new_path="$input_path"
36880    fi
36881  fi
36882
36883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36884  if test "x$test_cygdrive_prefix" = x; then
36885    # As a simple fix, exclude /usr/bin since it's not a real path.
36886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36888      # a path prefixed by /cygdrive for fixpath to work.
36889      new_path="$CYGWIN_ROOT_PATH$input_path"
36890    fi
36891  fi
36892
36893  # remove trailing .exe if any
36894  new_path="${new_path/%.exe/}"
36895
36896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36897
36898  # First separate the path from the arguments. This will split at the first
36899  # space.
36900  complete="$MT"
36901  path="${complete%% *}"
36902  tmp="$complete EOL"
36903  arguments="${tmp#* }"
36904
36905  # Input might be given as Windows format, start by converting to
36906  # unix format.
36907  new_path="$path"
36908
36909  windows_path="$new_path"
36910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36911    unix_path=`$CYGPATH -u "$windows_path"`
36912    new_path="$unix_path"
36913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36915    new_path="$unix_path"
36916  fi
36917
36918
36919  # Now try to locate executable using which
36920  new_path=`$WHICH "$new_path" 2> /dev/null`
36921
36922  if test "x$new_path" = x; then
36923    # Oops. Which didn't find the executable.
36924    # The splitting of arguments from the executable at a space might have been incorrect,
36925    # since paths with space are more likely in Windows. Give it another try with the whole
36926    # argument.
36927    path="$complete"
36928    arguments="EOL"
36929    new_path="$path"
36930
36931  windows_path="$new_path"
36932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36933    unix_path=`$CYGPATH -u "$windows_path"`
36934    new_path="$unix_path"
36935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36937    new_path="$unix_path"
36938  fi
36939
36940
36941    new_path=`$WHICH "$new_path" 2> /dev/null`
36942    # bat and cmd files are not always considered executable in MSYS causing which
36943    # to not find them
36944    if test "x$new_path" = x \
36945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36947      new_path="$path"
36948
36949  windows_path="$new_path"
36950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36951    unix_path=`$CYGPATH -u "$windows_path"`
36952    new_path="$unix_path"
36953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36955    new_path="$unix_path"
36956  fi
36957
36958    fi
36959
36960    if test "x$new_path" = x; then
36961      # It's still not found. Now this is an unrecoverable error.
36962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
36963$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
36964      has_space=`$ECHO "$complete" | $GREP " "`
36965      if test "x$has_space" != x; then
36966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36968      fi
36969      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
36970    fi
36971  fi
36972
36973  # Now new_path has a complete unix path to the binary
36974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36975    # Keep paths in /bin as-is, but remove trailing .exe if any
36976    new_path="${new_path/%.exe/}"
36977    # Do not save /bin paths to all_fixpath_prefixes!
36978  else
36979    # Not in mixed or Windows style, start by that.
36980    new_path=`cmd //c echo $new_path`
36981
36982  input_path="$new_path"
36983  # Check if we need to convert this using DOS-style short mode. If the path
36984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36985  # take no chances and rewrite it.
36986  # Note: m4 eats our [], so we need to use [ and ] instead.
36987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36988  if test "x$has_forbidden_chars" != x; then
36989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36991  fi
36992
36993    # Output is in $new_path
36994
36995  windows_path="$new_path"
36996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36997    unix_path=`$CYGPATH -u "$windows_path"`
36998    new_path="$unix_path"
36999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37001    new_path="$unix_path"
37002  fi
37003
37004    # remove trailing .exe if any
37005    new_path="${new_path/%.exe/}"
37006
37007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37009  fi
37010
37011    else
37012      # We're on a unix platform. Hooray! :)
37013      # First separate the path from the arguments. This will split at the first
37014      # space.
37015      complete="$MT"
37016      path="${complete%% *}"
37017      tmp="$complete EOL"
37018      arguments="${tmp#* }"
37019
37020      # Cannot rely on the command "which" here since it doesn't always work.
37021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37022      if test -z "$is_absolute_path"; then
37023        # Path to executable is not absolute. Find it.
37024        IFS_save="$IFS"
37025        IFS=:
37026        for p in $PATH; do
37027          if test -f "$p/$path" && test -x "$p/$path"; then
37028            new_path="$p/$path"
37029            break
37030          fi
37031        done
37032        IFS="$IFS_save"
37033      else
37034        # This is an absolute path, we can use it without further modifications.
37035        new_path="$path"
37036      fi
37037
37038      if test "x$new_path" = x; then
37039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37040$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37041        has_space=`$ECHO "$complete" | $GREP " "`
37042        if test "x$has_space" != x; then
37043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37045        fi
37046        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37047      fi
37048    fi
37049
37050    # Now join together the path and the arguments once again
37051    if test "x$arguments" != xEOL; then
37052      new_complete="$new_path ${arguments% *}"
37053    else
37054      new_complete="$new_path"
37055    fi
37056
37057    if test "x$complete" != "x$new_complete"; then
37058      MT="$new_complete"
37059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37060$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37061    fi
37062  fi
37063
37064    # Setup the resource compiler (RC)
37065    # Extract the first word of "rc", so it can be a program name with args.
37066set dummy rc; ac_word=$2
37067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37068$as_echo_n "checking for $ac_word... " >&6; }
37069if ${ac_cv_prog_RC+:} false; then :
37070  $as_echo_n "(cached) " >&6
37071else
37072  if test -n "$RC"; then
37073  ac_cv_prog_RC="$RC" # Let the user override the test.
37074else
37075  ac_prog_rejected=no
37076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37077for as_dir in $PATH
37078do
37079  IFS=$as_save_IFS
37080  test -z "$as_dir" && as_dir=.
37081    for ac_exec_ext in '' $ac_executable_extensions; do
37082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37083    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37084       ac_prog_rejected=yes
37085       continue
37086     fi
37087    ac_cv_prog_RC="rc"
37088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37089    break 2
37090  fi
37091done
37092  done
37093IFS=$as_save_IFS
37094
37095if test $ac_prog_rejected = yes; then
37096  # We found a bogon in the path, so make sure we never use it.
37097  set dummy $ac_cv_prog_RC
37098  shift
37099  if test $# != 0; then
37100    # We chose a different compiler from the bogus one.
37101    # However, it has the same basename, so the bogon will be chosen
37102    # first if we set RC to just the basename; use the full file name.
37103    shift
37104    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37105  fi
37106fi
37107fi
37108fi
37109RC=$ac_cv_prog_RC
37110if test -n "$RC"; then
37111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37112$as_echo "$RC" >&6; }
37113else
37114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37115$as_echo "no" >&6; }
37116fi
37117
37118
37119
37120  # Only process if variable expands to non-empty
37121
37122  if test "x$RC" != x; then
37123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37124
37125  # First separate the path from the arguments. This will split at the first
37126  # space.
37127  complete="$RC"
37128  path="${complete%% *}"
37129  tmp="$complete EOL"
37130  arguments="${tmp#* }"
37131
37132  # Input might be given as Windows format, start by converting to
37133  # unix format.
37134  new_path=`$CYGPATH -u "$path"`
37135
37136  # Now try to locate executable using which
37137  new_path=`$WHICH "$new_path" 2> /dev/null`
37138  # bat and cmd files are not always considered executable in cygwin causing which
37139  # to not find them
37140  if test "x$new_path" = x \
37141      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37142      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37143    new_path=`$CYGPATH -u "$path"`
37144  fi
37145  if test "x$new_path" = x; then
37146    # Oops. Which didn't find the executable.
37147    # The splitting of arguments from the executable at a space might have been incorrect,
37148    # since paths with space are more likely in Windows. Give it another try with the whole
37149    # argument.
37150    path="$complete"
37151    arguments="EOL"
37152    new_path=`$CYGPATH -u "$path"`
37153    new_path=`$WHICH "$new_path" 2> /dev/null`
37154    # bat and cmd files are not always considered executable in cygwin causing which
37155    # to not find them
37156    if test "x$new_path" = x \
37157        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37158        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37159      new_path=`$CYGPATH -u "$path"`
37160    fi
37161    if test "x$new_path" = x; then
37162      # It's still not found. Now this is an unrecoverable error.
37163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37164$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37165      has_space=`$ECHO "$complete" | $GREP " "`
37166      if test "x$has_space" != x; then
37167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37169      fi
37170      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37171    fi
37172  fi
37173
37174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37177  # "foo.exe" is OK but "foo" is an error.
37178  #
37179  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37180  # It is also a way to make sure we got the proper file name for the real test later on.
37181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37182  if test "x$test_shortpath" = x; then
37183    # Short path failed, file does not exist as specified.
37184    # Try adding .exe or .cmd
37185    if test -f "${new_path}.exe"; then
37186      input_to_shortpath="${new_path}.exe"
37187    elif test -f "${new_path}.cmd"; then
37188      input_to_shortpath="${new_path}.cmd"
37189    else
37190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37191$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37194      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37195    fi
37196  else
37197    input_to_shortpath="$new_path"
37198  fi
37199
37200  # Call helper function which possibly converts this using DOS-style short mode.
37201  # If so, the updated path is stored in $new_path.
37202  new_path="$input_to_shortpath"
37203
37204  input_path="$input_to_shortpath"
37205  # Check if we need to convert this using DOS-style short mode. If the path
37206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37207  # take no chances and rewrite it.
37208  # Note: m4 eats our [], so we need to use [ and ] instead.
37209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37210  if test "x$has_forbidden_chars" != x; then
37211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37215      # Going to short mode and back again did indeed matter. Since short mode is
37216      # case insensitive, let's make it lowercase to improve readability.
37217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37218      # Now convert it back to Unix-style (cygpath)
37219      input_path=`$CYGPATH -u "$shortmode_path"`
37220      new_path="$input_path"
37221    fi
37222  fi
37223
37224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37225  if test "x$test_cygdrive_prefix" = x; then
37226    # As a simple fix, exclude /usr/bin since it's not a real path.
37227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37229      # a path prefixed by /cygdrive for fixpath to work.
37230      new_path="$CYGWIN_ROOT_PATH$input_path"
37231    fi
37232  fi
37233
37234  # remove trailing .exe if any
37235  new_path="${new_path/%.exe/}"
37236
37237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37238
37239  # First separate the path from the arguments. This will split at the first
37240  # space.
37241  complete="$RC"
37242  path="${complete%% *}"
37243  tmp="$complete EOL"
37244  arguments="${tmp#* }"
37245
37246  # Input might be given as Windows format, start by converting to
37247  # unix format.
37248  new_path="$path"
37249
37250  windows_path="$new_path"
37251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37252    unix_path=`$CYGPATH -u "$windows_path"`
37253    new_path="$unix_path"
37254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37256    new_path="$unix_path"
37257  fi
37258
37259
37260  # Now try to locate executable using which
37261  new_path=`$WHICH "$new_path" 2> /dev/null`
37262
37263  if test "x$new_path" = x; then
37264    # Oops. Which didn't find the executable.
37265    # The splitting of arguments from the executable at a space might have been incorrect,
37266    # since paths with space are more likely in Windows. Give it another try with the whole
37267    # argument.
37268    path="$complete"
37269    arguments="EOL"
37270    new_path="$path"
37271
37272  windows_path="$new_path"
37273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37274    unix_path=`$CYGPATH -u "$windows_path"`
37275    new_path="$unix_path"
37276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37278    new_path="$unix_path"
37279  fi
37280
37281
37282    new_path=`$WHICH "$new_path" 2> /dev/null`
37283    # bat and cmd files are not always considered executable in MSYS causing which
37284    # to not find them
37285    if test "x$new_path" = x \
37286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37288      new_path="$path"
37289
37290  windows_path="$new_path"
37291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37292    unix_path=`$CYGPATH -u "$windows_path"`
37293    new_path="$unix_path"
37294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37296    new_path="$unix_path"
37297  fi
37298
37299    fi
37300
37301    if test "x$new_path" = x; then
37302      # It's still not found. Now this is an unrecoverable error.
37303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37304$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37305      has_space=`$ECHO "$complete" | $GREP " "`
37306      if test "x$has_space" != x; then
37307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37309      fi
37310      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37311    fi
37312  fi
37313
37314  # Now new_path has a complete unix path to the binary
37315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37316    # Keep paths in /bin as-is, but remove trailing .exe if any
37317    new_path="${new_path/%.exe/}"
37318    # Do not save /bin paths to all_fixpath_prefixes!
37319  else
37320    # Not in mixed or Windows style, start by that.
37321    new_path=`cmd //c echo $new_path`
37322
37323  input_path="$new_path"
37324  # Check if we need to convert this using DOS-style short mode. If the path
37325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37326  # take no chances and rewrite it.
37327  # Note: m4 eats our [], so we need to use [ and ] instead.
37328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37329  if test "x$has_forbidden_chars" != x; then
37330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37332  fi
37333
37334    # Output is in $new_path
37335
37336  windows_path="$new_path"
37337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37338    unix_path=`$CYGPATH -u "$windows_path"`
37339    new_path="$unix_path"
37340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37342    new_path="$unix_path"
37343  fi
37344
37345    # remove trailing .exe if any
37346    new_path="${new_path/%.exe/}"
37347
37348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37350  fi
37351
37352    else
37353      # We're on a unix platform. Hooray! :)
37354      # First separate the path from the arguments. This will split at the first
37355      # space.
37356      complete="$RC"
37357      path="${complete%% *}"
37358      tmp="$complete EOL"
37359      arguments="${tmp#* }"
37360
37361      # Cannot rely on the command "which" here since it doesn't always work.
37362      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37363      if test -z "$is_absolute_path"; then
37364        # Path to executable is not absolute. Find it.
37365        IFS_save="$IFS"
37366        IFS=:
37367        for p in $PATH; do
37368          if test -f "$p/$path" && test -x "$p/$path"; then
37369            new_path="$p/$path"
37370            break
37371          fi
37372        done
37373        IFS="$IFS_save"
37374      else
37375        # This is an absolute path, we can use it without further modifications.
37376        new_path="$path"
37377      fi
37378
37379      if test "x$new_path" = x; then
37380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37381$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37382        has_space=`$ECHO "$complete" | $GREP " "`
37383        if test "x$has_space" != x; then
37384          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37385$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37386        fi
37387        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37388      fi
37389    fi
37390
37391    # Now join together the path and the arguments once again
37392    if test "x$arguments" != xEOL; then
37393      new_complete="$new_path ${arguments% *}"
37394    else
37395      new_complete="$new_path"
37396    fi
37397
37398    if test "x$complete" != "x$new_complete"; then
37399      RC="$new_complete"
37400      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37401$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37402    fi
37403  fi
37404
37405    # Extract the first word of "dumpbin", so it can be a program name with args.
37406set dummy dumpbin; ac_word=$2
37407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37408$as_echo_n "checking for $ac_word... " >&6; }
37409if ${ac_cv_prog_DUMPBIN+:} false; then :
37410  $as_echo_n "(cached) " >&6
37411else
37412  if test -n "$DUMPBIN"; then
37413  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37414else
37415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37416for as_dir in $PATH
37417do
37418  IFS=$as_save_IFS
37419  test -z "$as_dir" && as_dir=.
37420    for ac_exec_ext in '' $ac_executable_extensions; do
37421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37422    ac_cv_prog_DUMPBIN="dumpbin"
37423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37424    break 2
37425  fi
37426done
37427  done
37428IFS=$as_save_IFS
37429
37430fi
37431fi
37432DUMPBIN=$ac_cv_prog_DUMPBIN
37433if test -n "$DUMPBIN"; then
37434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37435$as_echo "$DUMPBIN" >&6; }
37436else
37437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37438$as_echo "no" >&6; }
37439fi
37440
37441
37442
37443  # Only process if variable expands to non-empty
37444
37445  if test "x$DUMPBIN" != x; then
37446    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37447
37448  # First separate the path from the arguments. This will split at the first
37449  # space.
37450  complete="$DUMPBIN"
37451  path="${complete%% *}"
37452  tmp="$complete EOL"
37453  arguments="${tmp#* }"
37454
37455  # Input might be given as Windows format, start by converting to
37456  # unix format.
37457  new_path=`$CYGPATH -u "$path"`
37458
37459  # Now try to locate executable using which
37460  new_path=`$WHICH "$new_path" 2> /dev/null`
37461  # bat and cmd files are not always considered executable in cygwin causing which
37462  # to not find them
37463  if test "x$new_path" = x \
37464      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37465      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37466    new_path=`$CYGPATH -u "$path"`
37467  fi
37468  if test "x$new_path" = x; then
37469    # Oops. Which didn't find the executable.
37470    # The splitting of arguments from the executable at a space might have been incorrect,
37471    # since paths with space are more likely in Windows. Give it another try with the whole
37472    # argument.
37473    path="$complete"
37474    arguments="EOL"
37475    new_path=`$CYGPATH -u "$path"`
37476    new_path=`$WHICH "$new_path" 2> /dev/null`
37477    # bat and cmd files are not always considered executable in cygwin causing which
37478    # to not find them
37479    if test "x$new_path" = x \
37480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37482      new_path=`$CYGPATH -u "$path"`
37483    fi
37484    if test "x$new_path" = x; then
37485      # It's still not found. Now this is an unrecoverable error.
37486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37487$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37488      has_space=`$ECHO "$complete" | $GREP " "`
37489      if test "x$has_space" != x; then
37490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37492      fi
37493      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37494    fi
37495  fi
37496
37497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37500  # "foo.exe" is OK but "foo" is an error.
37501  #
37502  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37503  # It is also a way to make sure we got the proper file name for the real test later on.
37504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37505  if test "x$test_shortpath" = x; then
37506    # Short path failed, file does not exist as specified.
37507    # Try adding .exe or .cmd
37508    if test -f "${new_path}.exe"; then
37509      input_to_shortpath="${new_path}.exe"
37510    elif test -f "${new_path}.cmd"; then
37511      input_to_shortpath="${new_path}.cmd"
37512    else
37513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37514$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37515      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37516$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37517      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37518    fi
37519  else
37520    input_to_shortpath="$new_path"
37521  fi
37522
37523  # Call helper function which possibly converts this using DOS-style short mode.
37524  # If so, the updated path is stored in $new_path.
37525  new_path="$input_to_shortpath"
37526
37527  input_path="$input_to_shortpath"
37528  # Check if we need to convert this using DOS-style short mode. If the path
37529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37530  # take no chances and rewrite it.
37531  # Note: m4 eats our [], so we need to use [ and ] instead.
37532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37533  if test "x$has_forbidden_chars" != x; then
37534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37538      # Going to short mode and back again did indeed matter. Since short mode is
37539      # case insensitive, let's make it lowercase to improve readability.
37540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37541      # Now convert it back to Unix-style (cygpath)
37542      input_path=`$CYGPATH -u "$shortmode_path"`
37543      new_path="$input_path"
37544    fi
37545  fi
37546
37547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37548  if test "x$test_cygdrive_prefix" = x; then
37549    # As a simple fix, exclude /usr/bin since it's not a real path.
37550    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37552      # a path prefixed by /cygdrive for fixpath to work.
37553      new_path="$CYGWIN_ROOT_PATH$input_path"
37554    fi
37555  fi
37556
37557  # remove trailing .exe if any
37558  new_path="${new_path/%.exe/}"
37559
37560    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37561
37562  # First separate the path from the arguments. This will split at the first
37563  # space.
37564  complete="$DUMPBIN"
37565  path="${complete%% *}"
37566  tmp="$complete EOL"
37567  arguments="${tmp#* }"
37568
37569  # Input might be given as Windows format, start by converting to
37570  # unix format.
37571  new_path="$path"
37572
37573  windows_path="$new_path"
37574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37575    unix_path=`$CYGPATH -u "$windows_path"`
37576    new_path="$unix_path"
37577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37579    new_path="$unix_path"
37580  fi
37581
37582
37583  # Now try to locate executable using which
37584  new_path=`$WHICH "$new_path" 2> /dev/null`
37585
37586  if test "x$new_path" = x; then
37587    # Oops. Which didn't find the executable.
37588    # The splitting of arguments from the executable at a space might have been incorrect,
37589    # since paths with space are more likely in Windows. Give it another try with the whole
37590    # argument.
37591    path="$complete"
37592    arguments="EOL"
37593    new_path="$path"
37594
37595  windows_path="$new_path"
37596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37597    unix_path=`$CYGPATH -u "$windows_path"`
37598    new_path="$unix_path"
37599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37601    new_path="$unix_path"
37602  fi
37603
37604
37605    new_path=`$WHICH "$new_path" 2> /dev/null`
37606    # bat and cmd files are not always considered executable in MSYS causing which
37607    # to not find them
37608    if test "x$new_path" = x \
37609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37611      new_path="$path"
37612
37613  windows_path="$new_path"
37614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37615    unix_path=`$CYGPATH -u "$windows_path"`
37616    new_path="$unix_path"
37617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37619    new_path="$unix_path"
37620  fi
37621
37622    fi
37623
37624    if test "x$new_path" = x; then
37625      # It's still not found. Now this is an unrecoverable error.
37626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37627$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37628      has_space=`$ECHO "$complete" | $GREP " "`
37629      if test "x$has_space" != x; then
37630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37632      fi
37633      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37634    fi
37635  fi
37636
37637  # Now new_path has a complete unix path to the binary
37638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37639    # Keep paths in /bin as-is, but remove trailing .exe if any
37640    new_path="${new_path/%.exe/}"
37641    # Do not save /bin paths to all_fixpath_prefixes!
37642  else
37643    # Not in mixed or Windows style, start by that.
37644    new_path=`cmd //c echo $new_path`
37645
37646  input_path="$new_path"
37647  # Check if we need to convert this using DOS-style short mode. If the path
37648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37649  # take no chances and rewrite it.
37650  # Note: m4 eats our [], so we need to use [ and ] instead.
37651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37652  if test "x$has_forbidden_chars" != x; then
37653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37655  fi
37656
37657    # Output is in $new_path
37658
37659  windows_path="$new_path"
37660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37661    unix_path=`$CYGPATH -u "$windows_path"`
37662    new_path="$unix_path"
37663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37665    new_path="$unix_path"
37666  fi
37667
37668    # remove trailing .exe if any
37669    new_path="${new_path/%.exe/}"
37670
37671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37673  fi
37674
37675    else
37676      # We're on a unix platform. Hooray! :)
37677      # First separate the path from the arguments. This will split at the first
37678      # space.
37679      complete="$DUMPBIN"
37680      path="${complete%% *}"
37681      tmp="$complete EOL"
37682      arguments="${tmp#* }"
37683
37684      # Cannot rely on the command "which" here since it doesn't always work.
37685      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37686      if test -z "$is_absolute_path"; then
37687        # Path to executable is not absolute. Find it.
37688        IFS_save="$IFS"
37689        IFS=:
37690        for p in $PATH; do
37691          if test -f "$p/$path" && test -x "$p/$path"; then
37692            new_path="$p/$path"
37693            break
37694          fi
37695        done
37696        IFS="$IFS_save"
37697      else
37698        # This is an absolute path, we can use it without further modifications.
37699        new_path="$path"
37700      fi
37701
37702      if test "x$new_path" = x; then
37703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37704$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37705        has_space=`$ECHO "$complete" | $GREP " "`
37706        if test "x$has_space" != x; then
37707          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37709        fi
37710        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37711      fi
37712    fi
37713
37714    # Now join together the path and the arguments once again
37715    if test "x$arguments" != xEOL; then
37716      new_complete="$new_path ${arguments% *}"
37717    else
37718      new_complete="$new_path"
37719    fi
37720
37721    if test "x$complete" != "x$new_complete"; then
37722      DUMPBIN="$new_complete"
37723      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
37724$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
37725    fi
37726  fi
37727
37728    # We need to check for 'msbuild.exe' because at the place where we expect to
37729    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
37730    # won't find the 'msbuild.exe' executable in that case (and the
37731    # 'ac_executable_extensions' is unusable due to performance reasons).
37732    # Notice that we intentionally don't fix up the path to MSBUILD because we
37733    # will call it in a DOS shell during freetype detection on Windows (see
37734    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
37735    # Extract the first word of "msbuild.exe", so it can be a program name with args.
37736set dummy msbuild.exe; ac_word=$2
37737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37738$as_echo_n "checking for $ac_word... " >&6; }
37739if ${ac_cv_prog_MSBUILD+:} false; then :
37740  $as_echo_n "(cached) " >&6
37741else
37742  if test -n "$MSBUILD"; then
37743  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
37744else
37745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37746for as_dir in $PATH
37747do
37748  IFS=$as_save_IFS
37749  test -z "$as_dir" && as_dir=.
37750    for ac_exec_ext in '' $ac_executable_extensions; do
37751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37752    ac_cv_prog_MSBUILD="msbuild.exe"
37753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37754    break 2
37755  fi
37756done
37757  done
37758IFS=$as_save_IFS
37759
37760fi
37761fi
37762MSBUILD=$ac_cv_prog_MSBUILD
37763if test -n "$MSBUILD"; then
37764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
37765$as_echo "$MSBUILD" >&6; }
37766else
37767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37768$as_echo "no" >&6; }
37769fi
37770
37771
37772  fi
37773
37774  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37775
37776
37777  # Publish this variable in the help.
37778
37779
37780  if [ -z "${STRIP+x}" ]; then
37781    # The variable is not set by user, try to locate tool using the code snippet
37782    for ac_prog in strip
37783do
37784  # Extract the first word of "$ac_prog", so it can be a program name with args.
37785set dummy $ac_prog; ac_word=$2
37786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37787$as_echo_n "checking for $ac_word... " >&6; }
37788if ${ac_cv_path_STRIP+:} false; then :
37789  $as_echo_n "(cached) " >&6
37790else
37791  case $STRIP in
37792  [\\/]* | ?:[\\/]*)
37793  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37794  ;;
37795  *)
37796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37797for as_dir in $PATH
37798do
37799  IFS=$as_save_IFS
37800  test -z "$as_dir" && as_dir=.
37801    for ac_exec_ext in '' $ac_executable_extensions; do
37802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37803    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37805    break 2
37806  fi
37807done
37808  done
37809IFS=$as_save_IFS
37810
37811  ;;
37812esac
37813fi
37814STRIP=$ac_cv_path_STRIP
37815if test -n "$STRIP"; then
37816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37817$as_echo "$STRIP" >&6; }
37818else
37819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37820$as_echo "no" >&6; }
37821fi
37822
37823
37824  test -n "$STRIP" && break
37825done
37826
37827  else
37828    # The variable is set, but is it from the command line or the environment?
37829
37830    # Try to remove the string !STRIP! from our list.
37831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37833      # If it failed, the variable was not from the command line. Ignore it,
37834      # but warn the user (except for BASH, which is always set by the calling BASH).
37835      if test "xSTRIP" != xBASH; then
37836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37837$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37838      fi
37839      # Try to locate tool using the code snippet
37840      for ac_prog in strip
37841do
37842  # Extract the first word of "$ac_prog", so it can be a program name with args.
37843set dummy $ac_prog; ac_word=$2
37844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37845$as_echo_n "checking for $ac_word... " >&6; }
37846if ${ac_cv_path_STRIP+:} false; then :
37847  $as_echo_n "(cached) " >&6
37848else
37849  case $STRIP in
37850  [\\/]* | ?:[\\/]*)
37851  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37852  ;;
37853  *)
37854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37855for as_dir in $PATH
37856do
37857  IFS=$as_save_IFS
37858  test -z "$as_dir" && as_dir=.
37859    for ac_exec_ext in '' $ac_executable_extensions; do
37860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37861    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37863    break 2
37864  fi
37865done
37866  done
37867IFS=$as_save_IFS
37868
37869  ;;
37870esac
37871fi
37872STRIP=$ac_cv_path_STRIP
37873if test -n "$STRIP"; then
37874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37875$as_echo "$STRIP" >&6; }
37876else
37877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37878$as_echo "no" >&6; }
37879fi
37880
37881
37882  test -n "$STRIP" && break
37883done
37884
37885    else
37886      # If it succeeded, then it was overridden by the user. We will use it
37887      # for the tool.
37888
37889      # First remove it from the list of overridden variables, so we can test
37890      # for unknown variables in the end.
37891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37892
37893      # Check if we try to supply an empty value
37894      if test "x$STRIP" = x; then
37895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
37896$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
37897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37898$as_echo_n "checking for STRIP... " >&6; }
37899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37900$as_echo "disabled" >&6; }
37901      else
37902        # Check if the provided tool contains a complete path.
37903        tool_specified="$STRIP"
37904        tool_basename="${tool_specified##*/}"
37905        if test "x$tool_basename" = "x$tool_specified"; then
37906          # A command without a complete path is provided, search $PATH.
37907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37908$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37909          # Extract the first word of "$tool_basename", so it can be a program name with args.
37910set dummy $tool_basename; ac_word=$2
37911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37912$as_echo_n "checking for $ac_word... " >&6; }
37913if ${ac_cv_path_STRIP+:} false; then :
37914  $as_echo_n "(cached) " >&6
37915else
37916  case $STRIP in
37917  [\\/]* | ?:[\\/]*)
37918  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37919  ;;
37920  *)
37921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37922for as_dir in $PATH
37923do
37924  IFS=$as_save_IFS
37925  test -z "$as_dir" && as_dir=.
37926    for ac_exec_ext in '' $ac_executable_extensions; do
37927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37928    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37930    break 2
37931  fi
37932done
37933  done
37934IFS=$as_save_IFS
37935
37936  ;;
37937esac
37938fi
37939STRIP=$ac_cv_path_STRIP
37940if test -n "$STRIP"; then
37941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37942$as_echo "$STRIP" >&6; }
37943else
37944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37945$as_echo "no" >&6; }
37946fi
37947
37948
37949          if test "x$STRIP" = x; then
37950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37951          fi
37952        else
37953          # Otherwise we believe it is a complete path. Use it as it is.
37954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37955$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37957$as_echo_n "checking for STRIP... " >&6; }
37958          if test ! -x "$tool_specified"; then
37959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37960$as_echo "not found" >&6; }
37961            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37962          fi
37963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37964$as_echo "$tool_specified" >&6; }
37965        fi
37966      fi
37967    fi
37968
37969  fi
37970
37971
37972
37973  # Only process if variable expands to non-empty
37974
37975  if test "x$STRIP" != x; then
37976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37977
37978  # First separate the path from the arguments. This will split at the first
37979  # space.
37980  complete="$STRIP"
37981  path="${complete%% *}"
37982  tmp="$complete EOL"
37983  arguments="${tmp#* }"
37984
37985  # Input might be given as Windows format, start by converting to
37986  # unix format.
37987  new_path=`$CYGPATH -u "$path"`
37988
37989  # Now try to locate executable using which
37990  new_path=`$WHICH "$new_path" 2> /dev/null`
37991  # bat and cmd files are not always considered executable in cygwin causing which
37992  # to not find them
37993  if test "x$new_path" = x \
37994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37996    new_path=`$CYGPATH -u "$path"`
37997  fi
37998  if test "x$new_path" = x; then
37999    # Oops. Which didn't find the executable.
38000    # The splitting of arguments from the executable at a space might have been incorrect,
38001    # since paths with space are more likely in Windows. Give it another try with the whole
38002    # argument.
38003    path="$complete"
38004    arguments="EOL"
38005    new_path=`$CYGPATH -u "$path"`
38006    new_path=`$WHICH "$new_path" 2> /dev/null`
38007    # bat and cmd files are not always considered executable in cygwin causing which
38008    # to not find them
38009    if test "x$new_path" = x \
38010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38012      new_path=`$CYGPATH -u "$path"`
38013    fi
38014    if test "x$new_path" = x; then
38015      # It's still not found. Now this is an unrecoverable error.
38016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38017$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38018      has_space=`$ECHO "$complete" | $GREP " "`
38019      if test "x$has_space" != x; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38022      fi
38023      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38024    fi
38025  fi
38026
38027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38030  # "foo.exe" is OK but "foo" is an error.
38031  #
38032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38033  # It is also a way to make sure we got the proper file name for the real test later on.
38034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38035  if test "x$test_shortpath" = x; then
38036    # Short path failed, file does not exist as specified.
38037    # Try adding .exe or .cmd
38038    if test -f "${new_path}.exe"; then
38039      input_to_shortpath="${new_path}.exe"
38040    elif test -f "${new_path}.cmd"; then
38041      input_to_shortpath="${new_path}.cmd"
38042    else
38043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38044$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38047      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38048    fi
38049  else
38050    input_to_shortpath="$new_path"
38051  fi
38052
38053  # Call helper function which possibly converts this using DOS-style short mode.
38054  # If so, the updated path is stored in $new_path.
38055  new_path="$input_to_shortpath"
38056
38057  input_path="$input_to_shortpath"
38058  # Check if we need to convert this using DOS-style short mode. If the path
38059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38060  # take no chances and rewrite it.
38061  # Note: m4 eats our [], so we need to use [ and ] instead.
38062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38063  if test "x$has_forbidden_chars" != x; then
38064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38068      # Going to short mode and back again did indeed matter. Since short mode is
38069      # case insensitive, let's make it lowercase to improve readability.
38070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071      # Now convert it back to Unix-style (cygpath)
38072      input_path=`$CYGPATH -u "$shortmode_path"`
38073      new_path="$input_path"
38074    fi
38075  fi
38076
38077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38078  if test "x$test_cygdrive_prefix" = x; then
38079    # As a simple fix, exclude /usr/bin since it's not a real path.
38080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38082      # a path prefixed by /cygdrive for fixpath to work.
38083      new_path="$CYGWIN_ROOT_PATH$input_path"
38084    fi
38085  fi
38086
38087  # remove trailing .exe if any
38088  new_path="${new_path/%.exe/}"
38089
38090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38091
38092  # First separate the path from the arguments. This will split at the first
38093  # space.
38094  complete="$STRIP"
38095  path="${complete%% *}"
38096  tmp="$complete EOL"
38097  arguments="${tmp#* }"
38098
38099  # Input might be given as Windows format, start by converting to
38100  # unix format.
38101  new_path="$path"
38102
38103  windows_path="$new_path"
38104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38105    unix_path=`$CYGPATH -u "$windows_path"`
38106    new_path="$unix_path"
38107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38109    new_path="$unix_path"
38110  fi
38111
38112
38113  # Now try to locate executable using which
38114  new_path=`$WHICH "$new_path" 2> /dev/null`
38115
38116  if test "x$new_path" = x; then
38117    # Oops. Which didn't find the executable.
38118    # The splitting of arguments from the executable at a space might have been incorrect,
38119    # since paths with space are more likely in Windows. Give it another try with the whole
38120    # argument.
38121    path="$complete"
38122    arguments="EOL"
38123    new_path="$path"
38124
38125  windows_path="$new_path"
38126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38127    unix_path=`$CYGPATH -u "$windows_path"`
38128    new_path="$unix_path"
38129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38131    new_path="$unix_path"
38132  fi
38133
38134
38135    new_path=`$WHICH "$new_path" 2> /dev/null`
38136    # bat and cmd files are not always considered executable in MSYS causing which
38137    # to not find them
38138    if test "x$new_path" = x \
38139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38141      new_path="$path"
38142
38143  windows_path="$new_path"
38144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38145    unix_path=`$CYGPATH -u "$windows_path"`
38146    new_path="$unix_path"
38147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38149    new_path="$unix_path"
38150  fi
38151
38152    fi
38153
38154    if test "x$new_path" = x; then
38155      # It's still not found. Now this is an unrecoverable error.
38156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38157$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38158      has_space=`$ECHO "$complete" | $GREP " "`
38159      if test "x$has_space" != x; then
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38162      fi
38163      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38164    fi
38165  fi
38166
38167  # Now new_path has a complete unix path to the binary
38168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38169    # Keep paths in /bin as-is, but remove trailing .exe if any
38170    new_path="${new_path/%.exe/}"
38171    # Do not save /bin paths to all_fixpath_prefixes!
38172  else
38173    # Not in mixed or Windows style, start by that.
38174    new_path=`cmd //c echo $new_path`
38175
38176  input_path="$new_path"
38177  # Check if we need to convert this using DOS-style short mode. If the path
38178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38179  # take no chances and rewrite it.
38180  # Note: m4 eats our [], so we need to use [ and ] instead.
38181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38182  if test "x$has_forbidden_chars" != x; then
38183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38185  fi
38186
38187    # Output is in $new_path
38188
38189  windows_path="$new_path"
38190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38191    unix_path=`$CYGPATH -u "$windows_path"`
38192    new_path="$unix_path"
38193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38195    new_path="$unix_path"
38196  fi
38197
38198    # remove trailing .exe if any
38199    new_path="${new_path/%.exe/}"
38200
38201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38203  fi
38204
38205    else
38206      # We're on a unix platform. Hooray! :)
38207      # First separate the path from the arguments. This will split at the first
38208      # space.
38209      complete="$STRIP"
38210      path="${complete%% *}"
38211      tmp="$complete EOL"
38212      arguments="${tmp#* }"
38213
38214      # Cannot rely on the command "which" here since it doesn't always work.
38215      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38216      if test -z "$is_absolute_path"; then
38217        # Path to executable is not absolute. Find it.
38218        IFS_save="$IFS"
38219        IFS=:
38220        for p in $PATH; do
38221          if test -f "$p/$path" && test -x "$p/$path"; then
38222            new_path="$p/$path"
38223            break
38224          fi
38225        done
38226        IFS="$IFS_save"
38227      else
38228        # This is an absolute path, we can use it without further modifications.
38229        new_path="$path"
38230      fi
38231
38232      if test "x$new_path" = x; then
38233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38234$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38235        has_space=`$ECHO "$complete" | $GREP " "`
38236        if test "x$has_space" != x; then
38237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38239        fi
38240        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38241      fi
38242    fi
38243
38244    # Now join together the path and the arguments once again
38245    if test "x$arguments" != xEOL; then
38246      new_complete="$new_path ${arguments% *}"
38247    else
38248      new_complete="$new_path"
38249    fi
38250
38251    if test "x$complete" != "x$new_complete"; then
38252      STRIP="$new_complete"
38253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38254$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38255    fi
38256  fi
38257
38258
38259
38260  # Publish this variable in the help.
38261
38262
38263  if [ -z "${NM+x}" ]; then
38264    # The variable is not set by user, try to locate tool using the code snippet
38265    for ac_prog in nm
38266do
38267  # Extract the first word of "$ac_prog", so it can be a program name with args.
38268set dummy $ac_prog; ac_word=$2
38269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38270$as_echo_n "checking for $ac_word... " >&6; }
38271if ${ac_cv_path_NM+:} false; then :
38272  $as_echo_n "(cached) " >&6
38273else
38274  case $NM in
38275  [\\/]* | ?:[\\/]*)
38276  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38277  ;;
38278  *)
38279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38280for as_dir in $PATH
38281do
38282  IFS=$as_save_IFS
38283  test -z "$as_dir" && as_dir=.
38284    for ac_exec_ext in '' $ac_executable_extensions; do
38285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38286    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38288    break 2
38289  fi
38290done
38291  done
38292IFS=$as_save_IFS
38293
38294  ;;
38295esac
38296fi
38297NM=$ac_cv_path_NM
38298if test -n "$NM"; then
38299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38300$as_echo "$NM" >&6; }
38301else
38302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38303$as_echo "no" >&6; }
38304fi
38305
38306
38307  test -n "$NM" && break
38308done
38309
38310  else
38311    # The variable is set, but is it from the command line or the environment?
38312
38313    # Try to remove the string !NM! from our list.
38314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38316      # If it failed, the variable was not from the command line. Ignore it,
38317      # but warn the user (except for BASH, which is always set by the calling BASH).
38318      if test "xNM" != xBASH; then
38319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38320$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38321      fi
38322      # Try to locate tool using the code snippet
38323      for ac_prog in nm
38324do
38325  # Extract the first word of "$ac_prog", so it can be a program name with args.
38326set dummy $ac_prog; ac_word=$2
38327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38328$as_echo_n "checking for $ac_word... " >&6; }
38329if ${ac_cv_path_NM+:} false; then :
38330  $as_echo_n "(cached) " >&6
38331else
38332  case $NM in
38333  [\\/]* | ?:[\\/]*)
38334  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38335  ;;
38336  *)
38337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38338for as_dir in $PATH
38339do
38340  IFS=$as_save_IFS
38341  test -z "$as_dir" && as_dir=.
38342    for ac_exec_ext in '' $ac_executable_extensions; do
38343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38344    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38346    break 2
38347  fi
38348done
38349  done
38350IFS=$as_save_IFS
38351
38352  ;;
38353esac
38354fi
38355NM=$ac_cv_path_NM
38356if test -n "$NM"; then
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38358$as_echo "$NM" >&6; }
38359else
38360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38361$as_echo "no" >&6; }
38362fi
38363
38364
38365  test -n "$NM" && break
38366done
38367
38368    else
38369      # If it succeeded, then it was overridden by the user. We will use it
38370      # for the tool.
38371
38372      # First remove it from the list of overridden variables, so we can test
38373      # for unknown variables in the end.
38374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38375
38376      # Check if we try to supply an empty value
38377      if test "x$NM" = x; then
38378        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38379$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38381$as_echo_n "checking for NM... " >&6; }
38382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38383$as_echo "disabled" >&6; }
38384      else
38385        # Check if the provided tool contains a complete path.
38386        tool_specified="$NM"
38387        tool_basename="${tool_specified##*/}"
38388        if test "x$tool_basename" = "x$tool_specified"; then
38389          # A command without a complete path is provided, search $PATH.
38390          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38391$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38392          # Extract the first word of "$tool_basename", so it can be a program name with args.
38393set dummy $tool_basename; ac_word=$2
38394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38395$as_echo_n "checking for $ac_word... " >&6; }
38396if ${ac_cv_path_NM+:} false; then :
38397  $as_echo_n "(cached) " >&6
38398else
38399  case $NM in
38400  [\\/]* | ?:[\\/]*)
38401  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38402  ;;
38403  *)
38404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38405for as_dir in $PATH
38406do
38407  IFS=$as_save_IFS
38408  test -z "$as_dir" && as_dir=.
38409    for ac_exec_ext in '' $ac_executable_extensions; do
38410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38411    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38413    break 2
38414  fi
38415done
38416  done
38417IFS=$as_save_IFS
38418
38419  ;;
38420esac
38421fi
38422NM=$ac_cv_path_NM
38423if test -n "$NM"; then
38424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38425$as_echo "$NM" >&6; }
38426else
38427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38428$as_echo "no" >&6; }
38429fi
38430
38431
38432          if test "x$NM" = x; then
38433            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38434          fi
38435        else
38436          # Otherwise we believe it is a complete path. Use it as it is.
38437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38438$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38439          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38440$as_echo_n "checking for NM... " >&6; }
38441          if test ! -x "$tool_specified"; then
38442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38443$as_echo "not found" >&6; }
38444            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38445          fi
38446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38447$as_echo "$tool_specified" >&6; }
38448        fi
38449      fi
38450    fi
38451
38452  fi
38453
38454
38455
38456  # Only process if variable expands to non-empty
38457
38458  if test "x$NM" != x; then
38459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38460
38461  # First separate the path from the arguments. This will split at the first
38462  # space.
38463  complete="$NM"
38464  path="${complete%% *}"
38465  tmp="$complete EOL"
38466  arguments="${tmp#* }"
38467
38468  # Input might be given as Windows format, start by converting to
38469  # unix format.
38470  new_path=`$CYGPATH -u "$path"`
38471
38472  # Now try to locate executable using which
38473  new_path=`$WHICH "$new_path" 2> /dev/null`
38474  # bat and cmd files are not always considered executable in cygwin causing which
38475  # to not find them
38476  if test "x$new_path" = x \
38477      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38478      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38479    new_path=`$CYGPATH -u "$path"`
38480  fi
38481  if test "x$new_path" = x; then
38482    # Oops. Which didn't find the executable.
38483    # The splitting of arguments from the executable at a space might have been incorrect,
38484    # since paths with space are more likely in Windows. Give it another try with the whole
38485    # argument.
38486    path="$complete"
38487    arguments="EOL"
38488    new_path=`$CYGPATH -u "$path"`
38489    new_path=`$WHICH "$new_path" 2> /dev/null`
38490    # bat and cmd files are not always considered executable in cygwin causing which
38491    # to not find them
38492    if test "x$new_path" = x \
38493        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38494        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38495      new_path=`$CYGPATH -u "$path"`
38496    fi
38497    if test "x$new_path" = x; then
38498      # It's still not found. Now this is an unrecoverable error.
38499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38500$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38501      has_space=`$ECHO "$complete" | $GREP " "`
38502      if test "x$has_space" != x; then
38503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38505      fi
38506      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38507    fi
38508  fi
38509
38510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38513  # "foo.exe" is OK but "foo" is an error.
38514  #
38515  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38516  # It is also a way to make sure we got the proper file name for the real test later on.
38517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38518  if test "x$test_shortpath" = x; then
38519    # Short path failed, file does not exist as specified.
38520    # Try adding .exe or .cmd
38521    if test -f "${new_path}.exe"; then
38522      input_to_shortpath="${new_path}.exe"
38523    elif test -f "${new_path}.cmd"; then
38524      input_to_shortpath="${new_path}.cmd"
38525    else
38526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38527$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38528      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38529$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38530      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38531    fi
38532  else
38533    input_to_shortpath="$new_path"
38534  fi
38535
38536  # Call helper function which possibly converts this using DOS-style short mode.
38537  # If so, the updated path is stored in $new_path.
38538  new_path="$input_to_shortpath"
38539
38540  input_path="$input_to_shortpath"
38541  # Check if we need to convert this using DOS-style short mode. If the path
38542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38543  # take no chances and rewrite it.
38544  # Note: m4 eats our [], so we need to use [ and ] instead.
38545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38546  if test "x$has_forbidden_chars" != x; then
38547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38548    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38549    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38550    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38551      # Going to short mode and back again did indeed matter. Since short mode is
38552      # case insensitive, let's make it lowercase to improve readability.
38553      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38554      # Now convert it back to Unix-style (cygpath)
38555      input_path=`$CYGPATH -u "$shortmode_path"`
38556      new_path="$input_path"
38557    fi
38558  fi
38559
38560  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38561  if test "x$test_cygdrive_prefix" = x; then
38562    # As a simple fix, exclude /usr/bin since it's not a real path.
38563    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38564      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38565      # a path prefixed by /cygdrive for fixpath to work.
38566      new_path="$CYGWIN_ROOT_PATH$input_path"
38567    fi
38568  fi
38569
38570  # remove trailing .exe if any
38571  new_path="${new_path/%.exe/}"
38572
38573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38574
38575  # First separate the path from the arguments. This will split at the first
38576  # space.
38577  complete="$NM"
38578  path="${complete%% *}"
38579  tmp="$complete EOL"
38580  arguments="${tmp#* }"
38581
38582  # Input might be given as Windows format, start by converting to
38583  # unix format.
38584  new_path="$path"
38585
38586  windows_path="$new_path"
38587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38588    unix_path=`$CYGPATH -u "$windows_path"`
38589    new_path="$unix_path"
38590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38592    new_path="$unix_path"
38593  fi
38594
38595
38596  # Now try to locate executable using which
38597  new_path=`$WHICH "$new_path" 2> /dev/null`
38598
38599  if test "x$new_path" = x; then
38600    # Oops. Which didn't find the executable.
38601    # The splitting of arguments from the executable at a space might have been incorrect,
38602    # since paths with space are more likely in Windows. Give it another try with the whole
38603    # argument.
38604    path="$complete"
38605    arguments="EOL"
38606    new_path="$path"
38607
38608  windows_path="$new_path"
38609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38610    unix_path=`$CYGPATH -u "$windows_path"`
38611    new_path="$unix_path"
38612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38614    new_path="$unix_path"
38615  fi
38616
38617
38618    new_path=`$WHICH "$new_path" 2> /dev/null`
38619    # bat and cmd files are not always considered executable in MSYS causing which
38620    # to not find them
38621    if test "x$new_path" = x \
38622        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38623        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38624      new_path="$path"
38625
38626  windows_path="$new_path"
38627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38628    unix_path=`$CYGPATH -u "$windows_path"`
38629    new_path="$unix_path"
38630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38632    new_path="$unix_path"
38633  fi
38634
38635    fi
38636
38637    if test "x$new_path" = x; then
38638      # It's still not found. Now this is an unrecoverable error.
38639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38640$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38641      has_space=`$ECHO "$complete" | $GREP " "`
38642      if test "x$has_space" != x; then
38643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38645      fi
38646      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38647    fi
38648  fi
38649
38650  # Now new_path has a complete unix path to the binary
38651  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38652    # Keep paths in /bin as-is, but remove trailing .exe if any
38653    new_path="${new_path/%.exe/}"
38654    # Do not save /bin paths to all_fixpath_prefixes!
38655  else
38656    # Not in mixed or Windows style, start by that.
38657    new_path=`cmd //c echo $new_path`
38658
38659  input_path="$new_path"
38660  # Check if we need to convert this using DOS-style short mode. If the path
38661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38662  # take no chances and rewrite it.
38663  # Note: m4 eats our [], so we need to use [ and ] instead.
38664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38665  if test "x$has_forbidden_chars" != x; then
38666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38668  fi
38669
38670    # Output is in $new_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    # remove trailing .exe if any
38682    new_path="${new_path/%.exe/}"
38683
38684    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38685    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38686  fi
38687
38688    else
38689      # We're on a unix platform. Hooray! :)
38690      # First separate the path from the arguments. This will split at the first
38691      # space.
38692      complete="$NM"
38693      path="${complete%% *}"
38694      tmp="$complete EOL"
38695      arguments="${tmp#* }"
38696
38697      # Cannot rely on the command "which" here since it doesn't always work.
38698      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38699      if test -z "$is_absolute_path"; then
38700        # Path to executable is not absolute. Find it.
38701        IFS_save="$IFS"
38702        IFS=:
38703        for p in $PATH; do
38704          if test -f "$p/$path" && test -x "$p/$path"; then
38705            new_path="$p/$path"
38706            break
38707          fi
38708        done
38709        IFS="$IFS_save"
38710      else
38711        # This is an absolute path, we can use it without further modifications.
38712        new_path="$path"
38713      fi
38714
38715      if test "x$new_path" = x; then
38716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38717$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38718        has_space=`$ECHO "$complete" | $GREP " "`
38719        if test "x$has_space" != x; then
38720          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38721$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38722        fi
38723        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38724      fi
38725    fi
38726
38727    # Now join together the path and the arguments once again
38728    if test "x$arguments" != xEOL; then
38729      new_complete="$new_path ${arguments% *}"
38730    else
38731      new_complete="$new_path"
38732    fi
38733
38734    if test "x$complete" != "x$new_complete"; then
38735      NM="$new_complete"
38736      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38737$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38738    fi
38739  fi
38740
38741
38742
38743  # Publish this variable in the help.
38744
38745
38746  if [ -z "${GNM+x}" ]; then
38747    # The variable is not set by user, try to locate tool using the code snippet
38748    for ac_prog in gnm
38749do
38750  # Extract the first word of "$ac_prog", so it can be a program name with args.
38751set dummy $ac_prog; ac_word=$2
38752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38753$as_echo_n "checking for $ac_word... " >&6; }
38754if ${ac_cv_path_GNM+:} false; then :
38755  $as_echo_n "(cached) " >&6
38756else
38757  case $GNM in
38758  [\\/]* | ?:[\\/]*)
38759  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38760  ;;
38761  *)
38762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38763for as_dir in $PATH
38764do
38765  IFS=$as_save_IFS
38766  test -z "$as_dir" && as_dir=.
38767    for ac_exec_ext in '' $ac_executable_extensions; do
38768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38769    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38771    break 2
38772  fi
38773done
38774  done
38775IFS=$as_save_IFS
38776
38777  ;;
38778esac
38779fi
38780GNM=$ac_cv_path_GNM
38781if test -n "$GNM"; then
38782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38783$as_echo "$GNM" >&6; }
38784else
38785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38786$as_echo "no" >&6; }
38787fi
38788
38789
38790  test -n "$GNM" && break
38791done
38792
38793  else
38794    # The variable is set, but is it from the command line or the environment?
38795
38796    # Try to remove the string !GNM! from our list.
38797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
38798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38799      # If it failed, the variable was not from the command line. Ignore it,
38800      # but warn the user (except for BASH, which is always set by the calling BASH).
38801      if test "xGNM" != xBASH; then
38802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
38803$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
38804      fi
38805      # Try to locate tool using the code snippet
38806      for ac_prog in gnm
38807do
38808  # Extract the first word of "$ac_prog", so it can be a program name with args.
38809set dummy $ac_prog; ac_word=$2
38810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38811$as_echo_n "checking for $ac_word... " >&6; }
38812if ${ac_cv_path_GNM+:} false; then :
38813  $as_echo_n "(cached) " >&6
38814else
38815  case $GNM in
38816  [\\/]* | ?:[\\/]*)
38817  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38818  ;;
38819  *)
38820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38821for as_dir in $PATH
38822do
38823  IFS=$as_save_IFS
38824  test -z "$as_dir" && as_dir=.
38825    for ac_exec_ext in '' $ac_executable_extensions; do
38826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38827    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38829    break 2
38830  fi
38831done
38832  done
38833IFS=$as_save_IFS
38834
38835  ;;
38836esac
38837fi
38838GNM=$ac_cv_path_GNM
38839if test -n "$GNM"; then
38840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38841$as_echo "$GNM" >&6; }
38842else
38843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38844$as_echo "no" >&6; }
38845fi
38846
38847
38848  test -n "$GNM" && break
38849done
38850
38851    else
38852      # If it succeeded, then it was overridden by the user. We will use it
38853      # for the tool.
38854
38855      # First remove it from the list of overridden variables, so we can test
38856      # for unknown variables in the end.
38857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38858
38859      # Check if we try to supply an empty value
38860      if test "x$GNM" = x; then
38861        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
38862$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
38863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38864$as_echo_n "checking for GNM... " >&6; }
38865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38866$as_echo "disabled" >&6; }
38867      else
38868        # Check if the provided tool contains a complete path.
38869        tool_specified="$GNM"
38870        tool_basename="${tool_specified##*/}"
38871        if test "x$tool_basename" = "x$tool_specified"; then
38872          # A command without a complete path is provided, search $PATH.
38873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
38874$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
38875          # Extract the first word of "$tool_basename", so it can be a program name with args.
38876set dummy $tool_basename; ac_word=$2
38877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38878$as_echo_n "checking for $ac_word... " >&6; }
38879if ${ac_cv_path_GNM+:} false; then :
38880  $as_echo_n "(cached) " >&6
38881else
38882  case $GNM in
38883  [\\/]* | ?:[\\/]*)
38884  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
38885  ;;
38886  *)
38887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38888for as_dir in $PATH
38889do
38890  IFS=$as_save_IFS
38891  test -z "$as_dir" && as_dir=.
38892    for ac_exec_ext in '' $ac_executable_extensions; do
38893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38894    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
38895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38896    break 2
38897  fi
38898done
38899  done
38900IFS=$as_save_IFS
38901
38902  ;;
38903esac
38904fi
38905GNM=$ac_cv_path_GNM
38906if test -n "$GNM"; then
38907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
38908$as_echo "$GNM" >&6; }
38909else
38910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38911$as_echo "no" >&6; }
38912fi
38913
38914
38915          if test "x$GNM" = x; then
38916            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38917          fi
38918        else
38919          # Otherwise we believe it is a complete path. Use it as it is.
38920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
38921$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
38922          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
38923$as_echo_n "checking for GNM... " >&6; }
38924          if test ! -x "$tool_specified"; then
38925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38926$as_echo "not found" >&6; }
38927            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
38928          fi
38929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38930$as_echo "$tool_specified" >&6; }
38931        fi
38932      fi
38933    fi
38934
38935  fi
38936
38937
38938
38939  # Only process if variable expands to non-empty
38940
38941  if test "x$GNM" != x; then
38942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38943
38944  # First separate the path from the arguments. This will split at the first
38945  # space.
38946  complete="$GNM"
38947  path="${complete%% *}"
38948  tmp="$complete EOL"
38949  arguments="${tmp#* }"
38950
38951  # Input might be given as Windows format, start by converting to
38952  # unix format.
38953  new_path=`$CYGPATH -u "$path"`
38954
38955  # Now try to locate executable using which
38956  new_path=`$WHICH "$new_path" 2> /dev/null`
38957  # bat and cmd files are not always considered executable in cygwin causing which
38958  # to not find them
38959  if test "x$new_path" = x \
38960      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38961      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38962    new_path=`$CYGPATH -u "$path"`
38963  fi
38964  if test "x$new_path" = x; then
38965    # Oops. Which didn't find the executable.
38966    # The splitting of arguments from the executable at a space might have been incorrect,
38967    # since paths with space are more likely in Windows. Give it another try with the whole
38968    # argument.
38969    path="$complete"
38970    arguments="EOL"
38971    new_path=`$CYGPATH -u "$path"`
38972    new_path=`$WHICH "$new_path" 2> /dev/null`
38973    # bat and cmd files are not always considered executable in cygwin causing which
38974    # to not find them
38975    if test "x$new_path" = x \
38976        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38977        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38978      new_path=`$CYGPATH -u "$path"`
38979    fi
38980    if test "x$new_path" = x; then
38981      # It's still not found. Now this is an unrecoverable error.
38982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
38983$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
38984      has_space=`$ECHO "$complete" | $GREP " "`
38985      if test "x$has_space" != x; then
38986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38988      fi
38989      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
38990    fi
38991  fi
38992
38993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38996  # "foo.exe" is OK but "foo" is an error.
38997  #
38998  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38999  # It is also a way to make sure we got the proper file name for the real test later on.
39000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39001  if test "x$test_shortpath" = x; then
39002    # Short path failed, file does not exist as specified.
39003    # Try adding .exe or .cmd
39004    if test -f "${new_path}.exe"; then
39005      input_to_shortpath="${new_path}.exe"
39006    elif test -f "${new_path}.cmd"; then
39007      input_to_shortpath="${new_path}.cmd"
39008    else
39009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39010$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39011      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39012$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39013      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39014    fi
39015  else
39016    input_to_shortpath="$new_path"
39017  fi
39018
39019  # Call helper function which possibly converts this using DOS-style short mode.
39020  # If so, the updated path is stored in $new_path.
39021  new_path="$input_to_shortpath"
39022
39023  input_path="$input_to_shortpath"
39024  # Check if we need to convert this using DOS-style short mode. If the path
39025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39026  # take no chances and rewrite it.
39027  # Note: m4 eats our [], so we need to use [ and ] instead.
39028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39029  if test "x$has_forbidden_chars" != x; then
39030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39034      # Going to short mode and back again did indeed matter. Since short mode is
39035      # case insensitive, let's make it lowercase to improve readability.
39036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39037      # Now convert it back to Unix-style (cygpath)
39038      input_path=`$CYGPATH -u "$shortmode_path"`
39039      new_path="$input_path"
39040    fi
39041  fi
39042
39043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39044  if test "x$test_cygdrive_prefix" = x; then
39045    # As a simple fix, exclude /usr/bin since it's not a real path.
39046    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39048      # a path prefixed by /cygdrive for fixpath to work.
39049      new_path="$CYGWIN_ROOT_PATH$input_path"
39050    fi
39051  fi
39052
39053  # remove trailing .exe if any
39054  new_path="${new_path/%.exe/}"
39055
39056    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39057
39058  # First separate the path from the arguments. This will split at the first
39059  # space.
39060  complete="$GNM"
39061  path="${complete%% *}"
39062  tmp="$complete EOL"
39063  arguments="${tmp#* }"
39064
39065  # Input might be given as Windows format, start by converting to
39066  # unix format.
39067  new_path="$path"
39068
39069  windows_path="$new_path"
39070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39071    unix_path=`$CYGPATH -u "$windows_path"`
39072    new_path="$unix_path"
39073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39075    new_path="$unix_path"
39076  fi
39077
39078
39079  # Now try to locate executable using which
39080  new_path=`$WHICH "$new_path" 2> /dev/null`
39081
39082  if test "x$new_path" = x; then
39083    # Oops. Which didn't find the executable.
39084    # The splitting of arguments from the executable at a space might have been incorrect,
39085    # since paths with space are more likely in Windows. Give it another try with the whole
39086    # argument.
39087    path="$complete"
39088    arguments="EOL"
39089    new_path="$path"
39090
39091  windows_path="$new_path"
39092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39093    unix_path=`$CYGPATH -u "$windows_path"`
39094    new_path="$unix_path"
39095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39097    new_path="$unix_path"
39098  fi
39099
39100
39101    new_path=`$WHICH "$new_path" 2> /dev/null`
39102    # bat and cmd files are not always considered executable in MSYS causing which
39103    # to not find them
39104    if test "x$new_path" = x \
39105        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39106        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39107      new_path="$path"
39108
39109  windows_path="$new_path"
39110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39111    unix_path=`$CYGPATH -u "$windows_path"`
39112    new_path="$unix_path"
39113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39115    new_path="$unix_path"
39116  fi
39117
39118    fi
39119
39120    if test "x$new_path" = x; then
39121      # It's still not found. Now this is an unrecoverable error.
39122      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39123$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39124      has_space=`$ECHO "$complete" | $GREP " "`
39125      if test "x$has_space" != x; then
39126        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39127$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39128      fi
39129      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39130    fi
39131  fi
39132
39133  # Now new_path has a complete unix path to the binary
39134  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39135    # Keep paths in /bin as-is, but remove trailing .exe if any
39136    new_path="${new_path/%.exe/}"
39137    # Do not save /bin paths to all_fixpath_prefixes!
39138  else
39139    # Not in mixed or Windows style, start by that.
39140    new_path=`cmd //c echo $new_path`
39141
39142  input_path="$new_path"
39143  # Check if we need to convert this using DOS-style short mode. If the path
39144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39145  # take no chances and rewrite it.
39146  # Note: m4 eats our [], so we need to use [ and ] instead.
39147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39148  if test "x$has_forbidden_chars" != x; then
39149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39151  fi
39152
39153    # Output is in $new_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    # remove trailing .exe if any
39165    new_path="${new_path/%.exe/}"
39166
39167    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39168    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39169  fi
39170
39171    else
39172      # We're on a unix platform. Hooray! :)
39173      # First separate the path from the arguments. This will split at the first
39174      # space.
39175      complete="$GNM"
39176      path="${complete%% *}"
39177      tmp="$complete EOL"
39178      arguments="${tmp#* }"
39179
39180      # Cannot rely on the command "which" here since it doesn't always work.
39181      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39182      if test -z "$is_absolute_path"; then
39183        # Path to executable is not absolute. Find it.
39184        IFS_save="$IFS"
39185        IFS=:
39186        for p in $PATH; do
39187          if test -f "$p/$path" && test -x "$p/$path"; then
39188            new_path="$p/$path"
39189            break
39190          fi
39191        done
39192        IFS="$IFS_save"
39193      else
39194        # This is an absolute path, we can use it without further modifications.
39195        new_path="$path"
39196      fi
39197
39198      if test "x$new_path" = x; then
39199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39200$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39201        has_space=`$ECHO "$complete" | $GREP " "`
39202        if test "x$has_space" != x; then
39203          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39204$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39205        fi
39206        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39207      fi
39208    fi
39209
39210    # Now join together the path and the arguments once again
39211    if test "x$arguments" != xEOL; then
39212      new_complete="$new_path ${arguments% *}"
39213    else
39214      new_complete="$new_path"
39215    fi
39216
39217    if test "x$complete" != "x$new_complete"; then
39218      GNM="$new_complete"
39219      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39220$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39221    fi
39222  fi
39223
39224  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39225    # FIXME: we should unify this with the solaris case above.
39226
39227
39228  # Publish this variable in the help.
39229
39230
39231  if [ -z "${STRIP+x}" ]; then
39232    # The variable is not set by user, try to locate tool using the code snippet
39233    if test -n "$ac_tool_prefix"; then
39234  for ac_prog in strip
39235  do
39236    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39237set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39239$as_echo_n "checking for $ac_word... " >&6; }
39240if ${ac_cv_prog_STRIP+:} false; then :
39241  $as_echo_n "(cached) " >&6
39242else
39243  if test -n "$STRIP"; then
39244  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39245else
39246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39247for as_dir in $PATH
39248do
39249  IFS=$as_save_IFS
39250  test -z "$as_dir" && as_dir=.
39251    for ac_exec_ext in '' $ac_executable_extensions; do
39252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39253    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39255    break 2
39256  fi
39257done
39258  done
39259IFS=$as_save_IFS
39260
39261fi
39262fi
39263STRIP=$ac_cv_prog_STRIP
39264if test -n "$STRIP"; then
39265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39266$as_echo "$STRIP" >&6; }
39267else
39268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39269$as_echo "no" >&6; }
39270fi
39271
39272
39273    test -n "$STRIP" && break
39274  done
39275fi
39276if test -z "$STRIP"; then
39277  ac_ct_STRIP=$STRIP
39278  for ac_prog in strip
39279do
39280  # Extract the first word of "$ac_prog", so it can be a program name with args.
39281set dummy $ac_prog; ac_word=$2
39282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39283$as_echo_n "checking for $ac_word... " >&6; }
39284if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39285  $as_echo_n "(cached) " >&6
39286else
39287  if test -n "$ac_ct_STRIP"; then
39288  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39289else
39290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39291for as_dir in $PATH
39292do
39293  IFS=$as_save_IFS
39294  test -z "$as_dir" && as_dir=.
39295    for ac_exec_ext in '' $ac_executable_extensions; do
39296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39297    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39299    break 2
39300  fi
39301done
39302  done
39303IFS=$as_save_IFS
39304
39305fi
39306fi
39307ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39308if test -n "$ac_ct_STRIP"; then
39309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39310$as_echo "$ac_ct_STRIP" >&6; }
39311else
39312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39313$as_echo "no" >&6; }
39314fi
39315
39316
39317  test -n "$ac_ct_STRIP" && break
39318done
39319
39320  if test "x$ac_ct_STRIP" = x; then
39321    STRIP=""
39322  else
39323    case $cross_compiling:$ac_tool_warned in
39324yes:)
39325{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39326$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39327ac_tool_warned=yes ;;
39328esac
39329    STRIP=$ac_ct_STRIP
39330  fi
39331fi
39332
39333  else
39334    # The variable is set, but is it from the command line or the environment?
39335
39336    # Try to remove the string !STRIP! from our list.
39337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39339      # If it failed, the variable was not from the command line. Ignore it,
39340      # but warn the user (except for BASH, which is always set by the calling BASH).
39341      if test "xSTRIP" != xBASH; then
39342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39343$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39344      fi
39345      # Try to locate tool using the code snippet
39346      if test -n "$ac_tool_prefix"; then
39347  for ac_prog in strip
39348  do
39349    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39350set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39352$as_echo_n "checking for $ac_word... " >&6; }
39353if ${ac_cv_prog_STRIP+:} false; then :
39354  $as_echo_n "(cached) " >&6
39355else
39356  if test -n "$STRIP"; then
39357  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39358else
39359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39360for as_dir in $PATH
39361do
39362  IFS=$as_save_IFS
39363  test -z "$as_dir" && as_dir=.
39364    for ac_exec_ext in '' $ac_executable_extensions; do
39365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39366    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39368    break 2
39369  fi
39370done
39371  done
39372IFS=$as_save_IFS
39373
39374fi
39375fi
39376STRIP=$ac_cv_prog_STRIP
39377if test -n "$STRIP"; then
39378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39379$as_echo "$STRIP" >&6; }
39380else
39381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39382$as_echo "no" >&6; }
39383fi
39384
39385
39386    test -n "$STRIP" && break
39387  done
39388fi
39389if test -z "$STRIP"; then
39390  ac_ct_STRIP=$STRIP
39391  for ac_prog in strip
39392do
39393  # Extract the first word of "$ac_prog", so it can be a program name with args.
39394set dummy $ac_prog; ac_word=$2
39395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39396$as_echo_n "checking for $ac_word... " >&6; }
39397if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39398  $as_echo_n "(cached) " >&6
39399else
39400  if test -n "$ac_ct_STRIP"; then
39401  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39402else
39403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39404for as_dir in $PATH
39405do
39406  IFS=$as_save_IFS
39407  test -z "$as_dir" && as_dir=.
39408    for ac_exec_ext in '' $ac_executable_extensions; do
39409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39410    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39412    break 2
39413  fi
39414done
39415  done
39416IFS=$as_save_IFS
39417
39418fi
39419fi
39420ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39421if test -n "$ac_ct_STRIP"; then
39422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39423$as_echo "$ac_ct_STRIP" >&6; }
39424else
39425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39426$as_echo "no" >&6; }
39427fi
39428
39429
39430  test -n "$ac_ct_STRIP" && break
39431done
39432
39433  if test "x$ac_ct_STRIP" = x; then
39434    STRIP=""
39435  else
39436    case $cross_compiling:$ac_tool_warned in
39437yes:)
39438{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39439$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39440ac_tool_warned=yes ;;
39441esac
39442    STRIP=$ac_ct_STRIP
39443  fi
39444fi
39445
39446    else
39447      # If it succeeded, then it was overridden by the user. We will use it
39448      # for the tool.
39449
39450      # First remove it from the list of overridden variables, so we can test
39451      # for unknown variables in the end.
39452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39453
39454      # Check if we try to supply an empty value
39455      if test "x$STRIP" = x; then
39456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39457$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39459$as_echo_n "checking for STRIP... " >&6; }
39460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39461$as_echo "disabled" >&6; }
39462      else
39463        # Check if the provided tool contains a complete path.
39464        tool_specified="$STRIP"
39465        tool_basename="${tool_specified##*/}"
39466        if test "x$tool_basename" = "x$tool_specified"; then
39467          # A command without a complete path is provided, search $PATH.
39468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39469$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39470          # Extract the first word of "$tool_basename", so it can be a program name with args.
39471set dummy $tool_basename; ac_word=$2
39472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39473$as_echo_n "checking for $ac_word... " >&6; }
39474if ${ac_cv_path_STRIP+:} false; then :
39475  $as_echo_n "(cached) " >&6
39476else
39477  case $STRIP in
39478  [\\/]* | ?:[\\/]*)
39479  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39480  ;;
39481  *)
39482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39483for as_dir in $PATH
39484do
39485  IFS=$as_save_IFS
39486  test -z "$as_dir" && as_dir=.
39487    for ac_exec_ext in '' $ac_executable_extensions; do
39488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39489    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39491    break 2
39492  fi
39493done
39494  done
39495IFS=$as_save_IFS
39496
39497  ;;
39498esac
39499fi
39500STRIP=$ac_cv_path_STRIP
39501if test -n "$STRIP"; then
39502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39503$as_echo "$STRIP" >&6; }
39504else
39505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39506$as_echo "no" >&6; }
39507fi
39508
39509
39510          if test "x$STRIP" = x; then
39511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39512          fi
39513        else
39514          # Otherwise we believe it is a complete path. Use it as it is.
39515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39516$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39518$as_echo_n "checking for STRIP... " >&6; }
39519          if test ! -x "$tool_specified"; then
39520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39521$as_echo "not found" >&6; }
39522            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39523          fi
39524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39525$as_echo "$tool_specified" >&6; }
39526        fi
39527      fi
39528    fi
39529
39530  fi
39531
39532
39533
39534  # Only process if variable expands to non-empty
39535
39536  if test "x$STRIP" != x; then
39537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39538
39539  # First separate the path from the arguments. This will split at the first
39540  # space.
39541  complete="$STRIP"
39542  path="${complete%% *}"
39543  tmp="$complete EOL"
39544  arguments="${tmp#* }"
39545
39546  # Input might be given as Windows format, start by converting to
39547  # unix format.
39548  new_path=`$CYGPATH -u "$path"`
39549
39550  # Now try to locate executable using which
39551  new_path=`$WHICH "$new_path" 2> /dev/null`
39552  # bat and cmd files are not always considered executable in cygwin causing which
39553  # to not find them
39554  if test "x$new_path" = x \
39555      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39556      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39557    new_path=`$CYGPATH -u "$path"`
39558  fi
39559  if test "x$new_path" = x; then
39560    # Oops. Which didn't find the executable.
39561    # The splitting of arguments from the executable at a space might have been incorrect,
39562    # since paths with space are more likely in Windows. Give it another try with the whole
39563    # argument.
39564    path="$complete"
39565    arguments="EOL"
39566    new_path=`$CYGPATH -u "$path"`
39567    new_path=`$WHICH "$new_path" 2> /dev/null`
39568    # bat and cmd files are not always considered executable in cygwin causing which
39569    # to not find them
39570    if test "x$new_path" = x \
39571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39573      new_path=`$CYGPATH -u "$path"`
39574    fi
39575    if test "x$new_path" = x; then
39576      # It's still not found. Now this is an unrecoverable error.
39577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39578$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39579      has_space=`$ECHO "$complete" | $GREP " "`
39580      if test "x$has_space" != x; then
39581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39583      fi
39584      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39585    fi
39586  fi
39587
39588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39591  # "foo.exe" is OK but "foo" is an error.
39592  #
39593  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39594  # It is also a way to make sure we got the proper file name for the real test later on.
39595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39596  if test "x$test_shortpath" = x; then
39597    # Short path failed, file does not exist as specified.
39598    # Try adding .exe or .cmd
39599    if test -f "${new_path}.exe"; then
39600      input_to_shortpath="${new_path}.exe"
39601    elif test -f "${new_path}.cmd"; then
39602      input_to_shortpath="${new_path}.cmd"
39603    else
39604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39605$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39606      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39607$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39608      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39609    fi
39610  else
39611    input_to_shortpath="$new_path"
39612  fi
39613
39614  # Call helper function which possibly converts this using DOS-style short mode.
39615  # If so, the updated path is stored in $new_path.
39616  new_path="$input_to_shortpath"
39617
39618  input_path="$input_to_shortpath"
39619  # Check if we need to convert this using DOS-style short mode. If the path
39620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39621  # take no chances and rewrite it.
39622  # Note: m4 eats our [], so we need to use [ and ] instead.
39623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39624  if test "x$has_forbidden_chars" != x; then
39625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39629      # Going to short mode and back again did indeed matter. Since short mode is
39630      # case insensitive, let's make it lowercase to improve readability.
39631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39632      # Now convert it back to Unix-style (cygpath)
39633      input_path=`$CYGPATH -u "$shortmode_path"`
39634      new_path="$input_path"
39635    fi
39636  fi
39637
39638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39639  if test "x$test_cygdrive_prefix" = x; then
39640    # As a simple fix, exclude /usr/bin since it's not a real path.
39641    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39643      # a path prefixed by /cygdrive for fixpath to work.
39644      new_path="$CYGWIN_ROOT_PATH$input_path"
39645    fi
39646  fi
39647
39648  # remove trailing .exe if any
39649  new_path="${new_path/%.exe/}"
39650
39651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39652
39653  # First separate the path from the arguments. This will split at the first
39654  # space.
39655  complete="$STRIP"
39656  path="${complete%% *}"
39657  tmp="$complete EOL"
39658  arguments="${tmp#* }"
39659
39660  # Input might be given as Windows format, start by converting to
39661  # unix format.
39662  new_path="$path"
39663
39664  windows_path="$new_path"
39665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39666    unix_path=`$CYGPATH -u "$windows_path"`
39667    new_path="$unix_path"
39668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39670    new_path="$unix_path"
39671  fi
39672
39673
39674  # Now try to locate executable using which
39675  new_path=`$WHICH "$new_path" 2> /dev/null`
39676
39677  if test "x$new_path" = x; then
39678    # Oops. Which didn't find the executable.
39679    # The splitting of arguments from the executable at a space might have been incorrect,
39680    # since paths with space are more likely in Windows. Give it another try with the whole
39681    # argument.
39682    path="$complete"
39683    arguments="EOL"
39684    new_path="$path"
39685
39686  windows_path="$new_path"
39687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39688    unix_path=`$CYGPATH -u "$windows_path"`
39689    new_path="$unix_path"
39690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39692    new_path="$unix_path"
39693  fi
39694
39695
39696    new_path=`$WHICH "$new_path" 2> /dev/null`
39697    # bat and cmd files are not always considered executable in MSYS causing which
39698    # to not find them
39699    if test "x$new_path" = x \
39700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39702      new_path="$path"
39703
39704  windows_path="$new_path"
39705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39706    unix_path=`$CYGPATH -u "$windows_path"`
39707    new_path="$unix_path"
39708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39710    new_path="$unix_path"
39711  fi
39712
39713    fi
39714
39715    if test "x$new_path" = x; then
39716      # It's still not found. Now this is an unrecoverable error.
39717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39718$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39719      has_space=`$ECHO "$complete" | $GREP " "`
39720      if test "x$has_space" != x; then
39721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39723      fi
39724      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39725    fi
39726  fi
39727
39728  # Now new_path has a complete unix path to the binary
39729  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39730    # Keep paths in /bin as-is, but remove trailing .exe if any
39731    new_path="${new_path/%.exe/}"
39732    # Do not save /bin paths to all_fixpath_prefixes!
39733  else
39734    # Not in mixed or Windows style, start by that.
39735    new_path=`cmd //c echo $new_path`
39736
39737  input_path="$new_path"
39738  # Check if we need to convert this using DOS-style short mode. If the path
39739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39740  # take no chances and rewrite it.
39741  # Note: m4 eats our [], so we need to use [ and ] instead.
39742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39743  if test "x$has_forbidden_chars" != x; then
39744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39746  fi
39747
39748    # Output is in $new_path
39749
39750  windows_path="$new_path"
39751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752    unix_path=`$CYGPATH -u "$windows_path"`
39753    new_path="$unix_path"
39754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39756    new_path="$unix_path"
39757  fi
39758
39759    # remove trailing .exe if any
39760    new_path="${new_path/%.exe/}"
39761
39762    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39763    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39764  fi
39765
39766    else
39767      # We're on a unix platform. Hooray! :)
39768      # First separate the path from the arguments. This will split at the first
39769      # space.
39770      complete="$STRIP"
39771      path="${complete%% *}"
39772      tmp="$complete EOL"
39773      arguments="${tmp#* }"
39774
39775      # Cannot rely on the command "which" here since it doesn't always work.
39776      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39777      if test -z "$is_absolute_path"; then
39778        # Path to executable is not absolute. Find it.
39779        IFS_save="$IFS"
39780        IFS=:
39781        for p in $PATH; do
39782          if test -f "$p/$path" && test -x "$p/$path"; then
39783            new_path="$p/$path"
39784            break
39785          fi
39786        done
39787        IFS="$IFS_save"
39788      else
39789        # This is an absolute path, we can use it without further modifications.
39790        new_path="$path"
39791      fi
39792
39793      if test "x$new_path" = x; then
39794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39795$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39796        has_space=`$ECHO "$complete" | $GREP " "`
39797        if test "x$has_space" != x; then
39798          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39800        fi
39801        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39802      fi
39803    fi
39804
39805    # Now join together the path and the arguments once again
39806    if test "x$arguments" != xEOL; then
39807      new_complete="$new_path ${arguments% *}"
39808    else
39809      new_complete="$new_path"
39810    fi
39811
39812    if test "x$complete" != "x$new_complete"; then
39813      STRIP="$new_complete"
39814      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39815$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39816    fi
39817  fi
39818
39819
39820
39821  # Publish this variable in the help.
39822
39823
39824  if [ -z "${NM+x}" ]; then
39825    # The variable is not set by user, try to locate tool using the code snippet
39826    if test -n "$ac_tool_prefix"; then
39827  for ac_prog in nm
39828  do
39829    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39830set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39832$as_echo_n "checking for $ac_word... " >&6; }
39833if ${ac_cv_prog_NM+:} false; then :
39834  $as_echo_n "(cached) " >&6
39835else
39836  if test -n "$NM"; then
39837  ac_cv_prog_NM="$NM" # Let the user override the test.
39838else
39839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39840for as_dir in $PATH
39841do
39842  IFS=$as_save_IFS
39843  test -z "$as_dir" && as_dir=.
39844    for ac_exec_ext in '' $ac_executable_extensions; do
39845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39846    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
39847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39848    break 2
39849  fi
39850done
39851  done
39852IFS=$as_save_IFS
39853
39854fi
39855fi
39856NM=$ac_cv_prog_NM
39857if test -n "$NM"; then
39858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39859$as_echo "$NM" >&6; }
39860else
39861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39862$as_echo "no" >&6; }
39863fi
39864
39865
39866    test -n "$NM" && break
39867  done
39868fi
39869if test -z "$NM"; then
39870  ac_ct_NM=$NM
39871  for ac_prog in nm
39872do
39873  # Extract the first word of "$ac_prog", so it can be a program name with args.
39874set dummy $ac_prog; ac_word=$2
39875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39876$as_echo_n "checking for $ac_word... " >&6; }
39877if ${ac_cv_prog_ac_ct_NM+:} false; then :
39878  $as_echo_n "(cached) " >&6
39879else
39880  if test -n "$ac_ct_NM"; then
39881  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
39882else
39883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39884for as_dir in $PATH
39885do
39886  IFS=$as_save_IFS
39887  test -z "$as_dir" && as_dir=.
39888    for ac_exec_ext in '' $ac_executable_extensions; do
39889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39890    ac_cv_prog_ac_ct_NM="$ac_prog"
39891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39892    break 2
39893  fi
39894done
39895  done
39896IFS=$as_save_IFS
39897
39898fi
39899fi
39900ac_ct_NM=$ac_cv_prog_ac_ct_NM
39901if test -n "$ac_ct_NM"; then
39902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
39903$as_echo "$ac_ct_NM" >&6; }
39904else
39905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39906$as_echo "no" >&6; }
39907fi
39908
39909
39910  test -n "$ac_ct_NM" && break
39911done
39912
39913  if test "x$ac_ct_NM" = x; then
39914    NM=""
39915  else
39916    case $cross_compiling:$ac_tool_warned in
39917yes:)
39918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39920ac_tool_warned=yes ;;
39921esac
39922    NM=$ac_ct_NM
39923  fi
39924fi
39925
39926  else
39927    # The variable is set, but is it from the command line or the environment?
39928
39929    # Try to remove the string !NM! from our list.
39930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39932      # If it failed, the variable was not from the command line. Ignore it,
39933      # but warn the user (except for BASH, which is always set by the calling BASH).
39934      if test "xNM" != xBASH; then
39935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39936$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39937      fi
39938      # Try to locate tool using the code snippet
39939      if test -n "$ac_tool_prefix"; then
39940  for ac_prog in nm
39941  do
39942    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39943set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39945$as_echo_n "checking for $ac_word... " >&6; }
39946if ${ac_cv_prog_NM+:} false; then :
39947  $as_echo_n "(cached) " >&6
39948else
39949  if test -n "$NM"; then
39950  ac_cv_prog_NM="$NM" # Let the user override the test.
39951else
39952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39953for as_dir in $PATH
39954do
39955  IFS=$as_save_IFS
39956  test -z "$as_dir" && as_dir=.
39957    for ac_exec_ext in '' $ac_executable_extensions; do
39958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39959    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
39960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39961    break 2
39962  fi
39963done
39964  done
39965IFS=$as_save_IFS
39966
39967fi
39968fi
39969NM=$ac_cv_prog_NM
39970if test -n "$NM"; then
39971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39972$as_echo "$NM" >&6; }
39973else
39974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39975$as_echo "no" >&6; }
39976fi
39977
39978
39979    test -n "$NM" && break
39980  done
39981fi
39982if test -z "$NM"; then
39983  ac_ct_NM=$NM
39984  for ac_prog in nm
39985do
39986  # Extract the first word of "$ac_prog", so it can be a program name with args.
39987set dummy $ac_prog; ac_word=$2
39988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39989$as_echo_n "checking for $ac_word... " >&6; }
39990if ${ac_cv_prog_ac_ct_NM+:} false; then :
39991  $as_echo_n "(cached) " >&6
39992else
39993  if test -n "$ac_ct_NM"; then
39994  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
39995else
39996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39997for as_dir in $PATH
39998do
39999  IFS=$as_save_IFS
40000  test -z "$as_dir" && as_dir=.
40001    for ac_exec_ext in '' $ac_executable_extensions; do
40002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40003    ac_cv_prog_ac_ct_NM="$ac_prog"
40004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40005    break 2
40006  fi
40007done
40008  done
40009IFS=$as_save_IFS
40010
40011fi
40012fi
40013ac_ct_NM=$ac_cv_prog_ac_ct_NM
40014if test -n "$ac_ct_NM"; then
40015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40016$as_echo "$ac_ct_NM" >&6; }
40017else
40018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40019$as_echo "no" >&6; }
40020fi
40021
40022
40023  test -n "$ac_ct_NM" && break
40024done
40025
40026  if test "x$ac_ct_NM" = x; then
40027    NM=""
40028  else
40029    case $cross_compiling:$ac_tool_warned in
40030yes:)
40031{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40032$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40033ac_tool_warned=yes ;;
40034esac
40035    NM=$ac_ct_NM
40036  fi
40037fi
40038
40039    else
40040      # If it succeeded, then it was overridden by the user. We will use it
40041      # for the tool.
40042
40043      # First remove it from the list of overridden variables, so we can test
40044      # for unknown variables in the end.
40045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40046
40047      # Check if we try to supply an empty value
40048      if test "x$NM" = x; then
40049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40050$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40052$as_echo_n "checking for NM... " >&6; }
40053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40054$as_echo "disabled" >&6; }
40055      else
40056        # Check if the provided tool contains a complete path.
40057        tool_specified="$NM"
40058        tool_basename="${tool_specified##*/}"
40059        if test "x$tool_basename" = "x$tool_specified"; then
40060          # A command without a complete path is provided, search $PATH.
40061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40062$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40063          # Extract the first word of "$tool_basename", so it can be a program name with args.
40064set dummy $tool_basename; ac_word=$2
40065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40066$as_echo_n "checking for $ac_word... " >&6; }
40067if ${ac_cv_path_NM+:} false; then :
40068  $as_echo_n "(cached) " >&6
40069else
40070  case $NM in
40071  [\\/]* | ?:[\\/]*)
40072  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40073  ;;
40074  *)
40075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40076for as_dir in $PATH
40077do
40078  IFS=$as_save_IFS
40079  test -z "$as_dir" && as_dir=.
40080    for ac_exec_ext in '' $ac_executable_extensions; do
40081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40082    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40084    break 2
40085  fi
40086done
40087  done
40088IFS=$as_save_IFS
40089
40090  ;;
40091esac
40092fi
40093NM=$ac_cv_path_NM
40094if test -n "$NM"; then
40095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40096$as_echo "$NM" >&6; }
40097else
40098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40099$as_echo "no" >&6; }
40100fi
40101
40102
40103          if test "x$NM" = x; then
40104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40105          fi
40106        else
40107          # Otherwise we believe it is a complete path. Use it as it is.
40108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40109$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40111$as_echo_n "checking for NM... " >&6; }
40112          if test ! -x "$tool_specified"; then
40113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40114$as_echo "not found" >&6; }
40115            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40116          fi
40117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40118$as_echo "$tool_specified" >&6; }
40119        fi
40120      fi
40121    fi
40122
40123  fi
40124
40125
40126
40127  # Only process if variable expands to non-empty
40128
40129  if test "x$NM" != x; then
40130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40131
40132  # First separate the path from the arguments. This will split at the first
40133  # space.
40134  complete="$NM"
40135  path="${complete%% *}"
40136  tmp="$complete EOL"
40137  arguments="${tmp#* }"
40138
40139  # Input might be given as Windows format, start by converting to
40140  # unix format.
40141  new_path=`$CYGPATH -u "$path"`
40142
40143  # Now try to locate executable using which
40144  new_path=`$WHICH "$new_path" 2> /dev/null`
40145  # bat and cmd files are not always considered executable in cygwin causing which
40146  # to not find them
40147  if test "x$new_path" = x \
40148      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40149      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40150    new_path=`$CYGPATH -u "$path"`
40151  fi
40152  if test "x$new_path" = x; then
40153    # Oops. Which didn't find the executable.
40154    # The splitting of arguments from the executable at a space might have been incorrect,
40155    # since paths with space are more likely in Windows. Give it another try with the whole
40156    # argument.
40157    path="$complete"
40158    arguments="EOL"
40159    new_path=`$CYGPATH -u "$path"`
40160    new_path=`$WHICH "$new_path" 2> /dev/null`
40161    # bat and cmd files are not always considered executable in cygwin causing which
40162    # to not find them
40163    if test "x$new_path" = x \
40164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40166      new_path=`$CYGPATH -u "$path"`
40167    fi
40168    if test "x$new_path" = x; then
40169      # It's still not found. Now this is an unrecoverable error.
40170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40171$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40172      has_space=`$ECHO "$complete" | $GREP " "`
40173      if test "x$has_space" != x; then
40174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40176      fi
40177      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40178    fi
40179  fi
40180
40181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40184  # "foo.exe" is OK but "foo" is an error.
40185  #
40186  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40187  # It is also a way to make sure we got the proper file name for the real test later on.
40188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40189  if test "x$test_shortpath" = x; then
40190    # Short path failed, file does not exist as specified.
40191    # Try adding .exe or .cmd
40192    if test -f "${new_path}.exe"; then
40193      input_to_shortpath="${new_path}.exe"
40194    elif test -f "${new_path}.cmd"; then
40195      input_to_shortpath="${new_path}.cmd"
40196    else
40197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40198$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40199      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40200$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40201      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40202    fi
40203  else
40204    input_to_shortpath="$new_path"
40205  fi
40206
40207  # Call helper function which possibly converts this using DOS-style short mode.
40208  # If so, the updated path is stored in $new_path.
40209  new_path="$input_to_shortpath"
40210
40211  input_path="$input_to_shortpath"
40212  # Check if we need to convert this using DOS-style short mode. If the path
40213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40214  # take no chances and rewrite it.
40215  # Note: m4 eats our [], so we need to use [ and ] instead.
40216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40217  if test "x$has_forbidden_chars" != x; then
40218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40222      # Going to short mode and back again did indeed matter. Since short mode is
40223      # case insensitive, let's make it lowercase to improve readability.
40224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40225      # Now convert it back to Unix-style (cygpath)
40226      input_path=`$CYGPATH -u "$shortmode_path"`
40227      new_path="$input_path"
40228    fi
40229  fi
40230
40231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40232  if test "x$test_cygdrive_prefix" = x; then
40233    # As a simple fix, exclude /usr/bin since it's not a real path.
40234    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40236      # a path prefixed by /cygdrive for fixpath to work.
40237      new_path="$CYGWIN_ROOT_PATH$input_path"
40238    fi
40239  fi
40240
40241  # remove trailing .exe if any
40242  new_path="${new_path/%.exe/}"
40243
40244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40245
40246  # First separate the path from the arguments. This will split at the first
40247  # space.
40248  complete="$NM"
40249  path="${complete%% *}"
40250  tmp="$complete EOL"
40251  arguments="${tmp#* }"
40252
40253  # Input might be given as Windows format, start by converting to
40254  # unix format.
40255  new_path="$path"
40256
40257  windows_path="$new_path"
40258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40259    unix_path=`$CYGPATH -u "$windows_path"`
40260    new_path="$unix_path"
40261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40263    new_path="$unix_path"
40264  fi
40265
40266
40267  # Now try to locate executable using which
40268  new_path=`$WHICH "$new_path" 2> /dev/null`
40269
40270  if test "x$new_path" = x; then
40271    # Oops. Which didn't find the executable.
40272    # The splitting of arguments from the executable at a space might have been incorrect,
40273    # since paths with space are more likely in Windows. Give it another try with the whole
40274    # argument.
40275    path="$complete"
40276    arguments="EOL"
40277    new_path="$path"
40278
40279  windows_path="$new_path"
40280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40281    unix_path=`$CYGPATH -u "$windows_path"`
40282    new_path="$unix_path"
40283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40285    new_path="$unix_path"
40286  fi
40287
40288
40289    new_path=`$WHICH "$new_path" 2> /dev/null`
40290    # bat and cmd files are not always considered executable in MSYS causing which
40291    # to not find them
40292    if test "x$new_path" = x \
40293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40295      new_path="$path"
40296
40297  windows_path="$new_path"
40298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40299    unix_path=`$CYGPATH -u "$windows_path"`
40300    new_path="$unix_path"
40301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40303    new_path="$unix_path"
40304  fi
40305
40306    fi
40307
40308    if test "x$new_path" = x; then
40309      # It's still not found. Now this is an unrecoverable error.
40310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40311$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40312      has_space=`$ECHO "$complete" | $GREP " "`
40313      if test "x$has_space" != x; then
40314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40316      fi
40317      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40318    fi
40319  fi
40320
40321  # Now new_path has a complete unix path to the binary
40322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40323    # Keep paths in /bin as-is, but remove trailing .exe if any
40324    new_path="${new_path/%.exe/}"
40325    # Do not save /bin paths to all_fixpath_prefixes!
40326  else
40327    # Not in mixed or Windows style, start by that.
40328    new_path=`cmd //c echo $new_path`
40329
40330  input_path="$new_path"
40331  # Check if we need to convert this using DOS-style short mode. If the path
40332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40333  # take no chances and rewrite it.
40334  # Note: m4 eats our [], so we need to use [ and ] instead.
40335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40336  if test "x$has_forbidden_chars" != x; then
40337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40339  fi
40340
40341    # Output is in $new_path
40342
40343  windows_path="$new_path"
40344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40345    unix_path=`$CYGPATH -u "$windows_path"`
40346    new_path="$unix_path"
40347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40349    new_path="$unix_path"
40350  fi
40351
40352    # remove trailing .exe if any
40353    new_path="${new_path/%.exe/}"
40354
40355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40357  fi
40358
40359    else
40360      # We're on a unix platform. Hooray! :)
40361      # First separate the path from the arguments. This will split at the first
40362      # space.
40363      complete="$NM"
40364      path="${complete%% *}"
40365      tmp="$complete EOL"
40366      arguments="${tmp#* }"
40367
40368      # Cannot rely on the command "which" here since it doesn't always work.
40369      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40370      if test -z "$is_absolute_path"; then
40371        # Path to executable is not absolute. Find it.
40372        IFS_save="$IFS"
40373        IFS=:
40374        for p in $PATH; do
40375          if test -f "$p/$path" && test -x "$p/$path"; then
40376            new_path="$p/$path"
40377            break
40378          fi
40379        done
40380        IFS="$IFS_save"
40381      else
40382        # This is an absolute path, we can use it without further modifications.
40383        new_path="$path"
40384      fi
40385
40386      if test "x$new_path" = x; then
40387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40388$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40389        has_space=`$ECHO "$complete" | $GREP " "`
40390        if test "x$has_space" != x; then
40391          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40393        fi
40394        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40395      fi
40396    fi
40397
40398    # Now join together the path and the arguments once again
40399    if test "x$arguments" != xEOL; then
40400      new_complete="$new_path ${arguments% *}"
40401    else
40402      new_complete="$new_path"
40403    fi
40404
40405    if test "x$complete" != "x$new_complete"; then
40406      NM="$new_complete"
40407      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40408$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40409    fi
40410  fi
40411
40412    GNM="$NM"
40413
40414  fi
40415
40416  # objcopy is used for moving debug symbols to separate files when
40417  # full debug symbols are enabled.
40418  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
40419
40420
40421  # Publish this variable in the help.
40422
40423
40424  if [ -z "${OBJCOPY+x}" ]; then
40425    # The variable is not set by user, try to locate tool using the code snippet
40426    if test -n "$ac_tool_prefix"; then
40427  for ac_prog in gobjcopy objcopy
40428  do
40429    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40430set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40432$as_echo_n "checking for $ac_word... " >&6; }
40433if ${ac_cv_prog_OBJCOPY+:} false; then :
40434  $as_echo_n "(cached) " >&6
40435else
40436  if test -n "$OBJCOPY"; then
40437  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40438else
40439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40440for as_dir in $PATH
40441do
40442  IFS=$as_save_IFS
40443  test -z "$as_dir" && as_dir=.
40444    for ac_exec_ext in '' $ac_executable_extensions; do
40445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40446    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40448    break 2
40449  fi
40450done
40451  done
40452IFS=$as_save_IFS
40453
40454fi
40455fi
40456OBJCOPY=$ac_cv_prog_OBJCOPY
40457if test -n "$OBJCOPY"; then
40458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40459$as_echo "$OBJCOPY" >&6; }
40460else
40461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40462$as_echo "no" >&6; }
40463fi
40464
40465
40466    test -n "$OBJCOPY" && break
40467  done
40468fi
40469if test -z "$OBJCOPY"; then
40470  ac_ct_OBJCOPY=$OBJCOPY
40471  for ac_prog in gobjcopy objcopy
40472do
40473  # Extract the first word of "$ac_prog", so it can be a program name with args.
40474set dummy $ac_prog; ac_word=$2
40475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40476$as_echo_n "checking for $ac_word... " >&6; }
40477if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40478  $as_echo_n "(cached) " >&6
40479else
40480  if test -n "$ac_ct_OBJCOPY"; then
40481  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40482else
40483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40484for as_dir in $PATH
40485do
40486  IFS=$as_save_IFS
40487  test -z "$as_dir" && as_dir=.
40488    for ac_exec_ext in '' $ac_executable_extensions; do
40489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40490    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40492    break 2
40493  fi
40494done
40495  done
40496IFS=$as_save_IFS
40497
40498fi
40499fi
40500ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40501if test -n "$ac_ct_OBJCOPY"; then
40502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40503$as_echo "$ac_ct_OBJCOPY" >&6; }
40504else
40505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40506$as_echo "no" >&6; }
40507fi
40508
40509
40510  test -n "$ac_ct_OBJCOPY" && break
40511done
40512
40513  if test "x$ac_ct_OBJCOPY" = x; then
40514    OBJCOPY=""
40515  else
40516    case $cross_compiling:$ac_tool_warned in
40517yes:)
40518{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40519$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40520ac_tool_warned=yes ;;
40521esac
40522    OBJCOPY=$ac_ct_OBJCOPY
40523  fi
40524fi
40525
40526  else
40527    # The variable is set, but is it from the command line or the environment?
40528
40529    # Try to remove the string !OBJCOPY! from our list.
40530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
40531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40532      # If it failed, the variable was not from the command line. Ignore it,
40533      # but warn the user (except for BASH, which is always set by the calling BASH).
40534      if test "xOBJCOPY" != xBASH; then
40535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
40536$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
40537      fi
40538      # Try to locate tool using the code snippet
40539      if test -n "$ac_tool_prefix"; then
40540  for ac_prog in gobjcopy objcopy
40541  do
40542    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40543set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40545$as_echo_n "checking for $ac_word... " >&6; }
40546if ${ac_cv_prog_OBJCOPY+:} false; then :
40547  $as_echo_n "(cached) " >&6
40548else
40549  if test -n "$OBJCOPY"; then
40550  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
40551else
40552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40553for as_dir in $PATH
40554do
40555  IFS=$as_save_IFS
40556  test -z "$as_dir" && as_dir=.
40557    for ac_exec_ext in '' $ac_executable_extensions; do
40558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40559    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
40560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40561    break 2
40562  fi
40563done
40564  done
40565IFS=$as_save_IFS
40566
40567fi
40568fi
40569OBJCOPY=$ac_cv_prog_OBJCOPY
40570if test -n "$OBJCOPY"; then
40571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40572$as_echo "$OBJCOPY" >&6; }
40573else
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40575$as_echo "no" >&6; }
40576fi
40577
40578
40579    test -n "$OBJCOPY" && break
40580  done
40581fi
40582if test -z "$OBJCOPY"; then
40583  ac_ct_OBJCOPY=$OBJCOPY
40584  for ac_prog in gobjcopy objcopy
40585do
40586  # Extract the first word of "$ac_prog", so it can be a program name with args.
40587set dummy $ac_prog; ac_word=$2
40588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40589$as_echo_n "checking for $ac_word... " >&6; }
40590if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
40591  $as_echo_n "(cached) " >&6
40592else
40593  if test -n "$ac_ct_OBJCOPY"; then
40594  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
40595else
40596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597for as_dir in $PATH
40598do
40599  IFS=$as_save_IFS
40600  test -z "$as_dir" && as_dir=.
40601    for ac_exec_ext in '' $ac_executable_extensions; do
40602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
40604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605    break 2
40606  fi
40607done
40608  done
40609IFS=$as_save_IFS
40610
40611fi
40612fi
40613ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
40614if test -n "$ac_ct_OBJCOPY"; then
40615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
40616$as_echo "$ac_ct_OBJCOPY" >&6; }
40617else
40618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40619$as_echo "no" >&6; }
40620fi
40621
40622
40623  test -n "$ac_ct_OBJCOPY" && break
40624done
40625
40626  if test "x$ac_ct_OBJCOPY" = x; then
40627    OBJCOPY=""
40628  else
40629    case $cross_compiling:$ac_tool_warned in
40630yes:)
40631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40633ac_tool_warned=yes ;;
40634esac
40635    OBJCOPY=$ac_ct_OBJCOPY
40636  fi
40637fi
40638
40639    else
40640      # If it succeeded, then it was overridden by the user. We will use it
40641      # for the tool.
40642
40643      # First remove it from the list of overridden variables, so we can test
40644      # for unknown variables in the end.
40645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40646
40647      # Check if we try to supply an empty value
40648      if test "x$OBJCOPY" = x; then
40649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
40650$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
40651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40652$as_echo_n "checking for OBJCOPY... " >&6; }
40653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40654$as_echo "disabled" >&6; }
40655      else
40656        # Check if the provided tool contains a complete path.
40657        tool_specified="$OBJCOPY"
40658        tool_basename="${tool_specified##*/}"
40659        if test "x$tool_basename" = "x$tool_specified"; then
40660          # A command without a complete path is provided, search $PATH.
40661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
40662$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
40663          # Extract the first word of "$tool_basename", so it can be a program name with args.
40664set dummy $tool_basename; ac_word=$2
40665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40666$as_echo_n "checking for $ac_word... " >&6; }
40667if ${ac_cv_path_OBJCOPY+:} false; then :
40668  $as_echo_n "(cached) " >&6
40669else
40670  case $OBJCOPY in
40671  [\\/]* | ?:[\\/]*)
40672  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
40673  ;;
40674  *)
40675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40676for as_dir in $PATH
40677do
40678  IFS=$as_save_IFS
40679  test -z "$as_dir" && as_dir=.
40680    for ac_exec_ext in '' $ac_executable_extensions; do
40681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40682    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
40683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40684    break 2
40685  fi
40686done
40687  done
40688IFS=$as_save_IFS
40689
40690  ;;
40691esac
40692fi
40693OBJCOPY=$ac_cv_path_OBJCOPY
40694if test -n "$OBJCOPY"; then
40695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
40696$as_echo "$OBJCOPY" >&6; }
40697else
40698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40699$as_echo "no" >&6; }
40700fi
40701
40702
40703          if test "x$OBJCOPY" = x; then
40704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40705          fi
40706        else
40707          # Otherwise we believe it is a complete path. Use it as it is.
40708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
40709$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
40710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
40711$as_echo_n "checking for OBJCOPY... " >&6; }
40712          if test ! -x "$tool_specified"; then
40713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40714$as_echo "not found" >&6; }
40715            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
40716          fi
40717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40718$as_echo "$tool_specified" >&6; }
40719        fi
40720      fi
40721    fi
40722
40723  fi
40724
40725
40726    # Only call fixup if objcopy was found.
40727    if test -n "$OBJCOPY"; then
40728
40729  # Only process if variable expands to non-empty
40730
40731  if test "x$OBJCOPY" != x; then
40732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40733
40734  # First separate the path from the arguments. This will split at the first
40735  # space.
40736  complete="$OBJCOPY"
40737  path="${complete%% *}"
40738  tmp="$complete EOL"
40739  arguments="${tmp#* }"
40740
40741  # Input might be given as Windows format, start by converting to
40742  # unix format.
40743  new_path=`$CYGPATH -u "$path"`
40744
40745  # Now try to locate executable using which
40746  new_path=`$WHICH "$new_path" 2> /dev/null`
40747  # bat and cmd files are not always considered executable in cygwin causing which
40748  # to not find them
40749  if test "x$new_path" = x \
40750      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40751      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40752    new_path=`$CYGPATH -u "$path"`
40753  fi
40754  if test "x$new_path" = x; then
40755    # Oops. Which didn't find the executable.
40756    # The splitting of arguments from the executable at a space might have been incorrect,
40757    # since paths with space are more likely in Windows. Give it another try with the whole
40758    # argument.
40759    path="$complete"
40760    arguments="EOL"
40761    new_path=`$CYGPATH -u "$path"`
40762    new_path=`$WHICH "$new_path" 2> /dev/null`
40763    # bat and cmd files are not always considered executable in cygwin causing which
40764    # to not find them
40765    if test "x$new_path" = x \
40766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40768      new_path=`$CYGPATH -u "$path"`
40769    fi
40770    if test "x$new_path" = x; then
40771      # It's still not found. Now this is an unrecoverable error.
40772      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40773$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40774      has_space=`$ECHO "$complete" | $GREP " "`
40775      if test "x$has_space" != x; then
40776        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40777$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40778      fi
40779      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40780    fi
40781  fi
40782
40783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40786  # "foo.exe" is OK but "foo" is an error.
40787  #
40788  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40789  # It is also a way to make sure we got the proper file name for the real test later on.
40790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40791  if test "x$test_shortpath" = x; then
40792    # Short path failed, file does not exist as specified.
40793    # Try adding .exe or .cmd
40794    if test -f "${new_path}.exe"; then
40795      input_to_shortpath="${new_path}.exe"
40796    elif test -f "${new_path}.cmd"; then
40797      input_to_shortpath="${new_path}.cmd"
40798    else
40799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
40800$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
40801      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40802$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40803      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40804    fi
40805  else
40806    input_to_shortpath="$new_path"
40807  fi
40808
40809  # Call helper function which possibly converts this using DOS-style short mode.
40810  # If so, the updated path is stored in $new_path.
40811  new_path="$input_to_shortpath"
40812
40813  input_path="$input_to_shortpath"
40814  # Check if we need to convert this using DOS-style short mode. If the path
40815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40816  # take no chances and rewrite it.
40817  # Note: m4 eats our [], so we need to use [ and ] instead.
40818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40819  if test "x$has_forbidden_chars" != x; then
40820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40824      # Going to short mode and back again did indeed matter. Since short mode is
40825      # case insensitive, let's make it lowercase to improve readability.
40826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40827      # Now convert it back to Unix-style (cygpath)
40828      input_path=`$CYGPATH -u "$shortmode_path"`
40829      new_path="$input_path"
40830    fi
40831  fi
40832
40833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40834  if test "x$test_cygdrive_prefix" = x; then
40835    # As a simple fix, exclude /usr/bin since it's not a real path.
40836    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40838      # a path prefixed by /cygdrive for fixpath to work.
40839      new_path="$CYGWIN_ROOT_PATH$input_path"
40840    fi
40841  fi
40842
40843  # remove trailing .exe if any
40844  new_path="${new_path/%.exe/}"
40845
40846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40847
40848  # First separate the path from the arguments. This will split at the first
40849  # space.
40850  complete="$OBJCOPY"
40851  path="${complete%% *}"
40852  tmp="$complete EOL"
40853  arguments="${tmp#* }"
40854
40855  # Input might be given as Windows format, start by converting to
40856  # unix format.
40857  new_path="$path"
40858
40859  windows_path="$new_path"
40860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40861    unix_path=`$CYGPATH -u "$windows_path"`
40862    new_path="$unix_path"
40863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40865    new_path="$unix_path"
40866  fi
40867
40868
40869  # Now try to locate executable using which
40870  new_path=`$WHICH "$new_path" 2> /dev/null`
40871
40872  if test "x$new_path" = x; then
40873    # Oops. Which didn't find the executable.
40874    # The splitting of arguments from the executable at a space might have been incorrect,
40875    # since paths with space are more likely in Windows. Give it another try with the whole
40876    # argument.
40877    path="$complete"
40878    arguments="EOL"
40879    new_path="$path"
40880
40881  windows_path="$new_path"
40882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40883    unix_path=`$CYGPATH -u "$windows_path"`
40884    new_path="$unix_path"
40885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40887    new_path="$unix_path"
40888  fi
40889
40890
40891    new_path=`$WHICH "$new_path" 2> /dev/null`
40892    # bat and cmd files are not always considered executable in MSYS causing which
40893    # to not find them
40894    if test "x$new_path" = x \
40895        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40896        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40897      new_path="$path"
40898
40899  windows_path="$new_path"
40900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40901    unix_path=`$CYGPATH -u "$windows_path"`
40902    new_path="$unix_path"
40903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40905    new_path="$unix_path"
40906  fi
40907
40908    fi
40909
40910    if test "x$new_path" = x; then
40911      # It's still not found. Now this is an unrecoverable error.
40912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40913$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40914      has_space=`$ECHO "$complete" | $GREP " "`
40915      if test "x$has_space" != x; then
40916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40918      fi
40919      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40920    fi
40921  fi
40922
40923  # Now new_path has a complete unix path to the binary
40924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40925    # Keep paths in /bin as-is, but remove trailing .exe if any
40926    new_path="${new_path/%.exe/}"
40927    # Do not save /bin paths to all_fixpath_prefixes!
40928  else
40929    # Not in mixed or Windows style, start by that.
40930    new_path=`cmd //c echo $new_path`
40931
40932  input_path="$new_path"
40933  # Check if we need to convert this using DOS-style short mode. If the path
40934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40935  # take no chances and rewrite it.
40936  # Note: m4 eats our [], so we need to use [ and ] instead.
40937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40938  if test "x$has_forbidden_chars" != x; then
40939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40941  fi
40942
40943    # Output is in $new_path
40944
40945  windows_path="$new_path"
40946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40947    unix_path=`$CYGPATH -u "$windows_path"`
40948    new_path="$unix_path"
40949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40951    new_path="$unix_path"
40952  fi
40953
40954    # remove trailing .exe if any
40955    new_path="${new_path/%.exe/}"
40956
40957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40959  fi
40960
40961    else
40962      # We're on a unix platform. Hooray! :)
40963      # First separate the path from the arguments. This will split at the first
40964      # space.
40965      complete="$OBJCOPY"
40966      path="${complete%% *}"
40967      tmp="$complete EOL"
40968      arguments="${tmp#* }"
40969
40970      # Cannot rely on the command "which" here since it doesn't always work.
40971      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40972      if test -z "$is_absolute_path"; then
40973        # Path to executable is not absolute. Find it.
40974        IFS_save="$IFS"
40975        IFS=:
40976        for p in $PATH; do
40977          if test -f "$p/$path" && test -x "$p/$path"; then
40978            new_path="$p/$path"
40979            break
40980          fi
40981        done
40982        IFS="$IFS_save"
40983      else
40984        # This is an absolute path, we can use it without further modifications.
40985        new_path="$path"
40986      fi
40987
40988      if test "x$new_path" = x; then
40989        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
40990$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
40991        has_space=`$ECHO "$complete" | $GREP " "`
40992        if test "x$has_space" != x; then
40993          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40994$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40995        fi
40996        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
40997      fi
40998    fi
40999
41000    # Now join together the path and the arguments once again
41001    if test "x$arguments" != xEOL; then
41002      new_complete="$new_path ${arguments% *}"
41003    else
41004      new_complete="$new_path"
41005    fi
41006
41007    if test "x$complete" != "x$new_complete"; then
41008      OBJCOPY="$new_complete"
41009      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41010$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41011    fi
41012  fi
41013
41014      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41015        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41016        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41017        # - version number is last blank separate word on first line
41018        # - version number formats that have been seen:
41019        #   - <major>.<minor>
41020        #   - <major>.<minor>.<micro>
41021        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41022        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41023         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41024              -e 's/.* //' \
41025              -e '/^[01]\./b bad' \
41026              -e '/^2\./{' \
41027              -e '  s/^2\.//' \
41028              -e '  /^[0-9]$/b bad' \
41029              -e '  /^[0-9]\./b bad' \
41030              -e '  /^1[0-9]$/b bad' \
41031              -e '  /^1[0-9]\./b bad' \
41032              -e '  /^20\./b bad' \
41033              -e '  /^21\.0$/b bad' \
41034              -e '  /^21\.0\./b bad' \
41035              -e '}' \
41036              -e ':good' \
41037              -e 's/.*/VALID_VERSION/p' \
41038              -e 'q' \
41039              -e ':bad' \
41040              -e 's/.*/BAD_VERSION/p' \
41041              -e 'q'`
41042        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41043          OBJCOPY=
41044          { $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
41045$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41046          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41047$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41048          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41049$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41050          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41051$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41052          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41053$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41054        fi
41055      fi
41056    fi
41057  fi
41058
41059
41060
41061  # Publish this variable in the help.
41062
41063
41064  if [ -z "${OBJDUMP+x}" ]; then
41065    # The variable is not set by user, try to locate tool using the code snippet
41066    if test -n "$ac_tool_prefix"; then
41067  for ac_prog in gobjdump objdump
41068  do
41069    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41072$as_echo_n "checking for $ac_word... " >&6; }
41073if ${ac_cv_prog_OBJDUMP+:} false; then :
41074  $as_echo_n "(cached) " >&6
41075else
41076  if test -n "$OBJDUMP"; then
41077  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41078else
41079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41080for as_dir in $PATH
41081do
41082  IFS=$as_save_IFS
41083  test -z "$as_dir" && as_dir=.
41084    for ac_exec_ext in '' $ac_executable_extensions; do
41085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41086    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41088    break 2
41089  fi
41090done
41091  done
41092IFS=$as_save_IFS
41093
41094fi
41095fi
41096OBJDUMP=$ac_cv_prog_OBJDUMP
41097if test -n "$OBJDUMP"; then
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41099$as_echo "$OBJDUMP" >&6; }
41100else
41101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41102$as_echo "no" >&6; }
41103fi
41104
41105
41106    test -n "$OBJDUMP" && break
41107  done
41108fi
41109if test -z "$OBJDUMP"; then
41110  ac_ct_OBJDUMP=$OBJDUMP
41111  for ac_prog in gobjdump objdump
41112do
41113  # Extract the first word of "$ac_prog", so it can be a program name with args.
41114set dummy $ac_prog; ac_word=$2
41115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41116$as_echo_n "checking for $ac_word... " >&6; }
41117if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41118  $as_echo_n "(cached) " >&6
41119else
41120  if test -n "$ac_ct_OBJDUMP"; then
41121  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41122else
41123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41124for as_dir in $PATH
41125do
41126  IFS=$as_save_IFS
41127  test -z "$as_dir" && as_dir=.
41128    for ac_exec_ext in '' $ac_executable_extensions; do
41129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41130    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41132    break 2
41133  fi
41134done
41135  done
41136IFS=$as_save_IFS
41137
41138fi
41139fi
41140ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41141if test -n "$ac_ct_OBJDUMP"; then
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41143$as_echo "$ac_ct_OBJDUMP" >&6; }
41144else
41145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41146$as_echo "no" >&6; }
41147fi
41148
41149
41150  test -n "$ac_ct_OBJDUMP" && break
41151done
41152
41153  if test "x$ac_ct_OBJDUMP" = x; then
41154    OBJDUMP=""
41155  else
41156    case $cross_compiling:$ac_tool_warned in
41157yes:)
41158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41160ac_tool_warned=yes ;;
41161esac
41162    OBJDUMP=$ac_ct_OBJDUMP
41163  fi
41164fi
41165
41166  else
41167    # The variable is set, but is it from the command line or the environment?
41168
41169    # Try to remove the string !OBJDUMP! from our list.
41170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41172      # If it failed, the variable was not from the command line. Ignore it,
41173      # but warn the user (except for BASH, which is always set by the calling BASH).
41174      if test "xOBJDUMP" != xBASH; then
41175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41176$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41177      fi
41178      # Try to locate tool using the code snippet
41179      if test -n "$ac_tool_prefix"; then
41180  for ac_prog in gobjdump objdump
41181  do
41182    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41183set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41185$as_echo_n "checking for $ac_word... " >&6; }
41186if ${ac_cv_prog_OBJDUMP+:} false; then :
41187  $as_echo_n "(cached) " >&6
41188else
41189  if test -n "$OBJDUMP"; then
41190  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41191else
41192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41193for as_dir in $PATH
41194do
41195  IFS=$as_save_IFS
41196  test -z "$as_dir" && as_dir=.
41197    for ac_exec_ext in '' $ac_executable_extensions; do
41198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41199    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41201    break 2
41202  fi
41203done
41204  done
41205IFS=$as_save_IFS
41206
41207fi
41208fi
41209OBJDUMP=$ac_cv_prog_OBJDUMP
41210if test -n "$OBJDUMP"; then
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41212$as_echo "$OBJDUMP" >&6; }
41213else
41214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41215$as_echo "no" >&6; }
41216fi
41217
41218
41219    test -n "$OBJDUMP" && break
41220  done
41221fi
41222if test -z "$OBJDUMP"; then
41223  ac_ct_OBJDUMP=$OBJDUMP
41224  for ac_prog in gobjdump objdump
41225do
41226  # Extract the first word of "$ac_prog", so it can be a program name with args.
41227set dummy $ac_prog; ac_word=$2
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229$as_echo_n "checking for $ac_word... " >&6; }
41230if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41231  $as_echo_n "(cached) " >&6
41232else
41233  if test -n "$ac_ct_OBJDUMP"; then
41234  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41235else
41236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237for as_dir in $PATH
41238do
41239  IFS=$as_save_IFS
41240  test -z "$as_dir" && as_dir=.
41241    for ac_exec_ext in '' $ac_executable_extensions; do
41242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245    break 2
41246  fi
41247done
41248  done
41249IFS=$as_save_IFS
41250
41251fi
41252fi
41253ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41254if test -n "$ac_ct_OBJDUMP"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41256$as_echo "$ac_ct_OBJDUMP" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263  test -n "$ac_ct_OBJDUMP" && break
41264done
41265
41266  if test "x$ac_ct_OBJDUMP" = x; then
41267    OBJDUMP=""
41268  else
41269    case $cross_compiling:$ac_tool_warned in
41270yes:)
41271{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41272$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41273ac_tool_warned=yes ;;
41274esac
41275    OBJDUMP=$ac_ct_OBJDUMP
41276  fi
41277fi
41278
41279    else
41280      # If it succeeded, then it was overridden by the user. We will use it
41281      # for the tool.
41282
41283      # First remove it from the list of overridden variables, so we can test
41284      # for unknown variables in the end.
41285      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41286
41287      # Check if we try to supply an empty value
41288      if test "x$OBJDUMP" = x; then
41289        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41290$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41292$as_echo_n "checking for OBJDUMP... " >&6; }
41293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41294$as_echo "disabled" >&6; }
41295      else
41296        # Check if the provided tool contains a complete path.
41297        tool_specified="$OBJDUMP"
41298        tool_basename="${tool_specified##*/}"
41299        if test "x$tool_basename" = "x$tool_specified"; then
41300          # A command without a complete path is provided, search $PATH.
41301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41302$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41303          # Extract the first word of "$tool_basename", so it can be a program name with args.
41304set dummy $tool_basename; ac_word=$2
41305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41306$as_echo_n "checking for $ac_word... " >&6; }
41307if ${ac_cv_path_OBJDUMP+:} false; then :
41308  $as_echo_n "(cached) " >&6
41309else
41310  case $OBJDUMP in
41311  [\\/]* | ?:[\\/]*)
41312  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41313  ;;
41314  *)
41315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41316for as_dir in $PATH
41317do
41318  IFS=$as_save_IFS
41319  test -z "$as_dir" && as_dir=.
41320    for ac_exec_ext in '' $ac_executable_extensions; do
41321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41322    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41324    break 2
41325  fi
41326done
41327  done
41328IFS=$as_save_IFS
41329
41330  ;;
41331esac
41332fi
41333OBJDUMP=$ac_cv_path_OBJDUMP
41334if test -n "$OBJDUMP"; then
41335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41336$as_echo "$OBJDUMP" >&6; }
41337else
41338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41339$as_echo "no" >&6; }
41340fi
41341
41342
41343          if test "x$OBJDUMP" = x; then
41344            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41345          fi
41346        else
41347          # Otherwise we believe it is a complete path. Use it as it is.
41348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
41349$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
41350          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41351$as_echo_n "checking for OBJDUMP... " >&6; }
41352          if test ! -x "$tool_specified"; then
41353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41354$as_echo "not found" >&6; }
41355            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
41356          fi
41357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41358$as_echo "$tool_specified" >&6; }
41359        fi
41360      fi
41361    fi
41362
41363  fi
41364
41365
41366  if test "x$OBJDUMP" != x; then
41367    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
41368    # bails if argument is missing.
41369
41370  # Only process if variable expands to non-empty
41371
41372  if test "x$OBJDUMP" != x; then
41373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41374
41375  # First separate the path from the arguments. This will split at the first
41376  # space.
41377  complete="$OBJDUMP"
41378  path="${complete%% *}"
41379  tmp="$complete EOL"
41380  arguments="${tmp#* }"
41381
41382  # Input might be given as Windows format, start by converting to
41383  # unix format.
41384  new_path=`$CYGPATH -u "$path"`
41385
41386  # Now try to locate executable using which
41387  new_path=`$WHICH "$new_path" 2> /dev/null`
41388  # bat and cmd files are not always considered executable in cygwin causing which
41389  # to not find them
41390  if test "x$new_path" = x \
41391      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41392      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41393    new_path=`$CYGPATH -u "$path"`
41394  fi
41395  if test "x$new_path" = x; then
41396    # Oops. Which didn't find the executable.
41397    # The splitting of arguments from the executable at a space might have been incorrect,
41398    # since paths with space are more likely in Windows. Give it another try with the whole
41399    # argument.
41400    path="$complete"
41401    arguments="EOL"
41402    new_path=`$CYGPATH -u "$path"`
41403    new_path=`$WHICH "$new_path" 2> /dev/null`
41404    # bat and cmd files are not always considered executable in cygwin causing which
41405    # to not find them
41406    if test "x$new_path" = x \
41407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41409      new_path=`$CYGPATH -u "$path"`
41410    fi
41411    if test "x$new_path" = x; then
41412      # It's still not found. Now this is an unrecoverable error.
41413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41414$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41415      has_space=`$ECHO "$complete" | $GREP " "`
41416      if test "x$has_space" != x; then
41417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41419      fi
41420      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41421    fi
41422  fi
41423
41424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41427  # "foo.exe" is OK but "foo" is an error.
41428  #
41429  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41430  # It is also a way to make sure we got the proper file name for the real test later on.
41431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41432  if test "x$test_shortpath" = x; then
41433    # Short path failed, file does not exist as specified.
41434    # Try adding .exe or .cmd
41435    if test -f "${new_path}.exe"; then
41436      input_to_shortpath="${new_path}.exe"
41437    elif test -f "${new_path}.cmd"; then
41438      input_to_shortpath="${new_path}.cmd"
41439    else
41440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
41441$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
41442      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41443$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41444      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41445    fi
41446  else
41447    input_to_shortpath="$new_path"
41448  fi
41449
41450  # Call helper function which possibly converts this using DOS-style short mode.
41451  # If so, the updated path is stored in $new_path.
41452  new_path="$input_to_shortpath"
41453
41454  input_path="$input_to_shortpath"
41455  # Check if we need to convert this using DOS-style short mode. If the path
41456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41457  # take no chances and rewrite it.
41458  # Note: m4 eats our [], so we need to use [ and ] instead.
41459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41460  if test "x$has_forbidden_chars" != x; then
41461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41465      # Going to short mode and back again did indeed matter. Since short mode is
41466      # case insensitive, let's make it lowercase to improve readability.
41467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41468      # Now convert it back to Unix-style (cygpath)
41469      input_path=`$CYGPATH -u "$shortmode_path"`
41470      new_path="$input_path"
41471    fi
41472  fi
41473
41474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41475  if test "x$test_cygdrive_prefix" = x; then
41476    # As a simple fix, exclude /usr/bin since it's not a real path.
41477    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41479      # a path prefixed by /cygdrive for fixpath to work.
41480      new_path="$CYGWIN_ROOT_PATH$input_path"
41481    fi
41482  fi
41483
41484  # remove trailing .exe if any
41485  new_path="${new_path/%.exe/}"
41486
41487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41488
41489  # First separate the path from the arguments. This will split at the first
41490  # space.
41491  complete="$OBJDUMP"
41492  path="${complete%% *}"
41493  tmp="$complete EOL"
41494  arguments="${tmp#* }"
41495
41496  # Input might be given as Windows format, start by converting to
41497  # unix format.
41498  new_path="$path"
41499
41500  windows_path="$new_path"
41501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41502    unix_path=`$CYGPATH -u "$windows_path"`
41503    new_path="$unix_path"
41504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41506    new_path="$unix_path"
41507  fi
41508
41509
41510  # Now try to locate executable using which
41511  new_path=`$WHICH "$new_path" 2> /dev/null`
41512
41513  if test "x$new_path" = x; then
41514    # Oops. Which didn't find the executable.
41515    # The splitting of arguments from the executable at a space might have been incorrect,
41516    # since paths with space are more likely in Windows. Give it another try with the whole
41517    # argument.
41518    path="$complete"
41519    arguments="EOL"
41520    new_path="$path"
41521
41522  windows_path="$new_path"
41523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41524    unix_path=`$CYGPATH -u "$windows_path"`
41525    new_path="$unix_path"
41526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41528    new_path="$unix_path"
41529  fi
41530
41531
41532    new_path=`$WHICH "$new_path" 2> /dev/null`
41533    # bat and cmd files are not always considered executable in MSYS causing which
41534    # to not find them
41535    if test "x$new_path" = x \
41536        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41537        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41538      new_path="$path"
41539
41540  windows_path="$new_path"
41541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41542    unix_path=`$CYGPATH -u "$windows_path"`
41543    new_path="$unix_path"
41544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41546    new_path="$unix_path"
41547  fi
41548
41549    fi
41550
41551    if test "x$new_path" = x; then
41552      # It's still not found. Now this is an unrecoverable error.
41553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41554$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41555      has_space=`$ECHO "$complete" | $GREP " "`
41556      if test "x$has_space" != x; then
41557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41559      fi
41560      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41561    fi
41562  fi
41563
41564  # Now new_path has a complete unix path to the binary
41565  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41566    # Keep paths in /bin as-is, but remove trailing .exe if any
41567    new_path="${new_path/%.exe/}"
41568    # Do not save /bin paths to all_fixpath_prefixes!
41569  else
41570    # Not in mixed or Windows style, start by that.
41571    new_path=`cmd //c echo $new_path`
41572
41573  input_path="$new_path"
41574  # Check if we need to convert this using DOS-style short mode. If the path
41575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41576  # take no chances and rewrite it.
41577  # Note: m4 eats our [], so we need to use [ and ] instead.
41578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41579  if test "x$has_forbidden_chars" != x; then
41580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41582  fi
41583
41584    # Output is in $new_path
41585
41586  windows_path="$new_path"
41587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41588    unix_path=`$CYGPATH -u "$windows_path"`
41589    new_path="$unix_path"
41590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41592    new_path="$unix_path"
41593  fi
41594
41595    # remove trailing .exe if any
41596    new_path="${new_path/%.exe/}"
41597
41598    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41599    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41600  fi
41601
41602    else
41603      # We're on a unix platform. Hooray! :)
41604      # First separate the path from the arguments. This will split at the first
41605      # space.
41606      complete="$OBJDUMP"
41607      path="${complete%% *}"
41608      tmp="$complete EOL"
41609      arguments="${tmp#* }"
41610
41611      # Cannot rely on the command "which" here since it doesn't always work.
41612      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41613      if test -z "$is_absolute_path"; then
41614        # Path to executable is not absolute. Find it.
41615        IFS_save="$IFS"
41616        IFS=:
41617        for p in $PATH; do
41618          if test -f "$p/$path" && test -x "$p/$path"; then
41619            new_path="$p/$path"
41620            break
41621          fi
41622        done
41623        IFS="$IFS_save"
41624      else
41625        # This is an absolute path, we can use it without further modifications.
41626        new_path="$path"
41627      fi
41628
41629      if test "x$new_path" = x; then
41630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
41631$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
41632        has_space=`$ECHO "$complete" | $GREP " "`
41633        if test "x$has_space" != x; then
41634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41636        fi
41637        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
41638      fi
41639    fi
41640
41641    # Now join together the path and the arguments once again
41642    if test "x$arguments" != xEOL; then
41643      new_complete="$new_path ${arguments% *}"
41644    else
41645      new_complete="$new_path"
41646    fi
41647
41648    if test "x$complete" != "x$new_complete"; then
41649      OBJDUMP="$new_complete"
41650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
41651$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
41652    fi
41653  fi
41654
41655  fi
41656
41657
41658  # Restore old path.
41659  PATH="$OLD_PATH"
41660
41661  # Restore the flags to the user specified values.
41662  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
41663  CFLAGS="$ORG_CFLAGS"
41664  CXXFLAGS="$ORG_CXXFLAGS"
41665
41666
41667# Finally do some processing after the detection phase
41668
41669  if test "x$COMPILE_TYPE" = "xcross"; then
41670    # Now we need to find a C/C++ compiler that can build executables for the
41671    # build platform. We can't use the AC_PROG_CC macro, since it can only be
41672    # used once. Also, we need to do this without adding a tools dir to the
41673    # path, otherwise we might pick up cross-compilers which don't use standard
41674    # naming.
41675
41676    OLDPATH="$PATH"
41677
41678
41679# Check whether --with-build-devkit was given.
41680if test "${with_build_devkit+set}" = set; then :
41681  withval=$with_build_devkit;
41682fi
41683
41684    if test "x$with_build_devkit" = "xyes"; then
41685      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
41686    elif test -n "$with_build_devkit"; then
41687      if test ! -d "$with_build_devkit"; then
41688        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
41689      else
41690
41691  # Only process if variable expands to non-empty
41692
41693  if test "x$with_build_devkit" != x; then
41694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41695
41696  # Input might be given as Windows format, start by converting to
41697  # unix format.
41698  path="$with_build_devkit"
41699  new_path=`$CYGPATH -u "$path"`
41700
41701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41704  # "foo.exe" is OK but "foo" is an error.
41705  #
41706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41707  # It is also a way to make sure we got the proper file name for the real test later on.
41708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41709  if test "x$test_shortpath" = x; then
41710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41711$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41712    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
41713  fi
41714
41715  # Call helper function which possibly converts this using DOS-style short mode.
41716  # If so, the updated path is stored in $new_path.
41717
41718  input_path="$new_path"
41719  # Check if we need to convert this using DOS-style short mode. If the path
41720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41721  # take no chances and rewrite it.
41722  # Note: m4 eats our [], so we need to use [ and ] instead.
41723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41724  if test "x$has_forbidden_chars" != x; then
41725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41729      # Going to short mode and back again did indeed matter. Since short mode is
41730      # case insensitive, let's make it lowercase to improve readability.
41731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41732      # Now convert it back to Unix-style (cygpath)
41733      input_path=`$CYGPATH -u "$shortmode_path"`
41734      new_path="$input_path"
41735    fi
41736  fi
41737
41738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41739  if test "x$test_cygdrive_prefix" = x; then
41740    # As a simple fix, exclude /usr/bin since it's not a real path.
41741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41743      # a path prefixed by /cygdrive for fixpath to work.
41744      new_path="$CYGWIN_ROOT_PATH$input_path"
41745    fi
41746  fi
41747
41748
41749  if test "x$path" != "x$new_path"; then
41750    with_build_devkit="$new_path"
41751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41752$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41753  fi
41754
41755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41756
41757  path="$with_build_devkit"
41758  has_colon=`$ECHO $path | $GREP ^.:`
41759  new_path="$path"
41760  if test "x$has_colon" = x; then
41761    # Not in mixed or Windows style, start by that.
41762    new_path=`cmd //c echo $path`
41763  fi
41764
41765
41766  input_path="$new_path"
41767  # Check if we need to convert this using DOS-style short mode. If the path
41768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41769  # take no chances and rewrite it.
41770  # Note: m4 eats our [], so we need to use [ and ] instead.
41771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41772  if test "x$has_forbidden_chars" != x; then
41773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41775  fi
41776
41777
41778  windows_path="$new_path"
41779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41780    unix_path=`$CYGPATH -u "$windows_path"`
41781    new_path="$unix_path"
41782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41784    new_path="$unix_path"
41785  fi
41786
41787  if test "x$path" != "x$new_path"; then
41788    with_build_devkit="$new_path"
41789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
41790$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
41791  fi
41792
41793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41795
41796    else
41797      # We're on a unix platform. Hooray! :)
41798      path="$with_build_devkit"
41799      has_space=`$ECHO "$path" | $GREP " "`
41800      if test "x$has_space" != x; then
41801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
41802$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
41803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41804      fi
41805
41806      # Use eval to expand a potential ~
41807      eval path="$path"
41808      if test ! -f "$path" && test ! -d "$path"; then
41809        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
41810      fi
41811
41812      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
41813    fi
41814  fi
41815
41816        BUILD_DEVKIT_ROOT="$with_build_devkit"
41817        # Check for a meta data info file in the root of the devkit
41818        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
41819          # Process devkit.info so that existing devkit variables are not
41820          # modified by this
41821          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
41822              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
41823              -e "s/\$host/\$build/g" \
41824              $BUILD_DEVKIT_ROOT/devkit.info \
41825              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41826          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
41827          # This potentially sets the following:
41828          # A descriptive name of the devkit
41829
41830  if test "x$BUILD_DEVKIT_NAME" = x; then
41831    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
41832  fi
41833
41834          # Corresponds to --with-extra-path
41835
41836  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
41837    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
41838  fi
41839
41840          # Corresponds to --with-toolchain-path
41841
41842  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41843    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
41844  fi
41845
41846          # Corresponds to --with-sysroot
41847
41848  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
41849    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
41850  fi
41851
41852          # Skip the Window specific parts
41853        fi
41854
41855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
41856$as_echo_n "checking for build platform devkit... " >&6; }
41857        if test "x$BUILD_DEVKIT_NAME" != x; then
41858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
41859$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
41860        else
41861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
41862$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
41863        fi
41864
41865        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
41866
41867  if test "x$BUILD_SYSROOT" != "x"; then
41868    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41869      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41870        # Solaris Studio does not have a concept of sysroot. Instead we must
41871        # make sure the default include and lib dirs are appended to each
41872        # compile and link command line.
41873        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
41874        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41875            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41876            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41877      fi
41878    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41879      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
41880      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
41881    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41882      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
41883      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
41884    fi
41885    # Propagate the sysroot args to hotspot
41886    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
41887    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41888    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41889    # The global CFLAGS and LDFLAGS variables need these for configure to function
41890    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
41891    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
41892    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
41893    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
41894  fi
41895
41896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41897    # We also need -iframework<path>/System/Library/Frameworks
41898    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41899    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
41900    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41901    # set this here so it doesn't have to be peppered throughout the forest
41902    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41903    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
41904  fi
41905
41906
41907
41908
41909
41910         # Fallback default of just /bin if DEVKIT_PATH is not defined
41911        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
41912          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
41913        fi
41914        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
41915      fi
41916    fi
41917
41918    # FIXME: we should list the discovered compilers as an exclude pattern!
41919    # If we do that, we can do this detection before POST_DETECTION, and still
41920    # find the build compilers in the tools dir, if needed.
41921
41922
41923
41924  # Publish this variable in the help.
41925
41926
41927  if [ -z "${BUILD_CC+x}" ]; then
41928    # The variable is not set by user, try to locate tool using the code snippet
41929    for ac_prog in cl cc gcc
41930do
41931  # Extract the first word of "$ac_prog", so it can be a program name with args.
41932set dummy $ac_prog; ac_word=$2
41933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41934$as_echo_n "checking for $ac_word... " >&6; }
41935if ${ac_cv_path_BUILD_CC+:} false; then :
41936  $as_echo_n "(cached) " >&6
41937else
41938  case $BUILD_CC in
41939  [\\/]* | ?:[\\/]*)
41940  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
41941  ;;
41942  *)
41943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41944for as_dir in $PATH
41945do
41946  IFS=$as_save_IFS
41947  test -z "$as_dir" && as_dir=.
41948    for ac_exec_ext in '' $ac_executable_extensions; do
41949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41950    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
41951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41952    break 2
41953  fi
41954done
41955  done
41956IFS=$as_save_IFS
41957
41958  ;;
41959esac
41960fi
41961BUILD_CC=$ac_cv_path_BUILD_CC
41962if test -n "$BUILD_CC"; then
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
41964$as_echo "$BUILD_CC" >&6; }
41965else
41966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41967$as_echo "no" >&6; }
41968fi
41969
41970
41971  test -n "$BUILD_CC" && break
41972done
41973
41974  else
41975    # The variable is set, but is it from the command line or the environment?
41976
41977    # Try to remove the string !BUILD_CC! from our list.
41978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
41979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41980      # If it failed, the variable was not from the command line. Ignore it,
41981      # but warn the user (except for BASH, which is always set by the calling BASH).
41982      if test "xBUILD_CC" != xBASH; then
41983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
41984$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
41985      fi
41986      # Try to locate tool using the code snippet
41987      for ac_prog in cl cc gcc
41988do
41989  # Extract the first word of "$ac_prog", so it can be a program name with args.
41990set dummy $ac_prog; ac_word=$2
41991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41992$as_echo_n "checking for $ac_word... " >&6; }
41993if ${ac_cv_path_BUILD_CC+:} false; then :
41994  $as_echo_n "(cached) " >&6
41995else
41996  case $BUILD_CC in
41997  [\\/]* | ?:[\\/]*)
41998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
41999  ;;
42000  *)
42001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42002for as_dir in $PATH
42003do
42004  IFS=$as_save_IFS
42005  test -z "$as_dir" && as_dir=.
42006    for ac_exec_ext in '' $ac_executable_extensions; do
42007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42010    break 2
42011  fi
42012done
42013  done
42014IFS=$as_save_IFS
42015
42016  ;;
42017esac
42018fi
42019BUILD_CC=$ac_cv_path_BUILD_CC
42020if test -n "$BUILD_CC"; then
42021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42022$as_echo "$BUILD_CC" >&6; }
42023else
42024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42025$as_echo "no" >&6; }
42026fi
42027
42028
42029  test -n "$BUILD_CC" && break
42030done
42031
42032    else
42033      # If it succeeded, then it was overridden by the user. We will use it
42034      # for the tool.
42035
42036      # First remove it from the list of overridden variables, so we can test
42037      # for unknown variables in the end.
42038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42039
42040      # Check if we try to supply an empty value
42041      if test "x$BUILD_CC" = x; then
42042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42043$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42045$as_echo_n "checking for BUILD_CC... " >&6; }
42046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42047$as_echo "disabled" >&6; }
42048      else
42049        # Check if the provided tool contains a complete path.
42050        tool_specified="$BUILD_CC"
42051        tool_basename="${tool_specified##*/}"
42052        if test "x$tool_basename" = "x$tool_specified"; then
42053          # A command without a complete path is provided, search $PATH.
42054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42055$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42056          # Extract the first word of "$tool_basename", so it can be a program name with args.
42057set dummy $tool_basename; ac_word=$2
42058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42059$as_echo_n "checking for $ac_word... " >&6; }
42060if ${ac_cv_path_BUILD_CC+:} false; then :
42061  $as_echo_n "(cached) " >&6
42062else
42063  case $BUILD_CC in
42064  [\\/]* | ?:[\\/]*)
42065  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42066  ;;
42067  *)
42068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42069for as_dir in $PATH
42070do
42071  IFS=$as_save_IFS
42072  test -z "$as_dir" && as_dir=.
42073    for ac_exec_ext in '' $ac_executable_extensions; do
42074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42075    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42077    break 2
42078  fi
42079done
42080  done
42081IFS=$as_save_IFS
42082
42083  ;;
42084esac
42085fi
42086BUILD_CC=$ac_cv_path_BUILD_CC
42087if test -n "$BUILD_CC"; then
42088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42089$as_echo "$BUILD_CC" >&6; }
42090else
42091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42092$as_echo "no" >&6; }
42093fi
42094
42095
42096          if test "x$BUILD_CC" = x; then
42097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42098          fi
42099        else
42100          # Otherwise we believe it is a complete path. Use it as it is.
42101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42102$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42104$as_echo_n "checking for BUILD_CC... " >&6; }
42105          if test ! -x "$tool_specified"; then
42106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42107$as_echo "not found" >&6; }
42108            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42109          fi
42110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42111$as_echo "$tool_specified" >&6; }
42112        fi
42113      fi
42114    fi
42115
42116  fi
42117
42118
42119
42120  if test "x$BUILD_CC" = x; then
42121    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42122  fi
42123
42124
42125
42126  # Only process if variable expands to non-empty
42127
42128  if test "x$BUILD_CC" != x; then
42129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42130
42131  # First separate the path from the arguments. This will split at the first
42132  # space.
42133  complete="$BUILD_CC"
42134  path="${complete%% *}"
42135  tmp="$complete EOL"
42136  arguments="${tmp#* }"
42137
42138  # Input might be given as Windows format, start by converting to
42139  # unix format.
42140  new_path=`$CYGPATH -u "$path"`
42141
42142  # Now try to locate executable using which
42143  new_path=`$WHICH "$new_path" 2> /dev/null`
42144  # bat and cmd files are not always considered executable in cygwin causing which
42145  # to not find them
42146  if test "x$new_path" = x \
42147      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42148      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42149    new_path=`$CYGPATH -u "$path"`
42150  fi
42151  if test "x$new_path" = x; then
42152    # Oops. Which didn't find the executable.
42153    # The splitting of arguments from the executable at a space might have been incorrect,
42154    # since paths with space are more likely in Windows. Give it another try with the whole
42155    # argument.
42156    path="$complete"
42157    arguments="EOL"
42158    new_path=`$CYGPATH -u "$path"`
42159    new_path=`$WHICH "$new_path" 2> /dev/null`
42160    # bat and cmd files are not always considered executable in cygwin causing which
42161    # to not find them
42162    if test "x$new_path" = x \
42163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42165      new_path=`$CYGPATH -u "$path"`
42166    fi
42167    if test "x$new_path" = x; then
42168      # It's still not found. Now this is an unrecoverable error.
42169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42170$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42171      has_space=`$ECHO "$complete" | $GREP " "`
42172      if test "x$has_space" != x; then
42173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42175      fi
42176      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42177    fi
42178  fi
42179
42180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42183  # "foo.exe" is OK but "foo" is an error.
42184  #
42185  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42186  # It is also a way to make sure we got the proper file name for the real test later on.
42187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42188  if test "x$test_shortpath" = x; then
42189    # Short path failed, file does not exist as specified.
42190    # Try adding .exe or .cmd
42191    if test -f "${new_path}.exe"; then
42192      input_to_shortpath="${new_path}.exe"
42193    elif test -f "${new_path}.cmd"; then
42194      input_to_shortpath="${new_path}.cmd"
42195    else
42196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42197$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42200      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42201    fi
42202  else
42203    input_to_shortpath="$new_path"
42204  fi
42205
42206  # Call helper function which possibly converts this using DOS-style short mode.
42207  # If so, the updated path is stored in $new_path.
42208  new_path="$input_to_shortpath"
42209
42210  input_path="$input_to_shortpath"
42211  # Check if we need to convert this using DOS-style short mode. If the path
42212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42213  # take no chances and rewrite it.
42214  # Note: m4 eats our [], so we need to use [ and ] instead.
42215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42216  if test "x$has_forbidden_chars" != x; then
42217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42221      # Going to short mode and back again did indeed matter. Since short mode is
42222      # case insensitive, let's make it lowercase to improve readability.
42223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42224      # Now convert it back to Unix-style (cygpath)
42225      input_path=`$CYGPATH -u "$shortmode_path"`
42226      new_path="$input_path"
42227    fi
42228  fi
42229
42230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42231  if test "x$test_cygdrive_prefix" = x; then
42232    # As a simple fix, exclude /usr/bin since it's not a real path.
42233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42235      # a path prefixed by /cygdrive for fixpath to work.
42236      new_path="$CYGWIN_ROOT_PATH$input_path"
42237    fi
42238  fi
42239
42240  # remove trailing .exe if any
42241  new_path="${new_path/%.exe/}"
42242
42243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42244
42245  # First separate the path from the arguments. This will split at the first
42246  # space.
42247  complete="$BUILD_CC"
42248  path="${complete%% *}"
42249  tmp="$complete EOL"
42250  arguments="${tmp#* }"
42251
42252  # Input might be given as Windows format, start by converting to
42253  # unix format.
42254  new_path="$path"
42255
42256  windows_path="$new_path"
42257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42258    unix_path=`$CYGPATH -u "$windows_path"`
42259    new_path="$unix_path"
42260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42262    new_path="$unix_path"
42263  fi
42264
42265
42266  # Now try to locate executable using which
42267  new_path=`$WHICH "$new_path" 2> /dev/null`
42268
42269  if test "x$new_path" = x; then
42270    # Oops. Which didn't find the executable.
42271    # The splitting of arguments from the executable at a space might have been incorrect,
42272    # since paths with space are more likely in Windows. Give it another try with the whole
42273    # argument.
42274    path="$complete"
42275    arguments="EOL"
42276    new_path="$path"
42277
42278  windows_path="$new_path"
42279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42280    unix_path=`$CYGPATH -u "$windows_path"`
42281    new_path="$unix_path"
42282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42284    new_path="$unix_path"
42285  fi
42286
42287
42288    new_path=`$WHICH "$new_path" 2> /dev/null`
42289    # bat and cmd files are not always considered executable in MSYS causing which
42290    # to not find them
42291    if test "x$new_path" = x \
42292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42294      new_path="$path"
42295
42296  windows_path="$new_path"
42297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42298    unix_path=`$CYGPATH -u "$windows_path"`
42299    new_path="$unix_path"
42300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42302    new_path="$unix_path"
42303  fi
42304
42305    fi
42306
42307    if test "x$new_path" = x; then
42308      # It's still not found. Now this is an unrecoverable error.
42309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42310$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42311      has_space=`$ECHO "$complete" | $GREP " "`
42312      if test "x$has_space" != x; then
42313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42315      fi
42316      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42317    fi
42318  fi
42319
42320  # Now new_path has a complete unix path to the binary
42321  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42322    # Keep paths in /bin as-is, but remove trailing .exe if any
42323    new_path="${new_path/%.exe/}"
42324    # Do not save /bin paths to all_fixpath_prefixes!
42325  else
42326    # Not in mixed or Windows style, start by that.
42327    new_path=`cmd //c echo $new_path`
42328
42329  input_path="$new_path"
42330  # Check if we need to convert this using DOS-style short mode. If the path
42331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42332  # take no chances and rewrite it.
42333  # Note: m4 eats our [], so we need to use [ and ] instead.
42334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42335  if test "x$has_forbidden_chars" != x; then
42336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42338  fi
42339
42340    # Output is in $new_path
42341
42342  windows_path="$new_path"
42343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42344    unix_path=`$CYGPATH -u "$windows_path"`
42345    new_path="$unix_path"
42346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42348    new_path="$unix_path"
42349  fi
42350
42351    # remove trailing .exe if any
42352    new_path="${new_path/%.exe/}"
42353
42354    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42355    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42356  fi
42357
42358    else
42359      # We're on a unix platform. Hooray! :)
42360      # First separate the path from the arguments. This will split at the first
42361      # space.
42362      complete="$BUILD_CC"
42363      path="${complete%% *}"
42364      tmp="$complete EOL"
42365      arguments="${tmp#* }"
42366
42367      # Cannot rely on the command "which" here since it doesn't always work.
42368      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42369      if test -z "$is_absolute_path"; then
42370        # Path to executable is not absolute. Find it.
42371        IFS_save="$IFS"
42372        IFS=:
42373        for p in $PATH; do
42374          if test -f "$p/$path" && test -x "$p/$path"; then
42375            new_path="$p/$path"
42376            break
42377          fi
42378        done
42379        IFS="$IFS_save"
42380      else
42381        # This is an absolute path, we can use it without further modifications.
42382        new_path="$path"
42383      fi
42384
42385      if test "x$new_path" = x; then
42386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42387$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42388        has_space=`$ECHO "$complete" | $GREP " "`
42389        if test "x$has_space" != x; then
42390          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42392        fi
42393        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42394      fi
42395    fi
42396
42397    # Now join together the path and the arguments once again
42398    if test "x$arguments" != xEOL; then
42399      new_complete="$new_path ${arguments% *}"
42400    else
42401      new_complete="$new_path"
42402    fi
42403
42404    if test "x$complete" != "x$new_complete"; then
42405      BUILD_CC="$new_complete"
42406      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
42407$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
42408    fi
42409  fi
42410
42411
42412
42413
42414  # Publish this variable in the help.
42415
42416
42417  if [ -z "${BUILD_CXX+x}" ]; then
42418    # The variable is not set by user, try to locate tool using the code snippet
42419    for ac_prog in cl CC g++
42420do
42421  # Extract the first word of "$ac_prog", so it can be a program name with args.
42422set dummy $ac_prog; ac_word=$2
42423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42424$as_echo_n "checking for $ac_word... " >&6; }
42425if ${ac_cv_path_BUILD_CXX+:} false; then :
42426  $as_echo_n "(cached) " >&6
42427else
42428  case $BUILD_CXX in
42429  [\\/]* | ?:[\\/]*)
42430  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42431  ;;
42432  *)
42433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42434for as_dir in $PATH
42435do
42436  IFS=$as_save_IFS
42437  test -z "$as_dir" && as_dir=.
42438    for ac_exec_ext in '' $ac_executable_extensions; do
42439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42440    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42442    break 2
42443  fi
42444done
42445  done
42446IFS=$as_save_IFS
42447
42448  ;;
42449esac
42450fi
42451BUILD_CXX=$ac_cv_path_BUILD_CXX
42452if test -n "$BUILD_CXX"; then
42453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42454$as_echo "$BUILD_CXX" >&6; }
42455else
42456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42457$as_echo "no" >&6; }
42458fi
42459
42460
42461  test -n "$BUILD_CXX" && break
42462done
42463
42464  else
42465    # The variable is set, but is it from the command line or the environment?
42466
42467    # Try to remove the string !BUILD_CXX! from our list.
42468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
42469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42470      # If it failed, the variable was not from the command line. Ignore it,
42471      # but warn the user (except for BASH, which is always set by the calling BASH).
42472      if test "xBUILD_CXX" != xBASH; then
42473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
42474$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
42475      fi
42476      # Try to locate tool using the code snippet
42477      for ac_prog in cl CC g++
42478do
42479  # Extract the first word of "$ac_prog", so it can be a program name with args.
42480set dummy $ac_prog; ac_word=$2
42481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42482$as_echo_n "checking for $ac_word... " >&6; }
42483if ${ac_cv_path_BUILD_CXX+:} false; then :
42484  $as_echo_n "(cached) " >&6
42485else
42486  case $BUILD_CXX in
42487  [\\/]* | ?:[\\/]*)
42488  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42489  ;;
42490  *)
42491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42492for as_dir in $PATH
42493do
42494  IFS=$as_save_IFS
42495  test -z "$as_dir" && as_dir=.
42496    for ac_exec_ext in '' $ac_executable_extensions; do
42497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42498    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42500    break 2
42501  fi
42502done
42503  done
42504IFS=$as_save_IFS
42505
42506  ;;
42507esac
42508fi
42509BUILD_CXX=$ac_cv_path_BUILD_CXX
42510if test -n "$BUILD_CXX"; then
42511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42512$as_echo "$BUILD_CXX" >&6; }
42513else
42514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42515$as_echo "no" >&6; }
42516fi
42517
42518
42519  test -n "$BUILD_CXX" && break
42520done
42521
42522    else
42523      # If it succeeded, then it was overridden by the user. We will use it
42524      # for the tool.
42525
42526      # First remove it from the list of overridden variables, so we can test
42527      # for unknown variables in the end.
42528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42529
42530      # Check if we try to supply an empty value
42531      if test "x$BUILD_CXX" = x; then
42532        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
42533$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
42534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42535$as_echo_n "checking for BUILD_CXX... " >&6; }
42536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42537$as_echo "disabled" >&6; }
42538      else
42539        # Check if the provided tool contains a complete path.
42540        tool_specified="$BUILD_CXX"
42541        tool_basename="${tool_specified##*/}"
42542        if test "x$tool_basename" = "x$tool_specified"; then
42543          # A command without a complete path is provided, search $PATH.
42544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
42545$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
42546          # Extract the first word of "$tool_basename", so it can be a program name with args.
42547set dummy $tool_basename; ac_word=$2
42548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42549$as_echo_n "checking for $ac_word... " >&6; }
42550if ${ac_cv_path_BUILD_CXX+:} false; then :
42551  $as_echo_n "(cached) " >&6
42552else
42553  case $BUILD_CXX in
42554  [\\/]* | ?:[\\/]*)
42555  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
42556  ;;
42557  *)
42558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42559for as_dir in $PATH
42560do
42561  IFS=$as_save_IFS
42562  test -z "$as_dir" && as_dir=.
42563    for ac_exec_ext in '' $ac_executable_extensions; do
42564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42565    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
42566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42567    break 2
42568  fi
42569done
42570  done
42571IFS=$as_save_IFS
42572
42573  ;;
42574esac
42575fi
42576BUILD_CXX=$ac_cv_path_BUILD_CXX
42577if test -n "$BUILD_CXX"; then
42578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
42579$as_echo "$BUILD_CXX" >&6; }
42580else
42581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42582$as_echo "no" >&6; }
42583fi
42584
42585
42586          if test "x$BUILD_CXX" = x; then
42587            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42588          fi
42589        else
42590          # Otherwise we believe it is a complete path. Use it as it is.
42591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
42592$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
42593          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
42594$as_echo_n "checking for BUILD_CXX... " >&6; }
42595          if test ! -x "$tool_specified"; then
42596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42597$as_echo "not found" >&6; }
42598            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
42599          fi
42600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42601$as_echo "$tool_specified" >&6; }
42602        fi
42603      fi
42604    fi
42605
42606  fi
42607
42608
42609
42610  if test "x$BUILD_CXX" = x; then
42611    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
42612  fi
42613
42614
42615
42616  # Only process if variable expands to non-empty
42617
42618  if test "x$BUILD_CXX" != x; then
42619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42620
42621  # First separate the path from the arguments. This will split at the first
42622  # space.
42623  complete="$BUILD_CXX"
42624  path="${complete%% *}"
42625  tmp="$complete EOL"
42626  arguments="${tmp#* }"
42627
42628  # Input might be given as Windows format, start by converting to
42629  # unix format.
42630  new_path=`$CYGPATH -u "$path"`
42631
42632  # Now try to locate executable using which
42633  new_path=`$WHICH "$new_path" 2> /dev/null`
42634  # bat and cmd files are not always considered executable in cygwin causing which
42635  # to not find them
42636  if test "x$new_path" = x \
42637      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42638      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42639    new_path=`$CYGPATH -u "$path"`
42640  fi
42641  if test "x$new_path" = x; then
42642    # Oops. Which didn't find the executable.
42643    # The splitting of arguments from the executable at a space might have been incorrect,
42644    # since paths with space are more likely in Windows. Give it another try with the whole
42645    # argument.
42646    path="$complete"
42647    arguments="EOL"
42648    new_path=`$CYGPATH -u "$path"`
42649    new_path=`$WHICH "$new_path" 2> /dev/null`
42650    # bat and cmd files are not always considered executable in cygwin causing which
42651    # to not find them
42652    if test "x$new_path" = x \
42653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42655      new_path=`$CYGPATH -u "$path"`
42656    fi
42657    if test "x$new_path" = x; then
42658      # It's still not found. Now this is an unrecoverable error.
42659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42660$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42661      has_space=`$ECHO "$complete" | $GREP " "`
42662      if test "x$has_space" != x; then
42663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42665      fi
42666      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42667    fi
42668  fi
42669
42670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42673  # "foo.exe" is OK but "foo" is an error.
42674  #
42675  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42676  # It is also a way to make sure we got the proper file name for the real test later on.
42677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42678  if test "x$test_shortpath" = x; then
42679    # Short path failed, file does not exist as specified.
42680    # Try adding .exe or .cmd
42681    if test -f "${new_path}.exe"; then
42682      input_to_shortpath="${new_path}.exe"
42683    elif test -f "${new_path}.cmd"; then
42684      input_to_shortpath="${new_path}.cmd"
42685    else
42686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
42687$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
42688      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42689$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42690      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42691    fi
42692  else
42693    input_to_shortpath="$new_path"
42694  fi
42695
42696  # Call helper function which possibly converts this using DOS-style short mode.
42697  # If so, the updated path is stored in $new_path.
42698  new_path="$input_to_shortpath"
42699
42700  input_path="$input_to_shortpath"
42701  # Check if we need to convert this using DOS-style short mode. If the path
42702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42703  # take no chances and rewrite it.
42704  # Note: m4 eats our [], so we need to use [ and ] instead.
42705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42706  if test "x$has_forbidden_chars" != x; then
42707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42711      # Going to short mode and back again did indeed matter. Since short mode is
42712      # case insensitive, let's make it lowercase to improve readability.
42713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42714      # Now convert it back to Unix-style (cygpath)
42715      input_path=`$CYGPATH -u "$shortmode_path"`
42716      new_path="$input_path"
42717    fi
42718  fi
42719
42720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42721  if test "x$test_cygdrive_prefix" = x; then
42722    # As a simple fix, exclude /usr/bin since it's not a real path.
42723    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42725      # a path prefixed by /cygdrive for fixpath to work.
42726      new_path="$CYGWIN_ROOT_PATH$input_path"
42727    fi
42728  fi
42729
42730  # remove trailing .exe if any
42731  new_path="${new_path/%.exe/}"
42732
42733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42734
42735  # First separate the path from the arguments. This will split at the first
42736  # space.
42737  complete="$BUILD_CXX"
42738  path="${complete%% *}"
42739  tmp="$complete EOL"
42740  arguments="${tmp#* }"
42741
42742  # Input might be given as Windows format, start by converting to
42743  # unix format.
42744  new_path="$path"
42745
42746  windows_path="$new_path"
42747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42748    unix_path=`$CYGPATH -u "$windows_path"`
42749    new_path="$unix_path"
42750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42752    new_path="$unix_path"
42753  fi
42754
42755
42756  # Now try to locate executable using which
42757  new_path=`$WHICH "$new_path" 2> /dev/null`
42758
42759  if test "x$new_path" = x; then
42760    # Oops. Which didn't find the executable.
42761    # The splitting of arguments from the executable at a space might have been incorrect,
42762    # since paths with space are more likely in Windows. Give it another try with the whole
42763    # argument.
42764    path="$complete"
42765    arguments="EOL"
42766    new_path="$path"
42767
42768  windows_path="$new_path"
42769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42770    unix_path=`$CYGPATH -u "$windows_path"`
42771    new_path="$unix_path"
42772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42774    new_path="$unix_path"
42775  fi
42776
42777
42778    new_path=`$WHICH "$new_path" 2> /dev/null`
42779    # bat and cmd files are not always considered executable in MSYS causing which
42780    # to not find them
42781    if test "x$new_path" = x \
42782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42784      new_path="$path"
42785
42786  windows_path="$new_path"
42787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42788    unix_path=`$CYGPATH -u "$windows_path"`
42789    new_path="$unix_path"
42790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42792    new_path="$unix_path"
42793  fi
42794
42795    fi
42796
42797    if test "x$new_path" = x; then
42798      # It's still not found. Now this is an unrecoverable error.
42799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42800$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42801      has_space=`$ECHO "$complete" | $GREP " "`
42802      if test "x$has_space" != x; then
42803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42805      fi
42806      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42807    fi
42808  fi
42809
42810  # Now new_path has a complete unix path to the binary
42811  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42812    # Keep paths in /bin as-is, but remove trailing .exe if any
42813    new_path="${new_path/%.exe/}"
42814    # Do not save /bin paths to all_fixpath_prefixes!
42815  else
42816    # Not in mixed or Windows style, start by that.
42817    new_path=`cmd //c echo $new_path`
42818
42819  input_path="$new_path"
42820  # Check if we need to convert this using DOS-style short mode. If the path
42821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42822  # take no chances and rewrite it.
42823  # Note: m4 eats our [], so we need to use [ and ] instead.
42824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42825  if test "x$has_forbidden_chars" != x; then
42826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42828  fi
42829
42830    # Output is in $new_path
42831
42832  windows_path="$new_path"
42833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42834    unix_path=`$CYGPATH -u "$windows_path"`
42835    new_path="$unix_path"
42836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42838    new_path="$unix_path"
42839  fi
42840
42841    # remove trailing .exe if any
42842    new_path="${new_path/%.exe/}"
42843
42844    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42845    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42846  fi
42847
42848    else
42849      # We're on a unix platform. Hooray! :)
42850      # First separate the path from the arguments. This will split at the first
42851      # space.
42852      complete="$BUILD_CXX"
42853      path="${complete%% *}"
42854      tmp="$complete EOL"
42855      arguments="${tmp#* }"
42856
42857      # Cannot rely on the command "which" here since it doesn't always work.
42858      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42859      if test -z "$is_absolute_path"; then
42860        # Path to executable is not absolute. Find it.
42861        IFS_save="$IFS"
42862        IFS=:
42863        for p in $PATH; do
42864          if test -f "$p/$path" && test -x "$p/$path"; then
42865            new_path="$p/$path"
42866            break
42867          fi
42868        done
42869        IFS="$IFS_save"
42870      else
42871        # This is an absolute path, we can use it without further modifications.
42872        new_path="$path"
42873      fi
42874
42875      if test "x$new_path" = x; then
42876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
42877$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
42878        has_space=`$ECHO "$complete" | $GREP " "`
42879        if test "x$has_space" != x; then
42880          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42882        fi
42883        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
42884      fi
42885    fi
42886
42887    # Now join together the path and the arguments once again
42888    if test "x$arguments" != xEOL; then
42889      new_complete="$new_path ${arguments% *}"
42890    else
42891      new_complete="$new_path"
42892    fi
42893
42894    if test "x$complete" != "x$new_complete"; then
42895      BUILD_CXX="$new_complete"
42896      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
42897$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
42898    fi
42899  fi
42900
42901    BUILD_LD="$BUILD_CC"
42902
42903    PATH="$OLDPATH"
42904  else
42905    # If we are not cross compiling, use the normal target compilers for
42906    # building the build platform executables.
42907    BUILD_CC="$CC"
42908    BUILD_CXX="$CXX"
42909    BUILD_LD="$LD"
42910    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
42911    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
42912  fi
42913
42914
42915
42916
42917
42918
42919
42920
42921  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42922    # For hotspot, we need these in Windows mixed path,
42923    # so rewrite them all. Need added .exe suffix.
42924    HOTSPOT_CXX="$CXX.exe"
42925    HOTSPOT_LD="$LD.exe"
42926    HOTSPOT_MT="$MT.exe"
42927    HOTSPOT_RC="$RC.exe"
42928
42929  unix_path="$HOTSPOT_CXX"
42930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42931    windows_path=`$CYGPATH -m "$unix_path"`
42932    HOTSPOT_CXX="$windows_path"
42933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42934    windows_path=`cmd //c echo $unix_path`
42935    HOTSPOT_CXX="$windows_path"
42936  fi
42937
42938
42939  unix_path="$HOTSPOT_LD"
42940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42941    windows_path=`$CYGPATH -m "$unix_path"`
42942    HOTSPOT_LD="$windows_path"
42943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42944    windows_path=`cmd //c echo $unix_path`
42945    HOTSPOT_LD="$windows_path"
42946  fi
42947
42948
42949  unix_path="$HOTSPOT_MT"
42950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42951    windows_path=`$CYGPATH -m "$unix_path"`
42952    HOTSPOT_MT="$windows_path"
42953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42954    windows_path=`cmd //c echo $unix_path`
42955    HOTSPOT_MT="$windows_path"
42956  fi
42957
42958
42959  unix_path="$HOTSPOT_RC"
42960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42961    windows_path=`$CYGPATH -m "$unix_path"`
42962    HOTSPOT_RC="$windows_path"
42963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42964    windows_path=`cmd //c echo $unix_path`
42965    HOTSPOT_RC="$windows_path"
42966  fi
42967
42968
42969
42970  else
42971    HOTSPOT_CXX="$CXX"
42972    HOTSPOT_LD="$LD"
42973  fi
42974
42975
42976
42977  if test  "x$TOOLCHAIN_TYPE" = xclang; then
42978    USE_CLANG=true
42979  fi
42980
42981
42982
42983
42984
42985  # The package path is used only on macosx?
42986  # FIXME: clean this up, and/or move it elsewhere.
42987  PACKAGE_PATH=/opt/local
42988
42989
42990  # Check for extra potential brokenness.
42991  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42992    # On Windows, double-check that we got the right compiler.
42993    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
42994    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
42995    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
42996      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
42997        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
42998      fi
42999    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
43000      if test "x$COMPILER_CPU_TEST" != "xx64"; then
43001        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
43002      fi
43003    fi
43004  fi
43005
43006  if test "x$TOOLCHAIN_TYPE" = xgcc; then
43007    # If this is a --hash-style=gnu system, use --hash-style=both, why?
43008    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
43009    # This is later checked when setting flags.
43010
43011    # "-Og" suppported for GCC 4.8 and later
43012    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
43013
43014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
43015$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
43016  supports=yes
43017
43018  saved_cflags="$CFLAGS"
43019  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
43020  ac_ext=c
43021ac_cpp='$CPP $CPPFLAGS'
43022ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43023ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43024ac_compiler_gnu=$ac_cv_c_compiler_gnu
43025
43026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43027/* end confdefs.h.  */
43028int i;
43029_ACEOF
43030if ac_fn_c_try_compile "$LINENO"; then :
43031
43032else
43033  supports=no
43034fi
43035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43036  ac_ext=cpp
43037ac_cpp='$CXXCPP $CPPFLAGS'
43038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43041
43042  CFLAGS="$saved_cflags"
43043
43044  saved_cxxflags="$CXXFLAGS"
43045  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
43046  ac_ext=cpp
43047ac_cpp='$CXXCPP $CPPFLAGS'
43048ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43049ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43050ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43051
43052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43053/* end confdefs.h.  */
43054int i;
43055_ACEOF
43056if ac_fn_cxx_try_compile "$LINENO"; then :
43057
43058else
43059  supports=no
43060fi
43061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43062  ac_ext=cpp
43063ac_cpp='$CXXCPP $CPPFLAGS'
43064ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43065ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43066ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43067
43068  CXXFLAGS="$saved_cxxflags"
43069
43070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43071$as_echo "$supports" >&6; }
43072  if test "x$supports" = "xyes" ; then
43073    HAS_CFLAG_OPTIMIZE_DEBUG=true
43074  else
43075    HAS_CFLAG_OPTIMIZE_DEBUG=false
43076  fi
43077
43078
43079    # "-z relro" supported in GNU binutils 2.17 and later
43080    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
43081
43082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
43083$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
43084  supports=yes
43085
43086  saved_ldflags="$LDFLAGS"
43087  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
43088  ac_ext=c
43089ac_cpp='$CPP $CPPFLAGS'
43090ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43091ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43092ac_compiler_gnu=$ac_cv_c_compiler_gnu
43093
43094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43095/* end confdefs.h.  */
43096
43097int
43098main ()
43099{
43100
43101  ;
43102  return 0;
43103}
43104_ACEOF
43105if ac_fn_c_try_link "$LINENO"; then :
43106
43107else
43108  supports=no
43109fi
43110rm -f core conftest.err conftest.$ac_objext \
43111    conftest$ac_exeext conftest.$ac_ext
43112  ac_ext=cpp
43113ac_cpp='$CXXCPP $CPPFLAGS'
43114ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43115ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43116ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43117
43118  LDFLAGS="$saved_ldflags"
43119
43120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43121$as_echo "$supports" >&6; }
43122  if test "x$supports" = "xyes" ; then
43123    HAS_LINKER_RELRO=true
43124  else
43125    HAS_LINKER_RELRO=false
43126  fi
43127
43128
43129    # "-z now" supported in GNU binutils 2.11 and later
43130    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
43131
43132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
43133$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
43134  supports=yes
43135
43136  saved_ldflags="$LDFLAGS"
43137  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
43138  ac_ext=c
43139ac_cpp='$CPP $CPPFLAGS'
43140ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43141ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43142ac_compiler_gnu=$ac_cv_c_compiler_gnu
43143
43144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43145/* end confdefs.h.  */
43146
43147int
43148main ()
43149{
43150
43151  ;
43152  return 0;
43153}
43154_ACEOF
43155if ac_fn_c_try_link "$LINENO"; then :
43156
43157else
43158  supports=no
43159fi
43160rm -f core conftest.err conftest.$ac_objext \
43161    conftest$ac_exeext conftest.$ac_ext
43162  ac_ext=cpp
43163ac_cpp='$CXXCPP $CPPFLAGS'
43164ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43165ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43166ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43167
43168  LDFLAGS="$saved_ldflags"
43169
43170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43171$as_echo "$supports" >&6; }
43172  if test "x$supports" = "xyes" ; then
43173    HAS_LINKER_NOW=true
43174  else
43175    HAS_LINKER_NOW=false
43176  fi
43177
43178  fi
43179
43180  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
43181  # in executable.'
43182  USING_BROKEN_SUSE_LD=no
43183  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
43184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
43185$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
43186    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
43187    $ECHO "int main() { }" > main.c
43188    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
43189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43190$as_echo "no" >&6; }
43191      USING_BROKEN_SUSE_LD=no
43192    else
43193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43194$as_echo "yes" >&6; }
43195      USING_BROKEN_SUSE_LD=yes
43196    fi
43197    rm -rf version-script.map main.c a.out
43198  fi
43199
43200
43201
43202# Setup the JTReg Regression Test Harness.
43203
43204
43205# Check whether --with-jtreg was given.
43206if test "${with_jtreg+set}" = set; then :
43207  withval=$with_jtreg;
43208else
43209  with_jtreg=no
43210fi
43211
43212
43213  if test "x$with_jtreg" = xno; then
43214    # jtreg disabled
43215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43216$as_echo_n "checking for jtreg... " >&6; }
43217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43218$as_echo "no" >&6; }
43219  else
43220    if test "x$with_jtreg" != xyes; then
43221      # with path specified.
43222      JT_HOME="$with_jtreg"
43223    fi
43224
43225    if test "x$JT_HOME" != x; then
43226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
43227$as_echo_n "checking for jtreg... " >&6; }
43228
43229      # use JT_HOME enviroment var.
43230
43231  # Only process if variable expands to non-empty
43232
43233  if test "x$JT_HOME" != x; then
43234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43235
43236  # Input might be given as Windows format, start by converting to
43237  # unix format.
43238  path="$JT_HOME"
43239  new_path=`$CYGPATH -u "$path"`
43240
43241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43244  # "foo.exe" is OK but "foo" is an error.
43245  #
43246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43247  # It is also a way to make sure we got the proper file name for the real test later on.
43248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43249  if test "x$test_shortpath" = x; then
43250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43251$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43252    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
43253  fi
43254
43255  # Call helper function which possibly converts this using DOS-style short mode.
43256  # If so, the updated path is stored in $new_path.
43257
43258  input_path="$new_path"
43259  # Check if we need to convert this using DOS-style short mode. If the path
43260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43261  # take no chances and rewrite it.
43262  # Note: m4 eats our [], so we need to use [ and ] instead.
43263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43264  if test "x$has_forbidden_chars" != x; then
43265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43269      # Going to short mode and back again did indeed matter. Since short mode is
43270      # case insensitive, let's make it lowercase to improve readability.
43271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43272      # Now convert it back to Unix-style (cygpath)
43273      input_path=`$CYGPATH -u "$shortmode_path"`
43274      new_path="$input_path"
43275    fi
43276  fi
43277
43278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43279  if test "x$test_cygdrive_prefix" = x; then
43280    # As a simple fix, exclude /usr/bin since it's not a real path.
43281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43283      # a path prefixed by /cygdrive for fixpath to work.
43284      new_path="$CYGWIN_ROOT_PATH$input_path"
43285    fi
43286  fi
43287
43288
43289  if test "x$path" != "x$new_path"; then
43290    JT_HOME="$new_path"
43291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43292$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43293  fi
43294
43295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43296
43297  path="$JT_HOME"
43298  has_colon=`$ECHO $path | $GREP ^.:`
43299  new_path="$path"
43300  if test "x$has_colon" = x; then
43301    # Not in mixed or Windows style, start by that.
43302    new_path=`cmd //c echo $path`
43303  fi
43304
43305
43306  input_path="$new_path"
43307  # Check if we need to convert this using DOS-style short mode. If the path
43308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43309  # take no chances and rewrite it.
43310  # Note: m4 eats our [], so we need to use [ and ] instead.
43311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43312  if test "x$has_forbidden_chars" != x; then
43313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43315  fi
43316
43317
43318  windows_path="$new_path"
43319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43320    unix_path=`$CYGPATH -u "$windows_path"`
43321    new_path="$unix_path"
43322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43324    new_path="$unix_path"
43325  fi
43326
43327  if test "x$path" != "x$new_path"; then
43328    JT_HOME="$new_path"
43329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
43330$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
43331  fi
43332
43333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43335
43336    else
43337      # We're on a unix platform. Hooray! :)
43338      path="$JT_HOME"
43339      has_space=`$ECHO "$path" | $GREP " "`
43340      if test "x$has_space" != x; then
43341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
43342$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
43343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43344      fi
43345
43346      # Use eval to expand a potential ~
43347      eval path="$path"
43348      if test ! -f "$path" && test ! -d "$path"; then
43349        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
43350      fi
43351
43352      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
43353    fi
43354  fi
43355
43356
43357      # jtreg win32 script works for everybody
43358      JTREGEXE="$JT_HOME/bin/jtreg"
43359
43360      if test ! -f "$JTREGEXE"; then
43361        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
43362      fi
43363
43364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43365$as_echo "$JTREGEXE" >&6; }
43366    else
43367      # try to find jtreg on path
43368
43369
43370
43371  # Publish this variable in the help.
43372
43373
43374  if [ -z "${JTREGEXE+x}" ]; then
43375    # The variable is not set by user, try to locate tool using the code snippet
43376    for ac_prog in jtreg
43377do
43378  # Extract the first word of "$ac_prog", so it can be a program name with args.
43379set dummy $ac_prog; ac_word=$2
43380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43381$as_echo_n "checking for $ac_word... " >&6; }
43382if ${ac_cv_path_JTREGEXE+:} false; then :
43383  $as_echo_n "(cached) " >&6
43384else
43385  case $JTREGEXE in
43386  [\\/]* | ?:[\\/]*)
43387  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43388  ;;
43389  *)
43390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43391for as_dir in $PATH
43392do
43393  IFS=$as_save_IFS
43394  test -z "$as_dir" && as_dir=.
43395    for ac_exec_ext in '' $ac_executable_extensions; do
43396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43397    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43399    break 2
43400  fi
43401done
43402  done
43403IFS=$as_save_IFS
43404
43405  ;;
43406esac
43407fi
43408JTREGEXE=$ac_cv_path_JTREGEXE
43409if test -n "$JTREGEXE"; then
43410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43411$as_echo "$JTREGEXE" >&6; }
43412else
43413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43414$as_echo "no" >&6; }
43415fi
43416
43417
43418  test -n "$JTREGEXE" && break
43419done
43420
43421  else
43422    # The variable is set, but is it from the command line or the environment?
43423
43424    # Try to remove the string !JTREGEXE! from our list.
43425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
43426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43427      # If it failed, the variable was not from the command line. Ignore it,
43428      # but warn the user (except for BASH, which is always set by the calling BASH).
43429      if test "xJTREGEXE" != xBASH; then
43430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
43431$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
43432      fi
43433      # Try to locate tool using the code snippet
43434      for ac_prog in jtreg
43435do
43436  # Extract the first word of "$ac_prog", so it can be a program name with args.
43437set dummy $ac_prog; ac_word=$2
43438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43439$as_echo_n "checking for $ac_word... " >&6; }
43440if ${ac_cv_path_JTREGEXE+:} false; then :
43441  $as_echo_n "(cached) " >&6
43442else
43443  case $JTREGEXE in
43444  [\\/]* | ?:[\\/]*)
43445  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43446  ;;
43447  *)
43448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43449for as_dir in $PATH
43450do
43451  IFS=$as_save_IFS
43452  test -z "$as_dir" && as_dir=.
43453    for ac_exec_ext in '' $ac_executable_extensions; do
43454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43455    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43457    break 2
43458  fi
43459done
43460  done
43461IFS=$as_save_IFS
43462
43463  ;;
43464esac
43465fi
43466JTREGEXE=$ac_cv_path_JTREGEXE
43467if test -n "$JTREGEXE"; then
43468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43469$as_echo "$JTREGEXE" >&6; }
43470else
43471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43472$as_echo "no" >&6; }
43473fi
43474
43475
43476  test -n "$JTREGEXE" && break
43477done
43478
43479    else
43480      # If it succeeded, then it was overridden by the user. We will use it
43481      # for the tool.
43482
43483      # First remove it from the list of overridden variables, so we can test
43484      # for unknown variables in the end.
43485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43486
43487      # Check if we try to supply an empty value
43488      if test "x$JTREGEXE" = x; then
43489        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
43490$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
43491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43492$as_echo_n "checking for JTREGEXE... " >&6; }
43493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43494$as_echo "disabled" >&6; }
43495      else
43496        # Check if the provided tool contains a complete path.
43497        tool_specified="$JTREGEXE"
43498        tool_basename="${tool_specified##*/}"
43499        if test "x$tool_basename" = "x$tool_specified"; then
43500          # A command without a complete path is provided, search $PATH.
43501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
43502$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
43503          # Extract the first word of "$tool_basename", so it can be a program name with args.
43504set dummy $tool_basename; ac_word=$2
43505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43506$as_echo_n "checking for $ac_word... " >&6; }
43507if ${ac_cv_path_JTREGEXE+:} false; then :
43508  $as_echo_n "(cached) " >&6
43509else
43510  case $JTREGEXE in
43511  [\\/]* | ?:[\\/]*)
43512  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
43513  ;;
43514  *)
43515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43516for as_dir in $PATH
43517do
43518  IFS=$as_save_IFS
43519  test -z "$as_dir" && as_dir=.
43520    for ac_exec_ext in '' $ac_executable_extensions; do
43521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43522    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
43523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43524    break 2
43525  fi
43526done
43527  done
43528IFS=$as_save_IFS
43529
43530  ;;
43531esac
43532fi
43533JTREGEXE=$ac_cv_path_JTREGEXE
43534if test -n "$JTREGEXE"; then
43535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
43536$as_echo "$JTREGEXE" >&6; }
43537else
43538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43539$as_echo "no" >&6; }
43540fi
43541
43542
43543          if test "x$JTREGEXE" = x; then
43544            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43545          fi
43546        else
43547          # Otherwise we believe it is a complete path. Use it as it is.
43548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
43549$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
43550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
43551$as_echo_n "checking for JTREGEXE... " >&6; }
43552          if test ! -x "$tool_specified"; then
43553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43554$as_echo "not found" >&6; }
43555            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
43556          fi
43557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43558$as_echo "$tool_specified" >&6; }
43559        fi
43560      fi
43561    fi
43562
43563  fi
43564
43565
43566
43567  if test "x$JTREGEXE" = x; then
43568    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
43569  fi
43570
43571
43572      JT_HOME="`$DIRNAME $JTREGEXE`"
43573    fi
43574  fi
43575
43576
43577
43578
43579
43580
43581  # Option used to tell the compiler whether to create 32- or 64-bit executables
43582  if test "x$TOOLCHAIN_TYPE" = xxlc; then
43583    COMPILER_TARGET_BITS_FLAG="-q"
43584  else
43585    COMPILER_TARGET_BITS_FLAG="-m"
43586  fi
43587
43588
43589  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
43590  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43591    ARFLAGS="-r"
43592  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43593    ARFLAGS="-X64"
43594  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
43595    # lib.exe is used as AR to create static libraries.
43596    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
43597  else
43598    ARFLAGS=""
43599  fi
43600
43601
43602  ## Setup strip.
43603  # FIXME: should this really be per platform, or should it be per toolchain type?
43604  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
43605  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
43606  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43607    STRIPFLAGS="-g"
43608  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
43609    STRIPFLAGS="-x"
43610  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
43611    STRIPFLAGS="-S"
43612  elif test "x$OPENJDK_TARGET_OS" = xaix; then
43613    STRIPFLAGS="-X32_64"
43614  fi
43615
43616
43617
43618  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43619    CC_OUT_OPTION=-Fo
43620    EXE_OUT_OPTION=-out:
43621    LD_OUT_OPTION=-out:
43622    AR_OUT_OPTION=-out:
43623  else
43624    # The option used to specify the target .o,.a or .so file.
43625    # When compiling, how to specify the to be created object file.
43626    CC_OUT_OPTION='-o$(SPACE)'
43627    # When linking, how to specify the to be created executable.
43628    EXE_OUT_OPTION='-o$(SPACE)'
43629    # When linking, how to specify the to be created dynamically linkable library.
43630    LD_OUT_OPTION='-o$(SPACE)'
43631    # When archiving, how to specify the to be create static archive for object files.
43632    AR_OUT_OPTION='rcs$(SPACE)'
43633  fi
43634
43635
43636
43637
43638
43639  # On Windows, we need to set RC flags.
43640  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43641    RC_FLAGS="-nologo -l0x409"
43642    if test "x$VARIANT" = xOPT; then
43643      RC_FLAGS="$RC_FLAGS -DNDEBUG"
43644    fi
43645
43646    # The version variables used to create RC_FLAGS may be overridden
43647    # in a custom configure script, or possibly the command line.
43648    # Let those variables be expanded at make time in spec.gmk.
43649    # The \$ are escaped to the shell, and the $(...) variables
43650    # are evaluated by make.
43651    RC_FLAGS="$RC_FLAGS \
43652        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
43653        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
43654        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
43655        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
43656        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
43657        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
43658        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
43659  fi
43660
43661
43662  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
43663    # silence copyright notice and other headers.
43664    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
43665  fi
43666
43667
43668# FIXME: Currently we must test this after toolchain but before flags. Fix!
43669
43670# Now we can test some aspects on the target using configure macros.
43671
43672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
43673$as_echo_n "checking for ANSI C header files... " >&6; }
43674if ${ac_cv_header_stdc+:} false; then :
43675  $as_echo_n "(cached) " >&6
43676else
43677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43678/* end confdefs.h.  */
43679#include <stdlib.h>
43680#include <stdarg.h>
43681#include <string.h>
43682#include <float.h>
43683
43684int
43685main ()
43686{
43687
43688  ;
43689  return 0;
43690}
43691_ACEOF
43692if ac_fn_cxx_try_compile "$LINENO"; then :
43693  ac_cv_header_stdc=yes
43694else
43695  ac_cv_header_stdc=no
43696fi
43697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43698
43699if test $ac_cv_header_stdc = yes; then
43700  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
43701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43702/* end confdefs.h.  */
43703#include <string.h>
43704
43705_ACEOF
43706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43707  $EGREP "memchr" >/dev/null 2>&1; then :
43708
43709else
43710  ac_cv_header_stdc=no
43711fi
43712rm -f conftest*
43713
43714fi
43715
43716if test $ac_cv_header_stdc = yes; then
43717  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
43718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43719/* end confdefs.h.  */
43720#include <stdlib.h>
43721
43722_ACEOF
43723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43724  $EGREP "free" >/dev/null 2>&1; then :
43725
43726else
43727  ac_cv_header_stdc=no
43728fi
43729rm -f conftest*
43730
43731fi
43732
43733if test $ac_cv_header_stdc = yes; then
43734  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
43735  if test "$cross_compiling" = yes; then :
43736  :
43737else
43738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43739/* end confdefs.h.  */
43740#include <ctype.h>
43741#include <stdlib.h>
43742#if ((' ' & 0x0FF) == 0x020)
43743# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
43744# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
43745#else
43746# define ISLOWER(c) \
43747		   (('a' <= (c) && (c) <= 'i') \
43748		     || ('j' <= (c) && (c) <= 'r') \
43749		     || ('s' <= (c) && (c) <= 'z'))
43750# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
43751#endif
43752
43753#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
43754int
43755main ()
43756{
43757  int i;
43758  for (i = 0; i < 256; i++)
43759    if (XOR (islower (i), ISLOWER (i))
43760	|| toupper (i) != TOUPPER (i))
43761      return 2;
43762  return 0;
43763}
43764_ACEOF
43765if ac_fn_cxx_try_run "$LINENO"; then :
43766
43767else
43768  ac_cv_header_stdc=no
43769fi
43770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43771  conftest.$ac_objext conftest.beam conftest.$ac_ext
43772fi
43773
43774fi
43775fi
43776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
43777$as_echo "$ac_cv_header_stdc" >&6; }
43778if test $ac_cv_header_stdc = yes; then
43779
43780$as_echo "#define STDC_HEADERS 1" >>confdefs.h
43781
43782fi
43783
43784# On IRIX 5.3, sys/types and inttypes.h are conflicting.
43785for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
43786		  inttypes.h stdint.h unistd.h
43787do :
43788  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43789ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
43790"
43791if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43792  cat >>confdefs.h <<_ACEOF
43793#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43794_ACEOF
43795
43796fi
43797
43798done
43799
43800
43801
43802  ###############################################################################
43803  #
43804  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
43805  # (The JVM can use 32 or 64 bit Java pointers but that decision
43806  # is made at runtime.)
43807  #
43808
43809  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
43810    # Always specify -m flag on Solaris
43811    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
43812
43813  # When we add flags to the "official" CFLAGS etc, we need to
43814  # keep track of these additions in ADDED_CFLAGS etc. These
43815  # will later be checked to make sure only controlled additions
43816  # have been made to CFLAGS etc.
43817  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43818  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43819  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43820
43821  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43822  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43823  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43824
43825  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43826  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43827  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43828
43829  elif test "x$COMPILE_TYPE" = xreduced; then
43830    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
43831      # Specify -m if running reduced on unix platforms
43832
43833  # When we add flags to the "official" CFLAGS etc, we need to
43834  # keep track of these additions in ADDED_CFLAGS etc. These
43835  # will later be checked to make sure only controlled additions
43836  # have been made to CFLAGS etc.
43837  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43838  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43839  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43840
43841  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43842  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43843  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43844
43845  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43846  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43847  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43848
43849    fi
43850  fi
43851
43852  # Make compilation sanity check
43853  for ac_header in stdio.h
43854do :
43855  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
43856if test "x$ac_cv_header_stdio_h" = xyes; then :
43857  cat >>confdefs.h <<_ACEOF
43858#define HAVE_STDIO_H 1
43859_ACEOF
43860
43861else
43862
43863    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
43864$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
43865    if test "x$COMPILE_TYPE" = xreduced; then
43866
43867  # Print a helpful message on how to acquire the necessary build dependency.
43868  # reduced is the help tag: freetype, cups, alsa etc
43869  MISSING_DEPENDENCY=reduced
43870
43871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43872    cygwin_help $MISSING_DEPENDENCY
43873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43874    msys_help $MISSING_DEPENDENCY
43875  else
43876    PKGHANDLER_COMMAND=
43877
43878    case $PKGHANDLER in
43879      apt-get)
43880        apt_help     $MISSING_DEPENDENCY ;;
43881      yum)
43882        yum_help     $MISSING_DEPENDENCY ;;
43883      port)
43884        port_help    $MISSING_DEPENDENCY ;;
43885      pkgutil)
43886        pkgutil_help $MISSING_DEPENDENCY ;;
43887      pkgadd)
43888        pkgadd_help  $MISSING_DEPENDENCY ;;
43889    esac
43890
43891    if test "x$PKGHANDLER_COMMAND" != x; then
43892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43893    fi
43894  fi
43895
43896      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
43897$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
43898    elif test "x$COMPILE_TYPE" = xcross; then
43899      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
43900$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
43901    fi
43902    as_fn_error $? "Cannot continue." "$LINENO" 5
43903
43904fi
43905
43906done
43907
43908
43909  # The cast to long int works around a bug in the HP C Compiler
43910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
43911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
43912# This bug is HP SR number 8606223364.
43913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
43914$as_echo_n "checking size of int *... " >&6; }
43915if ${ac_cv_sizeof_int_p+:} false; then :
43916  $as_echo_n "(cached) " >&6
43917else
43918  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
43919
43920else
43921  if test "$ac_cv_type_int_p" = yes; then
43922     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
43924as_fn_error 77 "cannot compute sizeof (int *)
43925See \`config.log' for more details" "$LINENO" 5; }
43926   else
43927     ac_cv_sizeof_int_p=0
43928   fi
43929fi
43930
43931fi
43932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
43933$as_echo "$ac_cv_sizeof_int_p" >&6; }
43934
43935
43936
43937cat >>confdefs.h <<_ACEOF
43938#define SIZEOF_INT_P $ac_cv_sizeof_int_p
43939_ACEOF
43940
43941
43942
43943  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
43944  if test "x$ac_cv_sizeof_int_p" = x; then
43945    # The test failed, lets stick to the assumed value.
43946    { $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
43947$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
43948  else
43949    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
43950
43951    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
43952      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
43953      # Let's try to implicitely set the compilers target architecture and retry the test
43954      { $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
43955$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;}
43956      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
43957$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
43958
43959  # When we add flags to the "official" CFLAGS etc, we need to
43960  # keep track of these additions in ADDED_CFLAGS etc. These
43961  # will later be checked to make sure only controlled additions
43962  # have been made to CFLAGS etc.
43963  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43964  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43965  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43966
43967  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
43968  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
43969  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
43970
43971  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
43972  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
43973  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
43974
43975
43976      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
43977      unset ac_cv_sizeof_int_p
43978      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
43979      cat >>confdefs.h <<_ACEOF
43980#undef SIZEOF_INT_P
43981_ACEOF
43982
43983      # The cast to long int works around a bug in the HP C Compiler
43984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
43985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
43986# This bug is HP SR number 8606223364.
43987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
43988$as_echo_n "checking size of int *... " >&6; }
43989if ${ac_cv_sizeof_int_p+:} false; then :
43990  $as_echo_n "(cached) " >&6
43991else
43992  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
43993
43994else
43995  if test "$ac_cv_type_int_p" = yes; then
43996     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
43997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
43998as_fn_error 77 "cannot compute sizeof (int *)
43999See \`config.log' for more details" "$LINENO" 5; }
44000   else
44001     ac_cv_sizeof_int_p=0
44002   fi
44003fi
44004
44005fi
44006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
44007$as_echo "$ac_cv_sizeof_int_p" >&6; }
44008
44009
44010
44011cat >>confdefs.h <<_ACEOF
44012#define SIZEOF_INT_P $ac_cv_sizeof_int_p
44013_ACEOF
44014
44015
44016
44017      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
44018
44019      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
44020        { $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
44021$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;}
44022        if test "x$COMPILE_TYPE" = xreduced; then
44023
44024  # Print a helpful message on how to acquire the necessary build dependency.
44025  # reduced is the help tag: freetype, cups, alsa etc
44026  MISSING_DEPENDENCY=reduced
44027
44028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44029    cygwin_help $MISSING_DEPENDENCY
44030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44031    msys_help $MISSING_DEPENDENCY
44032  else
44033    PKGHANDLER_COMMAND=
44034
44035    case $PKGHANDLER in
44036      apt-get)
44037        apt_help     $MISSING_DEPENDENCY ;;
44038      yum)
44039        yum_help     $MISSING_DEPENDENCY ;;
44040      port)
44041        port_help    $MISSING_DEPENDENCY ;;
44042      pkgutil)
44043        pkgutil_help $MISSING_DEPENDENCY ;;
44044      pkgadd)
44045        pkgadd_help  $MISSING_DEPENDENCY ;;
44046    esac
44047
44048    if test "x$PKGHANDLER_COMMAND" != x; then
44049      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44050    fi
44051  fi
44052
44053          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
44054$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
44055        elif test "x$COMPILE_TYPE" = xcross; then
44056          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
44057$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
44058        fi
44059        as_fn_error $? "Cannot continue." "$LINENO" 5
44060      fi
44061    fi
44062  fi
44063
44064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
44065$as_echo_n "checking for target address size... " >&6; }
44066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
44067$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
44068
44069
44070  ###############################################################################
44071  #
44072  # Is the target little of big endian?
44073  #
44074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
44075$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
44076if ${ac_cv_c_bigendian+:} false; then :
44077  $as_echo_n "(cached) " >&6
44078else
44079  ac_cv_c_bigendian=unknown
44080    # See if we're dealing with a universal compiler.
44081    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44082/* end confdefs.h.  */
44083#ifndef __APPLE_CC__
44084	       not a universal capable compiler
44085	     #endif
44086	     typedef int dummy;
44087
44088_ACEOF
44089if ac_fn_cxx_try_compile "$LINENO"; then :
44090
44091	# Check for potential -arch flags.  It is not universal unless
44092	# there are at least two -arch flags with different values.
44093	ac_arch=
44094	ac_prev=
44095	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
44096	 if test -n "$ac_prev"; then
44097	   case $ac_word in
44098	     i?86 | x86_64 | ppc | ppc64)
44099	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
44100		 ac_arch=$ac_word
44101	       else
44102		 ac_cv_c_bigendian=universal
44103		 break
44104	       fi
44105	       ;;
44106	   esac
44107	   ac_prev=
44108	 elif test "x$ac_word" = "x-arch"; then
44109	   ac_prev=arch
44110	 fi
44111       done
44112fi
44113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44114    if test $ac_cv_c_bigendian = unknown; then
44115      # See if sys/param.h defines the BYTE_ORDER macro.
44116      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44117/* end confdefs.h.  */
44118#include <sys/types.h>
44119	     #include <sys/param.h>
44120
44121int
44122main ()
44123{
44124#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
44125		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
44126		     && LITTLE_ENDIAN)
44127	      bogus endian macros
44128	     #endif
44129
44130  ;
44131  return 0;
44132}
44133_ACEOF
44134if ac_fn_cxx_try_compile "$LINENO"; then :
44135  # It does; now see whether it defined to BIG_ENDIAN or not.
44136	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44137/* end confdefs.h.  */
44138#include <sys/types.h>
44139		#include <sys/param.h>
44140
44141int
44142main ()
44143{
44144#if BYTE_ORDER != BIG_ENDIAN
44145		 not big endian
44146		#endif
44147
44148  ;
44149  return 0;
44150}
44151_ACEOF
44152if ac_fn_cxx_try_compile "$LINENO"; then :
44153  ac_cv_c_bigendian=yes
44154else
44155  ac_cv_c_bigendian=no
44156fi
44157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44158fi
44159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44160    fi
44161    if test $ac_cv_c_bigendian = unknown; then
44162      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
44163      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44164/* end confdefs.h.  */
44165#include <limits.h>
44166
44167int
44168main ()
44169{
44170#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
44171	      bogus endian macros
44172	     #endif
44173
44174  ;
44175  return 0;
44176}
44177_ACEOF
44178if ac_fn_cxx_try_compile "$LINENO"; then :
44179  # It does; now see whether it defined to _BIG_ENDIAN or not.
44180	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44181/* end confdefs.h.  */
44182#include <limits.h>
44183
44184int
44185main ()
44186{
44187#ifndef _BIG_ENDIAN
44188		 not big endian
44189		#endif
44190
44191  ;
44192  return 0;
44193}
44194_ACEOF
44195if ac_fn_cxx_try_compile "$LINENO"; then :
44196  ac_cv_c_bigendian=yes
44197else
44198  ac_cv_c_bigendian=no
44199fi
44200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44201fi
44202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44203    fi
44204    if test $ac_cv_c_bigendian = unknown; then
44205      # Compile a test program.
44206      if test "$cross_compiling" = yes; then :
44207  # Try to guess by grepping values from an object file.
44208	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44209/* end confdefs.h.  */
44210short int ascii_mm[] =
44211		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
44212		short int ascii_ii[] =
44213		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
44214		int use_ascii (int i) {
44215		  return ascii_mm[i] + ascii_ii[i];
44216		}
44217		short int ebcdic_ii[] =
44218		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
44219		short int ebcdic_mm[] =
44220		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
44221		int use_ebcdic (int i) {
44222		  return ebcdic_mm[i] + ebcdic_ii[i];
44223		}
44224		extern int foo;
44225
44226int
44227main ()
44228{
44229return use_ascii (foo) == use_ebcdic (foo);
44230  ;
44231  return 0;
44232}
44233_ACEOF
44234if ac_fn_cxx_try_compile "$LINENO"; then :
44235  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
44236	      ac_cv_c_bigendian=yes
44237	    fi
44238	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
44239	      if test "$ac_cv_c_bigendian" = unknown; then
44240		ac_cv_c_bigendian=no
44241	      else
44242		# finding both strings is unlikely to happen, but who knows?
44243		ac_cv_c_bigendian=unknown
44244	      fi
44245	    fi
44246fi
44247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44248else
44249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44250/* end confdefs.h.  */
44251$ac_includes_default
44252int
44253main ()
44254{
44255
44256	     /* Are we little or big endian?  From Harbison&Steele.  */
44257	     union
44258	     {
44259	       long int l;
44260	       char c[sizeof (long int)];
44261	     } u;
44262	     u.l = 1;
44263	     return u.c[sizeof (long int) - 1] == 1;
44264
44265  ;
44266  return 0;
44267}
44268_ACEOF
44269if ac_fn_cxx_try_run "$LINENO"; then :
44270  ac_cv_c_bigendian=no
44271else
44272  ac_cv_c_bigendian=yes
44273fi
44274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44275  conftest.$ac_objext conftest.beam conftest.$ac_ext
44276fi
44277
44278    fi
44279fi
44280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
44281$as_echo "$ac_cv_c_bigendian" >&6; }
44282 case $ac_cv_c_bigendian in #(
44283   yes)
44284     ENDIAN="big";; #(
44285   no)
44286     ENDIAN="little" ;; #(
44287   universal)
44288     ENDIAN="universal_endianness"
44289     ;; #(
44290   *)
44291     ENDIAN="unknown" ;;
44292 esac
44293
44294
44295  if test "x$ENDIAN" = xuniversal_endianness; then
44296    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
44297  fi
44298  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
44299    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
44300  fi
44301
44302
44303# Configure flags for the tools
44304
44305  ###############################################################################
44306  #
44307  # How to compile shared libraries.
44308  #
44309
44310  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44311    PICFLAG="-fPIC"
44312    C_FLAG_REORDER=''
44313    CXX_FLAG_REORDER=''
44314
44315    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44316      # Linking is different on MacOSX
44317      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44318      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44319      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44320      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44321      SET_SHARED_LIBRARY_MAPFILE=''
44322    else
44323      # Default works for linux, might work on other platforms as well.
44324      SHARED_LIBRARY_FLAGS='-shared'
44325      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44326      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44327      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44328      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44329    fi
44330  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44331    PICFLAG=''
44332    C_FLAG_REORDER=''
44333    CXX_FLAG_REORDER=''
44334
44335    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44336      # Linking is different on MacOSX
44337      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
44338      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
44339      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44340      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
44341      SET_SHARED_LIBRARY_MAPFILE=''
44342    else
44343      # Default works for linux, might work on other platforms as well.
44344      SHARED_LIBRARY_FLAGS='-shared'
44345      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
44346      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
44347      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
44348      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
44349    fi
44350  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44351    PICFLAG="-KPIC"
44352    C_FLAG_REORDER='-xF'
44353    CXX_FLAG_REORDER='-xF'
44354    SHARED_LIBRARY_FLAGS="-G"
44355    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
44356    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
44357    SET_SHARED_LIBRARY_NAME=''
44358    SET_SHARED_LIBRARY_MAPFILE='-M$1'
44359  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44360    PICFLAG="-qpic=large"
44361    C_FLAG_REORDER=''
44362    CXX_FLAG_REORDER=''
44363    SHARED_LIBRARY_FLAGS="-qmkshrobj"
44364    SET_EXECUTABLE_ORIGIN=""
44365    SET_SHARED_LIBRARY_ORIGIN=''
44366    SET_SHARED_LIBRARY_NAME=''
44367    SET_SHARED_LIBRARY_MAPFILE=''
44368  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44369    PICFLAG=""
44370    C_FLAG_REORDER=''
44371    CXX_FLAG_REORDER=''
44372    SHARED_LIBRARY_FLAGS="-LD"
44373    SET_EXECUTABLE_ORIGIN=''
44374    SET_SHARED_LIBRARY_ORIGIN=''
44375    SET_SHARED_LIBRARY_NAME=''
44376    SET_SHARED_LIBRARY_MAPFILE=''
44377  fi
44378
44379
44380
44381
44382
44383
44384
44385
44386  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44387    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
44388    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
44389    CFLAGS_JDKLIB_EXTRA='-xstrconst'
44390  fi
44391  # The (cross) compiler is now configured, we can now test capabilities
44392  # of the target platform.
44393
44394
44395
44396  ###############################################################################
44397  #
44398  # Setup the opt flags for different compilers
44399  # and different operating systems.
44400  #
44401
44402  # FIXME: this was indirectly the old default, but just inherited.
44403  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44404  #   C_FLAG_DEPS="-MMD -MF"
44405  # fi
44406
44407  # Generate make dependency files
44408  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44409    C_FLAG_DEPS="-MMD -MF"
44410  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44411    C_FLAG_DEPS="-MMD -MF"
44412  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44413    C_FLAG_DEPS="-xMMD -xMF"
44414  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44415    C_FLAG_DEPS="-qmakedep=gcc -MF"
44416  fi
44417  CXX_FLAG_DEPS="$C_FLAG_DEPS"
44418
44419
44420
44421  # Debug symbols
44422  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44423    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
44424      # reduce from default "-g2" option to save space
44425      CFLAGS_DEBUG_SYMBOLS="-g1"
44426      CXXFLAGS_DEBUG_SYMBOLS="-g1"
44427    else
44428      CFLAGS_DEBUG_SYMBOLS="-g"
44429      CXXFLAGS_DEBUG_SYMBOLS="-g"
44430    fi
44431  elif test "x$TOOLCHAIN_TYPE" = xclang; then
44432    CFLAGS_DEBUG_SYMBOLS="-g"
44433    CXXFLAGS_DEBUG_SYMBOLS="-g"
44434  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44435    CFLAGS_DEBUG_SYMBOLS="-g -xs"
44436    # FIXME: likely a bug, this disables debug symbols rather than enables them
44437    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
44438  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44439    CFLAGS_DEBUG_SYMBOLS="-g"
44440    CXXFLAGS_DEBUG_SYMBOLS="-g"
44441  fi
44442
44443
44444
44445  # bounds, memory and behavior checking options
44446  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44447    case $DEBUG_LEVEL in
44448    release )
44449      # no adjustment
44450      ;;
44451    fastdebug )
44452      # no adjustment
44453      ;;
44454    slowdebug )
44455      # Add runtime stack smashing and undefined behavior checks.
44456      # Not all versions of gcc support -fstack-protector
44457      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
44458
44459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
44460$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
44461  supports=yes
44462
44463  saved_cflags="$CFLAGS"
44464  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
44465  ac_ext=c
44466ac_cpp='$CPP $CPPFLAGS'
44467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44469ac_compiler_gnu=$ac_cv_c_compiler_gnu
44470
44471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44472/* end confdefs.h.  */
44473int i;
44474_ACEOF
44475if ac_fn_c_try_compile "$LINENO"; then :
44476
44477else
44478  supports=no
44479fi
44480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44481  ac_ext=cpp
44482ac_cpp='$CXXCPP $CPPFLAGS'
44483ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44484ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44485ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44486
44487  CFLAGS="$saved_cflags"
44488
44489  saved_cxxflags="$CXXFLAGS"
44490  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
44491  ac_ext=cpp
44492ac_cpp='$CXXCPP $CPPFLAGS'
44493ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44494ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44495ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44496
44497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44498/* end confdefs.h.  */
44499int i;
44500_ACEOF
44501if ac_fn_cxx_try_compile "$LINENO"; then :
44502
44503else
44504  supports=no
44505fi
44506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44507  ac_ext=cpp
44508ac_cpp='$CXXCPP $CPPFLAGS'
44509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44510ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44512
44513  CXXFLAGS="$saved_cxxflags"
44514
44515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44516$as_echo "$supports" >&6; }
44517  if test "x$supports" = "xyes" ; then
44518    :
44519  else
44520    STACK_PROTECTOR_CFLAG=""
44521  fi
44522
44523
44524      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44525      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
44526      ;;
44527    esac
44528  fi
44529
44530  # Optimization levels
44531  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44532    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
44533
44534    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
44535      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
44536      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
44537      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
44538      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
44539      C_O_FLAG_DEBUG="-xregs=no%frameptr"
44540      C_O_FLAG_NONE="-xregs=no%frameptr"
44541      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
44542      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
44543      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
44544      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
44545      CXX_O_FLAG_NONE="-xregs=no%frameptr"
44546      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44547        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
44548        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
44549      fi
44550    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44551      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
44552      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44553      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
44554      C_O_FLAG_DEBUG=""
44555      C_O_FLAG_NONE=""
44556      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
44557      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44558      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
44559      C_O_FLAG_DEBUG=""
44560      CXX_O_FLAG_NONE=""
44561    fi
44562  else
44563    # The remaining toolchains share opt flags between CC and CXX;
44564    # setup for C and duplicate afterwards.
44565    if test "x$TOOLCHAIN_TYPE" = xgcc; then
44566      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44567        # On MacOSX we optimize for size, something
44568        # we should do for all platforms?
44569        C_O_FLAG_HIGHEST="-Os"
44570        C_O_FLAG_HI="-Os"
44571        C_O_FLAG_NORM="-Os"
44572      else
44573        C_O_FLAG_HIGHEST="-O3"
44574        C_O_FLAG_HI="-O3"
44575        C_O_FLAG_NORM="-O2"
44576      fi
44577      C_O_FLAG_DEBUG="-O0"
44578      C_O_FLAG_NONE="-O0"
44579    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44580      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44581        # On MacOSX we optimize for size, something
44582        # we should do for all platforms?
44583        C_O_FLAG_HIGHEST="-Os"
44584        C_O_FLAG_HI="-Os"
44585        C_O_FLAG_NORM="-Os"
44586      else
44587        C_O_FLAG_HIGHEST="-O3"
44588        C_O_FLAG_HI="-O3"
44589        C_O_FLAG_NORM="-O2"
44590      fi
44591      C_O_FLAG_DEBUG="-O0"
44592      C_O_FLAG_NONE="-O0"
44593    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44594      C_O_FLAG_HIGHEST="-O3"
44595      C_O_FLAG_HI="-O3 -qstrict"
44596      C_O_FLAG_NORM="-O2"
44597      C_O_FLAG_DEBUG="-qnoopt"
44598      C_O_FLAG_NONE="-qnoop"
44599    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44600      C_O_FLAG_HIGHEST="-O2"
44601      C_O_FLAG_HI="-O1"
44602      C_O_FLAG_NORM="-O1"
44603      C_O_FLAG_DEBUG="-Od"
44604      C_O_FLAG_NONE="-Od"
44605    fi
44606    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
44607    CXX_O_FLAG_HI="$C_O_FLAG_HI"
44608    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
44609    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
44610    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
44611  fi
44612
44613  # Adjust optimization flags according to debug level.
44614  case $DEBUG_LEVEL in
44615    release )
44616      # no adjustment
44617      ;;
44618    fastdebug )
44619      # Not quite so much optimization
44620      C_O_FLAG_HI="$C_O_FLAG_NORM"
44621      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
44622      ;;
44623    slowdebug )
44624      # Disable optimization
44625      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
44626      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
44627      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
44628      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
44629      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
44630      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
44631      ;;
44632  esac
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646  # Special extras...
44647  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44648    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
44649      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44650      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
44651    fi
44652    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44653    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
44654  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44655    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44656    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
44657  fi
44658
44659  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
44660  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
44661  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
44662
44663  ###############################################################################
44664  #
44665  # Now setup the CFLAGS and LDFLAGS for the JDK build.
44666  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
44667  #
44668
44669  # Setup compiler/platform specific flags into
44670  #    CFLAGS_JDK    - C Compiler flags
44671  #    CXXFLAGS_JDK  - C++ Compiler flags
44672  #    COMMON_CCXXFLAGS_JDK - common to C and C++
44673  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44674    if test "x$OPENJDK_TARGET_CPU" = xx86; then
44675      # Force compatibility with i586 on 32 bit intel platforms.
44676      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
44677    fi
44678    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
44679        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
44680    case $OPENJDK_TARGET_CPU_ARCH in
44681      arm )
44682        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44683        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44684        ;;
44685      ppc )
44686        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
44687        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44688        ;;
44689      * )
44690        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
44691        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
44692        ;;
44693    esac
44694  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44695    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
44696    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
44697      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
44698    fi
44699
44700    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
44701    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
44702  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44703    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44704    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
44705  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44706    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
44707        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
44708        -DWIN32_LEAN_AND_MEAN \
44709        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
44710        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
44711        -DWIN32 -DIAL"
44712    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44713      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
44714    else
44715      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
44716    fi
44717    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
44718    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
44719    # studio.
44720    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
44721      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44722          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
44723    fi
44724  fi
44725
44726  ###############################################################################
44727
44728  # Adjust flags according to debug level.
44729  case $DEBUG_LEVEL in
44730    fastdebug | slowdebug )
44731      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
44732      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
44733      JAVAC_FLAGS="$JAVAC_FLAGS -g"
44734      ;;
44735    release )
44736      ;;
44737    * )
44738      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44739      ;;
44740  esac
44741
44742  # Setup LP64
44743  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
44744
44745  # Set some common defines. These works for all compilers, but assume
44746  # -D is universally accepted.
44747
44748  # Setup endianness
44749  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
44750    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
44751    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
44752    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
44753    #   Note: -Dmacro         is the same as    #define macro 1
44754    #         -Dmacro=        is the same as    #define macro
44755    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44756      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
44757    else
44758      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
44759    fi
44760  else
44761    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
44762    # are defined in the system?
44763    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44764      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
44765    else
44766      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
44767    fi
44768  fi
44769
44770  # Setup target OS define. Use OS target name but in upper case.
44771  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
44772  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
44773
44774  # Setup target CPU
44775  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
44776
44777  # Setup debug/release defines
44778  if test "x$DEBUG_LEVEL" = xrelease; then
44779    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
44780    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44781      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
44782    fi
44783  else
44784    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
44785  fi
44786
44787  # Setup release name
44788  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
44789
44790
44791  # Set some additional per-OS defines.
44792  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44793    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
44794  elif test "x$OPENJDK_TARGET_OS" = xaix; then
44795    # FIXME: PPC64 should not be here.
44796    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
44797  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
44798    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
44799  fi
44800
44801  # Additional macosx handling
44802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44803    # Setting these parameters makes it an error to link to macosx APIs that are
44804    # newer than the given OS version and makes the linked binaries compatible
44805    # even if built on a newer version of the OS.
44806    # The expected format is X.Y.Z
44807    MACOSX_VERSION_MIN=10.7.0
44808
44809
44810    # The macro takes the version with no dots, ex: 1070
44811    # Let the flags variables get resolved in make for easier override on make
44812    # command line.
44813    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44814    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
44815  fi
44816
44817  # Setup some hard coded includes
44818  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
44819      -I${JDK_TOPDIR}/src/java.base/share/native/include \
44820      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
44821      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
44822
44823  # The shared libraries are compiled using the picflag.
44824  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44825  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44826
44827  # Executable flags
44828  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44829  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44830
44831
44832
44833
44834
44835
44836  # Flags for compiling test libraries
44837  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
44838  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
44839
44840  # Flags for compiling test executables
44841  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
44842  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
44843
44844
44845
44846
44847
44848
44849  # Setup LDFLAGS et al.
44850  #
44851
44852  # Now this is odd. The JDK native libraries have to link against libjvm.so
44853  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
44854  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
44855  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
44856  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
44857  # libraries will link to whatever is in memory. Yuck.
44858  #
44859  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
44860  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44861    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
44862    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
44863      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
44864    fi
44865    # TODO: make -debug optional "--disable-full-debug-symbols"
44866    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
44867  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44868    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44869    # We have previously set HAS_GNU_HASH if this is the case
44870    if test -n "$HAS_GNU_HASH"; then
44871      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
44872    fi
44873    if test "x$OPENJDK_TARGET_OS" = xlinux; then
44874      # And since we now know that the linker is gnu, then add -z defs, to forbid
44875      # undefined symbols in object files.
44876      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
44877      case $DEBUG_LEVEL in
44878        release )
44879          # tell linker to optimize libraries.
44880          # Should this be supplied to the OSS linker as well?
44881          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
44882          ;;
44883        slowdebug )
44884          if test "x$HAS_LINKER_NOW" = "xtrue"; then
44885            # do relocations at load
44886            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
44887            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
44888          fi
44889          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44890            # mark relocations read only
44891            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44892            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44893          fi
44894          ;;
44895        fastdebug )
44896          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
44897            # mark relocations read only
44898            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
44899            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
44900          fi
44901          ;;
44902        * )
44903          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
44904          ;;
44905        esac
44906    fi
44907  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44908    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
44909    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
44910  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
44911    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
44912  fi
44913
44914  # Customize LDFLAGS for executables
44915
44916  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
44917
44918  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44919    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
44920      LDFLAGS_STACK_SIZE=1048576
44921    else
44922      LDFLAGS_STACK_SIZE=327680
44923    fi
44924    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
44925  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
44926    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
44927  fi
44928
44929  # Customize LDFLAGS for libs
44930  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
44931
44932  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44933    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
44934    JDKLIB_LIBS=""
44935  else
44936    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
44937        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
44938
44939    # On some platforms (mac) the linker warns about non existing -L dirs.
44940    # Add server first if available. Linking aginst client does not always produce the same results.
44941    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
44942    # Default to server for other variants.
44943    if test "x$JVM_VARIANT_SERVER" = xtrue; then
44944      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
44945    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
44946      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
44947    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
44948      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
44949    else
44950      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
44951    fi
44952
44953    JDKLIB_LIBS="-ljava -ljvm"
44954    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44955      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
44956    fi
44957  fi
44958
44959
44960
44961
44962
44963
44964
44965  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
44966  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
44967
44968
44969
44970
44971
44972  # Some Zero and Shark settings.
44973  # ZERO_ARCHFLAG tells the compiler which mode to build for
44974  case "${OPENJDK_TARGET_CPU}" in
44975    s390)
44976      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
44977      ;;
44978    *)
44979      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
44980  esac
44981
44982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
44983$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
44984  supports=yes
44985
44986  saved_cflags="$CFLAGS"
44987  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
44988  ac_ext=c
44989ac_cpp='$CPP $CPPFLAGS'
44990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44992ac_compiler_gnu=$ac_cv_c_compiler_gnu
44993
44994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44995/* end confdefs.h.  */
44996int i;
44997_ACEOF
44998if ac_fn_c_try_compile "$LINENO"; then :
44999
45000else
45001  supports=no
45002fi
45003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45004  ac_ext=cpp
45005ac_cpp='$CXXCPP $CPPFLAGS'
45006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45009
45010  CFLAGS="$saved_cflags"
45011
45012  saved_cxxflags="$CXXFLAGS"
45013  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
45014  ac_ext=cpp
45015ac_cpp='$CXXCPP $CPPFLAGS'
45016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45019
45020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45021/* end confdefs.h.  */
45022int i;
45023_ACEOF
45024if ac_fn_cxx_try_compile "$LINENO"; then :
45025
45026else
45027  supports=no
45028fi
45029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45030  ac_ext=cpp
45031ac_cpp='$CXXCPP $CPPFLAGS'
45032ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45033ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45034ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45035
45036  CXXFLAGS="$saved_cxxflags"
45037
45038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45039$as_echo "$supports" >&6; }
45040  if test "x$supports" = "xyes" ; then
45041    :
45042  else
45043    ZERO_ARCHFLAG=""
45044  fi
45045
45046
45047
45048  # Check that the compiler supports -mX (or -qX on AIX) flags
45049  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
45050
45051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
45052$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
45053  supports=yes
45054
45055  saved_cflags="$CFLAGS"
45056  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45057  ac_ext=c
45058ac_cpp='$CPP $CPPFLAGS'
45059ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45060ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45061ac_compiler_gnu=$ac_cv_c_compiler_gnu
45062
45063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45064/* end confdefs.h.  */
45065int i;
45066_ACEOF
45067if ac_fn_c_try_compile "$LINENO"; then :
45068
45069else
45070  supports=no
45071fi
45072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45073  ac_ext=cpp
45074ac_cpp='$CXXCPP $CPPFLAGS'
45075ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45076ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45077ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45078
45079  CFLAGS="$saved_cflags"
45080
45081  saved_cxxflags="$CXXFLAGS"
45082  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45083  ac_ext=cpp
45084ac_cpp='$CXXCPP $CPPFLAGS'
45085ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45086ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45087ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45088
45089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45090/* end confdefs.h.  */
45091int i;
45092_ACEOF
45093if ac_fn_cxx_try_compile "$LINENO"; then :
45094
45095else
45096  supports=no
45097fi
45098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45099  ac_ext=cpp
45100ac_cpp='$CXXCPP $CPPFLAGS'
45101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45104
45105  CXXFLAGS="$saved_cxxflags"
45106
45107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45108$as_echo "$supports" >&6; }
45109  if test "x$supports" = "xyes" ; then
45110    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
45111  else
45112    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
45113  fi
45114
45115
45116
45117  # Check whether --enable-warnings-as-errors was given.
45118if test "${enable_warnings_as_errors+set}" = set; then :
45119  enableval=$enable_warnings_as_errors;
45120fi
45121
45122
45123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
45124$as_echo_n "checking if native warnings are errors... " >&6; }
45125  if test "x$enable_warnings_as_errors" = "xyes"; then
45126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
45127$as_echo "yes (explicitely set)" >&6; }
45128    WARNINGS_AS_ERRORS=true
45129  elif test "x$enable_warnings_as_errors" = "xno"; then
45130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45131$as_echo "no" >&6; }
45132    WARNINGS_AS_ERRORS=false
45133  elif test "x$enable_warnings_as_errors" = "x"; then
45134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
45135$as_echo "yes (default)" >&6; }
45136    WARNINGS_AS_ERRORS=true
45137  else
45138    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
45139  fi
45140
45141  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
45142    # Set legacy hotspot variable
45143    HOTSPOT_SET_WARNINGS_AS_ERRORS=WARNINGS_ARE_ERRORS=
45144  else
45145    HOTSPOT_SET_WARNINGS_AS_ERRORS=
45146  fi
45147
45148
45149
45150
45151  case "${TOOLCHAIN_TYPE}" in
45152    microsoft)
45153      DISABLE_WARNING_PREFIX="-wd"
45154      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
45155      ;;
45156    solstudio)
45157      DISABLE_WARNING_PREFIX="-erroff="
45158      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
45159      ;;
45160    gcc)
45161      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
45162
45163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
45164$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
45165  supports=yes
45166
45167  saved_cflags="$CFLAGS"
45168  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
45169  ac_ext=c
45170ac_cpp='$CPP $CPPFLAGS'
45171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45173ac_compiler_gnu=$ac_cv_c_compiler_gnu
45174
45175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45176/* end confdefs.h.  */
45177int i;
45178_ACEOF
45179if ac_fn_c_try_compile "$LINENO"; then :
45180
45181else
45182  supports=no
45183fi
45184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45185  ac_ext=cpp
45186ac_cpp='$CXXCPP $CPPFLAGS'
45187ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45188ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45189ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45190
45191  CFLAGS="$saved_cflags"
45192
45193  saved_cxxflags="$CXXFLAGS"
45194  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
45195  ac_ext=cpp
45196ac_cpp='$CXXCPP $CPPFLAGS'
45197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45200
45201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45202/* end confdefs.h.  */
45203int i;
45204_ACEOF
45205if ac_fn_cxx_try_compile "$LINENO"; then :
45206
45207else
45208  supports=no
45209fi
45210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45211  ac_ext=cpp
45212ac_cpp='$CXXCPP $CPPFLAGS'
45213ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45214ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45215ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45216
45217  CXXFLAGS="$saved_cxxflags"
45218
45219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45220$as_echo "$supports" >&6; }
45221  if test "x$supports" = "xyes" ; then
45222    GCC_CAN_DISABLE_WARNINGS=true
45223  else
45224    GCC_CAN_DISABLE_WARNINGS=false
45225
45226  fi
45227
45228      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
45229        DISABLE_WARNING_PREFIX="-Wno-"
45230      else
45231        DISABLE_WARNING_PREFIX=
45232      fi
45233      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45234      ;;
45235    clang)
45236      DISABLE_WARNING_PREFIX="-Wno-"
45237      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
45238      ;;
45239  esac
45240
45241
45242
45243
45244# Setup debug symbols (need objcopy from the toolchain for that)
45245
45246  #
45247  # ENABLE_DEBUG_SYMBOLS
45248  # This must be done after the toolchain is setup, since we're looking at objcopy.
45249  #
45250  # Check whether --enable-debug-symbols was given.
45251if test "${enable_debug_symbols+set}" = set; then :
45252  enableval=$enable_debug_symbols;
45253fi
45254
45255
45256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
45257$as_echo_n "checking if we should generate debug symbols... " >&6; }
45258
45259  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
45260    # explicit enabling of enable-debug-symbols and can't find objcopy
45261    #   this is an error
45262    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
45263  fi
45264
45265  if test "x$enable_debug_symbols" = "xyes"; then
45266    ENABLE_DEBUG_SYMBOLS=true
45267  elif test "x$enable_debug_symbols" = "xno"; then
45268    ENABLE_DEBUG_SYMBOLS=false
45269  else
45270    # Default is on if objcopy is found
45271    if test "x$OBJCOPY" != x; then
45272      ENABLE_DEBUG_SYMBOLS=true
45273    # MacOS X and Windows don't use objcopy but default is on for those OSes
45274    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
45275      ENABLE_DEBUG_SYMBOLS=true
45276    else
45277      ENABLE_DEBUG_SYMBOLS=false
45278    fi
45279  fi
45280
45281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
45282$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
45283
45284  #
45285  # ZIP_DEBUGINFO_FILES
45286  #
45287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
45288$as_echo_n "checking if we should zip debug-info files... " >&6; }
45289  # Check whether --enable-zip-debug-info was given.
45290if test "${enable_zip_debug_info+set}" = set; then :
45291  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
45292else
45293  enable_zip_debug_info="yes"
45294fi
45295
45296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
45297$as_echo "${enable_zip_debug_info}" >&6; }
45298
45299  if test "x${enable_zip_debug_info}" = "xno"; then
45300    ZIP_DEBUGINFO_FILES=false
45301  else
45302    ZIP_DEBUGINFO_FILES=true
45303  fi
45304
45305
45306
45307
45308
45309  # Check whether --enable-native-coverage was given.
45310if test "${enable_native_coverage+set}" = set; then :
45311  enableval=$enable_native_coverage;
45312fi
45313
45314  GCOV_ENABLED="false"
45315  if test "x$enable_native_coverage" = "xyes"; then
45316    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
45317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45318$as_echo_n "checking if native coverage is enabled... " >&6; }
45319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45320$as_echo "yes" >&6; }
45321      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
45322      GCOV_LDFLAGS="-fprofile-arcs"
45323      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
45324      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
45325      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
45326      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
45327      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
45328      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
45329      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
45330      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
45331      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
45332      GCOV_ENABLED="true"
45333    else
45334      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
45335    fi
45336  elif test "x$enable_native_coverage" = "xno"; then
45337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
45338$as_echo_n "checking if native coverage is enabled... " >&6; }
45339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45340$as_echo "no" >&6; }
45341  elif test "x$enable_native_coverage" != "x"; then
45342    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
45343  fi
45344
45345
45346
45347
45348###############################################################################
45349#
45350# Check dependencies for external and internal libraries.
45351#
45352###############################################################################
45353
45354# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
45355
45356  # When using cygwin or msys, we need a wrapper binary that renames
45357  # /cygdrive/c/ arguments into c:/ arguments and peeks into
45358  # @files and rewrites these too! This wrapper binary is
45359  # called fixpath.
45360  FIXPATH=
45361  if test "x$OPENJDK_BUILD_OS" = xwindows; then
45362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
45363$as_echo_n "checking if fixpath can be created... " >&6; }
45364    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
45365    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
45366    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
45367    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
45368      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
45369      FIXPATH="$FIXPATH_BIN -c"
45370    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
45371      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
45372      # @ was chosen as separator to minimize risk of other tools messing around with it
45373      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
45374          | tr ' ' '\n' | grep '^/./' | sort | uniq`
45375      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
45376      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
45377    fi
45378    FIXPATH_SRC_W="$FIXPATH_SRC"
45379    FIXPATH_BIN_W="$FIXPATH_BIN"
45380
45381  unix_path="$FIXPATH_SRC_W"
45382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45383    windows_path=`$CYGPATH -m "$unix_path"`
45384    FIXPATH_SRC_W="$windows_path"
45385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45386    windows_path=`cmd //c echo $unix_path`
45387    FIXPATH_SRC_W="$windows_path"
45388  fi
45389
45390
45391  unix_path="$FIXPATH_BIN_W"
45392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45393    windows_path=`$CYGPATH -m "$unix_path"`
45394    FIXPATH_BIN_W="$windows_path"
45395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45396    windows_path=`cmd //c echo $unix_path`
45397    FIXPATH_BIN_W="$windows_path"
45398  fi
45399
45400    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
45401    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
45402    cd $FIXPATH_DIR
45403    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
45404    cd $CURDIR
45405
45406    if test ! -x $FIXPATH_BIN; then
45407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45408$as_echo "no" >&6; }
45409      cat $FIXPATH_DIR/fixpath1.log
45410      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
45411    fi
45412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45413$as_echo "yes" >&6; }
45414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
45415$as_echo_n "checking if fixpath.exe works... " >&6; }
45416    cd $FIXPATH_DIR
45417    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
45418        > $FIXPATH_DIR/fixpath2.log 2>&1
45419    cd $CURDIR
45420    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
45421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45422$as_echo "no" >&6; }
45423      cat $FIXPATH_DIR/fixpath2.log
45424      as_fn_error $? "fixpath did not work!" "$LINENO" 5
45425    fi
45426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45427$as_echo "yes" >&6; }
45428  fi
45429
45430
45431
45432
45433
45434  # Check if X11 is needed
45435  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
45436    # No X11 support on windows or macosx
45437    NEEDS_LIB_X11=false
45438  else
45439    if test "x$SUPPORT_HEADFUL" = xno; then
45440      # No X11 support if building headless-only
45441      NEEDS_LIB_X11=false
45442    else
45443      # All other instances need X11
45444      NEEDS_LIB_X11=true
45445    fi
45446  fi
45447
45448  # Check if cups is needed
45449  if test "x$OPENJDK_TARGET_OS" = xwindows; then
45450    # Windows have a separate print system
45451    NEEDS_LIB_CUPS=false
45452  else
45453    NEEDS_LIB_CUPS=true
45454  fi
45455
45456  # Check if freetype is needed
45457  if test "x$OPENJDK" = "xtrue"; then
45458    NEEDS_LIB_FREETYPE=true
45459  else
45460    NEEDS_LIB_FREETYPE=false
45461  fi
45462
45463  # Check if alsa is needed
45464  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45465    NEEDS_LIB_ALSA=true
45466  else
45467    NEEDS_LIB_ALSA=false
45468  fi
45469
45470  # Check if ffi is needed
45471  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45472    NEEDS_LIB_FFI=true
45473  else
45474    NEEDS_LIB_FFI=false
45475  fi
45476
45477
45478  # statically link libstdc++ before C++ ABI is stablized on Linux unless
45479  # dynamic build is configured on command line.
45480
45481# Check whether --with-stdc++lib was given.
45482if test "${with_stdc__lib+set}" = set; then :
45483  withval=$with_stdc__lib;
45484        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
45485                && test "x$with_stdc__lib" != xdefault; then
45486          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
45487        fi
45488
45489else
45490  with_stdc__lib=default
45491
45492fi
45493
45494
45495  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45496    # Test if -lstdc++ works.
45497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
45498$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
45499    ac_ext=cpp
45500ac_cpp='$CXXCPP $CPPFLAGS'
45501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45504
45505    OLD_CXXFLAGS="$CXXFLAGS"
45506    CXXFLAGS="$CXXFLAGS -lstdc++"
45507    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45508/* end confdefs.h.  */
45509
45510int
45511main ()
45512{
45513return 0;
45514  ;
45515  return 0;
45516}
45517_ACEOF
45518if ac_fn_cxx_try_link "$LINENO"; then :
45519  has_dynamic_libstdcxx=yes
45520else
45521  has_dynamic_libstdcxx=no
45522fi
45523rm -f core conftest.err conftest.$ac_objext \
45524    conftest$ac_exeext conftest.$ac_ext
45525    CXXFLAGS="$OLD_CXXFLAGS"
45526    ac_ext=cpp
45527ac_cpp='$CXXCPP $CPPFLAGS'
45528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45531
45532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
45533$as_echo "$has_dynamic_libstdcxx" >&6; }
45534
45535    # Test if stdc++ can be linked statically.
45536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
45537$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
45538    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
45539    ac_ext=cpp
45540ac_cpp='$CXXCPP $CPPFLAGS'
45541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45544
45545    OLD_LIBS="$LIBS"
45546    OLD_CXX="$CXX"
45547    LIBS="$STATIC_STDCXX_FLAGS"
45548    CXX="$CC"
45549    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45550/* end confdefs.h.  */
45551
45552int
45553main ()
45554{
45555return 0;
45556  ;
45557  return 0;
45558}
45559_ACEOF
45560if ac_fn_cxx_try_link "$LINENO"; then :
45561  has_static_libstdcxx=yes
45562else
45563  has_static_libstdcxx=no
45564fi
45565rm -f core conftest.err conftest.$ac_objext \
45566    conftest$ac_exeext conftest.$ac_ext
45567    LIBS="$OLD_LIBS"
45568    CXX="$OLD_CXX"
45569    ac_ext=cpp
45570ac_cpp='$CXXCPP $CPPFLAGS'
45571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45574
45575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
45576$as_echo "$has_static_libstdcxx" >&6; }
45577
45578    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
45579      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
45580    fi
45581
45582    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
45583      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
45584    fi
45585
45586    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
45587      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
45588    fi
45589
45590    # If dynamic was requested, it's available since it would fail above otherwise.
45591    # If dynamic wasn't requested, go with static unless it isn't available.
45592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
45593$as_echo_n "checking how to link with libstdc++... " >&6; }
45594    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
45595      LIBCXX="$LIBCXX -lstdc++"
45596      LDCXX="$CXX"
45597      STATIC_CXX_SETTING="STATIC_CXX=false"
45598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
45599$as_echo "dynamic" >&6; }
45600    else
45601      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
45602      LDCXX="$CC"
45603      STATIC_CXX_SETTING="STATIC_CXX=true"
45604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
45605$as_echo "static" >&6; }
45606    fi
45607  fi
45608
45609
45610  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
45611  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
45612    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
45613  fi
45614
45615  # TODO better (platform agnostic) test
45616  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
45617    LIBCXX="-lstdc++"
45618  fi
45619
45620
45621  # Setup Windows runtime dlls
45622  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
45623
45624
45625# Check whether --with-msvcr-dll was given.
45626if test "${with_msvcr_dll+set}" = set; then :
45627  withval=$with_msvcr_dll;
45628fi
45629
45630
45631  if test "x$with_msvcr_dll" != x; then
45632    # If given explicitely by user, do not probe. If not present, fail directly.
45633
45634  DLL_NAME="$MSVCR_NAME"
45635  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
45636  METHOD="--with-msvcr-dll"
45637  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45639$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45640
45641    # Need to check if the found msvcr is correct architecture
45642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45643$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45644    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45646      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45647      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45648      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45649        CORRECT_MSVCR_ARCH="PE32 executable"
45650      else
45651        CORRECT_MSVCR_ARCH="PE32+ executable"
45652      fi
45653    else
45654      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45655        CORRECT_MSVCR_ARCH=386
45656      else
45657        CORRECT_MSVCR_ARCH=x86-64
45658      fi
45659    fi
45660    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45662$as_echo "ok" >&6; }
45663      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45664
45665  # Only process if variable expands to non-empty
45666
45667  if test "x$MSVC_DLL" != x; then
45668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45669
45670  # Input might be given as Windows format, start by converting to
45671  # unix format.
45672  path="$MSVC_DLL"
45673  new_path=`$CYGPATH -u "$path"`
45674
45675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45678  # "foo.exe" is OK but "foo" is an error.
45679  #
45680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45681  # It is also a way to make sure we got the proper file name for the real test later on.
45682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45683  if test "x$test_shortpath" = x; then
45684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45685$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45686    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45687  fi
45688
45689  # Call helper function which possibly converts this using DOS-style short mode.
45690  # If so, the updated path is stored in $new_path.
45691
45692  input_path="$new_path"
45693  # Check if we need to convert this using DOS-style short mode. If the path
45694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45695  # take no chances and rewrite it.
45696  # Note: m4 eats our [], so we need to use [ and ] instead.
45697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45698  if test "x$has_forbidden_chars" != x; then
45699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45703      # Going to short mode and back again did indeed matter. Since short mode is
45704      # case insensitive, let's make it lowercase to improve readability.
45705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45706      # Now convert it back to Unix-style (cygpath)
45707      input_path=`$CYGPATH -u "$shortmode_path"`
45708      new_path="$input_path"
45709    fi
45710  fi
45711
45712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45713  if test "x$test_cygdrive_prefix" = x; then
45714    # As a simple fix, exclude /usr/bin since it's not a real path.
45715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45717      # a path prefixed by /cygdrive for fixpath to work.
45718      new_path="$CYGWIN_ROOT_PATH$input_path"
45719    fi
45720  fi
45721
45722
45723  if test "x$path" != "x$new_path"; then
45724    MSVC_DLL="$new_path"
45725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45726$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45727  fi
45728
45729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45730
45731  path="$MSVC_DLL"
45732  has_colon=`$ECHO $path | $GREP ^.:`
45733  new_path="$path"
45734  if test "x$has_colon" = x; then
45735    # Not in mixed or Windows style, start by that.
45736    new_path=`cmd //c echo $path`
45737  fi
45738
45739
45740  input_path="$new_path"
45741  # Check if we need to convert this using DOS-style short mode. If the path
45742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45743  # take no chances and rewrite it.
45744  # Note: m4 eats our [], so we need to use [ and ] instead.
45745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45746  if test "x$has_forbidden_chars" != x; then
45747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45749  fi
45750
45751
45752  windows_path="$new_path"
45753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45754    unix_path=`$CYGPATH -u "$windows_path"`
45755    new_path="$unix_path"
45756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45758    new_path="$unix_path"
45759  fi
45760
45761  if test "x$path" != "x$new_path"; then
45762    MSVC_DLL="$new_path"
45763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45764$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45765  fi
45766
45767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45769
45770    else
45771      # We're on a unix platform. Hooray! :)
45772      path="$MSVC_DLL"
45773      has_space=`$ECHO "$path" | $GREP " "`
45774      if test "x$has_space" != x; then
45775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45776$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45778      fi
45779
45780      # Use eval to expand a potential ~
45781      eval path="$path"
45782      if test ! -f "$path" && test ! -d "$path"; then
45783        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45784      fi
45785
45786      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45787    fi
45788  fi
45789
45790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45791$as_echo_n "checking for $DLL_NAME... " >&6; }
45792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45793$as_echo "$MSVC_DLL" >&6; }
45794    else
45795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45796$as_echo "incorrect, ignoring" >&6; }
45797      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45798$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45799    fi
45800  fi
45801
45802    if test "x$MSVC_DLL" = x; then
45803      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
45804    fi
45805    MSVCR_DLL="$MSVC_DLL"
45806  elif test "x$DEVKIT_MSVCR_DLL" != x; then
45807
45808  DLL_NAME="$MSVCR_NAME"
45809  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
45810  METHOD="devkit"
45811  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
45812    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
45813$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
45814
45815    # Need to check if the found msvcr is correct architecture
45816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
45817$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
45818    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
45819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45820      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
45821      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
45822      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45823        CORRECT_MSVCR_ARCH="PE32 executable"
45824      else
45825        CORRECT_MSVCR_ARCH="PE32+ executable"
45826      fi
45827    else
45828      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
45829        CORRECT_MSVCR_ARCH=386
45830      else
45831        CORRECT_MSVCR_ARCH=x86-64
45832      fi
45833    fi
45834    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
45835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
45836$as_echo "ok" >&6; }
45837      MSVC_DLL="$POSSIBLE_MSVC_DLL"
45838
45839  # Only process if variable expands to non-empty
45840
45841  if test "x$MSVC_DLL" != x; then
45842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45843
45844  # Input might be given as Windows format, start by converting to
45845  # unix format.
45846  path="$MSVC_DLL"
45847  new_path=`$CYGPATH -u "$path"`
45848
45849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45852  # "foo.exe" is OK but "foo" is an error.
45853  #
45854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45855  # It is also a way to make sure we got the proper file name for the real test later on.
45856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45857  if test "x$test_shortpath" = x; then
45858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45859$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45860    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
45861  fi
45862
45863  # Call helper function which possibly converts this using DOS-style short mode.
45864  # If so, the updated path is stored in $new_path.
45865
45866  input_path="$new_path"
45867  # Check if we need to convert this using DOS-style short mode. If the path
45868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45869  # take no chances and rewrite it.
45870  # Note: m4 eats our [], so we need to use [ and ] instead.
45871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45872  if test "x$has_forbidden_chars" != x; then
45873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45877      # Going to short mode and back again did indeed matter. Since short mode is
45878      # case insensitive, let's make it lowercase to improve readability.
45879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45880      # Now convert it back to Unix-style (cygpath)
45881      input_path=`$CYGPATH -u "$shortmode_path"`
45882      new_path="$input_path"
45883    fi
45884  fi
45885
45886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45887  if test "x$test_cygdrive_prefix" = x; then
45888    # As a simple fix, exclude /usr/bin since it's not a real path.
45889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45891      # a path prefixed by /cygdrive for fixpath to work.
45892      new_path="$CYGWIN_ROOT_PATH$input_path"
45893    fi
45894  fi
45895
45896
45897  if test "x$path" != "x$new_path"; then
45898    MSVC_DLL="$new_path"
45899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45900$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45901  fi
45902
45903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45904
45905  path="$MSVC_DLL"
45906  has_colon=`$ECHO $path | $GREP ^.:`
45907  new_path="$path"
45908  if test "x$has_colon" = x; then
45909    # Not in mixed or Windows style, start by that.
45910    new_path=`cmd //c echo $path`
45911  fi
45912
45913
45914  input_path="$new_path"
45915  # Check if we need to convert this using DOS-style short mode. If the path
45916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45917  # take no chances and rewrite it.
45918  # Note: m4 eats our [], so we need to use [ and ] instead.
45919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45920  if test "x$has_forbidden_chars" != x; then
45921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45923  fi
45924
45925
45926  windows_path="$new_path"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    new_path="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    new_path="$unix_path"
45933  fi
45934
45935  if test "x$path" != "x$new_path"; then
45936    MSVC_DLL="$new_path"
45937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
45938$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
45939  fi
45940
45941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45943
45944    else
45945      # We're on a unix platform. Hooray! :)
45946      path="$MSVC_DLL"
45947      has_space=`$ECHO "$path" | $GREP " "`
45948      if test "x$has_space" != x; then
45949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
45950$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
45951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45952      fi
45953
45954      # Use eval to expand a potential ~
45955      eval path="$path"
45956      if test ! -f "$path" && test ! -d "$path"; then
45957        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
45958      fi
45959
45960      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
45961    fi
45962  fi
45963
45964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
45965$as_echo_n "checking for $DLL_NAME... " >&6; }
45966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
45967$as_echo "$MSVC_DLL" >&6; }
45968    else
45969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
45970$as_echo "incorrect, ignoring" >&6; }
45971      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
45972$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
45973    fi
45974  fi
45975
45976    if test "x$MSVC_DLL" = x; then
45977      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
45978    fi
45979    MSVCR_DLL="$MSVC_DLL"
45980  else
45981
45982  DLL_NAME="${MSVCR_NAME}"
45983  MSVC_DLL=
45984
45985  if test "x$MSVC_DLL" = x; then
45986    # Probe: Using well-known location from Visual Studio 10.0
45987    if test "x$VCINSTALLDIR" != x; then
45988      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
45989
45990  windows_path="$CYGWIN_VC_INSTALL_DIR"
45991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45992    unix_path=`$CYGPATH -u "$windows_path"`
45993    CYGWIN_VC_INSTALL_DIR="$unix_path"
45994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45996    CYGWIN_VC_INSTALL_DIR="$unix_path"
45997  fi
45998
45999      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46000        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46001      else
46002        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
46003      fi
46004      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
46005
46006  DLL_NAME="$DLL_NAME"
46007  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46008  METHOD="well-known location in VCINSTALLDIR"
46009  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46010    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46011$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46012
46013    # Need to check if the found msvcr is correct architecture
46014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46015$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46016    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46018      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46019      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46020      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46021        CORRECT_MSVCR_ARCH="PE32 executable"
46022      else
46023        CORRECT_MSVCR_ARCH="PE32+ executable"
46024      fi
46025    else
46026      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46027        CORRECT_MSVCR_ARCH=386
46028      else
46029        CORRECT_MSVCR_ARCH=x86-64
46030      fi
46031    fi
46032    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46033      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46034$as_echo "ok" >&6; }
46035      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46036
46037  # Only process if variable expands to non-empty
46038
46039  if test "x$MSVC_DLL" != x; then
46040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46041
46042  # Input might be given as Windows format, start by converting to
46043  # unix format.
46044  path="$MSVC_DLL"
46045  new_path=`$CYGPATH -u "$path"`
46046
46047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46050  # "foo.exe" is OK but "foo" is an error.
46051  #
46052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46053  # It is also a way to make sure we got the proper file name for the real test later on.
46054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46055  if test "x$test_shortpath" = x; then
46056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46057$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46058    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46059  fi
46060
46061  # Call helper function which possibly converts this using DOS-style short mode.
46062  # If so, the updated path is stored in $new_path.
46063
46064  input_path="$new_path"
46065  # Check if we need to convert this using DOS-style short mode. If the path
46066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46067  # take no chances and rewrite it.
46068  # Note: m4 eats our [], so we need to use [ and ] instead.
46069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46070  if test "x$has_forbidden_chars" != x; then
46071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46075      # Going to short mode and back again did indeed matter. Since short mode is
46076      # case insensitive, let's make it lowercase to improve readability.
46077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46078      # Now convert it back to Unix-style (cygpath)
46079      input_path=`$CYGPATH -u "$shortmode_path"`
46080      new_path="$input_path"
46081    fi
46082  fi
46083
46084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46085  if test "x$test_cygdrive_prefix" = x; then
46086    # As a simple fix, exclude /usr/bin since it's not a real path.
46087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46089      # a path prefixed by /cygdrive for fixpath to work.
46090      new_path="$CYGWIN_ROOT_PATH$input_path"
46091    fi
46092  fi
46093
46094
46095  if test "x$path" != "x$new_path"; then
46096    MSVC_DLL="$new_path"
46097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46098$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46099  fi
46100
46101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46102
46103  path="$MSVC_DLL"
46104  has_colon=`$ECHO $path | $GREP ^.:`
46105  new_path="$path"
46106  if test "x$has_colon" = x; then
46107    # Not in mixed or Windows style, start by that.
46108    new_path=`cmd //c echo $path`
46109  fi
46110
46111
46112  input_path="$new_path"
46113  # Check if we need to convert this using DOS-style short mode. If the path
46114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46115  # take no chances and rewrite it.
46116  # Note: m4 eats our [], so we need to use [ and ] instead.
46117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46118  if test "x$has_forbidden_chars" != x; then
46119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46121  fi
46122
46123
46124  windows_path="$new_path"
46125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46126    unix_path=`$CYGPATH -u "$windows_path"`
46127    new_path="$unix_path"
46128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46130    new_path="$unix_path"
46131  fi
46132
46133  if test "x$path" != "x$new_path"; then
46134    MSVC_DLL="$new_path"
46135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46136$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46137  fi
46138
46139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46141
46142    else
46143      # We're on a unix platform. Hooray! :)
46144      path="$MSVC_DLL"
46145      has_space=`$ECHO "$path" | $GREP " "`
46146      if test "x$has_space" != x; then
46147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46148$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46150      fi
46151
46152      # Use eval to expand a potential ~
46153      eval path="$path"
46154      if test ! -f "$path" && test ! -d "$path"; then
46155        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46156      fi
46157
46158      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46159    fi
46160  fi
46161
46162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46163$as_echo_n "checking for $DLL_NAME... " >&6; }
46164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46165$as_echo "$MSVC_DLL" >&6; }
46166    else
46167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46168$as_echo "incorrect, ignoring" >&6; }
46169      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46170$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46171    fi
46172  fi
46173
46174    fi
46175  fi
46176
46177  if test "x$MSVC_DLL" = x; then
46178    # Probe: Check in the Boot JDK directory.
46179    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
46180
46181  DLL_NAME="$DLL_NAME"
46182  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46183  METHOD="well-known location in Boot JDK"
46184  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46186$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46187
46188    # Need to check if the found msvcr is correct architecture
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46190$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46191    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46193      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46194      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46195      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46196        CORRECT_MSVCR_ARCH="PE32 executable"
46197      else
46198        CORRECT_MSVCR_ARCH="PE32+ executable"
46199      fi
46200    else
46201      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46202        CORRECT_MSVCR_ARCH=386
46203      else
46204        CORRECT_MSVCR_ARCH=x86-64
46205      fi
46206    fi
46207    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46209$as_echo "ok" >&6; }
46210      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46211
46212  # Only process if variable expands to non-empty
46213
46214  if test "x$MSVC_DLL" != x; then
46215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46216
46217  # Input might be given as Windows format, start by converting to
46218  # unix format.
46219  path="$MSVC_DLL"
46220  new_path=`$CYGPATH -u "$path"`
46221
46222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46225  # "foo.exe" is OK but "foo" is an error.
46226  #
46227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46228  # It is also a way to make sure we got the proper file name for the real test later on.
46229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46230  if test "x$test_shortpath" = x; then
46231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46232$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46233    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46234  fi
46235
46236  # Call helper function which possibly converts this using DOS-style short mode.
46237  # If so, the updated path is stored in $new_path.
46238
46239  input_path="$new_path"
46240  # Check if we need to convert this using DOS-style short mode. If the path
46241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46242  # take no chances and rewrite it.
46243  # Note: m4 eats our [], so we need to use [ and ] instead.
46244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46245  if test "x$has_forbidden_chars" != x; then
46246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46250      # Going to short mode and back again did indeed matter. Since short mode is
46251      # case insensitive, let's make it lowercase to improve readability.
46252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46253      # Now convert it back to Unix-style (cygpath)
46254      input_path=`$CYGPATH -u "$shortmode_path"`
46255      new_path="$input_path"
46256    fi
46257  fi
46258
46259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46260  if test "x$test_cygdrive_prefix" = x; then
46261    # As a simple fix, exclude /usr/bin since it's not a real path.
46262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46264      # a path prefixed by /cygdrive for fixpath to work.
46265      new_path="$CYGWIN_ROOT_PATH$input_path"
46266    fi
46267  fi
46268
46269
46270  if test "x$path" != "x$new_path"; then
46271    MSVC_DLL="$new_path"
46272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46274  fi
46275
46276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46277
46278  path="$MSVC_DLL"
46279  has_colon=`$ECHO $path | $GREP ^.:`
46280  new_path="$path"
46281  if test "x$has_colon" = x; then
46282    # Not in mixed or Windows style, start by that.
46283    new_path=`cmd //c echo $path`
46284  fi
46285
46286
46287  input_path="$new_path"
46288  # Check if we need to convert this using DOS-style short mode. If the path
46289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46290  # take no chances and rewrite it.
46291  # Note: m4 eats our [], so we need to use [ and ] instead.
46292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46293  if test "x$has_forbidden_chars" != x; then
46294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46296  fi
46297
46298
46299  windows_path="$new_path"
46300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46301    unix_path=`$CYGPATH -u "$windows_path"`
46302    new_path="$unix_path"
46303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46305    new_path="$unix_path"
46306  fi
46307
46308  if test "x$path" != "x$new_path"; then
46309    MSVC_DLL="$new_path"
46310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46312  fi
46313
46314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46316
46317    else
46318      # We're on a unix platform. Hooray! :)
46319      path="$MSVC_DLL"
46320      has_space=`$ECHO "$path" | $GREP " "`
46321      if test "x$has_space" != x; then
46322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46323$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46325      fi
46326
46327      # Use eval to expand a potential ~
46328      eval path="$path"
46329      if test ! -f "$path" && test ! -d "$path"; then
46330        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46331      fi
46332
46333      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46334    fi
46335  fi
46336
46337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46338$as_echo_n "checking for $DLL_NAME... " >&6; }
46339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46340$as_echo "$MSVC_DLL" >&6; }
46341    else
46342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46343$as_echo "incorrect, ignoring" >&6; }
46344      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46345$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46346    fi
46347  fi
46348
46349  fi
46350
46351  if test "x$MSVC_DLL" = x; then
46352    # Probe: Look in the Windows system32 directory
46353    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
46354
46355  windows_path="$CYGWIN_SYSTEMROOT"
46356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46357    unix_path=`$CYGPATH -u "$windows_path"`
46358    CYGWIN_SYSTEMROOT="$unix_path"
46359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46361    CYGWIN_SYSTEMROOT="$unix_path"
46362  fi
46363
46364    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
46365
46366  DLL_NAME="$DLL_NAME"
46367  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46368  METHOD="well-known location in SYSTEMROOT"
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  fi
46535
46536  if test "x$MSVC_DLL" = x; then
46537    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
46538    if test "x$VS100COMNTOOLS" != x; then
46539      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
46540
46541  windows_path="$CYGWIN_VS_TOOLS_DIR"
46542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46543    unix_path=`$CYGPATH -u "$windows_path"`
46544    CYGWIN_VS_TOOLS_DIR="$unix_path"
46545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46547    CYGWIN_VS_TOOLS_DIR="$unix_path"
46548  fi
46549
46550      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46551        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46552	    | $GREP -i /x64/ | $HEAD --lines 1`
46553      else
46554        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
46555	    | $GREP -i /x86/ | $HEAD --lines 1`
46556      fi
46557
46558  DLL_NAME="$DLL_NAME"
46559  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46560  METHOD="search of VS100COMNTOOLS"
46561  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46563$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46564
46565    # Need to check if the found msvcr is correct architecture
46566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46567$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46568    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46570      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46571      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46572      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46573        CORRECT_MSVCR_ARCH="PE32 executable"
46574      else
46575        CORRECT_MSVCR_ARCH="PE32+ executable"
46576      fi
46577    else
46578      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46579        CORRECT_MSVCR_ARCH=386
46580      else
46581        CORRECT_MSVCR_ARCH=x86-64
46582      fi
46583    fi
46584    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46586$as_echo "ok" >&6; }
46587      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46588
46589  # Only process if variable expands to non-empty
46590
46591  if test "x$MSVC_DLL" != x; then
46592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46593
46594  # Input might be given as Windows format, start by converting to
46595  # unix format.
46596  path="$MSVC_DLL"
46597  new_path=`$CYGPATH -u "$path"`
46598
46599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46602  # "foo.exe" is OK but "foo" is an error.
46603  #
46604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46605  # It is also a way to make sure we got the proper file name for the real test later on.
46606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46607  if test "x$test_shortpath" = x; then
46608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46609$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46610    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46611  fi
46612
46613  # Call helper function which possibly converts this using DOS-style short mode.
46614  # If so, the updated path is stored in $new_path.
46615
46616  input_path="$new_path"
46617  # Check if we need to convert this using DOS-style short mode. If the path
46618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46619  # take no chances and rewrite it.
46620  # Note: m4 eats our [], so we need to use [ and ] instead.
46621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46622  if test "x$has_forbidden_chars" != x; then
46623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46627      # Going to short mode and back again did indeed matter. Since short mode is
46628      # case insensitive, let's make it lowercase to improve readability.
46629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46630      # Now convert it back to Unix-style (cygpath)
46631      input_path=`$CYGPATH -u "$shortmode_path"`
46632      new_path="$input_path"
46633    fi
46634  fi
46635
46636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46637  if test "x$test_cygdrive_prefix" = x; then
46638    # As a simple fix, exclude /usr/bin since it's not a real path.
46639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46641      # a path prefixed by /cygdrive for fixpath to work.
46642      new_path="$CYGWIN_ROOT_PATH$input_path"
46643    fi
46644  fi
46645
46646
46647  if test "x$path" != "x$new_path"; then
46648    MSVC_DLL="$new_path"
46649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46650$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46651  fi
46652
46653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46654
46655  path="$MSVC_DLL"
46656  has_colon=`$ECHO $path | $GREP ^.:`
46657  new_path="$path"
46658  if test "x$has_colon" = x; then
46659    # Not in mixed or Windows style, start by that.
46660    new_path=`cmd //c echo $path`
46661  fi
46662
46663
46664  input_path="$new_path"
46665  # Check if we need to convert this using DOS-style short mode. If the path
46666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46667  # take no chances and rewrite it.
46668  # Note: m4 eats our [], so we need to use [ and ] instead.
46669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46670  if test "x$has_forbidden_chars" != x; then
46671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46673  fi
46674
46675
46676  windows_path="$new_path"
46677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46678    unix_path=`$CYGPATH -u "$windows_path"`
46679    new_path="$unix_path"
46680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46682    new_path="$unix_path"
46683  fi
46684
46685  if test "x$path" != "x$new_path"; then
46686    MSVC_DLL="$new_path"
46687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46688$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46689  fi
46690
46691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46693
46694    else
46695      # We're on a unix platform. Hooray! :)
46696      path="$MSVC_DLL"
46697      has_space=`$ECHO "$path" | $GREP " "`
46698      if test "x$has_space" != x; then
46699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46700$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46702      fi
46703
46704      # Use eval to expand a potential ~
46705      eval path="$path"
46706      if test ! -f "$path" && test ! -d "$path"; then
46707        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46708      fi
46709
46710      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46711    fi
46712  fi
46713
46714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46715$as_echo_n "checking for $DLL_NAME... " >&6; }
46716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46717$as_echo "$MSVC_DLL" >&6; }
46718    else
46719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46720$as_echo "incorrect, ignoring" >&6; }
46721      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46722$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46723    fi
46724  fi
46725
46726    fi
46727  fi
46728
46729  if test "x$MSVC_DLL" = x; then
46730    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
46731    # (This was the original behaviour; kept since it might turn something up)
46732    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
46733      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46734        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46735	    | $GREP x64 | $HEAD --lines 1`
46736      else
46737        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46738	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
46739        if test "x$POSSIBLE_MSVC_DLL" = x; then
46740          # We're grasping at straws now...
46741          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
46742	      | $HEAD --lines 1`
46743        fi
46744      fi
46745
46746
46747  DLL_NAME="$DLL_NAME"
46748  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
46749  METHOD="search of VCINSTALLDIR"
46750  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46751    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46752$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46753
46754    # Need to check if the found msvcr is correct architecture
46755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46756$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46757    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46758    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46759      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46760      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46761      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46762        CORRECT_MSVCR_ARCH="PE32 executable"
46763      else
46764        CORRECT_MSVCR_ARCH="PE32+ executable"
46765      fi
46766    else
46767      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46768        CORRECT_MSVCR_ARCH=386
46769      else
46770        CORRECT_MSVCR_ARCH=x86-64
46771      fi
46772    fi
46773    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46775$as_echo "ok" >&6; }
46776      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46777
46778  # Only process if variable expands to non-empty
46779
46780  if test "x$MSVC_DLL" != x; then
46781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46782
46783  # Input might be given as Windows format, start by converting to
46784  # unix format.
46785  path="$MSVC_DLL"
46786  new_path=`$CYGPATH -u "$path"`
46787
46788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46791  # "foo.exe" is OK but "foo" is an error.
46792  #
46793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46794  # It is also a way to make sure we got the proper file name for the real test later on.
46795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46796  if test "x$test_shortpath" = x; then
46797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46798$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46799    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46800  fi
46801
46802  # Call helper function which possibly converts this using DOS-style short mode.
46803  # If so, the updated path is stored in $new_path.
46804
46805  input_path="$new_path"
46806  # Check if we need to convert this using DOS-style short mode. If the path
46807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46808  # take no chances and rewrite it.
46809  # Note: m4 eats our [], so we need to use [ and ] instead.
46810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46811  if test "x$has_forbidden_chars" != x; then
46812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46816      # Going to short mode and back again did indeed matter. Since short mode is
46817      # case insensitive, let's make it lowercase to improve readability.
46818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46819      # Now convert it back to Unix-style (cygpath)
46820      input_path=`$CYGPATH -u "$shortmode_path"`
46821      new_path="$input_path"
46822    fi
46823  fi
46824
46825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46826  if test "x$test_cygdrive_prefix" = x; then
46827    # As a simple fix, exclude /usr/bin since it's not a real path.
46828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46830      # a path prefixed by /cygdrive for fixpath to work.
46831      new_path="$CYGWIN_ROOT_PATH$input_path"
46832    fi
46833  fi
46834
46835
46836  if test "x$path" != "x$new_path"; then
46837    MSVC_DLL="$new_path"
46838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46839$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46840  fi
46841
46842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46843
46844  path="$MSVC_DLL"
46845  has_colon=`$ECHO $path | $GREP ^.:`
46846  new_path="$path"
46847  if test "x$has_colon" = x; then
46848    # Not in mixed or Windows style, start by that.
46849    new_path=`cmd //c echo $path`
46850  fi
46851
46852
46853  input_path="$new_path"
46854  # Check if we need to convert this using DOS-style short mode. If the path
46855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46856  # take no chances and rewrite it.
46857  # Note: m4 eats our [], so we need to use [ and ] instead.
46858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46859  if test "x$has_forbidden_chars" != x; then
46860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46862  fi
46863
46864
46865  windows_path="$new_path"
46866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46867    unix_path=`$CYGPATH -u "$windows_path"`
46868    new_path="$unix_path"
46869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46871    new_path="$unix_path"
46872  fi
46873
46874  if test "x$path" != "x$new_path"; then
46875    MSVC_DLL="$new_path"
46876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
46877$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
46878  fi
46879
46880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46882
46883    else
46884      # We're on a unix platform. Hooray! :)
46885      path="$MSVC_DLL"
46886      has_space=`$ECHO "$path" | $GREP " "`
46887      if test "x$has_space" != x; then
46888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46889$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46891      fi
46892
46893      # Use eval to expand a potential ~
46894      eval path="$path"
46895      if test ! -f "$path" && test ! -d "$path"; then
46896        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
46897      fi
46898
46899      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
46900    fi
46901  fi
46902
46903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46904$as_echo_n "checking for $DLL_NAME... " >&6; }
46905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
46906$as_echo "$MSVC_DLL" >&6; }
46907    else
46908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
46909$as_echo "incorrect, ignoring" >&6; }
46910      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
46911$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
46912    fi
46913  fi
46914
46915    fi
46916  fi
46917
46918  if test "x$MSVC_DLL" = x; then
46919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
46920$as_echo_n "checking for $DLL_NAME... " >&6; }
46921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46922$as_echo "no" >&6; }
46923    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
46924  fi
46925
46926    MSVCR_DLL="$MSVC_DLL"
46927  fi
46928
46929
46930
46931# Check whether --with-msvcp-dll was given.
46932if test "${with_msvcp_dll+set}" = set; then :
46933  withval=$with_msvcp_dll;
46934fi
46935
46936
46937  if test "x$MSVCP_NAME" != "x"; then
46938    if test "x$with_msvcp_dll" != x; then
46939      # If given explicitely by user, do not probe. If not present, fail directly.
46940
46941  DLL_NAME="$MSVCP_NAME"
46942  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
46943  METHOD="--with-msvcp-dll"
46944  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
46945    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
46946$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
46947
46948    # Need to check if the found msvcr is correct architecture
46949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
46950$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
46951    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
46952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46953      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
46954      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
46955      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46956        CORRECT_MSVCR_ARCH="PE32 executable"
46957      else
46958        CORRECT_MSVCR_ARCH="PE32+ executable"
46959      fi
46960    else
46961      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
46962        CORRECT_MSVCR_ARCH=386
46963      else
46964        CORRECT_MSVCR_ARCH=x86-64
46965      fi
46966    fi
46967    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
46969$as_echo "ok" >&6; }
46970      MSVC_DLL="$POSSIBLE_MSVC_DLL"
46971
46972  # Only process if variable expands to non-empty
46973
46974  if test "x$MSVC_DLL" != x; then
46975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46976
46977  # Input might be given as Windows format, start by converting to
46978  # unix format.
46979  path="$MSVC_DLL"
46980  new_path=`$CYGPATH -u "$path"`
46981
46982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46985  # "foo.exe" is OK but "foo" is an error.
46986  #
46987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46988  # It is also a way to make sure we got the proper file name for the real test later on.
46989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46990  if test "x$test_shortpath" = x; then
46991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
46992$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
46993    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
46994  fi
46995
46996  # Call helper function which possibly converts this using DOS-style short mode.
46997  # If so, the updated path is stored in $new_path.
46998
46999  input_path="$new_path"
47000  # Check if we need to convert this using DOS-style short mode. If the path
47001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47002  # take no chances and rewrite it.
47003  # Note: m4 eats our [], so we need to use [ and ] instead.
47004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47005  if test "x$has_forbidden_chars" != x; then
47006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47010      # Going to short mode and back again did indeed matter. Since short mode is
47011      # case insensitive, let's make it lowercase to improve readability.
47012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47013      # Now convert it back to Unix-style (cygpath)
47014      input_path=`$CYGPATH -u "$shortmode_path"`
47015      new_path="$input_path"
47016    fi
47017  fi
47018
47019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47020  if test "x$test_cygdrive_prefix" = x; then
47021    # As a simple fix, exclude /usr/bin since it's not a real path.
47022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47024      # a path prefixed by /cygdrive for fixpath to work.
47025      new_path="$CYGWIN_ROOT_PATH$input_path"
47026    fi
47027  fi
47028
47029
47030  if test "x$path" != "x$new_path"; then
47031    MSVC_DLL="$new_path"
47032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47033$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47034  fi
47035
47036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47037
47038  path="$MSVC_DLL"
47039  has_colon=`$ECHO $path | $GREP ^.:`
47040  new_path="$path"
47041  if test "x$has_colon" = x; then
47042    # Not in mixed or Windows style, start by that.
47043    new_path=`cmd //c echo $path`
47044  fi
47045
47046
47047  input_path="$new_path"
47048  # Check if we need to convert this using DOS-style short mode. If the path
47049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47050  # take no chances and rewrite it.
47051  # Note: m4 eats our [], so we need to use [ and ] instead.
47052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47053  if test "x$has_forbidden_chars" != x; then
47054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47056  fi
47057
47058
47059  windows_path="$new_path"
47060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47061    unix_path=`$CYGPATH -u "$windows_path"`
47062    new_path="$unix_path"
47063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47065    new_path="$unix_path"
47066  fi
47067
47068  if test "x$path" != "x$new_path"; then
47069    MSVC_DLL="$new_path"
47070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47071$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47072  fi
47073
47074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47076
47077    else
47078      # We're on a unix platform. Hooray! :)
47079      path="$MSVC_DLL"
47080      has_space=`$ECHO "$path" | $GREP " "`
47081      if test "x$has_space" != x; then
47082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47083$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47084        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47085      fi
47086
47087      # Use eval to expand a potential ~
47088      eval path="$path"
47089      if test ! -f "$path" && test ! -d "$path"; then
47090        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47091      fi
47092
47093      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47094    fi
47095  fi
47096
47097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47098$as_echo_n "checking for $DLL_NAME... " >&6; }
47099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47100$as_echo "$MSVC_DLL" >&6; }
47101    else
47102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47103$as_echo "incorrect, ignoring" >&6; }
47104      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47105$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47106    fi
47107  fi
47108
47109      if test "x$MSVC_DLL" = x; then
47110        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
47111      fi
47112      MSVCP_DLL="$MSVC_DLL"
47113    elif test "x$DEVKIT_MSVCP_DLL" != x; then
47114
47115  DLL_NAME="$MSVCP_NAME"
47116  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
47117  METHOD="devkit"
47118  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47119    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47120$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47121
47122    # Need to check if the found msvcr is correct architecture
47123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47124$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47125    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47127      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47128      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47129      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47130        CORRECT_MSVCR_ARCH="PE32 executable"
47131      else
47132        CORRECT_MSVCR_ARCH="PE32+ executable"
47133      fi
47134    else
47135      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47136        CORRECT_MSVCR_ARCH=386
47137      else
47138        CORRECT_MSVCR_ARCH=x86-64
47139      fi
47140    fi
47141    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47143$as_echo "ok" >&6; }
47144      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47145
47146  # Only process if variable expands to non-empty
47147
47148  if test "x$MSVC_DLL" != x; then
47149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47150
47151  # Input might be given as Windows format, start by converting to
47152  # unix format.
47153  path="$MSVC_DLL"
47154  new_path=`$CYGPATH -u "$path"`
47155
47156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47159  # "foo.exe" is OK but "foo" is an error.
47160  #
47161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47162  # It is also a way to make sure we got the proper file name for the real test later on.
47163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47164  if test "x$test_shortpath" = x; then
47165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47166$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47167    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47168  fi
47169
47170  # Call helper function which possibly converts this using DOS-style short mode.
47171  # If so, the updated path is stored in $new_path.
47172
47173  input_path="$new_path"
47174  # Check if we need to convert this using DOS-style short mode. If the path
47175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47176  # take no chances and rewrite it.
47177  # Note: m4 eats our [], so we need to use [ and ] instead.
47178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47179  if test "x$has_forbidden_chars" != x; then
47180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47184      # Going to short mode and back again did indeed matter. Since short mode is
47185      # case insensitive, let's make it lowercase to improve readability.
47186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47187      # Now convert it back to Unix-style (cygpath)
47188      input_path=`$CYGPATH -u "$shortmode_path"`
47189      new_path="$input_path"
47190    fi
47191  fi
47192
47193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47194  if test "x$test_cygdrive_prefix" = x; then
47195    # As a simple fix, exclude /usr/bin since it's not a real path.
47196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47198      # a path prefixed by /cygdrive for fixpath to work.
47199      new_path="$CYGWIN_ROOT_PATH$input_path"
47200    fi
47201  fi
47202
47203
47204  if test "x$path" != "x$new_path"; then
47205    MSVC_DLL="$new_path"
47206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47207$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47208  fi
47209
47210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47211
47212  path="$MSVC_DLL"
47213  has_colon=`$ECHO $path | $GREP ^.:`
47214  new_path="$path"
47215  if test "x$has_colon" = x; then
47216    # Not in mixed or Windows style, start by that.
47217    new_path=`cmd //c echo $path`
47218  fi
47219
47220
47221  input_path="$new_path"
47222  # Check if we need to convert this using DOS-style short mode. If the path
47223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47224  # take no chances and rewrite it.
47225  # Note: m4 eats our [], so we need to use [ and ] instead.
47226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47227  if test "x$has_forbidden_chars" != x; then
47228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47230  fi
47231
47232
47233  windows_path="$new_path"
47234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47235    unix_path=`$CYGPATH -u "$windows_path"`
47236    new_path="$unix_path"
47237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47239    new_path="$unix_path"
47240  fi
47241
47242  if test "x$path" != "x$new_path"; then
47243    MSVC_DLL="$new_path"
47244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47245$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47246  fi
47247
47248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47250
47251    else
47252      # We're on a unix platform. Hooray! :)
47253      path="$MSVC_DLL"
47254      has_space=`$ECHO "$path" | $GREP " "`
47255      if test "x$has_space" != x; then
47256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47257$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47259      fi
47260
47261      # Use eval to expand a potential ~
47262      eval path="$path"
47263      if test ! -f "$path" && test ! -d "$path"; then
47264        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47265      fi
47266
47267      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47268    fi
47269  fi
47270
47271      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47272$as_echo_n "checking for $DLL_NAME... " >&6; }
47273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47274$as_echo "$MSVC_DLL" >&6; }
47275    else
47276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47277$as_echo "incorrect, ignoring" >&6; }
47278      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47279$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47280    fi
47281  fi
47282
47283      if test "x$MSVC_DLL" = x; then
47284        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
47285      fi
47286      MSVCP_DLL="$MSVC_DLL"
47287    else
47288
47289  DLL_NAME="${MSVCP_NAME}"
47290  MSVC_DLL=
47291
47292  if test "x$MSVC_DLL" = x; then
47293    # Probe: Using well-known location from Visual Studio 10.0
47294    if test "x$VCINSTALLDIR" != x; then
47295      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47296
47297  windows_path="$CYGWIN_VC_INSTALL_DIR"
47298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47299    unix_path=`$CYGPATH -u "$windows_path"`
47300    CYGWIN_VC_INSTALL_DIR="$unix_path"
47301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47303    CYGWIN_VC_INSTALL_DIR="$unix_path"
47304  fi
47305
47306      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47307        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47308      else
47309        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47310      fi
47311      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47312
47313  DLL_NAME="$DLL_NAME"
47314  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47315  METHOD="well-known location in VCINSTALLDIR"
47316  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47317    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47318$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47319
47320    # Need to check if the found msvcr is correct architecture
47321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47322$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47323    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47325      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47326      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47327      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47328        CORRECT_MSVCR_ARCH="PE32 executable"
47329      else
47330        CORRECT_MSVCR_ARCH="PE32+ executable"
47331      fi
47332    else
47333      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47334        CORRECT_MSVCR_ARCH=386
47335      else
47336        CORRECT_MSVCR_ARCH=x86-64
47337      fi
47338    fi
47339    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47341$as_echo "ok" >&6; }
47342      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47343
47344  # Only process if variable expands to non-empty
47345
47346  if test "x$MSVC_DLL" != x; then
47347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47348
47349  # Input might be given as Windows format, start by converting to
47350  # unix format.
47351  path="$MSVC_DLL"
47352  new_path=`$CYGPATH -u "$path"`
47353
47354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47357  # "foo.exe" is OK but "foo" is an error.
47358  #
47359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47360  # It is also a way to make sure we got the proper file name for the real test later on.
47361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47362  if test "x$test_shortpath" = x; then
47363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47364$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47365    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47366  fi
47367
47368  # Call helper function which possibly converts this using DOS-style short mode.
47369  # If so, the updated path is stored in $new_path.
47370
47371  input_path="$new_path"
47372  # Check if we need to convert this using DOS-style short mode. If the path
47373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47374  # take no chances and rewrite it.
47375  # Note: m4 eats our [], so we need to use [ and ] instead.
47376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47377  if test "x$has_forbidden_chars" != x; then
47378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47382      # Going to short mode and back again did indeed matter. Since short mode is
47383      # case insensitive, let's make it lowercase to improve readability.
47384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47385      # Now convert it back to Unix-style (cygpath)
47386      input_path=`$CYGPATH -u "$shortmode_path"`
47387      new_path="$input_path"
47388    fi
47389  fi
47390
47391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47392  if test "x$test_cygdrive_prefix" = x; then
47393    # As a simple fix, exclude /usr/bin since it's not a real path.
47394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47396      # a path prefixed by /cygdrive for fixpath to work.
47397      new_path="$CYGWIN_ROOT_PATH$input_path"
47398    fi
47399  fi
47400
47401
47402  if test "x$path" != "x$new_path"; then
47403    MSVC_DLL="$new_path"
47404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47405$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47406  fi
47407
47408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47409
47410  path="$MSVC_DLL"
47411  has_colon=`$ECHO $path | $GREP ^.:`
47412  new_path="$path"
47413  if test "x$has_colon" = x; then
47414    # Not in mixed or Windows style, start by that.
47415    new_path=`cmd //c echo $path`
47416  fi
47417
47418
47419  input_path="$new_path"
47420  # Check if we need to convert this using DOS-style short mode. If the path
47421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47422  # take no chances and rewrite it.
47423  # Note: m4 eats our [], so we need to use [ and ] instead.
47424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47425  if test "x$has_forbidden_chars" != x; then
47426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47428  fi
47429
47430
47431  windows_path="$new_path"
47432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47433    unix_path=`$CYGPATH -u "$windows_path"`
47434    new_path="$unix_path"
47435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47437    new_path="$unix_path"
47438  fi
47439
47440  if test "x$path" != "x$new_path"; then
47441    MSVC_DLL="$new_path"
47442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47444  fi
47445
47446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47448
47449    else
47450      # We're on a unix platform. Hooray! :)
47451      path="$MSVC_DLL"
47452      has_space=`$ECHO "$path" | $GREP " "`
47453      if test "x$has_space" != x; then
47454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47455$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47457      fi
47458
47459      # Use eval to expand a potential ~
47460      eval path="$path"
47461      if test ! -f "$path" && test ! -d "$path"; then
47462        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47463      fi
47464
47465      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47466    fi
47467  fi
47468
47469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47470$as_echo_n "checking for $DLL_NAME... " >&6; }
47471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47472$as_echo "$MSVC_DLL" >&6; }
47473    else
47474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47475$as_echo "incorrect, ignoring" >&6; }
47476      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47477$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47478    fi
47479  fi
47480
47481    fi
47482  fi
47483
47484  if test "x$MSVC_DLL" = x; then
47485    # Probe: Check in the Boot JDK directory.
47486    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47487
47488  DLL_NAME="$DLL_NAME"
47489  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47490  METHOD="well-known location in Boot JDK"
47491  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47493$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47494
47495    # Need to check if the found msvcr is correct architecture
47496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47497$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47498    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47499    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47500      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47501      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47502      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47503        CORRECT_MSVCR_ARCH="PE32 executable"
47504      else
47505        CORRECT_MSVCR_ARCH="PE32+ executable"
47506      fi
47507    else
47508      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47509        CORRECT_MSVCR_ARCH=386
47510      else
47511        CORRECT_MSVCR_ARCH=x86-64
47512      fi
47513    fi
47514    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47516$as_echo "ok" >&6; }
47517      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47518
47519  # Only process if variable expands to non-empty
47520
47521  if test "x$MSVC_DLL" != x; then
47522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47523
47524  # Input might be given as Windows format, start by converting to
47525  # unix format.
47526  path="$MSVC_DLL"
47527  new_path=`$CYGPATH -u "$path"`
47528
47529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47532  # "foo.exe" is OK but "foo" is an error.
47533  #
47534  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47535  # It is also a way to make sure we got the proper file name for the real test later on.
47536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47537  if test "x$test_shortpath" = x; then
47538    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47539$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47540    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47541  fi
47542
47543  # Call helper function which possibly converts this using DOS-style short mode.
47544  # If so, the updated path is stored in $new_path.
47545
47546  input_path="$new_path"
47547  # Check if we need to convert this using DOS-style short mode. If the path
47548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47549  # take no chances and rewrite it.
47550  # Note: m4 eats our [], so we need to use [ and ] instead.
47551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47552  if test "x$has_forbidden_chars" != x; then
47553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47557      # Going to short mode and back again did indeed matter. Since short mode is
47558      # case insensitive, let's make it lowercase to improve readability.
47559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47560      # Now convert it back to Unix-style (cygpath)
47561      input_path=`$CYGPATH -u "$shortmode_path"`
47562      new_path="$input_path"
47563    fi
47564  fi
47565
47566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47567  if test "x$test_cygdrive_prefix" = x; then
47568    # As a simple fix, exclude /usr/bin since it's not a real path.
47569    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47571      # a path prefixed by /cygdrive for fixpath to work.
47572      new_path="$CYGWIN_ROOT_PATH$input_path"
47573    fi
47574  fi
47575
47576
47577  if test "x$path" != "x$new_path"; then
47578    MSVC_DLL="$new_path"
47579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47580$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47581  fi
47582
47583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47584
47585  path="$MSVC_DLL"
47586  has_colon=`$ECHO $path | $GREP ^.:`
47587  new_path="$path"
47588  if test "x$has_colon" = x; then
47589    # Not in mixed or Windows style, start by that.
47590    new_path=`cmd //c echo $path`
47591  fi
47592
47593
47594  input_path="$new_path"
47595  # Check if we need to convert this using DOS-style short mode. If the path
47596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47597  # take no chances and rewrite it.
47598  # Note: m4 eats our [], so we need to use [ and ] instead.
47599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47600  if test "x$has_forbidden_chars" != x; then
47601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47603  fi
47604
47605
47606  windows_path="$new_path"
47607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47608    unix_path=`$CYGPATH -u "$windows_path"`
47609    new_path="$unix_path"
47610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47612    new_path="$unix_path"
47613  fi
47614
47615  if test "x$path" != "x$new_path"; then
47616    MSVC_DLL="$new_path"
47617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47618$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47619  fi
47620
47621  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47622  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47623
47624    else
47625      # We're on a unix platform. Hooray! :)
47626      path="$MSVC_DLL"
47627      has_space=`$ECHO "$path" | $GREP " "`
47628      if test "x$has_space" != x; then
47629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47630$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47631        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47632      fi
47633
47634      # Use eval to expand a potential ~
47635      eval path="$path"
47636      if test ! -f "$path" && test ! -d "$path"; then
47637        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47638      fi
47639
47640      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47641    fi
47642  fi
47643
47644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47645$as_echo_n "checking for $DLL_NAME... " >&6; }
47646      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47647$as_echo "$MSVC_DLL" >&6; }
47648    else
47649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47650$as_echo "incorrect, ignoring" >&6; }
47651      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47652$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47653    fi
47654  fi
47655
47656  fi
47657
47658  if test "x$MSVC_DLL" = x; then
47659    # Probe: Look in the Windows system32 directory
47660    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47661
47662  windows_path="$CYGWIN_SYSTEMROOT"
47663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47664    unix_path=`$CYGPATH -u "$windows_path"`
47665    CYGWIN_SYSTEMROOT="$unix_path"
47666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47668    CYGWIN_SYSTEMROOT="$unix_path"
47669  fi
47670
47671    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
47672
47673  DLL_NAME="$DLL_NAME"
47674  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47675  METHOD="well-known location in SYSTEMROOT"
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  fi
47842
47843  if test "x$MSVC_DLL" = x; then
47844    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47845    if test "x$VS100COMNTOOLS" != x; then
47846      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47847
47848  windows_path="$CYGWIN_VS_TOOLS_DIR"
47849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47850    unix_path=`$CYGPATH -u "$windows_path"`
47851    CYGWIN_VS_TOOLS_DIR="$unix_path"
47852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47854    CYGWIN_VS_TOOLS_DIR="$unix_path"
47855  fi
47856
47857      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47858        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47859	    | $GREP -i /x64/ | $HEAD --lines 1`
47860      else
47861        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
47862	    | $GREP -i /x86/ | $HEAD --lines 1`
47863      fi
47864
47865  DLL_NAME="$DLL_NAME"
47866  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47867  METHOD="search of VS100COMNTOOLS"
47868  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47870$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47871
47872    # Need to check if the found msvcr is correct architecture
47873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47874$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47875    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47877      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47878      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47879      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47880        CORRECT_MSVCR_ARCH="PE32 executable"
47881      else
47882        CORRECT_MSVCR_ARCH="PE32+ executable"
47883      fi
47884    else
47885      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47886        CORRECT_MSVCR_ARCH=386
47887      else
47888        CORRECT_MSVCR_ARCH=x86-64
47889      fi
47890    fi
47891    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47893$as_echo "ok" >&6; }
47894      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47895
47896  # Only process if variable expands to non-empty
47897
47898  if test "x$MSVC_DLL" != x; then
47899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47900
47901  # Input might be given as Windows format, start by converting to
47902  # unix format.
47903  path="$MSVC_DLL"
47904  new_path=`$CYGPATH -u "$path"`
47905
47906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47909  # "foo.exe" is OK but "foo" is an error.
47910  #
47911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47912  # It is also a way to make sure we got the proper file name for the real test later on.
47913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47914  if test "x$test_shortpath" = x; then
47915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47916$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47917    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47918  fi
47919
47920  # Call helper function which possibly converts this using DOS-style short mode.
47921  # If so, the updated path is stored in $new_path.
47922
47923  input_path="$new_path"
47924  # Check if we need to convert this using DOS-style short mode. If the path
47925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47926  # take no chances and rewrite it.
47927  # Note: m4 eats our [], so we need to use [ and ] instead.
47928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47929  if test "x$has_forbidden_chars" != x; then
47930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47934      # Going to short mode and back again did indeed matter. Since short mode is
47935      # case insensitive, let's make it lowercase to improve readability.
47936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47937      # Now convert it back to Unix-style (cygpath)
47938      input_path=`$CYGPATH -u "$shortmode_path"`
47939      new_path="$input_path"
47940    fi
47941  fi
47942
47943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47944  if test "x$test_cygdrive_prefix" = x; then
47945    # As a simple fix, exclude /usr/bin since it's not a real path.
47946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47948      # a path prefixed by /cygdrive for fixpath to work.
47949      new_path="$CYGWIN_ROOT_PATH$input_path"
47950    fi
47951  fi
47952
47953
47954  if test "x$path" != "x$new_path"; then
47955    MSVC_DLL="$new_path"
47956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47957$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47958  fi
47959
47960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47961
47962  path="$MSVC_DLL"
47963  has_colon=`$ECHO $path | $GREP ^.:`
47964  new_path="$path"
47965  if test "x$has_colon" = x; then
47966    # Not in mixed or Windows style, start by that.
47967    new_path=`cmd //c echo $path`
47968  fi
47969
47970
47971  input_path="$new_path"
47972  # Check if we need to convert this using DOS-style short mode. If the path
47973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47974  # take no chances and rewrite it.
47975  # Note: m4 eats our [], so we need to use [ and ] instead.
47976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47977  if test "x$has_forbidden_chars" != x; then
47978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47980  fi
47981
47982
47983  windows_path="$new_path"
47984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47985    unix_path=`$CYGPATH -u "$windows_path"`
47986    new_path="$unix_path"
47987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47989    new_path="$unix_path"
47990  fi
47991
47992  if test "x$path" != "x$new_path"; then
47993    MSVC_DLL="$new_path"
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47995$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47996  fi
47997
47998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48000
48001    else
48002      # We're on a unix platform. Hooray! :)
48003      path="$MSVC_DLL"
48004      has_space=`$ECHO "$path" | $GREP " "`
48005      if test "x$has_space" != x; then
48006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48007$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48008        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48009      fi
48010
48011      # Use eval to expand a potential ~
48012      eval path="$path"
48013      if test ! -f "$path" && test ! -d "$path"; then
48014        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48015      fi
48016
48017      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48018    fi
48019  fi
48020
48021      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48022$as_echo_n "checking for $DLL_NAME... " >&6; }
48023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48024$as_echo "$MSVC_DLL" >&6; }
48025    else
48026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48027$as_echo "incorrect, ignoring" >&6; }
48028      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48029$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48030    fi
48031  fi
48032
48033    fi
48034  fi
48035
48036  if test "x$MSVC_DLL" = x; then
48037    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48038    # (This was the original behaviour; kept since it might turn something up)
48039    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48040      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48041        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48042	    | $GREP x64 | $HEAD --lines 1`
48043      else
48044        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48045	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48046        if test "x$POSSIBLE_MSVC_DLL" = x; then
48047          # We're grasping at straws now...
48048          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48049	      | $HEAD --lines 1`
48050        fi
48051      fi
48052
48053
48054  DLL_NAME="$DLL_NAME"
48055  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48056  METHOD="search of VCINSTALLDIR"
48057  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48058    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48059$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48060
48061    # Need to check if the found msvcr is correct architecture
48062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48063$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48064    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48066      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48067      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48068      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48069        CORRECT_MSVCR_ARCH="PE32 executable"
48070      else
48071        CORRECT_MSVCR_ARCH="PE32+ executable"
48072      fi
48073    else
48074      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48075        CORRECT_MSVCR_ARCH=386
48076      else
48077        CORRECT_MSVCR_ARCH=x86-64
48078      fi
48079    fi
48080    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48082$as_echo "ok" >&6; }
48083      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48084
48085  # Only process if variable expands to non-empty
48086
48087  if test "x$MSVC_DLL" != x; then
48088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48089
48090  # Input might be given as Windows format, start by converting to
48091  # unix format.
48092  path="$MSVC_DLL"
48093  new_path=`$CYGPATH -u "$path"`
48094
48095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48098  # "foo.exe" is OK but "foo" is an error.
48099  #
48100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48101  # It is also a way to make sure we got the proper file name for the real test later on.
48102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48103  if test "x$test_shortpath" = x; then
48104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48105$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48106    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48107  fi
48108
48109  # Call helper function which possibly converts this using DOS-style short mode.
48110  # If so, the updated path is stored in $new_path.
48111
48112  input_path="$new_path"
48113  # Check if we need to convert this using DOS-style short mode. If the path
48114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48115  # take no chances and rewrite it.
48116  # Note: m4 eats our [], so we need to use [ and ] instead.
48117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48118  if test "x$has_forbidden_chars" != x; then
48119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48123      # Going to short mode and back again did indeed matter. Since short mode is
48124      # case insensitive, let's make it lowercase to improve readability.
48125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48126      # Now convert it back to Unix-style (cygpath)
48127      input_path=`$CYGPATH -u "$shortmode_path"`
48128      new_path="$input_path"
48129    fi
48130  fi
48131
48132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48133  if test "x$test_cygdrive_prefix" = x; then
48134    # As a simple fix, exclude /usr/bin since it's not a real path.
48135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48137      # a path prefixed by /cygdrive for fixpath to work.
48138      new_path="$CYGWIN_ROOT_PATH$input_path"
48139    fi
48140  fi
48141
48142
48143  if test "x$path" != "x$new_path"; then
48144    MSVC_DLL="$new_path"
48145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48146$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48147  fi
48148
48149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48150
48151  path="$MSVC_DLL"
48152  has_colon=`$ECHO $path | $GREP ^.:`
48153  new_path="$path"
48154  if test "x$has_colon" = x; then
48155    # Not in mixed or Windows style, start by that.
48156    new_path=`cmd //c echo $path`
48157  fi
48158
48159
48160  input_path="$new_path"
48161  # Check if we need to convert this using DOS-style short mode. If the path
48162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48163  # take no chances and rewrite it.
48164  # Note: m4 eats our [], so we need to use [ and ] instead.
48165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48166  if test "x$has_forbidden_chars" != x; then
48167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48169  fi
48170
48171
48172  windows_path="$new_path"
48173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48174    unix_path=`$CYGPATH -u "$windows_path"`
48175    new_path="$unix_path"
48176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48178    new_path="$unix_path"
48179  fi
48180
48181  if test "x$path" != "x$new_path"; then
48182    MSVC_DLL="$new_path"
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48184$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48185  fi
48186
48187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48189
48190    else
48191      # We're on a unix platform. Hooray! :)
48192      path="$MSVC_DLL"
48193      has_space=`$ECHO "$path" | $GREP " "`
48194      if test "x$has_space" != x; then
48195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48196$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48198      fi
48199
48200      # Use eval to expand a potential ~
48201      eval path="$path"
48202      if test ! -f "$path" && test ! -d "$path"; then
48203        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48204      fi
48205
48206      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48207    fi
48208  fi
48209
48210      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48211$as_echo_n "checking for $DLL_NAME... " >&6; }
48212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48213$as_echo "$MSVC_DLL" >&6; }
48214    else
48215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48216$as_echo "incorrect, ignoring" >&6; }
48217      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48218$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48219    fi
48220  fi
48221
48222    fi
48223  fi
48224
48225  if test "x$MSVC_DLL" = x; then
48226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48227$as_echo_n "checking for $DLL_NAME... " >&6; }
48228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48229$as_echo "no" >&6; }
48230    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48231  fi
48232
48233      MSVCP_DLL="$MSVC_DLL"
48234    fi
48235
48236  fi
48237
48238  fi
48239
48240
48241  if test "x$NEEDS_LIB_X11" = xfalse; then
48242    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
48243      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
48244$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
48245    fi
48246    X_CFLAGS=
48247    X_LIBS=
48248  else
48249
48250    if test "x${with_x}" = xno; then
48251      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
48252    fi
48253
48254    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
48255      # The user has specified a X11 base directory. Use it for includes and
48256      # libraries, unless explicitely overridden.
48257      if test "x$x_includes" = xNONE; then
48258        x_includes="${with_x}/include"
48259      fi
48260      if test "x$x_libraries" = xNONE; then
48261        x_libraries="${with_x}/lib"
48262      fi
48263    else
48264      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
48265      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
48266      # --x-libraries for the sysroot, if that seems to be correct.
48267      if test "x$SYSROOT" != "x"; then
48268        if test "x$x_includes" = xNONE; then
48269          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
48270            x_includes="$SYSROOT/usr/X11R6/include"
48271          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
48272            x_includes="$SYSROOT/usr/include"
48273          fi
48274        fi
48275        if test "x$x_libraries" = xNONE; then
48276          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
48277            x_libraries="$SYSROOT/usr/X11R6/lib"
48278          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48279            x_libraries="$SYSROOT/usr/lib64"
48280          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
48281            x_libraries="$SYSROOT/usr/lib"
48282          fi
48283        fi
48284      fi
48285    fi
48286
48287    # Now let autoconf do it's magic
48288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
48289$as_echo_n "checking for X... " >&6; }
48290
48291
48292# Check whether --with-x was given.
48293if test "${with_x+set}" = set; then :
48294  withval=$with_x;
48295fi
48296
48297# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
48298if test "x$with_x" = xno; then
48299  # The user explicitly disabled X.
48300  have_x=disabled
48301else
48302  case $x_includes,$x_libraries in #(
48303    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
48304    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
48305  $as_echo_n "(cached) " >&6
48306else
48307  # One or both of the vars are not set, and there is no cached value.
48308ac_x_includes=no ac_x_libraries=no
48309rm -f -r conftest.dir
48310if mkdir conftest.dir; then
48311  cd conftest.dir
48312  cat >Imakefile <<'_ACEOF'
48313incroot:
48314	@echo incroot='${INCROOT}'
48315usrlibdir:
48316	@echo usrlibdir='${USRLIBDIR}'
48317libdir:
48318	@echo libdir='${LIBDIR}'
48319_ACEOF
48320  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
48321    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
48322    for ac_var in incroot usrlibdir libdir; do
48323      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
48324    done
48325    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
48326    for ac_extension in a so sl dylib la dll; do
48327      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
48328	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
48329	ac_im_usrlibdir=$ac_im_libdir; break
48330      fi
48331    done
48332    # Screen out bogus values from the imake configuration.  They are
48333    # bogus both because they are the default anyway, and because
48334    # using them would break gcc on systems where it needs fixed includes.
48335    case $ac_im_incroot in
48336	/usr/include) ac_x_includes= ;;
48337	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
48338    esac
48339    case $ac_im_usrlibdir in
48340	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
48341	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
48342    esac
48343  fi
48344  cd ..
48345  rm -f -r conftest.dir
48346fi
48347
48348# Standard set of common directories for X headers.
48349# Check X11 before X11Rn because it is often a symlink to the current release.
48350ac_x_header_dirs='
48351/usr/X11/include
48352/usr/X11R7/include
48353/usr/X11R6/include
48354/usr/X11R5/include
48355/usr/X11R4/include
48356
48357/usr/include/X11
48358/usr/include/X11R7
48359/usr/include/X11R6
48360/usr/include/X11R5
48361/usr/include/X11R4
48362
48363/usr/local/X11/include
48364/usr/local/X11R7/include
48365/usr/local/X11R6/include
48366/usr/local/X11R5/include
48367/usr/local/X11R4/include
48368
48369/usr/local/include/X11
48370/usr/local/include/X11R7
48371/usr/local/include/X11R6
48372/usr/local/include/X11R5
48373/usr/local/include/X11R4
48374
48375/usr/X386/include
48376/usr/x386/include
48377/usr/XFree86/include/X11
48378
48379/usr/include
48380/usr/local/include
48381/usr/unsupported/include
48382/usr/athena/include
48383/usr/local/x11r5/include
48384/usr/lpp/Xamples/include
48385
48386/usr/openwin/include
48387/usr/openwin/share/include'
48388
48389if test "$ac_x_includes" = no; then
48390  # Guess where to find include files, by looking for Xlib.h.
48391  # First, try using that file with no special directory specified.
48392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48393/* end confdefs.h.  */
48394#include <X11/Xlib.h>
48395_ACEOF
48396if ac_fn_cxx_try_cpp "$LINENO"; then :
48397  # We can compile using X headers with no special include directory.
48398ac_x_includes=
48399else
48400  for ac_dir in $ac_x_header_dirs; do
48401  if test -r "$ac_dir/X11/Xlib.h"; then
48402    ac_x_includes=$ac_dir
48403    break
48404  fi
48405done
48406fi
48407rm -f conftest.err conftest.i conftest.$ac_ext
48408fi # $ac_x_includes = no
48409
48410if test "$ac_x_libraries" = no; then
48411  # Check for the libraries.
48412  # See if we find them without any special options.
48413  # Don't add to $LIBS permanently.
48414  ac_save_LIBS=$LIBS
48415  LIBS="-lX11 $LIBS"
48416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48417/* end confdefs.h.  */
48418#include <X11/Xlib.h>
48419int
48420main ()
48421{
48422XrmInitialize ()
48423  ;
48424  return 0;
48425}
48426_ACEOF
48427if ac_fn_cxx_try_link "$LINENO"; then :
48428  LIBS=$ac_save_LIBS
48429# We can link X programs with no special library path.
48430ac_x_libraries=
48431else
48432  LIBS=$ac_save_LIBS
48433for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
48434do
48435  # Don't even attempt the hair of trying to link an X program!
48436  for ac_extension in a so sl dylib la dll; do
48437    if test -r "$ac_dir/libX11.$ac_extension"; then
48438      ac_x_libraries=$ac_dir
48439      break 2
48440    fi
48441  done
48442done
48443fi
48444rm -f core conftest.err conftest.$ac_objext \
48445    conftest$ac_exeext conftest.$ac_ext
48446fi # $ac_x_libraries = no
48447
48448case $ac_x_includes,$ac_x_libraries in #(
48449  no,* | *,no | *\'*)
48450    # Didn't find X, or a directory has "'" in its name.
48451    ac_cv_have_x="have_x=no";; #(
48452  *)
48453    # Record where we found X for the cache.
48454    ac_cv_have_x="have_x=yes\
48455	ac_x_includes='$ac_x_includes'\
48456	ac_x_libraries='$ac_x_libraries'"
48457esac
48458fi
48459;; #(
48460    *) have_x=yes;;
48461  esac
48462  eval "$ac_cv_have_x"
48463fi # $with_x != no
48464
48465if test "$have_x" != yes; then
48466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
48467$as_echo "$have_x" >&6; }
48468  no_x=yes
48469else
48470  # If each of the values was on the command line, it overrides each guess.
48471  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
48472  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
48473  # Update the cache value to reflect the command line values.
48474  ac_cv_have_x="have_x=yes\
48475	ac_x_includes='$x_includes'\
48476	ac_x_libraries='$x_libraries'"
48477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
48478$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
48479fi
48480
48481    if test "$no_x" = yes; then
48482  # Not all programs may use this symbol, but it does not hurt to define it.
48483
48484$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
48485
48486  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
48487else
48488  if test -n "$x_includes"; then
48489    X_CFLAGS="$X_CFLAGS -I$x_includes"
48490  fi
48491
48492  # It would also be nice to do this for all -L options, not just this one.
48493  if test -n "$x_libraries"; then
48494    X_LIBS="$X_LIBS -L$x_libraries"
48495    # For Solaris; some versions of Sun CC require a space after -R and
48496    # others require no space.  Words are not sufficient . . . .
48497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
48498$as_echo_n "checking whether -R must be followed by a space... " >&6; }
48499    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
48500    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
48501    ac_cxx_werror_flag=yes
48502    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48503/* end confdefs.h.  */
48504
48505int
48506main ()
48507{
48508
48509  ;
48510  return 0;
48511}
48512_ACEOF
48513if ac_fn_cxx_try_link "$LINENO"; then :
48514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48515$as_echo "no" >&6; }
48516       X_LIBS="$X_LIBS -R$x_libraries"
48517else
48518  LIBS="$ac_xsave_LIBS -R $x_libraries"
48519       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48520/* end confdefs.h.  */
48521
48522int
48523main ()
48524{
48525
48526  ;
48527  return 0;
48528}
48529_ACEOF
48530if ac_fn_cxx_try_link "$LINENO"; then :
48531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48532$as_echo "yes" >&6; }
48533	  X_LIBS="$X_LIBS -R $x_libraries"
48534else
48535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
48536$as_echo "neither works" >&6; }
48537fi
48538rm -f core conftest.err conftest.$ac_objext \
48539    conftest$ac_exeext conftest.$ac_ext
48540fi
48541rm -f core conftest.err conftest.$ac_objext \
48542    conftest$ac_exeext conftest.$ac_ext
48543    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
48544    LIBS=$ac_xsave_LIBS
48545  fi
48546
48547  # Check for system-dependent libraries X programs must link with.
48548  # Do this before checking for the system-independent R6 libraries
48549  # (-lICE), since we may need -lsocket or whatever for X linking.
48550
48551  if test "$ISC" = yes; then
48552    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
48553  else
48554    # Martyn Johnson says this is needed for Ultrix, if the X
48555    # libraries were built with DECnet support.  And Karl Berry says
48556    # the Alpha needs dnet_stub (dnet does not exist).
48557    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
48558    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48559/* end confdefs.h.  */
48560
48561/* Override any GCC internal prototype to avoid an error.
48562   Use char because int might match the return type of a GCC
48563   builtin and then its argument prototype would still apply.  */
48564#ifdef __cplusplus
48565extern "C"
48566#endif
48567char XOpenDisplay ();
48568int
48569main ()
48570{
48571return XOpenDisplay ();
48572  ;
48573  return 0;
48574}
48575_ACEOF
48576if ac_fn_cxx_try_link "$LINENO"; then :
48577
48578else
48579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
48580$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
48581if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
48582  $as_echo_n "(cached) " >&6
48583else
48584  ac_check_lib_save_LIBS=$LIBS
48585LIBS="-ldnet  $LIBS"
48586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48587/* end confdefs.h.  */
48588
48589/* Override any GCC internal prototype to avoid an error.
48590   Use char because int might match the return type of a GCC
48591   builtin and then its argument prototype would still apply.  */
48592#ifdef __cplusplus
48593extern "C"
48594#endif
48595char dnet_ntoa ();
48596int
48597main ()
48598{
48599return dnet_ntoa ();
48600  ;
48601  return 0;
48602}
48603_ACEOF
48604if ac_fn_cxx_try_link "$LINENO"; then :
48605  ac_cv_lib_dnet_dnet_ntoa=yes
48606else
48607  ac_cv_lib_dnet_dnet_ntoa=no
48608fi
48609rm -f core conftest.err conftest.$ac_objext \
48610    conftest$ac_exeext conftest.$ac_ext
48611LIBS=$ac_check_lib_save_LIBS
48612fi
48613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
48614$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
48615if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
48616  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
48617fi
48618
48619    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
48620      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
48621$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
48622if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
48623  $as_echo_n "(cached) " >&6
48624else
48625  ac_check_lib_save_LIBS=$LIBS
48626LIBS="-ldnet_stub  $LIBS"
48627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48628/* end confdefs.h.  */
48629
48630/* Override any GCC internal prototype to avoid an error.
48631   Use char because int might match the return type of a GCC
48632   builtin and then its argument prototype would still apply.  */
48633#ifdef __cplusplus
48634extern "C"
48635#endif
48636char dnet_ntoa ();
48637int
48638main ()
48639{
48640return dnet_ntoa ();
48641  ;
48642  return 0;
48643}
48644_ACEOF
48645if ac_fn_cxx_try_link "$LINENO"; then :
48646  ac_cv_lib_dnet_stub_dnet_ntoa=yes
48647else
48648  ac_cv_lib_dnet_stub_dnet_ntoa=no
48649fi
48650rm -f core conftest.err conftest.$ac_objext \
48651    conftest$ac_exeext conftest.$ac_ext
48652LIBS=$ac_check_lib_save_LIBS
48653fi
48654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
48655$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
48656if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
48657  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
48658fi
48659
48660    fi
48661fi
48662rm -f core conftest.err conftest.$ac_objext \
48663    conftest$ac_exeext conftest.$ac_ext
48664    LIBS="$ac_xsave_LIBS"
48665
48666    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
48667    # to get the SysV transport functions.
48668    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
48669    # needs -lnsl.
48670    # The nsl library prevents programs from opening the X display
48671    # on Irix 5.2, according to T.E. Dickey.
48672    # The functions gethostbyname, getservbyname, and inet_addr are
48673    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
48674    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
48675if test "x$ac_cv_func_gethostbyname" = xyes; then :
48676
48677fi
48678
48679    if test $ac_cv_func_gethostbyname = no; then
48680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
48681$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
48682if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
48683  $as_echo_n "(cached) " >&6
48684else
48685  ac_check_lib_save_LIBS=$LIBS
48686LIBS="-lnsl  $LIBS"
48687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48688/* end confdefs.h.  */
48689
48690/* Override any GCC internal prototype to avoid an error.
48691   Use char because int might match the return type of a GCC
48692   builtin and then its argument prototype would still apply.  */
48693#ifdef __cplusplus
48694extern "C"
48695#endif
48696char gethostbyname ();
48697int
48698main ()
48699{
48700return gethostbyname ();
48701  ;
48702  return 0;
48703}
48704_ACEOF
48705if ac_fn_cxx_try_link "$LINENO"; then :
48706  ac_cv_lib_nsl_gethostbyname=yes
48707else
48708  ac_cv_lib_nsl_gethostbyname=no
48709fi
48710rm -f core conftest.err conftest.$ac_objext \
48711    conftest$ac_exeext conftest.$ac_ext
48712LIBS=$ac_check_lib_save_LIBS
48713fi
48714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
48715$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
48716if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
48717  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
48718fi
48719
48720      if test $ac_cv_lib_nsl_gethostbyname = no; then
48721	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
48722$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
48723if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
48724  $as_echo_n "(cached) " >&6
48725else
48726  ac_check_lib_save_LIBS=$LIBS
48727LIBS="-lbsd  $LIBS"
48728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48729/* end confdefs.h.  */
48730
48731/* Override any GCC internal prototype to avoid an error.
48732   Use char because int might match the return type of a GCC
48733   builtin and then its argument prototype would still apply.  */
48734#ifdef __cplusplus
48735extern "C"
48736#endif
48737char gethostbyname ();
48738int
48739main ()
48740{
48741return gethostbyname ();
48742  ;
48743  return 0;
48744}
48745_ACEOF
48746if ac_fn_cxx_try_link "$LINENO"; then :
48747  ac_cv_lib_bsd_gethostbyname=yes
48748else
48749  ac_cv_lib_bsd_gethostbyname=no
48750fi
48751rm -f core conftest.err conftest.$ac_objext \
48752    conftest$ac_exeext conftest.$ac_ext
48753LIBS=$ac_check_lib_save_LIBS
48754fi
48755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
48756$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
48757if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
48758  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
48759fi
48760
48761      fi
48762    fi
48763
48764    # lieder@skyler.mavd.honeywell.com says without -lsocket,
48765    # socket/setsockopt and other routines are undefined under SCO ODT
48766    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
48767    # on later versions), says Simon Leinen: it contains gethostby*
48768    # variants that don't use the name server (or something).  -lsocket
48769    # must be given before -lnsl if both are needed.  We assume that
48770    # if connect needs -lnsl, so does gethostbyname.
48771    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
48772if test "x$ac_cv_func_connect" = xyes; then :
48773
48774fi
48775
48776    if test $ac_cv_func_connect = no; then
48777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
48778$as_echo_n "checking for connect in -lsocket... " >&6; }
48779if ${ac_cv_lib_socket_connect+:} false; then :
48780  $as_echo_n "(cached) " >&6
48781else
48782  ac_check_lib_save_LIBS=$LIBS
48783LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
48784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48785/* end confdefs.h.  */
48786
48787/* Override any GCC internal prototype to avoid an error.
48788   Use char because int might match the return type of a GCC
48789   builtin and then its argument prototype would still apply.  */
48790#ifdef __cplusplus
48791extern "C"
48792#endif
48793char connect ();
48794int
48795main ()
48796{
48797return connect ();
48798  ;
48799  return 0;
48800}
48801_ACEOF
48802if ac_fn_cxx_try_link "$LINENO"; then :
48803  ac_cv_lib_socket_connect=yes
48804else
48805  ac_cv_lib_socket_connect=no
48806fi
48807rm -f core conftest.err conftest.$ac_objext \
48808    conftest$ac_exeext conftest.$ac_ext
48809LIBS=$ac_check_lib_save_LIBS
48810fi
48811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
48812$as_echo "$ac_cv_lib_socket_connect" >&6; }
48813if test "x$ac_cv_lib_socket_connect" = xyes; then :
48814  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
48815fi
48816
48817    fi
48818
48819    # Guillermo Gomez says -lposix is necessary on A/UX.
48820    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
48821if test "x$ac_cv_func_remove" = xyes; then :
48822
48823fi
48824
48825    if test $ac_cv_func_remove = no; then
48826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
48827$as_echo_n "checking for remove in -lposix... " >&6; }
48828if ${ac_cv_lib_posix_remove+:} false; then :
48829  $as_echo_n "(cached) " >&6
48830else
48831  ac_check_lib_save_LIBS=$LIBS
48832LIBS="-lposix  $LIBS"
48833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48834/* end confdefs.h.  */
48835
48836/* Override any GCC internal prototype to avoid an error.
48837   Use char because int might match the return type of a GCC
48838   builtin and then its argument prototype would still apply.  */
48839#ifdef __cplusplus
48840extern "C"
48841#endif
48842char remove ();
48843int
48844main ()
48845{
48846return remove ();
48847  ;
48848  return 0;
48849}
48850_ACEOF
48851if ac_fn_cxx_try_link "$LINENO"; then :
48852  ac_cv_lib_posix_remove=yes
48853else
48854  ac_cv_lib_posix_remove=no
48855fi
48856rm -f core conftest.err conftest.$ac_objext \
48857    conftest$ac_exeext conftest.$ac_ext
48858LIBS=$ac_check_lib_save_LIBS
48859fi
48860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
48861$as_echo "$ac_cv_lib_posix_remove" >&6; }
48862if test "x$ac_cv_lib_posix_remove" = xyes; then :
48863  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
48864fi
48865
48866    fi
48867
48868    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
48869    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
48870if test "x$ac_cv_func_shmat" = xyes; then :
48871
48872fi
48873
48874    if test $ac_cv_func_shmat = no; then
48875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
48876$as_echo_n "checking for shmat in -lipc... " >&6; }
48877if ${ac_cv_lib_ipc_shmat+:} false; then :
48878  $as_echo_n "(cached) " >&6
48879else
48880  ac_check_lib_save_LIBS=$LIBS
48881LIBS="-lipc  $LIBS"
48882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48883/* end confdefs.h.  */
48884
48885/* Override any GCC internal prototype to avoid an error.
48886   Use char because int might match the return type of a GCC
48887   builtin and then its argument prototype would still apply.  */
48888#ifdef __cplusplus
48889extern "C"
48890#endif
48891char shmat ();
48892int
48893main ()
48894{
48895return shmat ();
48896  ;
48897  return 0;
48898}
48899_ACEOF
48900if ac_fn_cxx_try_link "$LINENO"; then :
48901  ac_cv_lib_ipc_shmat=yes
48902else
48903  ac_cv_lib_ipc_shmat=no
48904fi
48905rm -f core conftest.err conftest.$ac_objext \
48906    conftest$ac_exeext conftest.$ac_ext
48907LIBS=$ac_check_lib_save_LIBS
48908fi
48909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
48910$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
48911if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
48912  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
48913fi
48914
48915    fi
48916  fi
48917
48918  # Check for libraries that X11R6 Xt/Xaw programs need.
48919  ac_save_LDFLAGS=$LDFLAGS
48920  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
48921  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
48922  # check for ICE first), but we must link in the order -lSM -lICE or
48923  # we get undefined symbols.  So assume we have SM if we have ICE.
48924  # These have to be linked with before -lX11, unlike the other
48925  # libraries we check for below, so use a different variable.
48926  # John Interrante, Karl Berry
48927  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
48928$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
48929if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
48930  $as_echo_n "(cached) " >&6
48931else
48932  ac_check_lib_save_LIBS=$LIBS
48933LIBS="-lICE $X_EXTRA_LIBS $LIBS"
48934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48935/* end confdefs.h.  */
48936
48937/* Override any GCC internal prototype to avoid an error.
48938   Use char because int might match the return type of a GCC
48939   builtin and then its argument prototype would still apply.  */
48940#ifdef __cplusplus
48941extern "C"
48942#endif
48943char IceConnectionNumber ();
48944int
48945main ()
48946{
48947return IceConnectionNumber ();
48948  ;
48949  return 0;
48950}
48951_ACEOF
48952if ac_fn_cxx_try_link "$LINENO"; then :
48953  ac_cv_lib_ICE_IceConnectionNumber=yes
48954else
48955  ac_cv_lib_ICE_IceConnectionNumber=no
48956fi
48957rm -f core conftest.err conftest.$ac_objext \
48958    conftest$ac_exeext conftest.$ac_ext
48959LIBS=$ac_check_lib_save_LIBS
48960fi
48961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
48962$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
48963if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
48964  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
48965fi
48966
48967  LDFLAGS=$ac_save_LDFLAGS
48968
48969fi
48970
48971
48972    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
48973    # this doesn't make sense so we remove it.
48974    if test "x$COMPILE_TYPE" = xcross; then
48975      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
48976    fi
48977
48978    if test "x$no_x" = xyes; then
48979
48980  # Print a helpful message on how to acquire the necessary build dependency.
48981  # x11 is the help tag: freetype, cups, alsa etc
48982  MISSING_DEPENDENCY=x11
48983
48984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48985    cygwin_help $MISSING_DEPENDENCY
48986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48987    msys_help $MISSING_DEPENDENCY
48988  else
48989    PKGHANDLER_COMMAND=
48990
48991    case $PKGHANDLER in
48992      apt-get)
48993        apt_help     $MISSING_DEPENDENCY ;;
48994      yum)
48995        yum_help     $MISSING_DEPENDENCY ;;
48996      port)
48997        port_help    $MISSING_DEPENDENCY ;;
48998      pkgutil)
48999        pkgutil_help $MISSING_DEPENDENCY ;;
49000      pkgadd)
49001        pkgadd_help  $MISSING_DEPENDENCY ;;
49002    esac
49003
49004    if test "x$PKGHANDLER_COMMAND" != x; then
49005      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49006    fi
49007  fi
49008
49009      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
49010    fi
49011
49012    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49013      OPENWIN_HOME="/usr/openwin"
49014      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
49015      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49016          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
49017          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
49018          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
49019    fi
49020
49021    ac_ext=c
49022ac_cpp='$CPP $CPPFLAGS'
49023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49025ac_compiler_gnu=$ac_cv_c_compiler_gnu
49026
49027    OLD_CFLAGS="$CFLAGS"
49028    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
49029
49030    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
49031    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
49032do :
49033  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49034ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
49035          # include <X11/Xlib.h>
49036          # include <X11/Xutil.h>
49037
49038
49039"
49040if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49041  cat >>confdefs.h <<_ACEOF
49042#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49043_ACEOF
49044 X11_HEADERS_OK=yes
49045else
49046  X11_HEADERS_OK=no; break
49047fi
49048
49049done
49050
49051
49052    if test "x$X11_HEADERS_OK" = xno; then
49053
49054  # Print a helpful message on how to acquire the necessary build dependency.
49055  # x11 is the help tag: freetype, cups, alsa etc
49056  MISSING_DEPENDENCY=x11
49057
49058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49059    cygwin_help $MISSING_DEPENDENCY
49060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49061    msys_help $MISSING_DEPENDENCY
49062  else
49063    PKGHANDLER_COMMAND=
49064
49065    case $PKGHANDLER in
49066      apt-get)
49067        apt_help     $MISSING_DEPENDENCY ;;
49068      yum)
49069        yum_help     $MISSING_DEPENDENCY ;;
49070      port)
49071        port_help    $MISSING_DEPENDENCY ;;
49072      pkgutil)
49073        pkgutil_help $MISSING_DEPENDENCY ;;
49074      pkgadd)
49075        pkgadd_help  $MISSING_DEPENDENCY ;;
49076    esac
49077
49078    if test "x$PKGHANDLER_COMMAND" != x; then
49079      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49080    fi
49081  fi
49082
49083      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
49084    fi
49085
49086    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
49087    # defined in libawt_xawt.
49088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
49089$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
49090    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49091/* end confdefs.h.  */
49092#include <X11/extensions/Xrender.h>
49093int
49094main ()
49095{
49096XLinearGradient x;
49097  ;
49098  return 0;
49099}
49100_ACEOF
49101if ac_fn_c_try_compile "$LINENO"; then :
49102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49103$as_echo "yes" >&6; }
49104else
49105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49106$as_echo "no" >&6; }
49107         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
49108fi
49109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49110
49111    CFLAGS="$OLD_CFLAGS"
49112    ac_ext=cpp
49113ac_cpp='$CXXCPP $CPPFLAGS'
49114ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49115ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49116ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49117
49118  fi # NEEDS_LIB_X11
49119
49120
49121
49122
49123
49124
49125# Check whether --with-cups was given.
49126if test "${with_cups+set}" = set; then :
49127  withval=$with_cups;
49128fi
49129
49130
49131# Check whether --with-cups-include was given.
49132if test "${with_cups_include+set}" = set; then :
49133  withval=$with_cups_include;
49134fi
49135
49136
49137  if test "x$NEEDS_LIB_CUPS" = xfalse; then
49138    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
49139        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
49140      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
49141$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
49142    fi
49143    CUPS_CFLAGS=
49144  else
49145    CUPS_FOUND=no
49146
49147    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
49148      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
49149    fi
49150
49151    if test "x${with_cups}" != x; then
49152      CUPS_CFLAGS="-I${with_cups}/include"
49153      CUPS_FOUND=yes
49154    fi
49155    if test "x${with_cups_include}" != x; then
49156      CUPS_CFLAGS="-I${with_cups_include}"
49157      CUPS_FOUND=yes
49158    fi
49159    if test "x$CUPS_FOUND" = xno; then
49160      # Are the cups headers installed in the default /usr/include location?
49161      for ac_header in cups/cups.h cups/ppd.h
49162do :
49163  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49164ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49165if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49166  cat >>confdefs.h <<_ACEOF
49167#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49168_ACEOF
49169
49170          CUPS_FOUND=yes
49171          CUPS_CFLAGS=
49172          DEFAULT_CUPS=yes
49173
49174fi
49175
49176done
49177
49178    fi
49179    if test "x$CUPS_FOUND" = xno; then
49180      # Getting nervous now? Lets poke around for standard Solaris third-party
49181      # package installation locations.
49182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
49183$as_echo_n "checking for cups headers... " >&6; }
49184      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
49185        # An SFW package seems to be installed!
49186        CUPS_FOUND=yes
49187        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
49188      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
49189        # A CSW package seems to be installed!
49190        CUPS_FOUND=yes
49191        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
49192      fi
49193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
49194$as_echo "$CUPS_FOUND" >&6; }
49195    fi
49196    if test "x$CUPS_FOUND" = xno; then
49197
49198  # Print a helpful message on how to acquire the necessary build dependency.
49199  # cups is the help tag: freetype, cups, alsa etc
49200  MISSING_DEPENDENCY=cups
49201
49202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49203    cygwin_help $MISSING_DEPENDENCY
49204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49205    msys_help $MISSING_DEPENDENCY
49206  else
49207    PKGHANDLER_COMMAND=
49208
49209    case $PKGHANDLER in
49210      apt-get)
49211        apt_help     $MISSING_DEPENDENCY ;;
49212      yum)
49213        yum_help     $MISSING_DEPENDENCY ;;
49214      port)
49215        port_help    $MISSING_DEPENDENCY ;;
49216      pkgutil)
49217        pkgutil_help $MISSING_DEPENDENCY ;;
49218      pkgadd)
49219        pkgadd_help  $MISSING_DEPENDENCY ;;
49220    esac
49221
49222    if test "x$PKGHANDLER_COMMAND" != x; then
49223      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49224    fi
49225  fi
49226
49227      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
49228    fi
49229  fi
49230
49231
49232
49233
49234
49235# Check whether --with-freetype was given.
49236if test "${with_freetype+set}" = set; then :
49237  withval=$with_freetype;
49238fi
49239
49240
49241# Check whether --with-freetype-include was given.
49242if test "${with_freetype_include+set}" = set; then :
49243  withval=$with_freetype_include;
49244fi
49245
49246
49247# Check whether --with-freetype-lib was given.
49248if test "${with_freetype_lib+set}" = set; then :
49249  withval=$with_freetype_lib;
49250fi
49251
49252
49253# Check whether --with-freetype-src was given.
49254if test "${with_freetype_src+set}" = set; then :
49255  withval=$with_freetype_src;
49256fi
49257
49258  # Check whether --enable-freetype-bundling was given.
49259if test "${enable_freetype_bundling+set}" = set; then :
49260  enableval=$enable_freetype_bundling;
49261fi
49262
49263
49264  # Need to specify explicitly since it needs to be overridden on some versions of macosx
49265  FREETYPE_BASE_NAME=freetype
49266  FREETYPE_CFLAGS=
49267  FREETYPE_LIBS=
49268  FREETYPE_BUNDLE_LIB_PATH=
49269
49270  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
49271    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
49272        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
49273        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
49274        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
49275      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
49276$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
49277    fi
49278    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
49279      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
49280$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
49281    fi
49282  else
49283    # freetype is needed to build; go get it!
49284
49285    BUNDLE_FREETYPE="$enable_freetype_bundling"
49286
49287    if  test "x$with_freetype_src" != x; then
49288      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49289        # Try to build freetype if --with-freetype-src was given on Windows
49290
49291  FREETYPE_SRC_PATH="$with_freetype_src"
49292  BUILD_FREETYPE=yes
49293
49294  # Check if the freetype sources are acessible..
49295  if ! test -d $FREETYPE_SRC_PATH; then
49296    { $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
49297$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
49298    BUILD_FREETYPE=no
49299  fi
49300  # ..and contain a vc2010 project file
49301  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
49302  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
49303    { $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
49304$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
49305    BUILD_FREETYPE=no
49306  fi
49307  # Now check if configure found a version of 'msbuild.exe'
49308  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
49309    { $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
49310$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;}
49311    BUILD_FREETYPE=no
49312  fi
49313
49314  # Ready to go..
49315  if test "x$BUILD_FREETYPE" = xyes; then
49316    # msbuild requires trailing slashes for output directories
49317    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
49318    freetype_lib_path_unix="$freetype_lib_path"
49319    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
49320
49321  unix_path="$vcxproj_path"
49322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49323    windows_path=`$CYGPATH -m "$unix_path"`
49324    vcxproj_path="$windows_path"
49325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49326    windows_path=`cmd //c echo $unix_path`
49327    vcxproj_path="$windows_path"
49328  fi
49329
49330
49331  unix_path="$freetype_lib_path"
49332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49333    windows_path=`$CYGPATH -m "$unix_path"`
49334    freetype_lib_path="$windows_path"
49335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49336    windows_path=`cmd //c echo $unix_path`
49337    freetype_lib_path="$windows_path"
49338  fi
49339
49340
49341  unix_path="$freetype_obj_path"
49342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49343    windows_path=`$CYGPATH -m "$unix_path"`
49344    freetype_obj_path="$windows_path"
49345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49346    windows_path=`cmd //c echo $unix_path`
49347    freetype_obj_path="$windows_path"
49348  fi
49349
49350    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49351      freetype_platform=x64
49352    else
49353      freetype_platform=win32
49354    fi
49355
49356    # The original freetype project file is for VS 2010 (i.e. 'v100'),
49357    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
49358    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
49359    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
49360    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
49361$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
49362
49363    # First we try to build the freetype.dll
49364    $ECHO -e "@echo off\n"\
49365        "$MSBUILD $vcxproj_path "\
49366        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49367        "/p:Configuration=\"Release Multithreaded\" "\
49368        "/p:Platform=$freetype_platform "\
49369        "/p:ConfigurationType=DynamicLibrary "\
49370        "/p:TargetName=freetype "\
49371        "/p:OutDir=\"$freetype_lib_path\" "\
49372        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
49373    cmd /c freetype.bat
49374
49375    if test -s "$freetype_lib_path_unix/freetype.dll"; then
49376      # If that succeeds we also build freetype.lib
49377      $ECHO -e "@echo off\n"\
49378          "$MSBUILD $vcxproj_path "\
49379          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
49380          "/p:Configuration=\"Release Multithreaded\" "\
49381          "/p:Platform=$freetype_platform "\
49382          "/p:ConfigurationType=StaticLibrary "\
49383          "/p:TargetName=freetype "\
49384          "/p:OutDir=\"$freetype_lib_path\" "\
49385          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
49386      cmd /c freetype.bat
49387
49388      if test -s "$freetype_lib_path_unix/freetype.lib"; then
49389        # Once we build both, lib and dll, set freetype lib and include path appropriately
49390        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
49391        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
49392        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
49393$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
49394      else
49395        BUILD_FREETYPE=no
49396      fi
49397    else
49398      BUILD_FREETYPE=no
49399    fi
49400  fi
49401
49402        if test "x$BUILD_FREETYPE" = xyes; then
49403          # Okay, we built it. Check that it works.
49404
49405  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49406  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49407  METHOD="--with-freetype-src"
49408
49409  # Let's start with an optimistic view of the world :-)
49410  FOUND_FREETYPE=yes
49411
49412  # First look for the canonical freetype main include file ft2build.h.
49413  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49414    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49415    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49416    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49417      # Fail.
49418      FOUND_FREETYPE=no
49419    fi
49420  fi
49421
49422  if test "x$FOUND_FREETYPE" = xyes; then
49423    # Include file found, let's continue the sanity check.
49424    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49425$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49426
49427    # Reset to default value
49428    FREETYPE_BASE_NAME=freetype
49429    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49430    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49431      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49432          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49433        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49434        # for the .6 version explicitly.
49435        FREETYPE_BASE_NAME=freetype.6
49436        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49437        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49438$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49439      else
49440        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49441$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49442        FOUND_FREETYPE=no
49443      fi
49444    else
49445      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49446        # On Windows, we will need both .lib and .dll file.
49447        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49448          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49449$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49450          FOUND_FREETYPE=no
49451        fi
49452      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49453          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49454        # Found lib in isa dir, use that instead.
49455        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49456        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49457$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49458      fi
49459    fi
49460  fi
49461
49462  if test "x$FOUND_FREETYPE" = xyes; then
49463
49464  # Only process if variable expands to non-empty
49465
49466  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49468
49469  # Input might be given as Windows format, start by converting to
49470  # unix format.
49471  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49472  new_path=`$CYGPATH -u "$path"`
49473
49474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49477  # "foo.exe" is OK but "foo" is an error.
49478  #
49479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49480  # It is also a way to make sure we got the proper file name for the real test later on.
49481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49482  if test "x$test_shortpath" = x; then
49483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49485    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49486  fi
49487
49488  # Call helper function which possibly converts this using DOS-style short mode.
49489  # If so, the updated path is stored in $new_path.
49490
49491  input_path="$new_path"
49492  # Check if we need to convert this using DOS-style short mode. If the path
49493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49494  # take no chances and rewrite it.
49495  # Note: m4 eats our [], so we need to use [ and ] instead.
49496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49497  if test "x$has_forbidden_chars" != x; then
49498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49502      # Going to short mode and back again did indeed matter. Since short mode is
49503      # case insensitive, let's make it lowercase to improve readability.
49504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49505      # Now convert it back to Unix-style (cygpath)
49506      input_path=`$CYGPATH -u "$shortmode_path"`
49507      new_path="$input_path"
49508    fi
49509  fi
49510
49511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49512  if test "x$test_cygdrive_prefix" = x; then
49513    # As a simple fix, exclude /usr/bin since it's not a real path.
49514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49516      # a path prefixed by /cygdrive for fixpath to work.
49517      new_path="$CYGWIN_ROOT_PATH$input_path"
49518    fi
49519  fi
49520
49521
49522  if test "x$path" != "x$new_path"; then
49523    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49525$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49526  fi
49527
49528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49529
49530  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49531  has_colon=`$ECHO $path | $GREP ^.:`
49532  new_path="$path"
49533  if test "x$has_colon" = x; then
49534    # Not in mixed or Windows style, start by that.
49535    new_path=`cmd //c echo $path`
49536  fi
49537
49538
49539  input_path="$new_path"
49540  # Check if we need to convert this using DOS-style short mode. If the path
49541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49542  # take no chances and rewrite it.
49543  # Note: m4 eats our [], so we need to use [ and ] instead.
49544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49545  if test "x$has_forbidden_chars" != x; then
49546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49548  fi
49549
49550
49551  windows_path="$new_path"
49552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49553    unix_path=`$CYGPATH -u "$windows_path"`
49554    new_path="$unix_path"
49555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49557    new_path="$unix_path"
49558  fi
49559
49560  if test "x$path" != "x$new_path"; then
49561    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49563$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49564  fi
49565
49566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49568
49569    else
49570      # We're on a unix platform. Hooray! :)
49571      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49572      has_space=`$ECHO "$path" | $GREP " "`
49573      if test "x$has_space" != x; then
49574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49577      fi
49578
49579      # Use eval to expand a potential ~
49580      eval path="$path"
49581      if test ! -f "$path" && test ! -d "$path"; then
49582        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49583      fi
49584
49585      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49586    fi
49587  fi
49588
49589
49590  # Only process if variable expands to non-empty
49591
49592  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49594
49595  # Input might be given as Windows format, start by converting to
49596  # unix format.
49597  path="$POTENTIAL_FREETYPE_LIB_PATH"
49598  new_path=`$CYGPATH -u "$path"`
49599
49600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49603  # "foo.exe" is OK but "foo" is an error.
49604  #
49605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49606  # It is also a way to make sure we got the proper file name for the real test later on.
49607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49608  if test "x$test_shortpath" = x; then
49609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49610$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49611    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49612  fi
49613
49614  # Call helper function which possibly converts this using DOS-style short mode.
49615  # If so, the updated path is stored in $new_path.
49616
49617  input_path="$new_path"
49618  # Check if we need to convert this using DOS-style short mode. If the path
49619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49620  # take no chances and rewrite it.
49621  # Note: m4 eats our [], so we need to use [ and ] instead.
49622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49623  if test "x$has_forbidden_chars" != x; then
49624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49628      # Going to short mode and back again did indeed matter. Since short mode is
49629      # case insensitive, let's make it lowercase to improve readability.
49630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49631      # Now convert it back to Unix-style (cygpath)
49632      input_path=`$CYGPATH -u "$shortmode_path"`
49633      new_path="$input_path"
49634    fi
49635  fi
49636
49637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49638  if test "x$test_cygdrive_prefix" = x; then
49639    # As a simple fix, exclude /usr/bin since it's not a real path.
49640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49642      # a path prefixed by /cygdrive for fixpath to work.
49643      new_path="$CYGWIN_ROOT_PATH$input_path"
49644    fi
49645  fi
49646
49647
49648  if test "x$path" != "x$new_path"; then
49649    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49651$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49652  fi
49653
49654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49655
49656  path="$POTENTIAL_FREETYPE_LIB_PATH"
49657  has_colon=`$ECHO $path | $GREP ^.:`
49658  new_path="$path"
49659  if test "x$has_colon" = x; then
49660    # Not in mixed or Windows style, start by that.
49661    new_path=`cmd //c echo $path`
49662  fi
49663
49664
49665  input_path="$new_path"
49666  # Check if we need to convert this using DOS-style short mode. If the path
49667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49668  # take no chances and rewrite it.
49669  # Note: m4 eats our [], so we need to use [ and ] instead.
49670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49671  if test "x$has_forbidden_chars" != x; then
49672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49674  fi
49675
49676
49677  windows_path="$new_path"
49678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49679    unix_path=`$CYGPATH -u "$windows_path"`
49680    new_path="$unix_path"
49681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49683    new_path="$unix_path"
49684  fi
49685
49686  if test "x$path" != "x$new_path"; then
49687    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
49688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
49689$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
49690  fi
49691
49692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49694
49695    else
49696      # We're on a unix platform. Hooray! :)
49697      path="$POTENTIAL_FREETYPE_LIB_PATH"
49698      has_space=`$ECHO "$path" | $GREP " "`
49699      if test "x$has_space" != x; then
49700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49701$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49703      fi
49704
49705      # Use eval to expand a potential ~
49706      eval path="$path"
49707      if test ! -f "$path" && test ! -d "$path"; then
49708        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49709      fi
49710
49711      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
49712    fi
49713  fi
49714
49715
49716    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
49718$as_echo_n "checking for freetype includes... " >&6; }
49719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
49720$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
49721    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
49723$as_echo_n "checking for freetype libraries... " >&6; }
49724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
49725$as_echo "$FREETYPE_LIB_PATH" >&6; }
49726  fi
49727
49728          if test "x$FOUND_FREETYPE" != xyes; then
49729            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
49730          fi
49731        else
49732          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
49733$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
49734          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
49735        fi
49736      else
49737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
49738$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
49739      fi
49740    fi
49741
49742    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
49743      # User has specified settings
49744
49745      if test "x$BUNDLE_FREETYPE" = x; then
49746        # If not specified, default is to bundle freetype
49747        BUNDLE_FREETYPE=yes
49748      fi
49749
49750      if test "x$with_freetype" != x; then
49751        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
49752        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
49753      fi
49754
49755      # Allow --with-freetype-lib and --with-freetype-include to override
49756      if test "x$with_freetype_include" != x; then
49757        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
49758      fi
49759      if test "x$with_freetype_lib" != x; then
49760        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
49761      fi
49762
49763      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49764        # Okay, we got it. Check that it works.
49765
49766  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49767  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
49768  METHOD="--with-freetype"
49769
49770  # Let's start with an optimistic view of the world :-)
49771  FOUND_FREETYPE=yes
49772
49773  # First look for the canonical freetype main include file ft2build.h.
49774  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49775    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
49776    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
49777    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
49778      # Fail.
49779      FOUND_FREETYPE=no
49780    fi
49781  fi
49782
49783  if test "x$FOUND_FREETYPE" = xyes; then
49784    # Include file found, let's continue the sanity check.
49785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
49786$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
49787
49788    # Reset to default value
49789    FREETYPE_BASE_NAME=freetype
49790    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49791    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
49792      if test "x$OPENJDK_TARGET_OS" = xmacosx \
49793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
49794        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
49795        # for the .6 version explicitly.
49796        FREETYPE_BASE_NAME=freetype.6
49797        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
49798        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
49799$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
49800      else
49801        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
49802$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
49803        FOUND_FREETYPE=no
49804      fi
49805    else
49806      if test "x$OPENJDK_TARGET_OS" = xwindows; then
49807        # On Windows, we will need both .lib and .dll file.
49808        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
49809          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
49810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
49811          FOUND_FREETYPE=no
49812        fi
49813      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
49814          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
49815        # Found lib in isa dir, use that instead.
49816        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
49817        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
49818$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
49819      fi
49820    fi
49821  fi
49822
49823  if test "x$FOUND_FREETYPE" = xyes; then
49824
49825  # Only process if variable expands to non-empty
49826
49827  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
49828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49829
49830  # Input might be given as Windows format, start by converting to
49831  # unix format.
49832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49833  new_path=`$CYGPATH -u "$path"`
49834
49835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49838  # "foo.exe" is OK but "foo" is an error.
49839  #
49840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49841  # It is also a way to make sure we got the proper file name for the real test later on.
49842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49843  if test "x$test_shortpath" = x; then
49844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49846    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
49847  fi
49848
49849  # Call helper function which possibly converts this using DOS-style short mode.
49850  # If so, the updated path is stored in $new_path.
49851
49852  input_path="$new_path"
49853  # Check if we need to convert this using DOS-style short mode. If the path
49854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49855  # take no chances and rewrite it.
49856  # Note: m4 eats our [], so we need to use [ and ] instead.
49857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49858  if test "x$has_forbidden_chars" != x; then
49859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49863      # Going to short mode and back again did indeed matter. Since short mode is
49864      # case insensitive, let's make it lowercase to improve readability.
49865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49866      # Now convert it back to Unix-style (cygpath)
49867      input_path=`$CYGPATH -u "$shortmode_path"`
49868      new_path="$input_path"
49869    fi
49870  fi
49871
49872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49873  if test "x$test_cygdrive_prefix" = x; then
49874    # As a simple fix, exclude /usr/bin since it's not a real path.
49875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49877      # a path prefixed by /cygdrive for fixpath to work.
49878      new_path="$CYGWIN_ROOT_PATH$input_path"
49879    fi
49880  fi
49881
49882
49883  if test "x$path" != "x$new_path"; then
49884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49887  fi
49888
49889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49890
49891  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49892  has_colon=`$ECHO $path | $GREP ^.:`
49893  new_path="$path"
49894  if test "x$has_colon" = x; then
49895    # Not in mixed or Windows style, start by that.
49896    new_path=`cmd //c echo $path`
49897  fi
49898
49899
49900  input_path="$new_path"
49901  # Check if we need to convert this using DOS-style short mode. If the path
49902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49903  # take no chances and rewrite it.
49904  # Note: m4 eats our [], so we need to use [ and ] instead.
49905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49906  if test "x$has_forbidden_chars" != x; then
49907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49909  fi
49910
49911
49912  windows_path="$new_path"
49913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49914    unix_path=`$CYGPATH -u "$windows_path"`
49915    new_path="$unix_path"
49916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49918    new_path="$unix_path"
49919  fi
49920
49921  if test "x$path" != "x$new_path"; then
49922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
49923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
49924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
49925  fi
49926
49927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49929
49930    else
49931      # We're on a unix platform. Hooray! :)
49932      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
49933      has_space=`$ECHO "$path" | $GREP " "`
49934      if test "x$has_space" != x; then
49935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
49936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
49937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49938      fi
49939
49940      # Use eval to expand a potential ~
49941      eval path="$path"
49942      if test ! -f "$path" && test ! -d "$path"; then
49943        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
49944      fi
49945
49946      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
49947    fi
49948  fi
49949
49950
49951  # Only process if variable expands to non-empty
49952
49953  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
49954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49955
49956  # Input might be given as Windows format, start by converting to
49957  # unix format.
49958  path="$POTENTIAL_FREETYPE_LIB_PATH"
49959  new_path=`$CYGPATH -u "$path"`
49960
49961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49964  # "foo.exe" is OK but "foo" is an error.
49965  #
49966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49967  # It is also a way to make sure we got the proper file name for the real test later on.
49968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49969  if test "x$test_shortpath" = x; then
49970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
49971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
49972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
49973  fi
49974
49975  # Call helper function which possibly converts this using DOS-style short mode.
49976  # If so, the updated path is stored in $new_path.
49977
49978  input_path="$new_path"
49979  # Check if we need to convert this using DOS-style short mode. If the path
49980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49981  # take no chances and rewrite it.
49982  # Note: m4 eats our [], so we need to use [ and ] instead.
49983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49984  if test "x$has_forbidden_chars" != x; then
49985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49989      # Going to short mode and back again did indeed matter. Since short mode is
49990      # case insensitive, let's make it lowercase to improve readability.
49991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49992      # Now convert it back to Unix-style (cygpath)
49993      input_path=`$CYGPATH -u "$shortmode_path"`
49994      new_path="$input_path"
49995    fi
49996  fi
49997
49998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49999  if test "x$test_cygdrive_prefix" = x; then
50000    # As a simple fix, exclude /usr/bin since it's not a real path.
50001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50003      # a path prefixed by /cygdrive for fixpath to work.
50004      new_path="$CYGWIN_ROOT_PATH$input_path"
50005    fi
50006  fi
50007
50008
50009  if test "x$path" != "x$new_path"; then
50010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50013  fi
50014
50015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50016
50017  path="$POTENTIAL_FREETYPE_LIB_PATH"
50018  has_colon=`$ECHO $path | $GREP ^.:`
50019  new_path="$path"
50020  if test "x$has_colon" = x; then
50021    # Not in mixed or Windows style, start by that.
50022    new_path=`cmd //c echo $path`
50023  fi
50024
50025
50026  input_path="$new_path"
50027  # Check if we need to convert this using DOS-style short mode. If the path
50028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50029  # take no chances and rewrite it.
50030  # Note: m4 eats our [], so we need to use [ and ] instead.
50031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50032  if test "x$has_forbidden_chars" != x; then
50033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50035  fi
50036
50037
50038  windows_path="$new_path"
50039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50040    unix_path=`$CYGPATH -u "$windows_path"`
50041    new_path="$unix_path"
50042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50044    new_path="$unix_path"
50045  fi
50046
50047  if test "x$path" != "x$new_path"; then
50048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50051  fi
50052
50053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50055
50056    else
50057      # We're on a unix platform. Hooray! :)
50058      path="$POTENTIAL_FREETYPE_LIB_PATH"
50059      has_space=`$ECHO "$path" | $GREP " "`
50060      if test "x$has_space" != x; then
50061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50064      fi
50065
50066      # Use eval to expand a potential ~
50067      eval path="$path"
50068      if test ! -f "$path" && test ! -d "$path"; then
50069        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50070      fi
50071
50072      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50073    fi
50074  fi
50075
50076
50077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50079$as_echo_n "checking for freetype includes... " >&6; }
50080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50084$as_echo_n "checking for freetype libraries... " >&6; }
50085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50086$as_echo "$FREETYPE_LIB_PATH" >&6; }
50087  fi
50088
50089        if test "x$FOUND_FREETYPE" != xyes; then
50090          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
50091        fi
50092      else
50093        # User specified only one of lib or include. This is an error.
50094        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
50095          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
50096$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
50097          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50098        else
50099          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
50100$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
50101          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
50102        fi
50103      fi
50104    else
50105      # User did not specify settings, but we need freetype. Try to locate it.
50106
50107      if test "x$BUNDLE_FREETYPE" = x; then
50108        # If not specified, default is to bundle freetype only on windows
50109        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50110          BUNDLE_FREETYPE=yes
50111        else
50112          BUNDLE_FREETYPE=no
50113        fi
50114      fi
50115
50116      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
50117      if test "x$SYSROOT" = x; then
50118        if test "x$FOUND_FREETYPE" != xyes; then
50119          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
50120          if test "x$PKG_CONFIG" != x; then
50121
50122pkg_failed=no
50123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
50124$as_echo_n "checking for FREETYPE... " >&6; }
50125
50126if test -n "$FREETYPE_CFLAGS"; then
50127    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
50128 elif test -n "$PKG_CONFIG"; then
50129    if test -n "$PKG_CONFIG" && \
50130    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50131  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50132  ac_status=$?
50133  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50134  test $ac_status = 0; }; then
50135  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
50136else
50137  pkg_failed=yes
50138fi
50139 else
50140    pkg_failed=untried
50141fi
50142if test -n "$FREETYPE_LIBS"; then
50143    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
50144 elif test -n "$PKG_CONFIG"; then
50145    if test -n "$PKG_CONFIG" && \
50146    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
50147  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
50148  ac_status=$?
50149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50150  test $ac_status = 0; }; then
50151  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
50152else
50153  pkg_failed=yes
50154fi
50155 else
50156    pkg_failed=untried
50157fi
50158
50159
50160
50161if test $pkg_failed = yes; then
50162
50163if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50164        _pkg_short_errors_supported=yes
50165else
50166        _pkg_short_errors_supported=no
50167fi
50168        if test $_pkg_short_errors_supported = yes; then
50169	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
50170        else
50171	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
50172        fi
50173	# Put the nasty error message in config.log where it belongs
50174	echo "$FREETYPE_PKG_ERRORS" >&5
50175
50176	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50177$as_echo "no" >&6; }
50178                FOUND_FREETYPE=no
50179elif test $pkg_failed = untried; then
50180	FOUND_FREETYPE=no
50181else
50182	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
50183	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
50184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50185$as_echo "yes" >&6; }
50186	FOUND_FREETYPE=yes
50187fi
50188            if test "x$FOUND_FREETYPE" = xyes; then
50189              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
50190              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
50191              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
50192              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50193                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
50194              fi
50195              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
50196              if test "x$BUNDLE_FREETYPE" = xyes; then
50197                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
50198$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
50199                FOUND_FREETYPE=no
50200              else
50201                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
50202$as_echo_n "checking for freetype... " >&6; }
50203                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
50204$as_echo "yes (using pkg-config)" >&6; }
50205              fi
50206            fi
50207          fi
50208        fi
50209      fi
50210
50211      if test "x$FOUND_FREETYPE" != xyes; then
50212        # Check in well-known locations
50213        if test "x$OPENJDK_TARGET_OS" = xwindows; then
50214          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
50215
50216  windows_path="$FREETYPE_BASE_DIR"
50217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50218    unix_path=`$CYGPATH -u "$windows_path"`
50219    FREETYPE_BASE_DIR="$unix_path"
50220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50222    FREETYPE_BASE_DIR="$unix_path"
50223  fi
50224
50225
50226  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50227  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50228  METHOD="well-known location"
50229
50230  # Let's start with an optimistic view of the world :-)
50231  FOUND_FREETYPE=yes
50232
50233  # First look for the canonical freetype main include file ft2build.h.
50234  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50235    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50236    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50237    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50238      # Fail.
50239      FOUND_FREETYPE=no
50240    fi
50241  fi
50242
50243  if test "x$FOUND_FREETYPE" = xyes; then
50244    # Include file found, let's continue the sanity check.
50245    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50246$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50247
50248    # Reset to default value
50249    FREETYPE_BASE_NAME=freetype
50250    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50251    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50252      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50254        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50255        # for the .6 version explicitly.
50256        FREETYPE_BASE_NAME=freetype.6
50257        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50258        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50259$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50260      else
50261        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50262$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50263        FOUND_FREETYPE=no
50264      fi
50265    else
50266      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50267        # On Windows, we will need both .lib and .dll file.
50268        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50269          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50270$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50271          FOUND_FREETYPE=no
50272        fi
50273      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50274          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50275        # Found lib in isa dir, use that instead.
50276        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50277        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50278$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50279      fi
50280    fi
50281  fi
50282
50283  if test "x$FOUND_FREETYPE" = xyes; then
50284
50285  # Only process if variable expands to non-empty
50286
50287  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50289
50290  # Input might be given as Windows format, start by converting to
50291  # unix format.
50292  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50293  new_path=`$CYGPATH -u "$path"`
50294
50295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50298  # "foo.exe" is OK but "foo" is an error.
50299  #
50300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50301  # It is also a way to make sure we got the proper file name for the real test later on.
50302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50303  if test "x$test_shortpath" = x; then
50304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50306    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50307  fi
50308
50309  # Call helper function which possibly converts this using DOS-style short mode.
50310  # If so, the updated path is stored in $new_path.
50311
50312  input_path="$new_path"
50313  # Check if we need to convert this using DOS-style short mode. If the path
50314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50315  # take no chances and rewrite it.
50316  # Note: m4 eats our [], so we need to use [ and ] instead.
50317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50318  if test "x$has_forbidden_chars" != x; then
50319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50323      # Going to short mode and back again did indeed matter. Since short mode is
50324      # case insensitive, let's make it lowercase to improve readability.
50325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50326      # Now convert it back to Unix-style (cygpath)
50327      input_path=`$CYGPATH -u "$shortmode_path"`
50328      new_path="$input_path"
50329    fi
50330  fi
50331
50332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50333  if test "x$test_cygdrive_prefix" = x; then
50334    # As a simple fix, exclude /usr/bin since it's not a real path.
50335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50337      # a path prefixed by /cygdrive for fixpath to work.
50338      new_path="$CYGWIN_ROOT_PATH$input_path"
50339    fi
50340  fi
50341
50342
50343  if test "x$path" != "x$new_path"; then
50344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50347  fi
50348
50349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50350
50351  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50352  has_colon=`$ECHO $path | $GREP ^.:`
50353  new_path="$path"
50354  if test "x$has_colon" = x; then
50355    # Not in mixed or Windows style, start by that.
50356    new_path=`cmd //c echo $path`
50357  fi
50358
50359
50360  input_path="$new_path"
50361  # Check if we need to convert this using DOS-style short mode. If the path
50362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50363  # take no chances and rewrite it.
50364  # Note: m4 eats our [], so we need to use [ and ] instead.
50365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50366  if test "x$has_forbidden_chars" != x; then
50367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50369  fi
50370
50371
50372  windows_path="$new_path"
50373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50374    unix_path=`$CYGPATH -u "$windows_path"`
50375    new_path="$unix_path"
50376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50378    new_path="$unix_path"
50379  fi
50380
50381  if test "x$path" != "x$new_path"; then
50382    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50385  fi
50386
50387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50389
50390    else
50391      # We're on a unix platform. Hooray! :)
50392      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50393      has_space=`$ECHO "$path" | $GREP " "`
50394      if test "x$has_space" != x; then
50395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50398      fi
50399
50400      # Use eval to expand a potential ~
50401      eval path="$path"
50402      if test ! -f "$path" && test ! -d "$path"; then
50403        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50404      fi
50405
50406      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50407    fi
50408  fi
50409
50410
50411  # Only process if variable expands to non-empty
50412
50413  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50415
50416  # Input might be given as Windows format, start by converting to
50417  # unix format.
50418  path="$POTENTIAL_FREETYPE_LIB_PATH"
50419  new_path=`$CYGPATH -u "$path"`
50420
50421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50424  # "foo.exe" is OK but "foo" is an error.
50425  #
50426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50427  # It is also a way to make sure we got the proper file name for the real test later on.
50428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50429  if test "x$test_shortpath" = x; then
50430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50433  fi
50434
50435  # Call helper function which possibly converts this using DOS-style short mode.
50436  # If so, the updated path is stored in $new_path.
50437
50438  input_path="$new_path"
50439  # Check if we need to convert this using DOS-style short mode. If the path
50440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50441  # take no chances and rewrite it.
50442  # Note: m4 eats our [], so we need to use [ and ] instead.
50443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50444  if test "x$has_forbidden_chars" != x; then
50445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50449      # Going to short mode and back again did indeed matter. Since short mode is
50450      # case insensitive, let's make it lowercase to improve readability.
50451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50452      # Now convert it back to Unix-style (cygpath)
50453      input_path=`$CYGPATH -u "$shortmode_path"`
50454      new_path="$input_path"
50455    fi
50456  fi
50457
50458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50459  if test "x$test_cygdrive_prefix" = x; then
50460    # As a simple fix, exclude /usr/bin since it's not a real path.
50461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50463      # a path prefixed by /cygdrive for fixpath to work.
50464      new_path="$CYGWIN_ROOT_PATH$input_path"
50465    fi
50466  fi
50467
50468
50469  if test "x$path" != "x$new_path"; then
50470    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50473  fi
50474
50475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50476
50477  path="$POTENTIAL_FREETYPE_LIB_PATH"
50478  has_colon=`$ECHO $path | $GREP ^.:`
50479  new_path="$path"
50480  if test "x$has_colon" = x; then
50481    # Not in mixed or Windows style, start by that.
50482    new_path=`cmd //c echo $path`
50483  fi
50484
50485
50486  input_path="$new_path"
50487  # Check if we need to convert this using DOS-style short mode. If the path
50488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50489  # take no chances and rewrite it.
50490  # Note: m4 eats our [], so we need to use [ and ] instead.
50491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50492  if test "x$has_forbidden_chars" != x; then
50493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50495  fi
50496
50497
50498  windows_path="$new_path"
50499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50500    unix_path=`$CYGPATH -u "$windows_path"`
50501    new_path="$unix_path"
50502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50504    new_path="$unix_path"
50505  fi
50506
50507  if test "x$path" != "x$new_path"; then
50508    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50511  fi
50512
50513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50515
50516    else
50517      # We're on a unix platform. Hooray! :)
50518      path="$POTENTIAL_FREETYPE_LIB_PATH"
50519      has_space=`$ECHO "$path" | $GREP " "`
50520      if test "x$has_space" != x; then
50521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50524      fi
50525
50526      # Use eval to expand a potential ~
50527      eval path="$path"
50528      if test ! -f "$path" && test ! -d "$path"; then
50529        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50530      fi
50531
50532      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50533    fi
50534  fi
50535
50536
50537    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50539$as_echo_n "checking for freetype includes... " >&6; }
50540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50541$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50542    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50544$as_echo_n "checking for freetype libraries... " >&6; }
50545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50546$as_echo "$FREETYPE_LIB_PATH" >&6; }
50547  fi
50548
50549          if test "x$FOUND_FREETYPE" != xyes; then
50550            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
50551
50552  windows_path="$FREETYPE_BASE_DIR"
50553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50554    unix_path=`$CYGPATH -u "$windows_path"`
50555    FREETYPE_BASE_DIR="$unix_path"
50556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50558    FREETYPE_BASE_DIR="$unix_path"
50559  fi
50560
50561
50562  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50563  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50564  METHOD="well-known location"
50565
50566  # Let's start with an optimistic view of the world :-)
50567  FOUND_FREETYPE=yes
50568
50569  # First look for the canonical freetype main include file ft2build.h.
50570  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50571    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50572    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50573    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50574      # Fail.
50575      FOUND_FREETYPE=no
50576    fi
50577  fi
50578
50579  if test "x$FOUND_FREETYPE" = xyes; then
50580    # Include file found, let's continue the sanity check.
50581    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50582$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50583
50584    # Reset to default value
50585    FREETYPE_BASE_NAME=freetype
50586    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50587    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50588      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50589          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50590        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50591        # for the .6 version explicitly.
50592        FREETYPE_BASE_NAME=freetype.6
50593        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50594        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50595$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50596      else
50597        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50598$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50599        FOUND_FREETYPE=no
50600      fi
50601    else
50602      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50603        # On Windows, we will need both .lib and .dll file.
50604        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50605          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50606$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50607          FOUND_FREETYPE=no
50608        fi
50609      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50610          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50611        # Found lib in isa dir, use that instead.
50612        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50613        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50614$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50615      fi
50616    fi
50617  fi
50618
50619  if test "x$FOUND_FREETYPE" = xyes; then
50620
50621  # Only process if variable expands to non-empty
50622
50623  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50625
50626  # Input might be given as Windows format, start by converting to
50627  # unix format.
50628  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50629  new_path=`$CYGPATH -u "$path"`
50630
50631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50634  # "foo.exe" is OK but "foo" is an error.
50635  #
50636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50637  # It is also a way to make sure we got the proper file name for the real test later on.
50638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50639  if test "x$test_shortpath" = x; then
50640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50642    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50643  fi
50644
50645  # Call helper function which possibly converts this using DOS-style short mode.
50646  # If so, the updated path is stored in $new_path.
50647
50648  input_path="$new_path"
50649  # Check if we need to convert this using DOS-style short mode. If the path
50650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50651  # take no chances and rewrite it.
50652  # Note: m4 eats our [], so we need to use [ and ] instead.
50653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50654  if test "x$has_forbidden_chars" != x; then
50655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50659      # Going to short mode and back again did indeed matter. Since short mode is
50660      # case insensitive, let's make it lowercase to improve readability.
50661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50662      # Now convert it back to Unix-style (cygpath)
50663      input_path=`$CYGPATH -u "$shortmode_path"`
50664      new_path="$input_path"
50665    fi
50666  fi
50667
50668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50669  if test "x$test_cygdrive_prefix" = x; then
50670    # As a simple fix, exclude /usr/bin since it's not a real path.
50671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50673      # a path prefixed by /cygdrive for fixpath to work.
50674      new_path="$CYGWIN_ROOT_PATH$input_path"
50675    fi
50676  fi
50677
50678
50679  if test "x$path" != "x$new_path"; then
50680    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50683  fi
50684
50685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50686
50687  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50688  has_colon=`$ECHO $path | $GREP ^.:`
50689  new_path="$path"
50690  if test "x$has_colon" = x; then
50691    # Not in mixed or Windows style, start by that.
50692    new_path=`cmd //c echo $path`
50693  fi
50694
50695
50696  input_path="$new_path"
50697  # Check if we need to convert this using DOS-style short mode. If the path
50698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50699  # take no chances and rewrite it.
50700  # Note: m4 eats our [], so we need to use [ and ] instead.
50701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50702  if test "x$has_forbidden_chars" != x; then
50703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50705  fi
50706
50707
50708  windows_path="$new_path"
50709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50710    unix_path=`$CYGPATH -u "$windows_path"`
50711    new_path="$unix_path"
50712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50714    new_path="$unix_path"
50715  fi
50716
50717  if test "x$path" != "x$new_path"; then
50718    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
50719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
50720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
50721  fi
50722
50723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50725
50726    else
50727      # We're on a unix platform. Hooray! :)
50728      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50729      has_space=`$ECHO "$path" | $GREP " "`
50730      if test "x$has_space" != x; then
50731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50732$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50734      fi
50735
50736      # Use eval to expand a potential ~
50737      eval path="$path"
50738      if test ! -f "$path" && test ! -d "$path"; then
50739        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50740      fi
50741
50742      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
50743    fi
50744  fi
50745
50746
50747  # Only process if variable expands to non-empty
50748
50749  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
50750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50751
50752  # Input might be given as Windows format, start by converting to
50753  # unix format.
50754  path="$POTENTIAL_FREETYPE_LIB_PATH"
50755  new_path=`$CYGPATH -u "$path"`
50756
50757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50760  # "foo.exe" is OK but "foo" is an error.
50761  #
50762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50763  # It is also a way to make sure we got the proper file name for the real test later on.
50764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50765  if test "x$test_shortpath" = x; then
50766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50767$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50768    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
50769  fi
50770
50771  # Call helper function which possibly converts this using DOS-style short mode.
50772  # If so, the updated path is stored in $new_path.
50773
50774  input_path="$new_path"
50775  # Check if we need to convert this using DOS-style short mode. If the path
50776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50777  # take no chances and rewrite it.
50778  # Note: m4 eats our [], so we need to use [ and ] instead.
50779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50780  if test "x$has_forbidden_chars" != x; then
50781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50785      # Going to short mode and back again did indeed matter. Since short mode is
50786      # case insensitive, let's make it lowercase to improve readability.
50787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50788      # Now convert it back to Unix-style (cygpath)
50789      input_path=`$CYGPATH -u "$shortmode_path"`
50790      new_path="$input_path"
50791    fi
50792  fi
50793
50794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50795  if test "x$test_cygdrive_prefix" = x; then
50796    # As a simple fix, exclude /usr/bin since it's not a real path.
50797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50799      # a path prefixed by /cygdrive for fixpath to work.
50800      new_path="$CYGWIN_ROOT_PATH$input_path"
50801    fi
50802  fi
50803
50804
50805  if test "x$path" != "x$new_path"; then
50806    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50809  fi
50810
50811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50812
50813  path="$POTENTIAL_FREETYPE_LIB_PATH"
50814  has_colon=`$ECHO $path | $GREP ^.:`
50815  new_path="$path"
50816  if test "x$has_colon" = x; then
50817    # Not in mixed or Windows style, start by that.
50818    new_path=`cmd //c echo $path`
50819  fi
50820
50821
50822  input_path="$new_path"
50823  # Check if we need to convert this using DOS-style short mode. If the path
50824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50825  # take no chances and rewrite it.
50826  # Note: m4 eats our [], so we need to use [ and ] instead.
50827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50828  if test "x$has_forbidden_chars" != x; then
50829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50831  fi
50832
50833
50834  windows_path="$new_path"
50835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50836    unix_path=`$CYGPATH -u "$windows_path"`
50837    new_path="$unix_path"
50838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50840    new_path="$unix_path"
50841  fi
50842
50843  if test "x$path" != "x$new_path"; then
50844    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
50845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
50846$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
50847  fi
50848
50849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50851
50852    else
50853      # We're on a unix platform. Hooray! :)
50854      path="$POTENTIAL_FREETYPE_LIB_PATH"
50855      has_space=`$ECHO "$path" | $GREP " "`
50856      if test "x$has_space" != x; then
50857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
50858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
50859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50860      fi
50861
50862      # Use eval to expand a potential ~
50863      eval path="$path"
50864      if test ! -f "$path" && test ! -d "$path"; then
50865        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
50866      fi
50867
50868      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
50869    fi
50870  fi
50871
50872
50873    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
50875$as_echo_n "checking for freetype includes... " >&6; }
50876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
50877$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
50878    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
50879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
50880$as_echo_n "checking for freetype libraries... " >&6; }
50881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
50882$as_echo "$FREETYPE_LIB_PATH" >&6; }
50883  fi
50884
50885          fi
50886        else
50887          FREETYPE_BASE_DIR="$SYSROOT/usr"
50888
50889  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
50890  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
50891  METHOD="well-known location"
50892
50893  # Let's start with an optimistic view of the world :-)
50894  FOUND_FREETYPE=yes
50895
50896  # First look for the canonical freetype main include file ft2build.h.
50897  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50898    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
50899    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
50900    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
50901      # Fail.
50902      FOUND_FREETYPE=no
50903    fi
50904  fi
50905
50906  if test "x$FOUND_FREETYPE" = xyes; then
50907    # Include file found, let's continue the sanity check.
50908    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
50909$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
50910
50911    # Reset to default value
50912    FREETYPE_BASE_NAME=freetype
50913    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50914    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
50915      if test "x$OPENJDK_TARGET_OS" = xmacosx \
50916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
50917        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
50918        # for the .6 version explicitly.
50919        FREETYPE_BASE_NAME=freetype.6
50920        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
50921        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
50922$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
50923      else
50924        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
50925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
50926        FOUND_FREETYPE=no
50927      fi
50928    else
50929      if test "x$OPENJDK_TARGET_OS" = xwindows; then
50930        # On Windows, we will need both .lib and .dll file.
50931        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
50932          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
50933$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
50934          FOUND_FREETYPE=no
50935        fi
50936      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
50937          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
50938        # Found lib in isa dir, use that instead.
50939        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
50940        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
50941$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
50942      fi
50943    fi
50944  fi
50945
50946  if test "x$FOUND_FREETYPE" = xyes; then
50947
50948  # Only process if variable expands to non-empty
50949
50950  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
50951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50952
50953  # Input might be given as Windows format, start by converting to
50954  # unix format.
50955  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
50956  new_path=`$CYGPATH -u "$path"`
50957
50958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50961  # "foo.exe" is OK but "foo" is an error.
50962  #
50963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50964  # It is also a way to make sure we got the proper file name for the real test later on.
50965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50966  if test "x$test_shortpath" = x; then
50967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
50968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
50969    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
50970  fi
50971
50972  # Call helper function which possibly converts this using DOS-style short mode.
50973  # If so, the updated path is stored in $new_path.
50974
50975  input_path="$new_path"
50976  # Check if we need to convert this using DOS-style short mode. If the path
50977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50978  # take no chances and rewrite it.
50979  # Note: m4 eats our [], so we need to use [ and ] instead.
50980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50981  if test "x$has_forbidden_chars" != x; then
50982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50986      # Going to short mode and back again did indeed matter. Since short mode is
50987      # case insensitive, let's make it lowercase to improve readability.
50988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50989      # Now convert it back to Unix-style (cygpath)
50990      input_path=`$CYGPATH -u "$shortmode_path"`
50991      new_path="$input_path"
50992    fi
50993  fi
50994
50995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50996  if test "x$test_cygdrive_prefix" = x; then
50997    # As a simple fix, exclude /usr/bin since it's not a real path.
50998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51000      # a path prefixed by /cygdrive for fixpath to work.
51001      new_path="$CYGWIN_ROOT_PATH$input_path"
51002    fi
51003  fi
51004
51005
51006  if test "x$path" != "x$new_path"; then
51007    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51010  fi
51011
51012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51013
51014  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51015  has_colon=`$ECHO $path | $GREP ^.:`
51016  new_path="$path"
51017  if test "x$has_colon" = x; then
51018    # Not in mixed or Windows style, start by that.
51019    new_path=`cmd //c echo $path`
51020  fi
51021
51022
51023  input_path="$new_path"
51024  # Check if we need to convert this using DOS-style short mode. If the path
51025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51026  # take no chances and rewrite it.
51027  # Note: m4 eats our [], so we need to use [ and ] instead.
51028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51029  if test "x$has_forbidden_chars" != x; then
51030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51032  fi
51033
51034
51035  windows_path="$new_path"
51036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51037    unix_path=`$CYGPATH -u "$windows_path"`
51038    new_path="$unix_path"
51039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51041    new_path="$unix_path"
51042  fi
51043
51044  if test "x$path" != "x$new_path"; then
51045    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51047$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51048  fi
51049
51050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51052
51053    else
51054      # We're on a unix platform. Hooray! :)
51055      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51056      has_space=`$ECHO "$path" | $GREP " "`
51057      if test "x$has_space" != x; then
51058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51061      fi
51062
51063      # Use eval to expand a potential ~
51064      eval path="$path"
51065      if test ! -f "$path" && test ! -d "$path"; then
51066        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51067      fi
51068
51069      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51070    fi
51071  fi
51072
51073
51074  # Only process if variable expands to non-empty
51075
51076  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51078
51079  # Input might be given as Windows format, start by converting to
51080  # unix format.
51081  path="$POTENTIAL_FREETYPE_LIB_PATH"
51082  new_path=`$CYGPATH -u "$path"`
51083
51084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51087  # "foo.exe" is OK but "foo" is an error.
51088  #
51089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51090  # It is also a way to make sure we got the proper file name for the real test later on.
51091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51092  if test "x$test_shortpath" = x; then
51093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51095    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51096  fi
51097
51098  # Call helper function which possibly converts this using DOS-style short mode.
51099  # If so, the updated path is stored in $new_path.
51100
51101  input_path="$new_path"
51102  # Check if we need to convert this using DOS-style short mode. If the path
51103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51104  # take no chances and rewrite it.
51105  # Note: m4 eats our [], so we need to use [ and ] instead.
51106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51107  if test "x$has_forbidden_chars" != x; then
51108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51112      # Going to short mode and back again did indeed matter. Since short mode is
51113      # case insensitive, let's make it lowercase to improve readability.
51114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51115      # Now convert it back to Unix-style (cygpath)
51116      input_path=`$CYGPATH -u "$shortmode_path"`
51117      new_path="$input_path"
51118    fi
51119  fi
51120
51121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51122  if test "x$test_cygdrive_prefix" = x; then
51123    # As a simple fix, exclude /usr/bin since it's not a real path.
51124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51126      # a path prefixed by /cygdrive for fixpath to work.
51127      new_path="$CYGWIN_ROOT_PATH$input_path"
51128    fi
51129  fi
51130
51131
51132  if test "x$path" != "x$new_path"; then
51133    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51136  fi
51137
51138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51139
51140  path="$POTENTIAL_FREETYPE_LIB_PATH"
51141  has_colon=`$ECHO $path | $GREP ^.:`
51142  new_path="$path"
51143  if test "x$has_colon" = x; then
51144    # Not in mixed or Windows style, start by that.
51145    new_path=`cmd //c echo $path`
51146  fi
51147
51148
51149  input_path="$new_path"
51150  # Check if we need to convert this using DOS-style short mode. If the path
51151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51152  # take no chances and rewrite it.
51153  # Note: m4 eats our [], so we need to use [ and ] instead.
51154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51155  if test "x$has_forbidden_chars" != x; then
51156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51158  fi
51159
51160
51161  windows_path="$new_path"
51162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51163    unix_path=`$CYGPATH -u "$windows_path"`
51164    new_path="$unix_path"
51165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51167    new_path="$unix_path"
51168  fi
51169
51170  if test "x$path" != "x$new_path"; then
51171    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51174  fi
51175
51176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51178
51179    else
51180      # We're on a unix platform. Hooray! :)
51181      path="$POTENTIAL_FREETYPE_LIB_PATH"
51182      has_space=`$ECHO "$path" | $GREP " "`
51183      if test "x$has_space" != x; then
51184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51187      fi
51188
51189      # Use eval to expand a potential ~
51190      eval path="$path"
51191      if test ! -f "$path" && test ! -d "$path"; then
51192        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51193      fi
51194
51195      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51196    fi
51197  fi
51198
51199
51200    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51202$as_echo_n "checking for freetype includes... " >&6; }
51203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51204$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51205    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51207$as_echo_n "checking for freetype libraries... " >&6; }
51208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51209$as_echo "$FREETYPE_LIB_PATH" >&6; }
51210  fi
51211
51212
51213          if test "x$FOUND_FREETYPE" != xyes; then
51214            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
51215
51216  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51217  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51218  METHOD="well-known location"
51219
51220  # Let's start with an optimistic view of the world :-)
51221  FOUND_FREETYPE=yes
51222
51223  # First look for the canonical freetype main include file ft2build.h.
51224  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51225    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51226    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51227    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51228      # Fail.
51229      FOUND_FREETYPE=no
51230    fi
51231  fi
51232
51233  if test "x$FOUND_FREETYPE" = xyes; then
51234    # Include file found, let's continue the sanity check.
51235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51236$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51237
51238    # Reset to default value
51239    FREETYPE_BASE_NAME=freetype
51240    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51241    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51242      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51243          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51244        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51245        # for the .6 version explicitly.
51246        FREETYPE_BASE_NAME=freetype.6
51247        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51248        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51249$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51250      else
51251        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51252$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51253        FOUND_FREETYPE=no
51254      fi
51255    else
51256      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51257        # On Windows, we will need both .lib and .dll file.
51258        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51259          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51260$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51261          FOUND_FREETYPE=no
51262        fi
51263      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51264          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51265        # Found lib in isa dir, use that instead.
51266        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51267        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51268$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51269      fi
51270    fi
51271  fi
51272
51273  if test "x$FOUND_FREETYPE" = xyes; then
51274
51275  # Only process if variable expands to non-empty
51276
51277  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51279
51280  # Input might be given as Windows format, start by converting to
51281  # unix format.
51282  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51283  new_path=`$CYGPATH -u "$path"`
51284
51285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51288  # "foo.exe" is OK but "foo" is an error.
51289  #
51290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51291  # It is also a way to make sure we got the proper file name for the real test later on.
51292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51293  if test "x$test_shortpath" = x; then
51294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51296    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51297  fi
51298
51299  # Call helper function which possibly converts this using DOS-style short mode.
51300  # If so, the updated path is stored in $new_path.
51301
51302  input_path="$new_path"
51303  # Check if we need to convert this using DOS-style short mode. If the path
51304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51305  # take no chances and rewrite it.
51306  # Note: m4 eats our [], so we need to use [ and ] instead.
51307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51308  if test "x$has_forbidden_chars" != x; then
51309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51313      # Going to short mode and back again did indeed matter. Since short mode is
51314      # case insensitive, let's make it lowercase to improve readability.
51315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51316      # Now convert it back to Unix-style (cygpath)
51317      input_path=`$CYGPATH -u "$shortmode_path"`
51318      new_path="$input_path"
51319    fi
51320  fi
51321
51322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51323  if test "x$test_cygdrive_prefix" = x; then
51324    # As a simple fix, exclude /usr/bin since it's not a real path.
51325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51327      # a path prefixed by /cygdrive for fixpath to work.
51328      new_path="$CYGWIN_ROOT_PATH$input_path"
51329    fi
51330  fi
51331
51332
51333  if test "x$path" != "x$new_path"; then
51334    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51336$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51337  fi
51338
51339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51340
51341  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51342  has_colon=`$ECHO $path | $GREP ^.:`
51343  new_path="$path"
51344  if test "x$has_colon" = x; then
51345    # Not in mixed or Windows style, start by that.
51346    new_path=`cmd //c echo $path`
51347  fi
51348
51349
51350  input_path="$new_path"
51351  # Check if we need to convert this using DOS-style short mode. If the path
51352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51353  # take no chances and rewrite it.
51354  # Note: m4 eats our [], so we need to use [ and ] instead.
51355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51356  if test "x$has_forbidden_chars" != x; then
51357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51359  fi
51360
51361
51362  windows_path="$new_path"
51363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51364    unix_path=`$CYGPATH -u "$windows_path"`
51365    new_path="$unix_path"
51366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51368    new_path="$unix_path"
51369  fi
51370
51371  if test "x$path" != "x$new_path"; then
51372    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51374$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51375  fi
51376
51377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51379
51380    else
51381      # We're on a unix platform. Hooray! :)
51382      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51383      has_space=`$ECHO "$path" | $GREP " "`
51384      if test "x$has_space" != x; then
51385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51386$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51387        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51388      fi
51389
51390      # Use eval to expand a potential ~
51391      eval path="$path"
51392      if test ! -f "$path" && test ! -d "$path"; then
51393        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51394      fi
51395
51396      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51397    fi
51398  fi
51399
51400
51401  # Only process if variable expands to non-empty
51402
51403  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51405
51406  # Input might be given as Windows format, start by converting to
51407  # unix format.
51408  path="$POTENTIAL_FREETYPE_LIB_PATH"
51409  new_path=`$CYGPATH -u "$path"`
51410
51411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51414  # "foo.exe" is OK but "foo" is an error.
51415  #
51416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51417  # It is also a way to make sure we got the proper file name for the real test later on.
51418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51419  if test "x$test_shortpath" = x; then
51420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51422    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51423  fi
51424
51425  # Call helper function which possibly converts this using DOS-style short mode.
51426  # If so, the updated path is stored in $new_path.
51427
51428  input_path="$new_path"
51429  # Check if we need to convert this using DOS-style short mode. If the path
51430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51431  # take no chances and rewrite it.
51432  # Note: m4 eats our [], so we need to use [ and ] instead.
51433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51434  if test "x$has_forbidden_chars" != x; then
51435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51439      # Going to short mode and back again did indeed matter. Since short mode is
51440      # case insensitive, let's make it lowercase to improve readability.
51441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51442      # Now convert it back to Unix-style (cygpath)
51443      input_path=`$CYGPATH -u "$shortmode_path"`
51444      new_path="$input_path"
51445    fi
51446  fi
51447
51448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51449  if test "x$test_cygdrive_prefix" = x; then
51450    # As a simple fix, exclude /usr/bin since it's not a real path.
51451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51453      # a path prefixed by /cygdrive for fixpath to work.
51454      new_path="$CYGWIN_ROOT_PATH$input_path"
51455    fi
51456  fi
51457
51458
51459  if test "x$path" != "x$new_path"; then
51460    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51463  fi
51464
51465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51466
51467  path="$POTENTIAL_FREETYPE_LIB_PATH"
51468  has_colon=`$ECHO $path | $GREP ^.:`
51469  new_path="$path"
51470  if test "x$has_colon" = x; then
51471    # Not in mixed or Windows style, start by that.
51472    new_path=`cmd //c echo $path`
51473  fi
51474
51475
51476  input_path="$new_path"
51477  # Check if we need to convert this using DOS-style short mode. If the path
51478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51479  # take no chances and rewrite it.
51480  # Note: m4 eats our [], so we need to use [ and ] instead.
51481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51482  if test "x$has_forbidden_chars" != x; then
51483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51485  fi
51486
51487
51488  windows_path="$new_path"
51489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51490    unix_path=`$CYGPATH -u "$windows_path"`
51491    new_path="$unix_path"
51492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51494    new_path="$unix_path"
51495  fi
51496
51497  if test "x$path" != "x$new_path"; then
51498    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51501  fi
51502
51503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51505
51506    else
51507      # We're on a unix platform. Hooray! :)
51508      path="$POTENTIAL_FREETYPE_LIB_PATH"
51509      has_space=`$ECHO "$path" | $GREP " "`
51510      if test "x$has_space" != x; then
51511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51514      fi
51515
51516      # Use eval to expand a potential ~
51517      eval path="$path"
51518      if test ! -f "$path" && test ! -d "$path"; then
51519        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51520      fi
51521
51522      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51523    fi
51524  fi
51525
51526
51527    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51529$as_echo_n "checking for freetype includes... " >&6; }
51530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51531$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51532    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51534$as_echo_n "checking for freetype libraries... " >&6; }
51535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51536$as_echo "$FREETYPE_LIB_PATH" >&6; }
51537  fi
51538
51539          fi
51540
51541          if test "x$FOUND_FREETYPE" != xyes; then
51542            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
51543
51544  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51545  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51546  METHOD="well-known location"
51547
51548  # Let's start with an optimistic view of the world :-)
51549  FOUND_FREETYPE=yes
51550
51551  # First look for the canonical freetype main include file ft2build.h.
51552  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51553    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51554    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51555    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51556      # Fail.
51557      FOUND_FREETYPE=no
51558    fi
51559  fi
51560
51561  if test "x$FOUND_FREETYPE" = xyes; then
51562    # Include file found, let's continue the sanity check.
51563    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51564$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51565
51566    # Reset to default value
51567    FREETYPE_BASE_NAME=freetype
51568    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51569    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51570      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51571          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51572        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51573        # for the .6 version explicitly.
51574        FREETYPE_BASE_NAME=freetype.6
51575        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51576        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51577$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51578      else
51579        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51580$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51581        FOUND_FREETYPE=no
51582      fi
51583    else
51584      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51585        # On Windows, we will need both .lib and .dll file.
51586        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51587          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51588$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51589          FOUND_FREETYPE=no
51590        fi
51591      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51592          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51593        # Found lib in isa dir, use that instead.
51594        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51595        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51596$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51597      fi
51598    fi
51599  fi
51600
51601  if test "x$FOUND_FREETYPE" = xyes; then
51602
51603  # Only process if variable expands to non-empty
51604
51605  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51607
51608  # Input might be given as Windows format, start by converting to
51609  # unix format.
51610  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51611  new_path=`$CYGPATH -u "$path"`
51612
51613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51616  # "foo.exe" is OK but "foo" is an error.
51617  #
51618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51619  # It is also a way to make sure we got the proper file name for the real test later on.
51620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51621  if test "x$test_shortpath" = x; then
51622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51624    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51625  fi
51626
51627  # Call helper function which possibly converts this using DOS-style short mode.
51628  # If so, the updated path is stored in $new_path.
51629
51630  input_path="$new_path"
51631  # Check if we need to convert this using DOS-style short mode. If the path
51632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51633  # take no chances and rewrite it.
51634  # Note: m4 eats our [], so we need to use [ and ] instead.
51635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51636  if test "x$has_forbidden_chars" != x; then
51637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51641      # Going to short mode and back again did indeed matter. Since short mode is
51642      # case insensitive, let's make it lowercase to improve readability.
51643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51644      # Now convert it back to Unix-style (cygpath)
51645      input_path=`$CYGPATH -u "$shortmode_path"`
51646      new_path="$input_path"
51647    fi
51648  fi
51649
51650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51651  if test "x$test_cygdrive_prefix" = x; then
51652    # As a simple fix, exclude /usr/bin since it's not a real path.
51653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51655      # a path prefixed by /cygdrive for fixpath to work.
51656      new_path="$CYGWIN_ROOT_PATH$input_path"
51657    fi
51658  fi
51659
51660
51661  if test "x$path" != "x$new_path"; then
51662    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51665  fi
51666
51667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51668
51669  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51670  has_colon=`$ECHO $path | $GREP ^.:`
51671  new_path="$path"
51672  if test "x$has_colon" = x; then
51673    # Not in mixed or Windows style, start by that.
51674    new_path=`cmd //c echo $path`
51675  fi
51676
51677
51678  input_path="$new_path"
51679  # Check if we need to convert this using DOS-style short mode. If the path
51680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51681  # take no chances and rewrite it.
51682  # Note: m4 eats our [], so we need to use [ and ] instead.
51683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51684  if test "x$has_forbidden_chars" != x; then
51685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51687  fi
51688
51689
51690  windows_path="$new_path"
51691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51692    unix_path=`$CYGPATH -u "$windows_path"`
51693    new_path="$unix_path"
51694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51696    new_path="$unix_path"
51697  fi
51698
51699  if test "x$path" != "x$new_path"; then
51700    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51703  fi
51704
51705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51707
51708    else
51709      # We're on a unix platform. Hooray! :)
51710      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51711      has_space=`$ECHO "$path" | $GREP " "`
51712      if test "x$has_space" != x; then
51713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51714$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51716      fi
51717
51718      # Use eval to expand a potential ~
51719      eval path="$path"
51720      if test ! -f "$path" && test ! -d "$path"; then
51721        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51722      fi
51723
51724      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51725    fi
51726  fi
51727
51728
51729  # Only process if variable expands to non-empty
51730
51731  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51733
51734  # Input might be given as Windows format, start by converting to
51735  # unix format.
51736  path="$POTENTIAL_FREETYPE_LIB_PATH"
51737  new_path=`$CYGPATH -u "$path"`
51738
51739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51742  # "foo.exe" is OK but "foo" is an error.
51743  #
51744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51745  # It is also a way to make sure we got the proper file name for the real test later on.
51746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51747  if test "x$test_shortpath" = x; then
51748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51750    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51751  fi
51752
51753  # Call helper function which possibly converts this using DOS-style short mode.
51754  # If so, the updated path is stored in $new_path.
51755
51756  input_path="$new_path"
51757  # Check if we need to convert this using DOS-style short mode. If the path
51758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51759  # take no chances and rewrite it.
51760  # Note: m4 eats our [], so we need to use [ and ] instead.
51761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51762  if test "x$has_forbidden_chars" != x; then
51763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51767      # Going to short mode and back again did indeed matter. Since short mode is
51768      # case insensitive, let's make it lowercase to improve readability.
51769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51770      # Now convert it back to Unix-style (cygpath)
51771      input_path=`$CYGPATH -u "$shortmode_path"`
51772      new_path="$input_path"
51773    fi
51774  fi
51775
51776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51777  if test "x$test_cygdrive_prefix" = x; then
51778    # As a simple fix, exclude /usr/bin since it's not a real path.
51779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51781      # a path prefixed by /cygdrive for fixpath to work.
51782      new_path="$CYGWIN_ROOT_PATH$input_path"
51783    fi
51784  fi
51785
51786
51787  if test "x$path" != "x$new_path"; then
51788    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51790$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51791  fi
51792
51793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51794
51795  path="$POTENTIAL_FREETYPE_LIB_PATH"
51796  has_colon=`$ECHO $path | $GREP ^.:`
51797  new_path="$path"
51798  if test "x$has_colon" = x; then
51799    # Not in mixed or Windows style, start by that.
51800    new_path=`cmd //c echo $path`
51801  fi
51802
51803
51804  input_path="$new_path"
51805  # Check if we need to convert this using DOS-style short mode. If the path
51806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51807  # take no chances and rewrite it.
51808  # Note: m4 eats our [], so we need to use [ and ] instead.
51809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51810  if test "x$has_forbidden_chars" != x; then
51811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51813  fi
51814
51815
51816  windows_path="$new_path"
51817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51818    unix_path=`$CYGPATH -u "$windows_path"`
51819    new_path="$unix_path"
51820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51822    new_path="$unix_path"
51823  fi
51824
51825  if test "x$path" != "x$new_path"; then
51826    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51829  fi
51830
51831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51833
51834    else
51835      # We're on a unix platform. Hooray! :)
51836      path="$POTENTIAL_FREETYPE_LIB_PATH"
51837      has_space=`$ECHO "$path" | $GREP " "`
51838      if test "x$has_space" != x; then
51839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51840$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51842      fi
51843
51844      # Use eval to expand a potential ~
51845      eval path="$path"
51846      if test ! -f "$path" && test ! -d "$path"; then
51847        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51848      fi
51849
51850      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51851    fi
51852  fi
51853
51854
51855    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51857$as_echo_n "checking for freetype includes... " >&6; }
51858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51859$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51860    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51862$as_echo_n "checking for freetype libraries... " >&6; }
51863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51864$as_echo "$FREETYPE_LIB_PATH" >&6; }
51865  fi
51866
51867          fi
51868
51869          if test "x$FOUND_FREETYPE" != xyes; then
51870            FREETYPE_BASE_DIR="$SYSROOT/usr"
51871            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51872
51873  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51874  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
51875  METHOD="well-known location"
51876
51877  # Let's start with an optimistic view of the world :-)
51878  FOUND_FREETYPE=yes
51879
51880  # First look for the canonical freetype main include file ft2build.h.
51881  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51882    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51883    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51884    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51885      # Fail.
51886      FOUND_FREETYPE=no
51887    fi
51888  fi
51889
51890  if test "x$FOUND_FREETYPE" = xyes; then
51891    # Include file found, let's continue the sanity check.
51892    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51893$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51894
51895    # Reset to default value
51896    FREETYPE_BASE_NAME=freetype
51897    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51898    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51899      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51900          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51901        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51902        # for the .6 version explicitly.
51903        FREETYPE_BASE_NAME=freetype.6
51904        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51905        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51906$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51907      else
51908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51909$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51910        FOUND_FREETYPE=no
51911      fi
51912    else
51913      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51914        # On Windows, we will need both .lib and .dll file.
51915        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51916          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51917$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51918          FOUND_FREETYPE=no
51919        fi
51920      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51921          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51922        # Found lib in isa dir, use that instead.
51923        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51924        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51925$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51926      fi
51927    fi
51928  fi
51929
51930  if test "x$FOUND_FREETYPE" = xyes; then
51931
51932  # Only process if variable expands to non-empty
51933
51934  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51936
51937  # Input might be given as Windows format, start by converting to
51938  # unix format.
51939  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51940  new_path=`$CYGPATH -u "$path"`
51941
51942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51945  # "foo.exe" is OK but "foo" is an error.
51946  #
51947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51948  # It is also a way to make sure we got the proper file name for the real test later on.
51949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51950  if test "x$test_shortpath" = x; then
51951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51953    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51954  fi
51955
51956  # Call helper function which possibly converts this using DOS-style short mode.
51957  # If so, the updated path is stored in $new_path.
51958
51959  input_path="$new_path"
51960  # Check if we need to convert this using DOS-style short mode. If the path
51961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51962  # take no chances and rewrite it.
51963  # Note: m4 eats our [], so we need to use [ and ] instead.
51964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51965  if test "x$has_forbidden_chars" != x; then
51966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51970      # Going to short mode and back again did indeed matter. Since short mode is
51971      # case insensitive, let's make it lowercase to improve readability.
51972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51973      # Now convert it back to Unix-style (cygpath)
51974      input_path=`$CYGPATH -u "$shortmode_path"`
51975      new_path="$input_path"
51976    fi
51977  fi
51978
51979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51980  if test "x$test_cygdrive_prefix" = x; then
51981    # As a simple fix, exclude /usr/bin since it's not a real path.
51982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51984      # a path prefixed by /cygdrive for fixpath to work.
51985      new_path="$CYGWIN_ROOT_PATH$input_path"
51986    fi
51987  fi
51988
51989
51990  if test "x$path" != "x$new_path"; then
51991    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51993$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51994  fi
51995
51996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51997
51998  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51999  has_colon=`$ECHO $path | $GREP ^.:`
52000  new_path="$path"
52001  if test "x$has_colon" = x; then
52002    # Not in mixed or Windows style, start by that.
52003    new_path=`cmd //c echo $path`
52004  fi
52005
52006
52007  input_path="$new_path"
52008  # Check if we need to convert this using DOS-style short mode. If the path
52009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52010  # take no chances and rewrite it.
52011  # Note: m4 eats our [], so we need to use [ and ] instead.
52012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52013  if test "x$has_forbidden_chars" != x; then
52014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52016  fi
52017
52018
52019  windows_path="$new_path"
52020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52021    unix_path=`$CYGPATH -u "$windows_path"`
52022    new_path="$unix_path"
52023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52025    new_path="$unix_path"
52026  fi
52027
52028  if test "x$path" != "x$new_path"; then
52029    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52031$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52032  fi
52033
52034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52036
52037    else
52038      # We're on a unix platform. Hooray! :)
52039      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52040      has_space=`$ECHO "$path" | $GREP " "`
52041      if test "x$has_space" != x; then
52042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52043$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52044        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52045      fi
52046
52047      # Use eval to expand a potential ~
52048      eval path="$path"
52049      if test ! -f "$path" && test ! -d "$path"; then
52050        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52051      fi
52052
52053      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52054    fi
52055  fi
52056
52057
52058  # Only process if variable expands to non-empty
52059
52060  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52062
52063  # Input might be given as Windows format, start by converting to
52064  # unix format.
52065  path="$POTENTIAL_FREETYPE_LIB_PATH"
52066  new_path=`$CYGPATH -u "$path"`
52067
52068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52071  # "foo.exe" is OK but "foo" is an error.
52072  #
52073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52074  # It is also a way to make sure we got the proper file name for the real test later on.
52075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52076  if test "x$test_shortpath" = x; then
52077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52078$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52079    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52080  fi
52081
52082  # Call helper function which possibly converts this using DOS-style short mode.
52083  # If so, the updated path is stored in $new_path.
52084
52085  input_path="$new_path"
52086  # Check if we need to convert this using DOS-style short mode. If the path
52087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52088  # take no chances and rewrite it.
52089  # Note: m4 eats our [], so we need to use [ and ] instead.
52090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52091  if test "x$has_forbidden_chars" != x; then
52092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52096      # Going to short mode and back again did indeed matter. Since short mode is
52097      # case insensitive, let's make it lowercase to improve readability.
52098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52099      # Now convert it back to Unix-style (cygpath)
52100      input_path=`$CYGPATH -u "$shortmode_path"`
52101      new_path="$input_path"
52102    fi
52103  fi
52104
52105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52106  if test "x$test_cygdrive_prefix" = x; then
52107    # As a simple fix, exclude /usr/bin since it's not a real path.
52108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52110      # a path prefixed by /cygdrive for fixpath to work.
52111      new_path="$CYGWIN_ROOT_PATH$input_path"
52112    fi
52113  fi
52114
52115
52116  if test "x$path" != "x$new_path"; then
52117    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52120  fi
52121
52122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52123
52124  path="$POTENTIAL_FREETYPE_LIB_PATH"
52125  has_colon=`$ECHO $path | $GREP ^.:`
52126  new_path="$path"
52127  if test "x$has_colon" = x; then
52128    # Not in mixed or Windows style, start by that.
52129    new_path=`cmd //c echo $path`
52130  fi
52131
52132
52133  input_path="$new_path"
52134  # Check if we need to convert this using DOS-style short mode. If the path
52135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52136  # take no chances and rewrite it.
52137  # Note: m4 eats our [], so we need to use [ and ] instead.
52138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52139  if test "x$has_forbidden_chars" != x; then
52140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52142  fi
52143
52144
52145  windows_path="$new_path"
52146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52147    unix_path=`$CYGPATH -u "$windows_path"`
52148    new_path="$unix_path"
52149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52151    new_path="$unix_path"
52152  fi
52153
52154  if test "x$path" != "x$new_path"; then
52155    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52157$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52158  fi
52159
52160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52162
52163    else
52164      # We're on a unix platform. Hooray! :)
52165      path="$POTENTIAL_FREETYPE_LIB_PATH"
52166      has_space=`$ECHO "$path" | $GREP " "`
52167      if test "x$has_space" != x; then
52168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52169$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52171      fi
52172
52173      # Use eval to expand a potential ~
52174      eval path="$path"
52175      if test ! -f "$path" && test ! -d "$path"; then
52176        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52177      fi
52178
52179      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52180    fi
52181  fi
52182
52183
52184    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52186$as_echo_n "checking for freetype includes... " >&6; }
52187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52188$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52189    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52191$as_echo_n "checking for freetype libraries... " >&6; }
52192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52193$as_echo "$FREETYPE_LIB_PATH" >&6; }
52194  fi
52195
52196            else
52197
52198  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52199  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
52200  METHOD="well-known location"
52201
52202  # Let's start with an optimistic view of the world :-)
52203  FOUND_FREETYPE=yes
52204
52205  # First look for the canonical freetype main include file ft2build.h.
52206  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52207    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52208    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52209    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52210      # Fail.
52211      FOUND_FREETYPE=no
52212    fi
52213  fi
52214
52215  if test "x$FOUND_FREETYPE" = xyes; then
52216    # Include file found, let's continue the sanity check.
52217    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52218$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52219
52220    # Reset to default value
52221    FREETYPE_BASE_NAME=freetype
52222    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52223    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52224      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52225          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52226        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52227        # for the .6 version explicitly.
52228        FREETYPE_BASE_NAME=freetype.6
52229        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52230        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52231$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52232      else
52233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52234$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52235        FOUND_FREETYPE=no
52236      fi
52237    else
52238      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52239        # On Windows, we will need both .lib and .dll file.
52240        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52241          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52242$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52243          FOUND_FREETYPE=no
52244        fi
52245      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52246          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52247        # Found lib in isa dir, use that instead.
52248        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52249        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52250$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52251      fi
52252    fi
52253  fi
52254
52255  if test "x$FOUND_FREETYPE" = xyes; then
52256
52257  # Only process if variable expands to non-empty
52258
52259  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52261
52262  # Input might be given as Windows format, start by converting to
52263  # unix format.
52264  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52265  new_path=`$CYGPATH -u "$path"`
52266
52267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52270  # "foo.exe" is OK but "foo" is an error.
52271  #
52272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52273  # It is also a way to make sure we got the proper file name for the real test later on.
52274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52275  if test "x$test_shortpath" = x; then
52276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52278    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52279  fi
52280
52281  # Call helper function which possibly converts this using DOS-style short mode.
52282  # If so, the updated path is stored in $new_path.
52283
52284  input_path="$new_path"
52285  # Check if we need to convert this using DOS-style short mode. If the path
52286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52287  # take no chances and rewrite it.
52288  # Note: m4 eats our [], so we need to use [ and ] instead.
52289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52290  if test "x$has_forbidden_chars" != x; then
52291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52295      # Going to short mode and back again did indeed matter. Since short mode is
52296      # case insensitive, let's make it lowercase to improve readability.
52297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52298      # Now convert it back to Unix-style (cygpath)
52299      input_path=`$CYGPATH -u "$shortmode_path"`
52300      new_path="$input_path"
52301    fi
52302  fi
52303
52304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52305  if test "x$test_cygdrive_prefix" = x; then
52306    # As a simple fix, exclude /usr/bin since it's not a real path.
52307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52309      # a path prefixed by /cygdrive for fixpath to work.
52310      new_path="$CYGWIN_ROOT_PATH$input_path"
52311    fi
52312  fi
52313
52314
52315  if test "x$path" != "x$new_path"; then
52316    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52318$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52319  fi
52320
52321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52322
52323  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52324  has_colon=`$ECHO $path | $GREP ^.:`
52325  new_path="$path"
52326  if test "x$has_colon" = x; then
52327    # Not in mixed or Windows style, start by that.
52328    new_path=`cmd //c echo $path`
52329  fi
52330
52331
52332  input_path="$new_path"
52333  # Check if we need to convert this using DOS-style short mode. If the path
52334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52335  # take no chances and rewrite it.
52336  # Note: m4 eats our [], so we need to use [ and ] instead.
52337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52338  if test "x$has_forbidden_chars" != x; then
52339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52341  fi
52342
52343
52344  windows_path="$new_path"
52345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52346    unix_path=`$CYGPATH -u "$windows_path"`
52347    new_path="$unix_path"
52348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52350    new_path="$unix_path"
52351  fi
52352
52353  if test "x$path" != "x$new_path"; then
52354    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52356$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52357  fi
52358
52359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52361
52362    else
52363      # We're on a unix platform. Hooray! :)
52364      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52365      has_space=`$ECHO "$path" | $GREP " "`
52366      if test "x$has_space" != x; then
52367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52368$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52370      fi
52371
52372      # Use eval to expand a potential ~
52373      eval path="$path"
52374      if test ! -f "$path" && test ! -d "$path"; then
52375        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52376      fi
52377
52378      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52379    fi
52380  fi
52381
52382
52383  # Only process if variable expands to non-empty
52384
52385  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52387
52388  # Input might be given as Windows format, start by converting to
52389  # unix format.
52390  path="$POTENTIAL_FREETYPE_LIB_PATH"
52391  new_path=`$CYGPATH -u "$path"`
52392
52393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52396  # "foo.exe" is OK but "foo" is an error.
52397  #
52398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52399  # It is also a way to make sure we got the proper file name for the real test later on.
52400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52401  if test "x$test_shortpath" = x; then
52402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52405  fi
52406
52407  # Call helper function which possibly converts this using DOS-style short mode.
52408  # If so, the updated path is stored in $new_path.
52409
52410  input_path="$new_path"
52411  # Check if we need to convert this using DOS-style short mode. If the path
52412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52413  # take no chances and rewrite it.
52414  # Note: m4 eats our [], so we need to use [ and ] instead.
52415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52416  if test "x$has_forbidden_chars" != x; then
52417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52421      # Going to short mode and back again did indeed matter. Since short mode is
52422      # case insensitive, let's make it lowercase to improve readability.
52423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52424      # Now convert it back to Unix-style (cygpath)
52425      input_path=`$CYGPATH -u "$shortmode_path"`
52426      new_path="$input_path"
52427    fi
52428  fi
52429
52430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52431  if test "x$test_cygdrive_prefix" = x; then
52432    # As a simple fix, exclude /usr/bin since it's not a real path.
52433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52435      # a path prefixed by /cygdrive for fixpath to work.
52436      new_path="$CYGWIN_ROOT_PATH$input_path"
52437    fi
52438  fi
52439
52440
52441  if test "x$path" != "x$new_path"; then
52442    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52445  fi
52446
52447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52448
52449  path="$POTENTIAL_FREETYPE_LIB_PATH"
52450  has_colon=`$ECHO $path | $GREP ^.:`
52451  new_path="$path"
52452  if test "x$has_colon" = x; then
52453    # Not in mixed or Windows style, start by that.
52454    new_path=`cmd //c echo $path`
52455  fi
52456
52457
52458  input_path="$new_path"
52459  # Check if we need to convert this using DOS-style short mode. If the path
52460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52461  # take no chances and rewrite it.
52462  # Note: m4 eats our [], so we need to use [ and ] instead.
52463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52464  if test "x$has_forbidden_chars" != x; then
52465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52467  fi
52468
52469
52470  windows_path="$new_path"
52471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52472    unix_path=`$CYGPATH -u "$windows_path"`
52473    new_path="$unix_path"
52474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52476    new_path="$unix_path"
52477  fi
52478
52479  if test "x$path" != "x$new_path"; then
52480    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52483  fi
52484
52485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52487
52488    else
52489      # We're on a unix platform. Hooray! :)
52490      path="$POTENTIAL_FREETYPE_LIB_PATH"
52491      has_space=`$ECHO "$path" | $GREP " "`
52492      if test "x$has_space" != x; then
52493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52496      fi
52497
52498      # Use eval to expand a potential ~
52499      eval path="$path"
52500      if test ! -f "$path" && test ! -d "$path"; then
52501        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52502      fi
52503
52504      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52505    fi
52506  fi
52507
52508
52509    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52511$as_echo_n "checking for freetype includes... " >&6; }
52512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52513$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52514    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52516$as_echo_n "checking for freetype libraries... " >&6; }
52517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52518$as_echo "$FREETYPE_LIB_PATH" >&6; }
52519  fi
52520
52521              if test "x$FOUND_FREETYPE" != xyes; then
52522
52523  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52524  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
52525  METHOD="well-known location"
52526
52527  # Let's start with an optimistic view of the world :-)
52528  FOUND_FREETYPE=yes
52529
52530  # First look for the canonical freetype main include file ft2build.h.
52531  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52532    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52533    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52534    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52535      # Fail.
52536      FOUND_FREETYPE=no
52537    fi
52538  fi
52539
52540  if test "x$FOUND_FREETYPE" = xyes; then
52541    # Include file found, let's continue the sanity check.
52542    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52543$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52544
52545    # Reset to default value
52546    FREETYPE_BASE_NAME=freetype
52547    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52548    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52549      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52550          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52551        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52552        # for the .6 version explicitly.
52553        FREETYPE_BASE_NAME=freetype.6
52554        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52555        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52556$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52557      else
52558        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52559$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52560        FOUND_FREETYPE=no
52561      fi
52562    else
52563      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52564        # On Windows, we will need both .lib and .dll file.
52565        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52566          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52567$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52568          FOUND_FREETYPE=no
52569        fi
52570      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52571          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52572        # Found lib in isa dir, use that instead.
52573        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52574        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52575$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52576      fi
52577    fi
52578  fi
52579
52580  if test "x$FOUND_FREETYPE" = xyes; then
52581
52582  # Only process if variable expands to non-empty
52583
52584  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52586
52587  # Input might be given as Windows format, start by converting to
52588  # unix format.
52589  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52590  new_path=`$CYGPATH -u "$path"`
52591
52592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52595  # "foo.exe" is OK but "foo" is an error.
52596  #
52597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52598  # It is also a way to make sure we got the proper file name for the real test later on.
52599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52600  if test "x$test_shortpath" = x; then
52601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52603    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52604  fi
52605
52606  # Call helper function which possibly converts this using DOS-style short mode.
52607  # If so, the updated path is stored in $new_path.
52608
52609  input_path="$new_path"
52610  # Check if we need to convert this using DOS-style short mode. If the path
52611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52612  # take no chances and rewrite it.
52613  # Note: m4 eats our [], so we need to use [ and ] instead.
52614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52615  if test "x$has_forbidden_chars" != x; then
52616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52620      # Going to short mode and back again did indeed matter. Since short mode is
52621      # case insensitive, let's make it lowercase to improve readability.
52622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52623      # Now convert it back to Unix-style (cygpath)
52624      input_path=`$CYGPATH -u "$shortmode_path"`
52625      new_path="$input_path"
52626    fi
52627  fi
52628
52629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52630  if test "x$test_cygdrive_prefix" = x; then
52631    # As a simple fix, exclude /usr/bin since it's not a real path.
52632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52634      # a path prefixed by /cygdrive for fixpath to work.
52635      new_path="$CYGWIN_ROOT_PATH$input_path"
52636    fi
52637  fi
52638
52639
52640  if test "x$path" != "x$new_path"; then
52641    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52644  fi
52645
52646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52647
52648  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52649  has_colon=`$ECHO $path | $GREP ^.:`
52650  new_path="$path"
52651  if test "x$has_colon" = x; then
52652    # Not in mixed or Windows style, start by that.
52653    new_path=`cmd //c echo $path`
52654  fi
52655
52656
52657  input_path="$new_path"
52658  # Check if we need to convert this using DOS-style short mode. If the path
52659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52660  # take no chances and rewrite it.
52661  # Note: m4 eats our [], so we need to use [ and ] instead.
52662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52663  if test "x$has_forbidden_chars" != x; then
52664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52666  fi
52667
52668
52669  windows_path="$new_path"
52670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52671    unix_path=`$CYGPATH -u "$windows_path"`
52672    new_path="$unix_path"
52673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52675    new_path="$unix_path"
52676  fi
52677
52678  if test "x$path" != "x$new_path"; then
52679    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52682  fi
52683
52684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52686
52687    else
52688      # We're on a unix platform. Hooray! :)
52689      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52690      has_space=`$ECHO "$path" | $GREP " "`
52691      if test "x$has_space" != x; then
52692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52693$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52695      fi
52696
52697      # Use eval to expand a potential ~
52698      eval path="$path"
52699      if test ! -f "$path" && test ! -d "$path"; then
52700        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52701      fi
52702
52703      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52704    fi
52705  fi
52706
52707
52708  # Only process if variable expands to non-empty
52709
52710  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52712
52713  # Input might be given as Windows format, start by converting to
52714  # unix format.
52715  path="$POTENTIAL_FREETYPE_LIB_PATH"
52716  new_path=`$CYGPATH -u "$path"`
52717
52718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52721  # "foo.exe" is OK but "foo" is an error.
52722  #
52723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52724  # It is also a way to make sure we got the proper file name for the real test later on.
52725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52726  if test "x$test_shortpath" = x; then
52727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52728$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52729    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52730  fi
52731
52732  # Call helper function which possibly converts this using DOS-style short mode.
52733  # If so, the updated path is stored in $new_path.
52734
52735  input_path="$new_path"
52736  # Check if we need to convert this using DOS-style short mode. If the path
52737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52738  # take no chances and rewrite it.
52739  # Note: m4 eats our [], so we need to use [ and ] instead.
52740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52741  if test "x$has_forbidden_chars" != x; then
52742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52746      # Going to short mode and back again did indeed matter. Since short mode is
52747      # case insensitive, let's make it lowercase to improve readability.
52748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52749      # Now convert it back to Unix-style (cygpath)
52750      input_path=`$CYGPATH -u "$shortmode_path"`
52751      new_path="$input_path"
52752    fi
52753  fi
52754
52755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52756  if test "x$test_cygdrive_prefix" = x; then
52757    # As a simple fix, exclude /usr/bin since it's not a real path.
52758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52760      # a path prefixed by /cygdrive for fixpath to work.
52761      new_path="$CYGWIN_ROOT_PATH$input_path"
52762    fi
52763  fi
52764
52765
52766  if test "x$path" != "x$new_path"; then
52767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52770  fi
52771
52772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52773
52774  path="$POTENTIAL_FREETYPE_LIB_PATH"
52775  has_colon=`$ECHO $path | $GREP ^.:`
52776  new_path="$path"
52777  if test "x$has_colon" = x; then
52778    # Not in mixed or Windows style, start by that.
52779    new_path=`cmd //c echo $path`
52780  fi
52781
52782
52783  input_path="$new_path"
52784  # Check if we need to convert this using DOS-style short mode. If the path
52785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52786  # take no chances and rewrite it.
52787  # Note: m4 eats our [], so we need to use [ and ] instead.
52788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52789  if test "x$has_forbidden_chars" != x; then
52790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52792  fi
52793
52794
52795  windows_path="$new_path"
52796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52797    unix_path=`$CYGPATH -u "$windows_path"`
52798    new_path="$unix_path"
52799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52801    new_path="$unix_path"
52802  fi
52803
52804  if test "x$path" != "x$new_path"; then
52805    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52808  fi
52809
52810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52812
52813    else
52814      # We're on a unix platform. Hooray! :)
52815      path="$POTENTIAL_FREETYPE_LIB_PATH"
52816      has_space=`$ECHO "$path" | $GREP " "`
52817      if test "x$has_space" != x; then
52818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52819$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52821      fi
52822
52823      # Use eval to expand a potential ~
52824      eval path="$path"
52825      if test ! -f "$path" && test ! -d "$path"; then
52826        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52827      fi
52828
52829      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52830    fi
52831  fi
52832
52833
52834    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52836$as_echo_n "checking for freetype includes... " >&6; }
52837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52838$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52839    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52841$as_echo_n "checking for freetype libraries... " >&6; }
52842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52843$as_echo "$FREETYPE_LIB_PATH" >&6; }
52844  fi
52845
52846              fi
52847            fi
52848          fi
52849        fi
52850      fi # end check in well-known locations
52851
52852      if test "x$FOUND_FREETYPE" != xyes; then
52853
52854  # Print a helpful message on how to acquire the necessary build dependency.
52855  # freetype is the help tag: freetype, cups, alsa etc
52856  MISSING_DEPENDENCY=freetype
52857
52858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52859    cygwin_help $MISSING_DEPENDENCY
52860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52861    msys_help $MISSING_DEPENDENCY
52862  else
52863    PKGHANDLER_COMMAND=
52864
52865    case $PKGHANDLER in
52866      apt-get)
52867        apt_help     $MISSING_DEPENDENCY ;;
52868      yum)
52869        yum_help     $MISSING_DEPENDENCY ;;
52870      port)
52871        port_help    $MISSING_DEPENDENCY ;;
52872      pkgutil)
52873        pkgutil_help $MISSING_DEPENDENCY ;;
52874      pkgadd)
52875        pkgadd_help  $MISSING_DEPENDENCY ;;
52876    esac
52877
52878    if test "x$PKGHANDLER_COMMAND" != x; then
52879      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52880    fi
52881  fi
52882
52883        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
52884      fi
52885    fi # end user specified settings
52886
52887    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
52888    if test "x$FREETYPE_CFLAGS" = x; then
52889
52890  # Only process if variable expands to non-empty
52891
52892  if test "x$FREETYPE_INCLUDE_PATH" != x; then
52893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52894
52895  # Input might be given as Windows format, start by converting to
52896  # unix format.
52897  path="$FREETYPE_INCLUDE_PATH"
52898  new_path=`$CYGPATH -u "$path"`
52899
52900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52903  # "foo.exe" is OK but "foo" is an error.
52904  #
52905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52906  # It is also a way to make sure we got the proper file name for the real test later on.
52907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52908  if test "x$test_shortpath" = x; then
52909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52910$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52911    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
52912  fi
52913
52914  # Call helper function which possibly converts this using DOS-style short mode.
52915  # If so, the updated path is stored in $new_path.
52916
52917  input_path="$new_path"
52918  # Check if we need to convert this using DOS-style short mode. If the path
52919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52920  # take no chances and rewrite it.
52921  # Note: m4 eats our [], so we need to use [ and ] instead.
52922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52923  if test "x$has_forbidden_chars" != x; then
52924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52928      # Going to short mode and back again did indeed matter. Since short mode is
52929      # case insensitive, let's make it lowercase to improve readability.
52930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52931      # Now convert it back to Unix-style (cygpath)
52932      input_path=`$CYGPATH -u "$shortmode_path"`
52933      new_path="$input_path"
52934    fi
52935  fi
52936
52937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52938  if test "x$test_cygdrive_prefix" = x; then
52939    # As a simple fix, exclude /usr/bin since it's not a real path.
52940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52942      # a path prefixed by /cygdrive for fixpath to work.
52943      new_path="$CYGWIN_ROOT_PATH$input_path"
52944    fi
52945  fi
52946
52947
52948  if test "x$path" != "x$new_path"; then
52949    FREETYPE_INCLUDE_PATH="$new_path"
52950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52951$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52952  fi
52953
52954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52955
52956  path="$FREETYPE_INCLUDE_PATH"
52957  has_colon=`$ECHO $path | $GREP ^.:`
52958  new_path="$path"
52959  if test "x$has_colon" = x; then
52960    # Not in mixed or Windows style, start by that.
52961    new_path=`cmd //c echo $path`
52962  fi
52963
52964
52965  input_path="$new_path"
52966  # Check if we need to convert this using DOS-style short mode. If the path
52967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52968  # take no chances and rewrite it.
52969  # Note: m4 eats our [], so we need to use [ and ] instead.
52970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52971  if test "x$has_forbidden_chars" != x; then
52972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52974  fi
52975
52976
52977  windows_path="$new_path"
52978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52979    unix_path=`$CYGPATH -u "$windows_path"`
52980    new_path="$unix_path"
52981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52983    new_path="$unix_path"
52984  fi
52985
52986  if test "x$path" != "x$new_path"; then
52987    FREETYPE_INCLUDE_PATH="$new_path"
52988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52989$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52990  fi
52991
52992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52994
52995    else
52996      # We're on a unix platform. Hooray! :)
52997      path="$FREETYPE_INCLUDE_PATH"
52998      has_space=`$ECHO "$path" | $GREP " "`
52999      if test "x$has_space" != x; then
53000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53001$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53003      fi
53004
53005      # Use eval to expand a potential ~
53006      eval path="$path"
53007      if test ! -f "$path" && test ! -d "$path"; then
53008        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53009      fi
53010
53011      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53012    fi
53013  fi
53014
53015      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
53016        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
53017      else
53018        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
53019      fi
53020    fi
53021
53022    if test "x$FREETYPE_LIBS" = x; then
53023
53024  # Only process if variable expands to non-empty
53025
53026  if test "x$FREETYPE_LIB_PATH" != x; then
53027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53028
53029  # Input might be given as Windows format, start by converting to
53030  # unix format.
53031  path="$FREETYPE_LIB_PATH"
53032  new_path=`$CYGPATH -u "$path"`
53033
53034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53037  # "foo.exe" is OK but "foo" is an error.
53038  #
53039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53040  # It is also a way to make sure we got the proper file name for the real test later on.
53041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53042  if test "x$test_shortpath" = x; then
53043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53044$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53045    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
53046  fi
53047
53048  # Call helper function which possibly converts this using DOS-style short mode.
53049  # If so, the updated path is stored in $new_path.
53050
53051  input_path="$new_path"
53052  # Check if we need to convert this using DOS-style short mode. If the path
53053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53054  # take no chances and rewrite it.
53055  # Note: m4 eats our [], so we need to use [ and ] instead.
53056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53057  if test "x$has_forbidden_chars" != x; then
53058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53062      # Going to short mode and back again did indeed matter. Since short mode is
53063      # case insensitive, let's make it lowercase to improve readability.
53064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53065      # Now convert it back to Unix-style (cygpath)
53066      input_path=`$CYGPATH -u "$shortmode_path"`
53067      new_path="$input_path"
53068    fi
53069  fi
53070
53071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53072  if test "x$test_cygdrive_prefix" = x; then
53073    # As a simple fix, exclude /usr/bin since it's not a real path.
53074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53076      # a path prefixed by /cygdrive for fixpath to work.
53077      new_path="$CYGWIN_ROOT_PATH$input_path"
53078    fi
53079  fi
53080
53081
53082  if test "x$path" != "x$new_path"; then
53083    FREETYPE_LIB_PATH="$new_path"
53084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53085$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53086  fi
53087
53088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53089
53090  path="$FREETYPE_LIB_PATH"
53091  has_colon=`$ECHO $path | $GREP ^.:`
53092  new_path="$path"
53093  if test "x$has_colon" = x; then
53094    # Not in mixed or Windows style, start by that.
53095    new_path=`cmd //c echo $path`
53096  fi
53097
53098
53099  input_path="$new_path"
53100  # Check if we need to convert this using DOS-style short mode. If the path
53101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53102  # take no chances and rewrite it.
53103  # Note: m4 eats our [], so we need to use [ and ] instead.
53104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53105  if test "x$has_forbidden_chars" != x; then
53106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53108  fi
53109
53110
53111  windows_path="$new_path"
53112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53113    unix_path=`$CYGPATH -u "$windows_path"`
53114    new_path="$unix_path"
53115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53117    new_path="$unix_path"
53118  fi
53119
53120  if test "x$path" != "x$new_path"; then
53121    FREETYPE_LIB_PATH="$new_path"
53122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
53123$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53124  fi
53125
53126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53128
53129    else
53130      # We're on a unix platform. Hooray! :)
53131      path="$FREETYPE_LIB_PATH"
53132      has_space=`$ECHO "$path" | $GREP " "`
53133      if test "x$has_space" != x; then
53134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53135$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53137      fi
53138
53139      # Use eval to expand a potential ~
53140      eval path="$path"
53141      if test ! -f "$path" && test ! -d "$path"; then
53142        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53143      fi
53144
53145      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53146    fi
53147  fi
53148
53149      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53150        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
53151      else
53152        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
53153      fi
53154    fi
53155
53156    # Try to compile it
53157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
53158$as_echo_n "checking if we can compile and link with freetype... " >&6; }
53159    ac_ext=cpp
53160ac_cpp='$CXXCPP $CPPFLAGS'
53161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53164
53165    PREV_CXXCFLAGS="$CXXFLAGS"
53166    PREV_LIBS="$LIBS"
53167    PREV_CXX="$CXX"
53168    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
53169    LIBS="$LIBS $FREETYPE_LIBS"
53170    CXX="$FIXPATH $CXX"
53171    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53172/* end confdefs.h.  */
53173
53174          #include<ft2build.h>
53175          #include FT_FREETYPE_H
53176          int main () {
53177            FT_Init_FreeType(NULL);
53178            return 0;
53179          }
53180
53181_ACEOF
53182if ac_fn_cxx_try_link "$LINENO"; then :
53183
53184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53185$as_echo "yes" >&6; }
53186
53187else
53188
53189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53190$as_echo "no" >&6; }
53191          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
53192$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
53193          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
53194$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
53195
53196
53197  # Print a helpful message on how to acquire the necessary build dependency.
53198  # freetype is the help tag: freetype, cups, alsa etc
53199  MISSING_DEPENDENCY=freetype
53200
53201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53202    cygwin_help $MISSING_DEPENDENCY
53203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53204    msys_help $MISSING_DEPENDENCY
53205  else
53206    PKGHANDLER_COMMAND=
53207
53208    case $PKGHANDLER in
53209      apt-get)
53210        apt_help     $MISSING_DEPENDENCY ;;
53211      yum)
53212        yum_help     $MISSING_DEPENDENCY ;;
53213      port)
53214        port_help    $MISSING_DEPENDENCY ;;
53215      pkgutil)
53216        pkgutil_help $MISSING_DEPENDENCY ;;
53217      pkgadd)
53218        pkgadd_help  $MISSING_DEPENDENCY ;;
53219    esac
53220
53221    if test "x$PKGHANDLER_COMMAND" != x; then
53222      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53223    fi
53224  fi
53225
53226
53227          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
53228
53229
53230fi
53231rm -f core conftest.err conftest.$ac_objext \
53232    conftest$ac_exeext conftest.$ac_ext
53233    CXXCFLAGS="$PREV_CXXFLAGS"
53234    LIBS="$PREV_LIBS"
53235    CXX="$PREV_CXX"
53236    ac_ext=cpp
53237ac_cpp='$CXXCPP $CPPFLAGS'
53238ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53239ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53240ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53241
53242
53243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
53244$as_echo_n "checking if we should bundle freetype... " >&6; }
53245    if test "x$BUNDLE_FREETYPE" = xyes; then
53246      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
53247    fi
53248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
53249$as_echo "$BUNDLE_FREETYPE" >&6; }
53250
53251  fi # end freetype needed
53252
53253
53254
53255
53256
53257
53258
53259# Check whether --with-alsa was given.
53260if test "${with_alsa+set}" = set; then :
53261  withval=$with_alsa;
53262fi
53263
53264
53265# Check whether --with-alsa-include was given.
53266if test "${with_alsa_include+set}" = set; then :
53267  withval=$with_alsa_include;
53268fi
53269
53270
53271# Check whether --with-alsa-lib was given.
53272if test "${with_alsa_lib+set}" = set; then :
53273  withval=$with_alsa_lib;
53274fi
53275
53276
53277  if test "x$NEEDS_LIB_ALSA" = xfalse; then
53278    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
53279        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
53280        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
53281      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
53282$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
53283    fi
53284    ALSA_CFLAGS=
53285    ALSA_LIBS=
53286  else
53287    ALSA_FOUND=no
53288
53289    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
53290      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
53291    fi
53292
53293    if test "x${with_alsa}" != x; then
53294      ALSA_LIBS="-L${with_alsa}/lib -lasound"
53295      ALSA_CFLAGS="-I${with_alsa}/include"
53296      ALSA_FOUND=yes
53297    fi
53298    if test "x${with_alsa_include}" != x; then
53299      ALSA_CFLAGS="-I${with_alsa_include}"
53300      ALSA_FOUND=yes
53301    fi
53302    if test "x${with_alsa_lib}" != x; then
53303      ALSA_LIBS="-L${with_alsa_lib} -lasound"
53304      ALSA_FOUND=yes
53305    fi
53306    # Do not try pkg-config if we have a sysroot set.
53307    if test "x$SYSROOT" = x; then
53308      if test "x$ALSA_FOUND" = xno; then
53309
53310pkg_failed=no
53311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
53312$as_echo_n "checking for ALSA... " >&6; }
53313
53314if test -n "$ALSA_CFLAGS"; then
53315    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
53316 elif test -n "$PKG_CONFIG"; then
53317    if test -n "$PKG_CONFIG" && \
53318    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53319  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53320  ac_status=$?
53321  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53322  test $ac_status = 0; }; then
53323  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
53324else
53325  pkg_failed=yes
53326fi
53327 else
53328    pkg_failed=untried
53329fi
53330if test -n "$ALSA_LIBS"; then
53331    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
53332 elif test -n "$PKG_CONFIG"; then
53333    if test -n "$PKG_CONFIG" && \
53334    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
53335  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
53336  ac_status=$?
53337  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53338  test $ac_status = 0; }; then
53339  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
53340else
53341  pkg_failed=yes
53342fi
53343 else
53344    pkg_failed=untried
53345fi
53346
53347
53348
53349if test $pkg_failed = yes; then
53350
53351if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53352        _pkg_short_errors_supported=yes
53353else
53354        _pkg_short_errors_supported=no
53355fi
53356        if test $_pkg_short_errors_supported = yes; then
53357	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
53358        else
53359	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
53360        fi
53361	# Put the nasty error message in config.log where it belongs
53362	echo "$ALSA_PKG_ERRORS" >&5
53363
53364	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53365$as_echo "no" >&6; }
53366                ALSA_FOUND=no
53367elif test $pkg_failed = untried; then
53368	ALSA_FOUND=no
53369else
53370	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
53371	ALSA_LIBS=$pkg_cv_ALSA_LIBS
53372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53373$as_echo "yes" >&6; }
53374	ALSA_FOUND=yes
53375fi
53376      fi
53377    fi
53378    if test "x$ALSA_FOUND" = xno; then
53379      for ac_header in alsa/asoundlib.h
53380do :
53381  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
53382if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
53383  cat >>confdefs.h <<_ACEOF
53384#define HAVE_ALSA_ASOUNDLIB_H 1
53385_ACEOF
53386
53387            ALSA_FOUND=yes
53388            ALSA_CFLAGS=-Iignoreme
53389            ALSA_LIBS=-lasound
53390            DEFAULT_ALSA=yes
53391
53392else
53393  ALSA_FOUND=no
53394
53395fi
53396
53397done
53398
53399    fi
53400    if test "x$ALSA_FOUND" = xno; then
53401
53402  # Print a helpful message on how to acquire the necessary build dependency.
53403  # alsa is the help tag: freetype, cups, alsa etc
53404  MISSING_DEPENDENCY=alsa
53405
53406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53407    cygwin_help $MISSING_DEPENDENCY
53408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53409    msys_help $MISSING_DEPENDENCY
53410  else
53411    PKGHANDLER_COMMAND=
53412
53413    case $PKGHANDLER in
53414      apt-get)
53415        apt_help     $MISSING_DEPENDENCY ;;
53416      yum)
53417        yum_help     $MISSING_DEPENDENCY ;;
53418      port)
53419        port_help    $MISSING_DEPENDENCY ;;
53420      pkgutil)
53421        pkgutil_help $MISSING_DEPENDENCY ;;
53422      pkgadd)
53423        pkgadd_help  $MISSING_DEPENDENCY ;;
53424    esac
53425
53426    if test "x$PKGHANDLER_COMMAND" != x; then
53427      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53428    fi
53429  fi
53430
53431      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
53432    fi
53433  fi
53434
53435
53436
53437
53438
53439
53440# Check whether --with-libffi was given.
53441if test "${with_libffi+set}" = set; then :
53442  withval=$with_libffi;
53443fi
53444
53445
53446# Check whether --with-libffi-include was given.
53447if test "${with_libffi_include+set}" = set; then :
53448  withval=$with_libffi_include;
53449fi
53450
53451
53452# Check whether --with-libffi-lib was given.
53453if test "${with_libffi_lib+set}" = set; then :
53454  withval=$with_libffi_lib;
53455fi
53456
53457
53458  if test "x$NEEDS_LIB_FFI" = xfalse; then
53459    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
53460        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
53461        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
53462      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
53463$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
53464    fi
53465    LIBFFI_CFLAGS=
53466    LIBFFI_LIBS=
53467  else
53468    LIBFFI_FOUND=no
53469
53470    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
53471      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
53472    fi
53473
53474    if test "x${with_libffi}" != x; then
53475      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
53476      LIBFFI_CFLAGS="-I${with_libffi}/include"
53477      LIBFFI_FOUND=yes
53478    fi
53479    if test "x${with_libffi_include}" != x; then
53480      LIBFFI_CFLAGS="-I${with_libffi_include}"
53481      LIBFFI_FOUND=yes
53482    fi
53483    if test "x${with_libffi_lib}" != x; then
53484      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
53485      LIBFFI_FOUND=yes
53486    fi
53487    # Do not try pkg-config if we have a sysroot set.
53488    if test "x$SYSROOT" = x; then
53489      if test "x$LIBFFI_FOUND" = xno; then
53490        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
53491
53492pkg_failed=no
53493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
53494$as_echo_n "checking for LIBFFI... " >&6; }
53495
53496if test -n "$LIBFFI_CFLAGS"; then
53497    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
53498 elif test -n "$PKG_CONFIG"; then
53499    if test -n "$PKG_CONFIG" && \
53500    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53501  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53502  ac_status=$?
53503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53504  test $ac_status = 0; }; then
53505  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
53506else
53507  pkg_failed=yes
53508fi
53509 else
53510    pkg_failed=untried
53511fi
53512if test -n "$LIBFFI_LIBS"; then
53513    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
53514 elif test -n "$PKG_CONFIG"; then
53515    if test -n "$PKG_CONFIG" && \
53516    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
53517  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
53518  ac_status=$?
53519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53520  test $ac_status = 0; }; then
53521  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
53522else
53523  pkg_failed=yes
53524fi
53525 else
53526    pkg_failed=untried
53527fi
53528
53529
53530
53531if test $pkg_failed = yes; then
53532
53533if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53534        _pkg_short_errors_supported=yes
53535else
53536        _pkg_short_errors_supported=no
53537fi
53538        if test $_pkg_short_errors_supported = yes; then
53539	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
53540        else
53541	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
53542        fi
53543	# Put the nasty error message in config.log where it belongs
53544	echo "$LIBFFI_PKG_ERRORS" >&5
53545
53546	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53547$as_echo "no" >&6; }
53548                LIBFFI_FOUND=no
53549elif test $pkg_failed = untried; then
53550	LIBFFI_FOUND=no
53551else
53552	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
53553	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
53554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53555$as_echo "yes" >&6; }
53556	LIBFFI_FOUND=yes
53557fi
53558      fi
53559    fi
53560    if test "x$LIBFFI_FOUND" = xno; then
53561      for ac_header in ffi.h
53562do :
53563  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
53564if test "x$ac_cv_header_ffi_h" = xyes; then :
53565  cat >>confdefs.h <<_ACEOF
53566#define HAVE_FFI_H 1
53567_ACEOF
53568
53569            LIBFFI_FOUND=yes
53570            LIBFFI_CFLAGS=
53571            LIBFFI_LIBS=-lffi
53572
53573else
53574  LIBFFI_FOUND=no
53575
53576fi
53577
53578done
53579
53580    fi
53581    if test "x$LIBFFI_FOUND" = xno; then
53582
53583  # Print a helpful message on how to acquire the necessary build dependency.
53584  # ffi is the help tag: freetype, cups, alsa etc
53585  MISSING_DEPENDENCY=ffi
53586
53587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53588    cygwin_help $MISSING_DEPENDENCY
53589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53590    msys_help $MISSING_DEPENDENCY
53591  else
53592    PKGHANDLER_COMMAND=
53593
53594    case $PKGHANDLER in
53595      apt-get)
53596        apt_help     $MISSING_DEPENDENCY ;;
53597      yum)
53598        yum_help     $MISSING_DEPENDENCY ;;
53599      port)
53600        port_help    $MISSING_DEPENDENCY ;;
53601      pkgutil)
53602        pkgutil_help $MISSING_DEPENDENCY ;;
53603      pkgadd)
53604        pkgadd_help  $MISSING_DEPENDENCY ;;
53605    esac
53606
53607    if test "x$PKGHANDLER_COMMAND" != x; then
53608      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53609    fi
53610  fi
53611
53612      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
53613    fi
53614
53615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
53616$as_echo_n "checking if libffi works... " >&6; }
53617    ac_ext=c
53618ac_cpp='$CPP $CPPFLAGS'
53619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53621ac_compiler_gnu=$ac_cv_c_compiler_gnu
53622
53623    OLD_CFLAGS="$CFLAGS"
53624    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
53625    OLD_LIBS="$LIBS"
53626    LIBS="$LIBS $LIBFFI_LIBS"
53627    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53628/* end confdefs.h.  */
53629#include <ffi.h>
53630int
53631main ()
53632{
53633
53634          ffi_call(NULL, NULL, NULL, NULL);
53635          return 0;
53636
53637  ;
53638  return 0;
53639}
53640_ACEOF
53641if ac_fn_c_try_link "$LINENO"; then :
53642  LIBFFI_WORKS=yes
53643else
53644  LIBFFI_WORKS=no
53645
53646fi
53647rm -f core conftest.err conftest.$ac_objext \
53648    conftest$ac_exeext conftest.$ac_ext
53649    CFLAGS="$OLD_CFLAGS"
53650    LIBS="$OLD_LIBS"
53651    ac_ext=cpp
53652ac_cpp='$CXXCPP $CPPFLAGS'
53653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53656
53657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
53658$as_echo "$LIBFFI_WORKS" >&6; }
53659
53660    if test "x$LIBFFI_WORKS" = xno; then
53661
53662  # Print a helpful message on how to acquire the necessary build dependency.
53663  # ffi is the help tag: freetype, cups, alsa etc
53664  MISSING_DEPENDENCY=ffi
53665
53666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53667    cygwin_help $MISSING_DEPENDENCY
53668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53669    msys_help $MISSING_DEPENDENCY
53670  else
53671    PKGHANDLER_COMMAND=
53672
53673    case $PKGHANDLER in
53674      apt-get)
53675        apt_help     $MISSING_DEPENDENCY ;;
53676      yum)
53677        yum_help     $MISSING_DEPENDENCY ;;
53678      port)
53679        port_help    $MISSING_DEPENDENCY ;;
53680      pkgutil)
53681        pkgutil_help $MISSING_DEPENDENCY ;;
53682      pkgadd)
53683        pkgadd_help  $MISSING_DEPENDENCY ;;
53684    esac
53685
53686    if test "x$PKGHANDLER_COMMAND" != x; then
53687      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53688    fi
53689  fi
53690
53691      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
53692    fi
53693  fi
53694
53695
53696
53697
53698
53699  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
53700    # Extract the first word of "llvm-config", so it can be a program name with args.
53701set dummy llvm-config; ac_word=$2
53702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53703$as_echo_n "checking for $ac_word... " >&6; }
53704if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
53705  $as_echo_n "(cached) " >&6
53706else
53707  if test -n "$LLVM_CONFIG"; then
53708  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
53709else
53710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53711for as_dir in $PATH
53712do
53713  IFS=$as_save_IFS
53714  test -z "$as_dir" && as_dir=.
53715    for ac_exec_ext in '' $ac_executable_extensions; do
53716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53717    ac_cv_prog_LLVM_CONFIG="llvm-config"
53718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53719    break 2
53720  fi
53721done
53722  done
53723IFS=$as_save_IFS
53724
53725fi
53726fi
53727LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
53728if test -n "$LLVM_CONFIG"; then
53729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
53730$as_echo "$LLVM_CONFIG" >&6; }
53731else
53732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53733$as_echo "no" >&6; }
53734fi
53735
53736
53737
53738    if test "x$LLVM_CONFIG" != xllvm-config; then
53739      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
53740    fi
53741
53742    llvm_components="jit mcjit engine nativecodegen native"
53743    unset LLVM_CFLAGS
53744    for flag in $("$LLVM_CONFIG" --cxxflags); do
53745      if echo "${flag}" | grep -q '^-[ID]'; then
53746        if test "${flag}" != "-D_DEBUG" ; then
53747          if test "${LLVM_CFLAGS}" != "" ; then
53748            LLVM_CFLAGS="${LLVM_CFLAGS} "
53749          fi
53750          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
53751        fi
53752      fi
53753    done
53754    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
53755    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
53756
53757    unset LLVM_LDFLAGS
53758    for flag in $("${LLVM_CONFIG}" --ldflags); do
53759      if echo "${flag}" | grep -q '^-L'; then
53760        if test "${LLVM_LDFLAGS}" != ""; then
53761          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
53762        fi
53763        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
53764      fi
53765    done
53766
53767    unset LLVM_LIBS
53768    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
53769      if echo "${flag}" | grep -q '^-l'; then
53770        if test "${LLVM_LIBS}" != ""; then
53771          LLVM_LIBS="${LLVM_LIBS} "
53772        fi
53773        LLVM_LIBS="${LLVM_LIBS}${flag}"
53774      fi
53775    done
53776
53777
53778
53779
53780  fi
53781
53782
53783
53784# Check whether --with-libjpeg was given.
53785if test "${with_libjpeg+set}" = set; then :
53786  withval=$with_libjpeg;
53787fi
53788
53789
53790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
53791$as_echo_n "checking for which libjpeg to use... " >&6; }
53792  # default is bundled
53793  DEFAULT_LIBJPEG=bundled
53794  # if user didn't specify, use DEFAULT_LIBJPEG
53795  if test "x${with_libjpeg}" = "x"; then
53796    with_libjpeg=${DEFAULT_LIBJPEG}
53797  fi
53798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
53799$as_echo "${with_libjpeg}" >&6; }
53800
53801  if test "x${with_libjpeg}" = "xbundled"; then
53802    USE_EXTERNAL_LIBJPEG=false
53803  elif test "x${with_libjpeg}" = "xsystem"; then
53804    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
53805if test "x$ac_cv_header_jpeglib_h" = xyes; then :
53806
53807else
53808   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
53809fi
53810
53811
53812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
53813$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
53814if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
53815  $as_echo_n "(cached) " >&6
53816else
53817  ac_check_lib_save_LIBS=$LIBS
53818LIBS="-ljpeg  $LIBS"
53819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53820/* end confdefs.h.  */
53821
53822/* Override any GCC internal prototype to avoid an error.
53823   Use char because int might match the return type of a GCC
53824   builtin and then its argument prototype would still apply.  */
53825#ifdef __cplusplus
53826extern "C"
53827#endif
53828char jpeg_CreateDecompress ();
53829int
53830main ()
53831{
53832return jpeg_CreateDecompress ();
53833  ;
53834  return 0;
53835}
53836_ACEOF
53837if ac_fn_cxx_try_link "$LINENO"; then :
53838  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
53839else
53840  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
53841fi
53842rm -f core conftest.err conftest.$ac_objext \
53843    conftest$ac_exeext conftest.$ac_ext
53844LIBS=$ac_check_lib_save_LIBS
53845fi
53846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
53847$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
53848if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
53849  cat >>confdefs.h <<_ACEOF
53850#define HAVE_LIBJPEG 1
53851_ACEOF
53852
53853  LIBS="-ljpeg $LIBS"
53854
53855else
53856   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
53857fi
53858
53859
53860    USE_EXTERNAL_LIBJPEG=true
53861  else
53862    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
53863  fi
53864
53865
53866
53867
53868
53869# Check whether --with-giflib was given.
53870if test "${with_giflib+set}" = set; then :
53871  withval=$with_giflib;
53872fi
53873
53874
53875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
53876$as_echo_n "checking for which giflib to use... " >&6; }
53877  # default is bundled
53878  DEFAULT_GIFLIB=bundled
53879  # if user didn't specify, use DEFAULT_GIFLIB
53880  if test "x${with_giflib}" = "x"; then
53881    with_giflib=${DEFAULT_GIFLIB}
53882  fi
53883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
53884$as_echo "${with_giflib}" >&6; }
53885
53886  if test "x${with_giflib}" = "xbundled"; then
53887    USE_EXTERNAL_LIBGIF=false
53888  elif test "x${with_giflib}" = "xsystem"; then
53889    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
53890if test "x$ac_cv_header_gif_lib_h" = xyes; then :
53891
53892else
53893   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
53894fi
53895
53896
53897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
53898$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
53899if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
53900  $as_echo_n "(cached) " >&6
53901else
53902  ac_check_lib_save_LIBS=$LIBS
53903LIBS="-lgif  $LIBS"
53904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53905/* end confdefs.h.  */
53906
53907/* Override any GCC internal prototype to avoid an error.
53908   Use char because int might match the return type of a GCC
53909   builtin and then its argument prototype would still apply.  */
53910#ifdef __cplusplus
53911extern "C"
53912#endif
53913char DGifGetCode ();
53914int
53915main ()
53916{
53917return DGifGetCode ();
53918  ;
53919  return 0;
53920}
53921_ACEOF
53922if ac_fn_cxx_try_link "$LINENO"; then :
53923  ac_cv_lib_gif_DGifGetCode=yes
53924else
53925  ac_cv_lib_gif_DGifGetCode=no
53926fi
53927rm -f core conftest.err conftest.$ac_objext \
53928    conftest$ac_exeext conftest.$ac_ext
53929LIBS=$ac_check_lib_save_LIBS
53930fi
53931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
53932$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
53933if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
53934  cat >>confdefs.h <<_ACEOF
53935#define HAVE_LIBGIF 1
53936_ACEOF
53937
53938  LIBS="-lgif $LIBS"
53939
53940else
53941   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
53942fi
53943
53944
53945    USE_EXTERNAL_LIBGIF=true
53946  else
53947    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
53948  fi
53949
53950
53951
53952
53953
53954# Check whether --with-libpng was given.
53955if test "${with_libpng+set}" = set; then :
53956  withval=$with_libpng;
53957fi
53958
53959
53960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
53961$as_echo_n "checking for which libpng to use... " >&6; }
53962
53963  # default is bundled
53964  DEFAULT_LIBPNG=bundled
53965  # if user didn't specify, use DEFAULT_LIBPNG
53966  if test "x${with_libpng}" = "x"; then
53967      with_libpng=${DEFAULT_LIBPNG}
53968  fi
53969
53970  if test "x${with_libpng}" = "xbundled"; then
53971      USE_EXTERNAL_LIBPNG=false
53972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
53973$as_echo "bundled" >&6; }
53974  elif test "x${with_libpng}" = "xsystem"; then
53975
53976pkg_failed=no
53977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
53978$as_echo_n "checking for PNG... " >&6; }
53979
53980if test -n "$PNG_CFLAGS"; then
53981    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
53982 elif test -n "$PKG_CONFIG"; then
53983    if test -n "$PKG_CONFIG" && \
53984    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
53985  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
53986  ac_status=$?
53987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53988  test $ac_status = 0; }; then
53989  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
53990else
53991  pkg_failed=yes
53992fi
53993 else
53994    pkg_failed=untried
53995fi
53996if test -n "$PNG_LIBS"; then
53997    pkg_cv_PNG_LIBS="$PNG_LIBS"
53998 elif test -n "$PKG_CONFIG"; then
53999    if test -n "$PKG_CONFIG" && \
54000    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
54001  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
54002  ac_status=$?
54003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54004  test $ac_status = 0; }; then
54005  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
54006else
54007  pkg_failed=yes
54008fi
54009 else
54010    pkg_failed=untried
54011fi
54012
54013
54014
54015if test $pkg_failed = yes; then
54016
54017if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54018        _pkg_short_errors_supported=yes
54019else
54020        _pkg_short_errors_supported=no
54021fi
54022        if test $_pkg_short_errors_supported = yes; then
54023	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
54024        else
54025	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
54026        fi
54027	# Put the nasty error message in config.log where it belongs
54028	echo "$PNG_PKG_ERRORS" >&5
54029
54030	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54031$as_echo "no" >&6; }
54032                 LIBPNG_FOUND=no
54033elif test $pkg_failed = untried; then
54034	 LIBPNG_FOUND=no
54035else
54036	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
54037	PNG_LIBS=$pkg_cv_PNG_LIBS
54038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54039$as_echo "yes" >&6; }
54040	 LIBPNG_FOUND=yes
54041fi
54042      if test "x${LIBPNG_FOUND}" = "xyes"; then
54043          USE_EXTERNAL_LIBPNG=true
54044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54045$as_echo "system" >&6; }
54046      else
54047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54048$as_echo "system not found" >&6; }
54049          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
54050      fi
54051  else
54052      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
54053  fi
54054
54055
54056
54057
54058
54059# Check whether --with-zlib was given.
54060if test "${with_zlib+set}" = set; then :
54061  withval=$with_zlib;
54062fi
54063
54064
54065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
54066$as_echo_n "checking for compress in -lz... " >&6; }
54067if ${ac_cv_lib_z_compress+:} false; then :
54068  $as_echo_n "(cached) " >&6
54069else
54070  ac_check_lib_save_LIBS=$LIBS
54071LIBS="-lz  $LIBS"
54072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54073/* end confdefs.h.  */
54074
54075/* Override any GCC internal prototype to avoid an error.
54076   Use char because int might match the return type of a GCC
54077   builtin and then its argument prototype would still apply.  */
54078#ifdef __cplusplus
54079extern "C"
54080#endif
54081char compress ();
54082int
54083main ()
54084{
54085return compress ();
54086  ;
54087  return 0;
54088}
54089_ACEOF
54090if ac_fn_cxx_try_link "$LINENO"; then :
54091  ac_cv_lib_z_compress=yes
54092else
54093  ac_cv_lib_z_compress=no
54094fi
54095rm -f core conftest.err conftest.$ac_objext \
54096    conftest$ac_exeext conftest.$ac_ext
54097LIBS=$ac_check_lib_save_LIBS
54098fi
54099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
54100$as_echo "$ac_cv_lib_z_compress" >&6; }
54101if test "x$ac_cv_lib_z_compress" = xyes; then :
54102   ZLIB_FOUND=yes
54103else
54104   ZLIB_FOUND=no
54105fi
54106
54107
54108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
54109$as_echo_n "checking for which zlib to use... " >&6; }
54110
54111  DEFAULT_ZLIB=bundled
54112  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
54113    # On macosx default is system...on others default is bundled
54114    DEFAULT_ZLIB=system
54115  fi
54116
54117  if test "x${ZLIB_FOUND}" != "xyes"; then
54118    # If we don't find any system...set default to bundled
54119    DEFAULT_ZLIB=bundled
54120  fi
54121
54122  # If user didn't specify, use DEFAULT_ZLIB
54123  if test "x${with_zlib}" = "x"; then
54124    with_zlib=${DEFAULT_ZLIB}
54125  fi
54126
54127  if test "x${with_zlib}" = "xbundled"; then
54128    USE_EXTERNAL_LIBZ=false
54129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54130$as_echo "bundled" >&6; }
54131  elif test "x${with_zlib}" = "xsystem"; then
54132    if test "x${ZLIB_FOUND}" = "xyes"; then
54133      USE_EXTERNAL_LIBZ=true
54134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54135$as_echo "system" >&6; }
54136    else
54137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
54138$as_echo "system not found" >&6; }
54139      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
54140    fi
54141  else
54142    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
54143  fi
54144
54145
54146
54147
54148
54149# Check whether --with-lcms was given.
54150if test "${with_lcms+set}" = set; then :
54151  withval=$with_lcms;
54152fi
54153
54154
54155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
54156$as_echo_n "checking for which lcms to use... " >&6; }
54157
54158  DEFAULT_LCMS=bundled
54159  # If user didn't specify, use DEFAULT_LCMS
54160  if test "x${with_lcms}" = "x"; then
54161      with_lcms=${DEFAULT_LCMS}
54162  fi
54163
54164  if test "x${with_lcms}" = "xbundled"; then
54165    USE_EXTERNAL_LCMS=false
54166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
54167$as_echo "bundled" >&6; }
54168  elif test "x${with_lcms}" = "xsystem"; then
54169    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
54170$as_echo "system" >&6; }
54171
54172pkg_failed=no
54173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
54174$as_echo_n "checking for LCMS... " >&6; }
54175
54176if test -n "$LCMS_CFLAGS"; then
54177    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
54178 elif test -n "$PKG_CONFIG"; then
54179    if test -n "$PKG_CONFIG" && \
54180    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54181  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54182  ac_status=$?
54183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54184  test $ac_status = 0; }; then
54185  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
54186else
54187  pkg_failed=yes
54188fi
54189 else
54190    pkg_failed=untried
54191fi
54192if test -n "$LCMS_LIBS"; then
54193    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
54194 elif test -n "$PKG_CONFIG"; then
54195    if test -n "$PKG_CONFIG" && \
54196    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
54197  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
54198  ac_status=$?
54199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54200  test $ac_status = 0; }; then
54201  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
54202else
54203  pkg_failed=yes
54204fi
54205 else
54206    pkg_failed=untried
54207fi
54208
54209
54210
54211if test $pkg_failed = yes; then
54212
54213if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54214        _pkg_short_errors_supported=yes
54215else
54216        _pkg_short_errors_supported=no
54217fi
54218        if test $_pkg_short_errors_supported = yes; then
54219	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
54220        else
54221	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
54222        fi
54223	# Put the nasty error message in config.log where it belongs
54224	echo "$LCMS_PKG_ERRORS" >&5
54225
54226	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54227$as_echo "no" >&6; }
54228                LCMS_FOUND=no
54229elif test $pkg_failed = untried; then
54230	LCMS_FOUND=no
54231else
54232	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
54233	LCMS_LIBS=$pkg_cv_LCMS_LIBS
54234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54235$as_echo "yes" >&6; }
54236	LCMS_FOUND=yes
54237fi
54238    if test "x${LCMS_FOUND}" = "xyes"; then
54239      USE_EXTERNAL_LCMS=true
54240    else
54241      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
54242    fi
54243  else
54244    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
54245  fi
54246
54247
54248
54249
54250
54251
54252
54253
54254
54255
54256
54257  # Setup libm (the maths library)
54258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
54259$as_echo_n "checking for cos in -lm... " >&6; }
54260if ${ac_cv_lib_m_cos+:} false; then :
54261  $as_echo_n "(cached) " >&6
54262else
54263  ac_check_lib_save_LIBS=$LIBS
54264LIBS="-lm  $LIBS"
54265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54266/* end confdefs.h.  */
54267
54268/* Override any GCC internal prototype to avoid an error.
54269   Use char because int might match the return type of a GCC
54270   builtin and then its argument prototype would still apply.  */
54271#ifdef __cplusplus
54272extern "C"
54273#endif
54274char cos ();
54275int
54276main ()
54277{
54278return cos ();
54279  ;
54280  return 0;
54281}
54282_ACEOF
54283if ac_fn_cxx_try_link "$LINENO"; then :
54284  ac_cv_lib_m_cos=yes
54285else
54286  ac_cv_lib_m_cos=no
54287fi
54288rm -f core conftest.err conftest.$ac_objext \
54289    conftest$ac_exeext conftest.$ac_ext
54290LIBS=$ac_check_lib_save_LIBS
54291fi
54292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
54293$as_echo "$ac_cv_lib_m_cos" >&6; }
54294if test "x$ac_cv_lib_m_cos" = xyes; then :
54295  cat >>confdefs.h <<_ACEOF
54296#define HAVE_LIBM 1
54297_ACEOF
54298
54299  LIBS="-lm $LIBS"
54300
54301else
54302
54303      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
54304$as_echo "$as_me: Maths library was not found" >&6;}
54305
54306fi
54307
54308  LIBM=-lm
54309
54310
54311  # Setup libdl (for dynamic library loading)
54312  save_LIBS="$LIBS"
54313  LIBS=""
54314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54315$as_echo_n "checking for dlopen in -ldl... " >&6; }
54316if ${ac_cv_lib_dl_dlopen+:} false; then :
54317  $as_echo_n "(cached) " >&6
54318else
54319  ac_check_lib_save_LIBS=$LIBS
54320LIBS="-ldl  $LIBS"
54321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54322/* end confdefs.h.  */
54323
54324/* Override any GCC internal prototype to avoid an error.
54325   Use char because int might match the return type of a GCC
54326   builtin and then its argument prototype would still apply.  */
54327#ifdef __cplusplus
54328extern "C"
54329#endif
54330char dlopen ();
54331int
54332main ()
54333{
54334return dlopen ();
54335  ;
54336  return 0;
54337}
54338_ACEOF
54339if ac_fn_cxx_try_link "$LINENO"; then :
54340  ac_cv_lib_dl_dlopen=yes
54341else
54342  ac_cv_lib_dl_dlopen=no
54343fi
54344rm -f core conftest.err conftest.$ac_objext \
54345    conftest$ac_exeext conftest.$ac_ext
54346LIBS=$ac_check_lib_save_LIBS
54347fi
54348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54349$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
54350if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
54351  cat >>confdefs.h <<_ACEOF
54352#define HAVE_LIBDL 1
54353_ACEOF
54354
54355  LIBS="-ldl $LIBS"
54356
54357fi
54358
54359  LIBDL="$LIBS"
54360
54361  LIBS="$save_LIBS"
54362
54363  # Deprecated libraries, keep the flags for backwards compatibility
54364  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54365
54366
54367# Check whether --with-dxsdk was given.
54368if test "${with_dxsdk+set}" = set; then :
54369  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
54370$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
54371fi
54372
54373
54374
54375
54376# Check whether --with-dxsdk-lib was given.
54377if test "${with_dxsdk_lib+set}" = set; then :
54378  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
54379$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
54380fi
54381
54382
54383
54384
54385# Check whether --with-dxsdk-include was given.
54386if test "${with_dxsdk_include+set}" = set; then :
54387  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
54388$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
54389fi
54390
54391
54392  fi
54393
54394  # Control if libzip can use mmap. Available for purposes of overriding.
54395  LIBZIP_CAN_USE_MMAP=true
54396
54397
54398
54399
54400
54401
54402
54403
54404
54405
54406
54407
54408
54409
54410###############################################################################
54411#
54412# We need to do some final tweaking, when everything else is done.
54413#
54414###############################################################################
54415
54416
54417  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
54418
54419
54420  # The name of the Service Agent jar.
54421  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
54422  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54423    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
54424  fi
54425
54426
54427
54428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
54429$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
54430
54431    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
54432      ENABLE_INTREE_EC=yes
54433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54434$as_echo "yes" >&6; }
54435    else
54436      ENABLE_INTREE_EC=no
54437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54438$as_echo "no" >&6; }
54439    fi
54440
54441
54442
54443
54444###############################################################################
54445#
54446# Configure parts of the build that only affect the build performance,
54447# not the result.
54448#
54449###############################################################################
54450
54451
54452  # How many cores do we have on this build system?
54453
54454# Check whether --with-num-cores was given.
54455if test "${with_num_cores+set}" = set; then :
54456  withval=$with_num_cores;
54457fi
54458
54459  if test "x$with_num_cores" = x; then
54460    # The number of cores were not specified, try to probe them.
54461
54462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
54463$as_echo_n "checking for number of cores... " >&6; }
54464  NUM_CORES=1
54465  FOUND_CORES=no
54466
54467  if test -f /proc/cpuinfo; then
54468    # Looks like a Linux (or cygwin) system
54469    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
54470    FOUND_CORES=yes
54471  elif test -x /usr/sbin/psrinfo; then
54472    # Looks like a Solaris system
54473    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
54474    FOUND_CORES=yes
54475  elif test -x /usr/sbin/system_profiler; then
54476    # Looks like a MacOSX system
54477    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
54478    FOUND_CORES=yes
54479  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
54480    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
54481    FOUND_CORES=yes
54482  elif test -n "$NUMBER_OF_PROCESSORS"; then
54483    # On windows, look in the env
54484    NUM_CORES=$NUMBER_OF_PROCESSORS
54485    FOUND_CORES=yes
54486  fi
54487
54488  if test "x$FOUND_CORES" = xyes; then
54489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
54490$as_echo "$NUM_CORES" >&6; }
54491  else
54492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
54493$as_echo "could not detect number of cores, defaulting to 1" >&6; }
54494    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
54495$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
54496  fi
54497
54498  else
54499    NUM_CORES=$with_num_cores
54500  fi
54501
54502
54503
54504  # How much memory do we have on this build system?
54505
54506# Check whether --with-memory-size was given.
54507if test "${with_memory_size+set}" = set; then :
54508  withval=$with_memory_size;
54509fi
54510
54511  if test "x$with_memory_size" = x; then
54512    # The memory size was not specified, try to probe it.
54513
54514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
54515$as_echo_n "checking for memory size... " >&6; }
54516  # Default to 1024 MB
54517  MEMORY_SIZE=1024
54518  FOUND_MEM=no
54519
54520  if test -f /proc/meminfo; then
54521    # Looks like a Linux (or cygwin) system
54522    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
54523    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
54524    FOUND_MEM=yes
54525  elif test -x /usr/sbin/prtconf; then
54526    # Looks like a Solaris or AIX system
54527    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
54528    FOUND_MEM=yes
54529  elif test -x /usr/sbin/system_profiler; then
54530    # Looks like a MacOSX system
54531    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
54532    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
54533    FOUND_MEM=yes
54534  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54535    # Windows, but without cygwin
54536    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
54537    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
54538    FOUND_MEM=yes
54539  fi
54540
54541  if test "x$FOUND_MEM" = xyes; then
54542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
54543$as_echo "$MEMORY_SIZE MB" >&6; }
54544  else
54545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
54546$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
54547    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
54548$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
54549  fi
54550
54551  else
54552    MEMORY_SIZE=$with_memory_size
54553  fi
54554
54555
54556
54557  # Provide a decent default number of parallel jobs for make depending on
54558  # number of cores, amount of memory and machine architecture.
54559
54560# Check whether --with-jobs was given.
54561if test "${with_jobs+set}" = set; then :
54562  withval=$with_jobs;
54563fi
54564
54565  if test "x$with_jobs" = x; then
54566    # Number of jobs was not specified, calculate.
54567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
54568$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
54569    # Approximate memory in GB.
54570    memory_gb=`expr $MEMORY_SIZE / 1024`
54571    # Pick the lowest of memory in gb and number of cores.
54572    if test "$memory_gb" -lt "$NUM_CORES"; then
54573      JOBS="$memory_gb"
54574    else
54575      JOBS="$NUM_CORES"
54576      # On bigger machines, leave some room for other processes to run
54577      if test "$JOBS" -gt "4"; then
54578        JOBS=`expr $JOBS '*' 90 / 100`
54579      fi
54580    fi
54581    # Cap number of jobs to 16
54582    if test "$JOBS" -gt "16"; then
54583      JOBS=16
54584    fi
54585    if test "$JOBS" -eq "0"; then
54586      JOBS=1
54587    fi
54588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
54589$as_echo "$JOBS" >&6; }
54590  else
54591    JOBS=$with_jobs
54592  fi
54593
54594
54595
54596# Setup arguments for the boot jdk (after cores and memory have been setup)
54597
54598  ##############################################################################
54599  #
54600  # Specify jvm options for anything that is run with the Boot JDK.
54601  # Not all JVM:s accept the same arguments on the command line.
54602  #
54603
54604# Check whether --with-boot-jdk-jvmargs was given.
54605if test "${with_boot_jdk_jvmargs+set}" = set; then :
54606  withval=$with_boot_jdk_jvmargs;
54607fi
54608
54609
54610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
54611$as_echo_n "checking flags for boot jdk java command ... " >&6; }
54612
54613  # Disable special log output when a debug build is used as Boot JDK...
54614
54615  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
54616  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
54617  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
54618  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54619  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54620  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54621    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
54622    JVM_ARG_OK=true
54623  else
54624    $ECHO "Arg failed:" >&5
54625    $ECHO "$OUTPUT" >&5
54626    JVM_ARG_OK=false
54627  fi
54628
54629
54630  # Apply user provided options.
54631
54632  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
54633  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
54634  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
54635  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54636  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54637  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54638    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
54639    JVM_ARG_OK=true
54640  else
54641    $ECHO "Arg failed:" >&5
54642    $ECHO "$OUTPUT" >&5
54643    JVM_ARG_OK=false
54644  fi
54645
54646
54647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
54648$as_echo "$boot_jdk_jvmargs" >&6; }
54649
54650  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
54651  JAVA_FLAGS=$boot_jdk_jvmargs
54652
54653
54654
54655  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
54656$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
54657
54658  # Starting amount of heap memory.
54659
54660  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
54661  $ECHO "Command: $JAVA -Xms64M -version" >&5
54662  OUTPUT=`$JAVA -Xms64M -version 2>&1`
54663  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54664  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54665  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54666    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
54667    JVM_ARG_OK=true
54668  else
54669    $ECHO "Arg failed:" >&5
54670    $ECHO "$OUTPUT" >&5
54671    JVM_ARG_OK=false
54672  fi
54673
54674
54675  # Maximum amount of heap memory.
54676  # Maximum stack size.
54677  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
54678  if test "x$BOOT_JDK_BITS" = "x32"; then
54679    if test "$JVM_MAX_HEAP" -gt "1100"; then
54680      JVM_MAX_HEAP=1100
54681    elif test "$JVM_MAX_HEAP" -lt "512"; then
54682      JVM_MAX_HEAP=512
54683    fi
54684    STACK_SIZE=768
54685  else
54686    # Running a 64 bit JVM allows for and requires a bigger heap
54687    if test "$JVM_MAX_HEAP" -gt "1600"; then
54688      JVM_MAX_HEAP=1600
54689    elif test "$JVM_MAX_HEAP" -lt "512"; then
54690      JVM_MAX_HEAP=512
54691    fi
54692    STACK_SIZE=1536
54693  fi
54694
54695  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
54696  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
54697  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
54698  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54699  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54700  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54701    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
54702    JVM_ARG_OK=true
54703  else
54704    $ECHO "Arg failed:" >&5
54705    $ECHO "$OUTPUT" >&5
54706    JVM_ARG_OK=false
54707  fi
54708
54709
54710  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
54711  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
54712  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
54713  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54714  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54715  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54716    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
54717    JVM_ARG_OK=true
54718  else
54719    $ECHO "Arg failed:" >&5
54720    $ECHO "$OUTPUT" >&5
54721    JVM_ARG_OK=false
54722  fi
54723
54724
54725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
54726$as_echo "$boot_jdk_jvmargs_big" >&6; }
54727
54728  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
54729
54730
54731
54732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
54733$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
54734
54735  # Use serial gc for small short lived tools if possible
54736
54737  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
54738  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
54739  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
54740  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54741  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54742  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54743    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
54744    JVM_ARG_OK=true
54745  else
54746    $ECHO "Arg failed:" >&5
54747    $ECHO "$OUTPUT" >&5
54748    JVM_ARG_OK=false
54749  fi
54750
54751
54752  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
54753  $ECHO "Command: $JAVA -Xms32M -version" >&5
54754  OUTPUT=`$JAVA -Xms32M -version 2>&1`
54755  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54756  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54757  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54758    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
54759    JVM_ARG_OK=true
54760  else
54761    $ECHO "Arg failed:" >&5
54762    $ECHO "$OUTPUT" >&5
54763    JVM_ARG_OK=false
54764  fi
54765
54766
54767  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
54768  $ECHO "Command: $JAVA -Xmx512M -version" >&5
54769  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
54770  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54771  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54772  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54773    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
54774    JVM_ARG_OK=true
54775  else
54776    $ECHO "Arg failed:" >&5
54777    $ECHO "$OUTPUT" >&5
54778    JVM_ARG_OK=false
54779  fi
54780
54781
54782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
54783$as_echo "$boot_jdk_jvmargs_small" >&6; }
54784
54785  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
54786
54787
54788  JAVA_TOOL_FLAGS_SMALL=""
54789  for f in $JAVA_FLAGS_SMALL; do
54790    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
54791  done
54792
54793
54794
54795# Setup smart javac (after cores and memory have been setup)
54796
54797
54798# Check whether --with-sjavac-server-java was given.
54799if test "${with_sjavac_server_java+set}" = set; then :
54800  withval=$with_sjavac_server_java;
54801fi
54802
54803
54804  if test "x$with_sjavac_server_java" != x; then
54805    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
54806    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
54807    if test "x$FOUND_VERSION" = x; then
54808      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
54809    fi
54810  else
54811    SJAVAC_SERVER_JAVA="$JAVA"
54812  fi
54813
54814
54815  if test "$MEMORY_SIZE" -gt "3000"; then
54816
54817  $ECHO "Check if jvm arg is ok: -d64" >&5
54818  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
54819  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
54820  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54821  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54822  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54823    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
54824    JVM_ARG_OK=true
54825  else
54826    $ECHO "Arg failed:" >&5
54827    $ECHO "$OUTPUT" >&5
54828    JVM_ARG_OK=false
54829  fi
54830
54831    if test "$JVM_ARG_OK" = true; then
54832      JVM_64BIT=true
54833      JVM_ARG_OK=false
54834    fi
54835  fi
54836
54837  MX_VALUE=`expr $MEMORY_SIZE / 2`
54838  if test "$JVM_64BIT" = true; then
54839    # Set ms lower than mx since more than one instance of the server might
54840    # get launched at the same time before they figure out which instance won.
54841    MS_VALUE=512
54842    if test "$MX_VALUE" -gt "2048"; then
54843      MX_VALUE=2048
54844    fi
54845  else
54846    MS_VALUE=256
54847    if test "$MX_VALUE" -gt "1500"; then
54848      MX_VALUE=1500
54849    fi
54850  fi
54851  if test "$MX_VALUE" -lt "512"; then
54852    MX_VALUE=512
54853  fi
54854
54855  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
54856  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
54857  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
54858  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
54859  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
54860  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
54861    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
54862    JVM_ARG_OK=true
54863  else
54864    $ECHO "Arg failed:" >&5
54865    $ECHO "$OUTPUT" >&5
54866    JVM_ARG_OK=false
54867  fi
54868
54869
54870
54871  # Check whether --enable-sjavac was given.
54872if test "${enable_sjavac+set}" = set; then :
54873  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
54874else
54875  ENABLE_SJAVAC="no"
54876fi
54877
54878  if test "x$JVM_ARG_OK" = "xfalse"; then
54879    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
54880$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
54881    ENABLE_SJAVAC="no"
54882  fi
54883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
54884$as_echo_n "checking whether to use sjavac... " >&6; }
54885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
54886$as_echo "$ENABLE_SJAVAC" >&6; }
54887
54888
54889  # Check whether --enable-javac-server was given.
54890if test "${enable_javac_server+set}" = set; then :
54891  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
54892else
54893  ENABLE_JAVAC_SERVER="no"
54894fi
54895
54896  if test "x$JVM_ARG_OK" = "xfalse"; then
54897    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
54898$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
54899    ENABLE_JAVAC_SERVER="no"
54900  fi
54901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
54902$as_echo_n "checking whether to use javac server... " >&6; }
54903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
54904$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
54905
54906
54907
54908# Can the C/C++ compiler use precompiled headers?
54909
54910
54911  ###############################################################################
54912  #
54913  # Can the C/C++ compiler use precompiled headers?
54914  #
54915  # Check whether --enable-precompiled-headers was given.
54916if test "${enable_precompiled_headers+set}" = set; then :
54917  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
54918else
54919  ENABLE_PRECOMPH=yes
54920fi
54921
54922
54923  USE_PRECOMPILED_HEADER=1
54924  if test "x$ENABLE_PRECOMPH" = xno; then
54925    USE_PRECOMPILED_HEADER=0
54926  fi
54927
54928  if test "x$ENABLE_PRECOMPH" = xyes; then
54929    # Check that the compiler actually supports precomp headers.
54930    if test "x$TOOLCHAIN_TYPE" = xgcc; then
54931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
54932$as_echo_n "checking that precompiled headers work... " >&6; }
54933      echo "int alfa();" > conftest.h
54934      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
54935      if test ! -f conftest.hpp.gch; then
54936        USE_PRECOMPILED_HEADER=0
54937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54938$as_echo "no" >&6; }
54939      else
54940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54941$as_echo "yes" >&6; }
54942      fi
54943      rm -f conftest.h conftest.hpp.gch
54944    fi
54945  fi
54946
54947
54948
54949
54950# Setup use of ccache, if available
54951
54952  # Check whether --enable-ccache was given.
54953if test "${enable_ccache+set}" = set; then :
54954  enableval=$enable_ccache;
54955fi
54956
54957
54958  CCACHE=
54959  CCACHE_STATUS=
54960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
54961$as_echo_n "checking is ccache enabled... " >&6; }
54962  if test "x$enable_ccache" = xyes; then
54963    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
54964      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54965$as_echo "yes" >&6; }
54966      OLD_PATH="$PATH"
54967      if test "x$TOOLCHAIN_PATH" != x; then
54968        PATH=$TOOLCHAIN_PATH:$PATH
54969      fi
54970
54971
54972
54973  # Publish this variable in the help.
54974
54975
54976  if [ -z "${CCACHE+x}" ]; then
54977    # The variable is not set by user, try to locate tool using the code snippet
54978    for ac_prog in ccache
54979do
54980  # Extract the first word of "$ac_prog", so it can be a program name with args.
54981set dummy $ac_prog; ac_word=$2
54982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
54983$as_echo_n "checking for $ac_word... " >&6; }
54984if ${ac_cv_path_CCACHE+:} false; then :
54985  $as_echo_n "(cached) " >&6
54986else
54987  case $CCACHE in
54988  [\\/]* | ?:[\\/]*)
54989  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
54990  ;;
54991  *)
54992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54993for as_dir in $PATH
54994do
54995  IFS=$as_save_IFS
54996  test -z "$as_dir" && as_dir=.
54997    for ac_exec_ext in '' $ac_executable_extensions; do
54998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
54999    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55001    break 2
55002  fi
55003done
55004  done
55005IFS=$as_save_IFS
55006
55007  ;;
55008esac
55009fi
55010CCACHE=$ac_cv_path_CCACHE
55011if test -n "$CCACHE"; then
55012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55013$as_echo "$CCACHE" >&6; }
55014else
55015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55016$as_echo "no" >&6; }
55017fi
55018
55019
55020  test -n "$CCACHE" && break
55021done
55022
55023  else
55024    # The variable is set, but is it from the command line or the environment?
55025
55026    # Try to remove the string !CCACHE! from our list.
55027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
55028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
55029      # If it failed, the variable was not from the command line. Ignore it,
55030      # but warn the user (except for BASH, which is always set by the calling BASH).
55031      if test "xCCACHE" != xBASH; then
55032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
55033$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
55034      fi
55035      # Try to locate tool using the code snippet
55036      for ac_prog in ccache
55037do
55038  # Extract the first word of "$ac_prog", so it can be a program name with args.
55039set dummy $ac_prog; ac_word=$2
55040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55041$as_echo_n "checking for $ac_word... " >&6; }
55042if ${ac_cv_path_CCACHE+:} false; then :
55043  $as_echo_n "(cached) " >&6
55044else
55045  case $CCACHE in
55046  [\\/]* | ?:[\\/]*)
55047  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55048  ;;
55049  *)
55050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55051for as_dir in $PATH
55052do
55053  IFS=$as_save_IFS
55054  test -z "$as_dir" && as_dir=.
55055    for ac_exec_ext in '' $ac_executable_extensions; do
55056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55057    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55059    break 2
55060  fi
55061done
55062  done
55063IFS=$as_save_IFS
55064
55065  ;;
55066esac
55067fi
55068CCACHE=$ac_cv_path_CCACHE
55069if test -n "$CCACHE"; then
55070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55071$as_echo "$CCACHE" >&6; }
55072else
55073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55074$as_echo "no" >&6; }
55075fi
55076
55077
55078  test -n "$CCACHE" && break
55079done
55080
55081    else
55082      # If it succeeded, then it was overridden by the user. We will use it
55083      # for the tool.
55084
55085      # First remove it from the list of overridden variables, so we can test
55086      # for unknown variables in the end.
55087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
55088
55089      # Check if we try to supply an empty value
55090      if test "x$CCACHE" = x; then
55091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
55092$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
55093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55094$as_echo_n "checking for CCACHE... " >&6; }
55095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
55096$as_echo "disabled" >&6; }
55097      else
55098        # Check if the provided tool contains a complete path.
55099        tool_specified="$CCACHE"
55100        tool_basename="${tool_specified##*/}"
55101        if test "x$tool_basename" = "x$tool_specified"; then
55102          # A command without a complete path is provided, search $PATH.
55103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
55104$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
55105          # Extract the first word of "$tool_basename", so it can be a program name with args.
55106set dummy $tool_basename; ac_word=$2
55107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55108$as_echo_n "checking for $ac_word... " >&6; }
55109if ${ac_cv_path_CCACHE+:} false; then :
55110  $as_echo_n "(cached) " >&6
55111else
55112  case $CCACHE in
55113  [\\/]* | ?:[\\/]*)
55114  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
55115  ;;
55116  *)
55117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55118for as_dir in $PATH
55119do
55120  IFS=$as_save_IFS
55121  test -z "$as_dir" && as_dir=.
55122    for ac_exec_ext in '' $ac_executable_extensions; do
55123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55124    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
55125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55126    break 2
55127  fi
55128done
55129  done
55130IFS=$as_save_IFS
55131
55132  ;;
55133esac
55134fi
55135CCACHE=$ac_cv_path_CCACHE
55136if test -n "$CCACHE"; then
55137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
55138$as_echo "$CCACHE" >&6; }
55139else
55140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55141$as_echo "no" >&6; }
55142fi
55143
55144
55145          if test "x$CCACHE" = x; then
55146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
55147          fi
55148        else
55149          # Otherwise we believe it is a complete path. Use it as it is.
55150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
55151$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
55152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
55153$as_echo_n "checking for CCACHE... " >&6; }
55154          if test ! -x "$tool_specified"; then
55155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
55156$as_echo "not found" >&6; }
55157            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
55158          fi
55159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
55160$as_echo "$tool_specified" >&6; }
55161        fi
55162      fi
55163    fi
55164
55165  fi
55166
55167
55168
55169  if test "x$CCACHE" = x; then
55170    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
55171  fi
55172
55173
55174      PATH="$OLD_PATH"
55175      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
55176      CCACHE_STATUS="Active ($CCACHE_VERSION)"
55177    else
55178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55179$as_echo "no" >&6; }
55180      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
55181$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
55182    fi
55183  elif test "x$enable_ccache" = xno; then
55184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
55185$as_echo "no, explicitly disabled" >&6; }
55186    CCACHE_STATUS="Disabled"
55187  elif test "x$enable_ccache" = x; then
55188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55189$as_echo "no" >&6; }
55190  else
55191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
55192$as_echo "unknown" >&6; }
55193    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
55194  fi
55195
55196
55197
55198# Check whether --with-ccache-dir was given.
55199if test "${with_ccache_dir+set}" = set; then :
55200  withval=$with_ccache_dir;
55201fi
55202
55203
55204  if test "x$with_ccache_dir" != x; then
55205    # When using a non home ccache directory, assume the use is to share ccache files
55206    # with other users. Thus change the umask.
55207    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
55208    if test "x$CCACHE" = x; then
55209      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
55210$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
55211    fi
55212  fi
55213
55214  if test "x$CCACHE" != x; then
55215
55216  if test "x$CCACHE" != x; then
55217    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
55218      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
55219          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
55220      if test "x$HAS_BAD_CCACHE" != "x"; then
55221        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
55222      fi
55223      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
55224$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
55225      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
55226      PUSHED_FLAGS="$CXXFLAGS"
55227      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
55228      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55229/* end confdefs.h.  */
55230
55231int
55232main ()
55233{
55234
55235  ;
55236  return 0;
55237}
55238_ACEOF
55239if ac_fn_cxx_try_compile "$LINENO"; then :
55240  CC_KNOWS_CCACHE_TRICK=yes
55241else
55242  CC_KNOWS_CCACHE_TRICK=no
55243fi
55244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
55245      CXXFLAGS="$PUSHED_FLAGS"
55246      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
55247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55248$as_echo "yes" >&6; }
55249        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
55250
55251        CCACHE_SLOPPINESS=pch_defines,time_macros
55252      else
55253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55254$as_echo "no" >&6; }
55255        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
55256      fi
55257    fi
55258
55259    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
55260        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
55261
55262    if test "x$SET_CCACHE_DIR" != x; then
55263      mkdir -p $CCACHE_DIR > /dev/null 2>&1
55264      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
55265    fi
55266  fi
55267
55268  fi
55269
55270
55271###############################################################################
55272#
55273# And now the finish...
55274#
55275###############################################################################
55276
55277# Check for some common pitfalls
55278
55279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55280    file_to_test="$SRC_ROOT/LICENSE"
55281    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
55282      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
55283    fi
55284  fi
55285
55286
55287  # Did user specify any unknown variables?
55288
55289  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
55290    # Replace the separating ! with spaces before presenting for end user.
55291    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
55292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
55293$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
55294  fi
55295
55296
55297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
55298$as_echo_n "checking if build directory is on local disk... " >&6; }
55299
55300  # df -l lists only local disks; if the given directory is not found then
55301  # a non-zero exit code is given
55302  if test "x$DF" = x; then
55303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55304      # msys does not have df; use Windows "net use" instead.
55305      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
55306      if test "x$IS_NETWORK_DISK" = x; then
55307        OUTPUT_DIR_IS_LOCAL="yes"
55308      else
55309        OUTPUT_DIR_IS_LOCAL="no"
55310      fi
55311    else
55312      # No df here, say it's local
55313      OUTPUT_DIR_IS_LOCAL="yes"
55314    fi
55315  else
55316    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
55317      OUTPUT_DIR_IS_LOCAL="yes"
55318    else
55319      OUTPUT_DIR_IS_LOCAL="no"
55320    fi
55321  fi
55322
55323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
55324$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
55325
55326
55327
55328  # Check if the user has any old-style ALT_ variables set.
55329  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
55330
55331  # Before generating output files, test if they exist. If they do, this is a reconfigure.
55332  # Since we can't properly handle the dependencies for this, warn the user about the situation
55333  if test -e $OUTPUT_ROOT/spec.gmk; then
55334    IS_RECONFIGURE=yes
55335  else
55336    IS_RECONFIGURE=no
55337  fi
55338
55339
55340# At the end, call the custom hook. (Dummy macro if no custom sources available)
55341
55342
55343# We're messing a bit with internal autoconf variables to put the config.status
55344# in the output directory instead of the current directory.
55345CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
55346
55347# Create the actual output files. Now the main work of configure is done.
55348cat >confcache <<\_ACEOF
55349# This file is a shell script that caches the results of configure
55350# tests run on this system so they can be shared between configure
55351# scripts and configure runs, see configure's option --config-cache.
55352# It is not useful on other systems.  If it contains results you don't
55353# want to keep, you may remove or edit it.
55354#
55355# config.status only pays attention to the cache file if you give it
55356# the --recheck option to rerun configure.
55357#
55358# `ac_cv_env_foo' variables (set or unset) will be overridden when
55359# loading this file, other *unset* `ac_cv_foo' will be assigned the
55360# following values.
55361
55362_ACEOF
55363
55364# The following way of writing the cache mishandles newlines in values,
55365# but we know of no workaround that is simple, portable, and efficient.
55366# So, we kill variables containing newlines.
55367# Ultrix sh set writes to stderr and can't be redirected directly,
55368# and sets the high bit in the cache file unless we assign to the vars.
55369(
55370  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
55371    eval ac_val=\$$ac_var
55372    case $ac_val in #(
55373    *${as_nl}*)
55374      case $ac_var in #(
55375      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
55376$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
55377      esac
55378      case $ac_var in #(
55379      _ | IFS | as_nl) ;; #(
55380      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
55381      *) { eval $ac_var=; unset $ac_var;} ;;
55382      esac ;;
55383    esac
55384  done
55385
55386  (set) 2>&1 |
55387    case $as_nl`(ac_space=' '; set) 2>&1` in #(
55388    *${as_nl}ac_space=\ *)
55389      # `set' does not quote correctly, so add quotes: double-quote
55390      # substitution turns \\\\ into \\, and sed turns \\ into \.
55391      sed -n \
55392	"s/'/'\\\\''/g;
55393	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
55394      ;; #(
55395    *)
55396      # `set' quotes correctly as required by POSIX, so do not add quotes.
55397      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
55398      ;;
55399    esac |
55400    sort
55401) |
55402  sed '
55403     /^ac_cv_env_/b end
55404     t clear
55405     :clear
55406     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
55407     t end
55408     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
55409     :end' >>confcache
55410if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
55411  if test -w "$cache_file"; then
55412    if test "x$cache_file" != "x/dev/null"; then
55413      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
55414$as_echo "$as_me: updating cache $cache_file" >&6;}
55415      if test ! -f "$cache_file" || test -h "$cache_file"; then
55416	cat confcache >"$cache_file"
55417      else
55418        case $cache_file in #(
55419        */* | ?:*)
55420	  mv -f confcache "$cache_file"$$ &&
55421	  mv -f "$cache_file"$$ "$cache_file" ;; #(
55422        *)
55423	  mv -f confcache "$cache_file" ;;
55424	esac
55425      fi
55426    fi
55427  else
55428    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
55429$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
55430  fi
55431fi
55432rm -f confcache
55433
55434test "x$prefix" = xNONE && prefix=$ac_default_prefix
55435# Let make expand exec_prefix.
55436test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
55437
55438# Transform confdefs.h into DEFS.
55439# Protect against shell expansion while executing Makefile rules.
55440# Protect against Makefile macro expansion.
55441#
55442# If the first sed substitution is executed (which looks for macros that
55443# take arguments), then branch to the quote section.  Otherwise,
55444# look for a macro that doesn't take arguments.
55445ac_script='
55446:mline
55447/\\$/{
55448 N
55449 s,\\\n,,
55450 b mline
55451}
55452t clear
55453:clear
55454s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
55455t quote
55456s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
55457t quote
55458b any
55459:quote
55460s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
55461s/\[/\\&/g
55462s/\]/\\&/g
55463s/\$/$$/g
55464H
55465:any
55466${
55467	g
55468	s/^\n//
55469	s/\n/ /g
55470	p
55471}
55472'
55473DEFS=`sed -n "$ac_script" confdefs.h`
55474
55475
55476ac_libobjs=
55477ac_ltlibobjs=
55478U=
55479for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
55480  # 1. Remove the extension, and $U if already installed.
55481  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
55482  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
55483  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
55484  #    will be set to the directory where LIBOBJS objects are built.
55485  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
55486  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
55487done
55488LIBOBJS=$ac_libobjs
55489
55490LTLIBOBJS=$ac_ltlibobjs
55491
55492
55493
55494: "${CONFIG_STATUS=./config.status}"
55495ac_write_fail=0
55496ac_clean_files_save=$ac_clean_files
55497ac_clean_files="$ac_clean_files $CONFIG_STATUS"
55498{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
55499$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
55500as_write_fail=0
55501cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
55502#! $SHELL
55503# Generated by $as_me.
55504# Run this file to recreate the current configuration.
55505# Compiler output produced by configure, useful for debugging
55506# configure, is in config.log if it exists.
55507
55508debug=false
55509ac_cs_recheck=false
55510ac_cs_silent=false
55511
55512SHELL=\${CONFIG_SHELL-$SHELL}
55513export SHELL
55514_ASEOF
55515cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
55516## -------------------- ##
55517## M4sh Initialization. ##
55518## -------------------- ##
55519
55520# Be more Bourne compatible
55521DUALCASE=1; export DUALCASE # for MKS sh
55522if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
55523  emulate sh
55524  NULLCMD=:
55525  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
55526  # is contrary to our usage.  Disable this feature.
55527  alias -g '${1+"$@"}'='"$@"'
55528  setopt NO_GLOB_SUBST
55529else
55530  case `(set -o) 2>/dev/null` in #(
55531  *posix*) :
55532    set -o posix ;; #(
55533  *) :
55534     ;;
55535esac
55536fi
55537
55538
55539as_nl='
55540'
55541export as_nl
55542# Printing a long string crashes Solaris 7 /usr/bin/printf.
55543as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
55544as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
55545as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
55546# Prefer a ksh shell builtin over an external printf program on Solaris,
55547# but without wasting forks for bash or zsh.
55548if test -z "$BASH_VERSION$ZSH_VERSION" \
55549    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
55550  as_echo='print -r --'
55551  as_echo_n='print -rn --'
55552elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55553  as_echo='printf %s\n'
55554  as_echo_n='printf %s'
55555else
55556  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55557    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55558    as_echo_n='/usr/ucb/echo -n'
55559  else
55560    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55561    as_echo_n_body='eval
55562      arg=$1;
55563      case $arg in #(
55564      *"$as_nl"*)
55565	expr "X$arg" : "X\\(.*\\)$as_nl";
55566	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
55567      esac;
55568      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
55569    '
55570    export as_echo_n_body
55571    as_echo_n='sh -c $as_echo_n_body as_echo'
55572  fi
55573  export as_echo_body
55574  as_echo='sh -c $as_echo_body as_echo'
55575fi
55576
55577# The user is always right.
55578if test "${PATH_SEPARATOR+set}" != set; then
55579  PATH_SEPARATOR=:
55580  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
55581    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
55582      PATH_SEPARATOR=';'
55583  }
55584fi
55585
55586
55587# IFS
55588# We need space, tab and new line, in precisely that order.  Quoting is
55589# there to prevent editors from complaining about space-tab.
55590# (If _AS_PATH_WALK were called with IFS unset, it would disable word
55591# splitting by setting IFS to empty value.)
55592IFS=" ""	$as_nl"
55593
55594# Find who we are.  Look in the path if we contain no directory separator.
55595as_myself=
55596case $0 in #((
55597  *[\\/]* ) as_myself=$0 ;;
55598  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55599for as_dir in $PATH
55600do
55601  IFS=$as_save_IFS
55602  test -z "$as_dir" && as_dir=.
55603    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
55604  done
55605IFS=$as_save_IFS
55606
55607     ;;
55608esac
55609# We did not find ourselves, most probably we were run as `sh COMMAND'
55610# in which case we are not to be found in the path.
55611if test "x$as_myself" = x; then
55612  as_myself=$0
55613fi
55614if test ! -f "$as_myself"; then
55615  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
55616  exit 1
55617fi
55618
55619# Unset variables that we do not need and which cause bugs (e.g. in
55620# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
55621# suppresses any "Segmentation fault" message there.  '((' could
55622# trigger a bug in pdksh 5.2.14.
55623for as_var in BASH_ENV ENV MAIL MAILPATH
55624do eval test x\${$as_var+set} = xset \
55625  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
55626done
55627PS1='$ '
55628PS2='> '
55629PS4='+ '
55630
55631# NLS nuisances.
55632LC_ALL=C
55633export LC_ALL
55634LANGUAGE=C
55635export LANGUAGE
55636
55637# CDPATH.
55638(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
55639
55640
55641# as_fn_error STATUS ERROR [LINENO LOG_FD]
55642# ----------------------------------------
55643# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
55644# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
55645# script with STATUS, using 1 if that was 0.
55646as_fn_error ()
55647{
55648  as_status=$1; test $as_status -eq 0 && as_status=1
55649  if test "$4"; then
55650    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
55651    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
55652  fi
55653  $as_echo "$as_me: error: $2" >&2
55654  as_fn_exit $as_status
55655} # as_fn_error
55656
55657
55658# as_fn_set_status STATUS
55659# -----------------------
55660# Set $? to STATUS, without forking.
55661as_fn_set_status ()
55662{
55663  return $1
55664} # as_fn_set_status
55665
55666# as_fn_exit STATUS
55667# -----------------
55668# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
55669as_fn_exit ()
55670{
55671  set +e
55672  as_fn_set_status $1
55673  exit $1
55674} # as_fn_exit
55675
55676# as_fn_unset VAR
55677# ---------------
55678# Portably unset VAR.
55679as_fn_unset ()
55680{
55681  { eval $1=; unset $1;}
55682}
55683as_unset=as_fn_unset
55684# as_fn_append VAR VALUE
55685# ----------------------
55686# Append the text in VALUE to the end of the definition contained in VAR. Take
55687# advantage of any shell optimizations that allow amortized linear growth over
55688# repeated appends, instead of the typical quadratic growth present in naive
55689# implementations.
55690if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
55691  eval 'as_fn_append ()
55692  {
55693    eval $1+=\$2
55694  }'
55695else
55696  as_fn_append ()
55697  {
55698    eval $1=\$$1\$2
55699  }
55700fi # as_fn_append
55701
55702# as_fn_arith ARG...
55703# ------------------
55704# Perform arithmetic evaluation on the ARGs, and store the result in the
55705# global $as_val. Take advantage of shells that can avoid forks. The arguments
55706# must be portable across $(()) and expr.
55707if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
55708  eval 'as_fn_arith ()
55709  {
55710    as_val=$(( $* ))
55711  }'
55712else
55713  as_fn_arith ()
55714  {
55715    as_val=`expr "$@" || test $? -eq 1`
55716  }
55717fi # as_fn_arith
55718
55719
55720if expr a : '\(a\)' >/dev/null 2>&1 &&
55721   test "X`expr 00001 : '.*\(...\)'`" = X001; then
55722  as_expr=expr
55723else
55724  as_expr=false
55725fi
55726
55727if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
55728  as_basename=basename
55729else
55730  as_basename=false
55731fi
55732
55733if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
55734  as_dirname=dirname
55735else
55736  as_dirname=false
55737fi
55738
55739as_me=`$as_basename -- "$0" ||
55740$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
55741	 X"$0" : 'X\(//\)$' \| \
55742	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
55743$as_echo X/"$0" |
55744    sed '/^.*\/\([^/][^/]*\)\/*$/{
55745	    s//\1/
55746	    q
55747	  }
55748	  /^X\/\(\/\/\)$/{
55749	    s//\1/
55750	    q
55751	  }
55752	  /^X\/\(\/\).*/{
55753	    s//\1/
55754	    q
55755	  }
55756	  s/.*/./; q'`
55757
55758# Avoid depending upon Character Ranges.
55759as_cr_letters='abcdefghijklmnopqrstuvwxyz'
55760as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
55761as_cr_Letters=$as_cr_letters$as_cr_LETTERS
55762as_cr_digits='0123456789'
55763as_cr_alnum=$as_cr_Letters$as_cr_digits
55764
55765ECHO_C= ECHO_N= ECHO_T=
55766case `echo -n x` in #(((((
55767-n*)
55768  case `echo 'xy\c'` in
55769  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
55770  xy)  ECHO_C='\c';;
55771  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
55772       ECHO_T='	';;
55773  esac;;
55774*)
55775  ECHO_N='-n';;
55776esac
55777
55778rm -f conf$$ conf$$.exe conf$$.file
55779if test -d conf$$.dir; then
55780  rm -f conf$$.dir/conf$$.file
55781else
55782  rm -f conf$$.dir
55783  mkdir conf$$.dir 2>/dev/null
55784fi
55785if (echo >conf$$.file) 2>/dev/null; then
55786  if ln -s conf$$.file conf$$ 2>/dev/null; then
55787    as_ln_s='ln -s'
55788    # ... but there are two gotchas:
55789    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
55790    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
55791    # In both cases, we have to default to `cp -pR'.
55792    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
55793      as_ln_s='cp -pR'
55794  elif ln conf$$.file conf$$ 2>/dev/null; then
55795    as_ln_s=ln
55796  else
55797    as_ln_s='cp -pR'
55798  fi
55799else
55800  as_ln_s='cp -pR'
55801fi
55802rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
55803rmdir conf$$.dir 2>/dev/null
55804
55805
55806# as_fn_mkdir_p
55807# -------------
55808# Create "$as_dir" as a directory, including parents if necessary.
55809as_fn_mkdir_p ()
55810{
55811
55812  case $as_dir in #(
55813  -*) as_dir=./$as_dir;;
55814  esac
55815  test -d "$as_dir" || eval $as_mkdir_p || {
55816    as_dirs=
55817    while :; do
55818      case $as_dir in #(
55819      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
55820      *) as_qdir=$as_dir;;
55821      esac
55822      as_dirs="'$as_qdir' $as_dirs"
55823      as_dir=`$as_dirname -- "$as_dir" ||
55824$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55825	 X"$as_dir" : 'X\(//\)[^/]' \| \
55826	 X"$as_dir" : 'X\(//\)$' \| \
55827	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
55828$as_echo X"$as_dir" |
55829    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55830	    s//\1/
55831	    q
55832	  }
55833	  /^X\(\/\/\)[^/].*/{
55834	    s//\1/
55835	    q
55836	  }
55837	  /^X\(\/\/\)$/{
55838	    s//\1/
55839	    q
55840	  }
55841	  /^X\(\/\).*/{
55842	    s//\1/
55843	    q
55844	  }
55845	  s/.*/./; q'`
55846      test -d "$as_dir" && break
55847    done
55848    test -z "$as_dirs" || eval "mkdir $as_dirs"
55849  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
55850
55851
55852} # as_fn_mkdir_p
55853if mkdir -p . 2>/dev/null; then
55854  as_mkdir_p='mkdir -p "$as_dir"'
55855else
55856  test -d ./-p && rmdir ./-p
55857  as_mkdir_p=false
55858fi
55859
55860
55861# as_fn_executable_p FILE
55862# -----------------------
55863# Test if FILE is an executable regular file.
55864as_fn_executable_p ()
55865{
55866  test -f "$1" && test -x "$1"
55867} # as_fn_executable_p
55868as_test_x='test -x'
55869as_executable_p=as_fn_executable_p
55870
55871# Sed expression to map a string onto a valid CPP name.
55872as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
55873
55874# Sed expression to map a string onto a valid variable name.
55875as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
55876
55877
55878exec 6>&1
55879## ----------------------------------- ##
55880## Main body of $CONFIG_STATUS script. ##
55881## ----------------------------------- ##
55882_ASEOF
55883test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
55884
55885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55886# Save the log message, to keep $0 and so on meaningful, and to
55887# report actual input values of CONFIG_FILES etc. instead of their
55888# values after options handling.
55889ac_log="
55890This file was extended by OpenJDK $as_me jdk9, which was
55891generated by GNU Autoconf 2.69.  Invocation command line was
55892
55893  CONFIG_FILES    = $CONFIG_FILES
55894  CONFIG_HEADERS  = $CONFIG_HEADERS
55895  CONFIG_LINKS    = $CONFIG_LINKS
55896  CONFIG_COMMANDS = $CONFIG_COMMANDS
55897  $ $0 $@
55898
55899on `(hostname || uname -n) 2>/dev/null | sed 1q`
55900"
55901
55902_ACEOF
55903
55904case $ac_config_files in *"
55905"*) set x $ac_config_files; shift; ac_config_files=$*;;
55906esac
55907
55908
55909
55910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55911# Files that config.status was made for.
55912config_files="$ac_config_files"
55913
55914_ACEOF
55915
55916cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55917ac_cs_usage="\
55918\`$as_me' instantiates files and other configuration actions
55919from templates according to the current configuration.  Unless the files
55920and actions are specified as TAGs, all are instantiated by default.
55921
55922Usage: $0 [OPTION]... [TAG]...
55923
55924  -h, --help       print this help, then exit
55925  -V, --version    print version number and configuration settings, then exit
55926      --config     print configuration, then exit
55927  -q, --quiet, --silent
55928                   do not print progress messages
55929  -d, --debug      don't remove temporary files
55930      --recheck    update $as_me by reconfiguring in the same conditions
55931      --file=FILE[:TEMPLATE]
55932                   instantiate the configuration file FILE
55933
55934Configuration files:
55935$config_files
55936
55937Report bugs to <build-dev@openjdk.java.net>.
55938OpenJDK home page: <http://openjdk.java.net>."
55939
55940_ACEOF
55941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55942ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
55943ac_cs_version="\\
55944OpenJDK config.status jdk9
55945configured by $0, generated by GNU Autoconf 2.69,
55946  with options \\"\$ac_cs_config\\"
55947
55948Copyright (C) 2012 Free Software Foundation, Inc.
55949This config.status script is free software; the Free Software Foundation
55950gives unlimited permission to copy, distribute and modify it."
55951
55952ac_pwd='$ac_pwd'
55953srcdir='$srcdir'
55954AWK='$AWK'
55955test -n "\$AWK" || AWK=awk
55956_ACEOF
55957
55958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55959# The default lists apply if the user does not specify any file.
55960ac_need_defaults=:
55961while test $# != 0
55962do
55963  case $1 in
55964  --*=?*)
55965    ac_option=`expr "X$1" : 'X\([^=]*\)='`
55966    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
55967    ac_shift=:
55968    ;;
55969  --*=)
55970    ac_option=`expr "X$1" : 'X\([^=]*\)='`
55971    ac_optarg=
55972    ac_shift=:
55973    ;;
55974  *)
55975    ac_option=$1
55976    ac_optarg=$2
55977    ac_shift=shift
55978    ;;
55979  esac
55980
55981  case $ac_option in
55982  # Handling of the options.
55983  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
55984    ac_cs_recheck=: ;;
55985  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
55986    $as_echo "$ac_cs_version"; exit ;;
55987  --config | --confi | --conf | --con | --co | --c )
55988    $as_echo "$ac_cs_config"; exit ;;
55989  --debug | --debu | --deb | --de | --d | -d )
55990    debug=: ;;
55991  --file | --fil | --fi | --f )
55992    $ac_shift
55993    case $ac_optarg in
55994    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
55995    '') as_fn_error $? "missing file argument" ;;
55996    esac
55997    as_fn_append CONFIG_FILES " '$ac_optarg'"
55998    ac_need_defaults=false;;
55999  --he | --h |  --help | --hel | -h )
56000    $as_echo "$ac_cs_usage"; exit ;;
56001  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
56002  | -silent | --silent | --silen | --sile | --sil | --si | --s)
56003    ac_cs_silent=: ;;
56004
56005  # This is an error.
56006  -*) as_fn_error $? "unrecognized option: \`$1'
56007Try \`$0 --help' for more information." ;;
56008
56009  *) as_fn_append ac_config_targets " $1"
56010     ac_need_defaults=false ;;
56011
56012  esac
56013  shift
56014done
56015
56016ac_configure_extra_args=
56017
56018if $ac_cs_silent; then
56019  exec 6>/dev/null
56020  ac_configure_extra_args="$ac_configure_extra_args --silent"
56021fi
56022
56023_ACEOF
56024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56025if \$ac_cs_recheck; then
56026  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
56027  shift
56028  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
56029  CONFIG_SHELL='$SHELL'
56030  export CONFIG_SHELL
56031  exec "\$@"
56032fi
56033
56034_ACEOF
56035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56036exec 5>>config.log
56037{
56038  echo
56039  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
56040## Running $as_me. ##
56041_ASBOX
56042  $as_echo "$ac_log"
56043} >&5
56044
56045_ACEOF
56046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56047_ACEOF
56048
56049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56050
56051# Handling of arguments.
56052for ac_config_target in $ac_config_targets
56053do
56054  case $ac_config_target in
56055    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
56056    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
56057    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
56058    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
56059    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
56060
56061  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
56062  esac
56063done
56064
56065
56066# If the user did not use the arguments to specify the items to instantiate,
56067# then the envvar interface is used.  Set only those that are not.
56068# We use the long form for the default assignment because of an extremely
56069# bizarre bug on SunOS 4.1.3.
56070if $ac_need_defaults; then
56071  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
56072fi
56073
56074# Have a temporary directory for convenience.  Make it in the build tree
56075# simply because there is no reason against having it here, and in addition,
56076# creating and moving files from /tmp can sometimes cause problems.
56077# Hook for its removal unless debugging.
56078# Note that there is a small window in which the directory will not be cleaned:
56079# after its creation but before its name has been assigned to `$tmp'.
56080$debug ||
56081{
56082  tmp= ac_tmp=
56083  trap 'exit_status=$?
56084  : "${ac_tmp:=$tmp}"
56085  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
56086' 0
56087  trap 'as_fn_exit 1' 1 2 13 15
56088}
56089# Create a (secure) tmp directory for tmp files.
56090
56091{
56092  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
56093  test -d "$tmp"
56094}  ||
56095{
56096  tmp=./conf$$-$RANDOM
56097  (umask 077 && mkdir "$tmp")
56098} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
56099ac_tmp=$tmp
56100
56101# Set up the scripts for CONFIG_FILES section.
56102# No need to generate them if there are no CONFIG_FILES.
56103# This happens for instance with `./config.status config.h'.
56104if test -n "$CONFIG_FILES"; then
56105
56106
56107ac_cr=`echo X | tr X '\015'`
56108# On cygwin, bash can eat \r inside `` if the user requested igncr.
56109# But we know of no other shell where ac_cr would be empty at this
56110# point, so we can use a bashism as a fallback.
56111if test "x$ac_cr" = x; then
56112  eval ac_cr=\$\'\\r\'
56113fi
56114ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
56115if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
56116  ac_cs_awk_cr='\\r'
56117else
56118  ac_cs_awk_cr=$ac_cr
56119fi
56120
56121echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
56122_ACEOF
56123
56124
56125{
56126  echo "cat >conf$$subs.awk <<_ACEOF" &&
56127  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
56128  echo "_ACEOF"
56129} >conf$$subs.sh ||
56130  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56131ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
56132ac_delim='%!_!# '
56133for ac_last_try in false false false false false :; do
56134  . ./conf$$subs.sh ||
56135    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56136
56137  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
56138  if test $ac_delim_n = $ac_delim_num; then
56139    break
56140  elif $ac_last_try; then
56141    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
56142  else
56143    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
56144  fi
56145done
56146rm -f conf$$subs.sh
56147
56148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56149cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
56150_ACEOF
56151sed -n '
56152h
56153s/^/S["/; s/!.*/"]=/
56154p
56155g
56156s/^[^!]*!//
56157:repl
56158t repl
56159s/'"$ac_delim"'$//
56160t delim
56161:nl
56162h
56163s/\(.\{148\}\)..*/\1/
56164t more1
56165s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
56166p
56167n
56168b repl
56169:more1
56170s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56171p
56172g
56173s/.\{148\}//
56174t nl
56175:delim
56176h
56177s/\(.\{148\}\)..*/\1/
56178t more2
56179s/["\\]/\\&/g; s/^/"/; s/$/"/
56180p
56181b
56182:more2
56183s/["\\]/\\&/g; s/^/"/; s/$/"\\/
56184p
56185g
56186s/.\{148\}//
56187t delim
56188' <conf$$subs.awk | sed '
56189/^[^""]/{
56190  N
56191  s/\n//
56192}
56193' >>$CONFIG_STATUS || ac_write_fail=1
56194rm -f conf$$subs.awk
56195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56196_ACAWK
56197cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
56198  for (key in S) S_is_set[key] = 1
56199  FS = ""
56200
56201}
56202{
56203  line = $ 0
56204  nfields = split(line, field, "@")
56205  substed = 0
56206  len = length(field[1])
56207  for (i = 2; i < nfields; i++) {
56208    key = field[i]
56209    keylen = length(key)
56210    if (S_is_set[key]) {
56211      value = S[key]
56212      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
56213      len += length(value) + length(field[++i])
56214      substed = 1
56215    } else
56216      len += 1 + keylen
56217  }
56218
56219  print line
56220}
56221
56222_ACAWK
56223_ACEOF
56224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56225if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
56226  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
56227else
56228  cat
56229fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
56230  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
56231_ACEOF
56232
56233# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
56234# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
56235# trailing colons and then remove the whole line if VPATH becomes empty
56236# (actually we leave an empty line to preserve line numbers).
56237if test "x$srcdir" = x.; then
56238  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
56239h
56240s///
56241s/^/:/
56242s/[	 ]*$/:/
56243s/:\$(srcdir):/:/g
56244s/:\${srcdir}:/:/g
56245s/:@srcdir@:/:/g
56246s/^:*//
56247s/:*$//
56248x
56249s/\(=[	 ]*\).*/\1/
56250G
56251s/\n//
56252s/^[^=]*=[	 ]*$//
56253}'
56254fi
56255
56256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56257fi # test -n "$CONFIG_FILES"
56258
56259
56260eval set X "  :F $CONFIG_FILES      "
56261shift
56262for ac_tag
56263do
56264  case $ac_tag in
56265  :[FHLC]) ac_mode=$ac_tag; continue;;
56266  esac
56267  case $ac_mode$ac_tag in
56268  :[FHL]*:*);;
56269  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
56270  :[FH]-) ac_tag=-:-;;
56271  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
56272  esac
56273  ac_save_IFS=$IFS
56274  IFS=:
56275  set x $ac_tag
56276  IFS=$ac_save_IFS
56277  shift
56278  ac_file=$1
56279  shift
56280
56281  case $ac_mode in
56282  :L) ac_source=$1;;
56283  :[FH])
56284    ac_file_inputs=
56285    for ac_f
56286    do
56287      case $ac_f in
56288      -) ac_f="$ac_tmp/stdin";;
56289      *) # Look for the file first in the build tree, then in the source tree
56290	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
56291	 # because $ac_f cannot contain `:'.
56292	 test -f "$ac_f" ||
56293	   case $ac_f in
56294	   [\\/$]*) false;;
56295	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
56296	   esac ||
56297	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
56298      esac
56299      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
56300      as_fn_append ac_file_inputs " '$ac_f'"
56301    done
56302
56303    # Let's still pretend it is `configure' which instantiates (i.e., don't
56304    # use $as_me), people would be surprised to read:
56305    #    /* config.h.  Generated by config.status.  */
56306    configure_input='Generated from '`
56307	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
56308	`' by configure.'
56309    if test x"$ac_file" != x-; then
56310      configure_input="$ac_file.  $configure_input"
56311      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
56312$as_echo "$as_me: creating $ac_file" >&6;}
56313    fi
56314    # Neutralize special characters interpreted by sed in replacement strings.
56315    case $configure_input in #(
56316    *\&* | *\|* | *\\* )
56317       ac_sed_conf_input=`$as_echo "$configure_input" |
56318       sed 's/[\\\\&|]/\\\\&/g'`;; #(
56319    *) ac_sed_conf_input=$configure_input;;
56320    esac
56321
56322    case $ac_tag in
56323    *:-:* | *:-) cat >"$ac_tmp/stdin" \
56324      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
56325    esac
56326    ;;
56327  esac
56328
56329  ac_dir=`$as_dirname -- "$ac_file" ||
56330$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56331	 X"$ac_file" : 'X\(//\)[^/]' \| \
56332	 X"$ac_file" : 'X\(//\)$' \| \
56333	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
56334$as_echo X"$ac_file" |
56335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56336	    s//\1/
56337	    q
56338	  }
56339	  /^X\(\/\/\)[^/].*/{
56340	    s//\1/
56341	    q
56342	  }
56343	  /^X\(\/\/\)$/{
56344	    s//\1/
56345	    q
56346	  }
56347	  /^X\(\/\).*/{
56348	    s//\1/
56349	    q
56350	  }
56351	  s/.*/./; q'`
56352  as_dir="$ac_dir"; as_fn_mkdir_p
56353  ac_builddir=.
56354
56355case "$ac_dir" in
56356.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
56357*)
56358  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
56359  # A ".." for each directory in $ac_dir_suffix.
56360  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
56361  case $ac_top_builddir_sub in
56362  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
56363  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
56364  esac ;;
56365esac
56366ac_abs_top_builddir=$ac_pwd
56367ac_abs_builddir=$ac_pwd$ac_dir_suffix
56368# for backward compatibility:
56369ac_top_builddir=$ac_top_build_prefix
56370
56371case $srcdir in
56372  .)  # We are building in place.
56373    ac_srcdir=.
56374    ac_top_srcdir=$ac_top_builddir_sub
56375    ac_abs_top_srcdir=$ac_pwd ;;
56376  [\\/]* | ?:[\\/]* )  # Absolute name.
56377    ac_srcdir=$srcdir$ac_dir_suffix;
56378    ac_top_srcdir=$srcdir
56379    ac_abs_top_srcdir=$srcdir ;;
56380  *) # Relative name.
56381    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
56382    ac_top_srcdir=$ac_top_build_prefix$srcdir
56383    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
56384esac
56385ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
56386
56387
56388  case $ac_mode in
56389  :F)
56390  #
56391  # CONFIG_FILE
56392  #
56393
56394_ACEOF
56395
56396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56397# If the template does not know about datarootdir, expand it.
56398# FIXME: This hack should be removed a few years after 2.60.
56399ac_datarootdir_hack=; ac_datarootdir_seen=
56400ac_sed_dataroot='
56401/datarootdir/ {
56402  p
56403  q
56404}
56405/@datadir@/p
56406/@docdir@/p
56407/@infodir@/p
56408/@localedir@/p
56409/@mandir@/p'
56410case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
56411*datarootdir*) ac_datarootdir_seen=yes;;
56412*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
56413  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
56414$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
56415_ACEOF
56416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56417  ac_datarootdir_hack='
56418  s&@datadir@&$datadir&g
56419  s&@docdir@&$docdir&g
56420  s&@infodir@&$infodir&g
56421  s&@localedir@&$localedir&g
56422  s&@mandir@&$mandir&g
56423  s&\\\${datarootdir}&$datarootdir&g' ;;
56424esac
56425_ACEOF
56426
56427# Neutralize VPATH when `$srcdir' = `.'.
56428# Shell code in configure.ac might set extrasub.
56429# FIXME: do we really want to maintain this feature?
56430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
56431ac_sed_extra="$ac_vpsub
56432$extrasub
56433_ACEOF
56434cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
56435:t
56436/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
56437s|@configure_input@|$ac_sed_conf_input|;t t
56438s&@top_builddir@&$ac_top_builddir_sub&;t t
56439s&@top_build_prefix@&$ac_top_build_prefix&;t t
56440s&@srcdir@&$ac_srcdir&;t t
56441s&@abs_srcdir@&$ac_abs_srcdir&;t t
56442s&@top_srcdir@&$ac_top_srcdir&;t t
56443s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
56444s&@builddir@&$ac_builddir&;t t
56445s&@abs_builddir@&$ac_abs_builddir&;t t
56446s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
56447$ac_datarootdir_hack
56448"
56449eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
56450  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56451
56452test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
56453  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
56454  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
56455      "$ac_tmp/out"`; test -z "$ac_out"; } &&
56456  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56457which seems to be undefined.  Please make sure it is defined" >&5
56458$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
56459which seems to be undefined.  Please make sure it is defined" >&2;}
56460
56461  rm -f "$ac_tmp/stdin"
56462  case $ac_file in
56463  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
56464  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
56465  esac \
56466  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
56467 ;;
56468
56469
56470
56471  esac
56472
56473done # for ac_tag
56474
56475
56476as_fn_exit 0
56477_ACEOF
56478ac_clean_files=$ac_clean_files_save
56479
56480test $ac_write_fail = 0 ||
56481  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56482
56483
56484# configure is writing to config.log, and then calls config.status.
56485# config.status does its own redirection, appending to config.log.
56486# Unfortunately, on DOS this fails, as config.log is still kept open
56487# by configure, so config.status won't be able to write to it; its
56488# output is simply discarded.  So we exec the FD to /dev/null,
56489# effectively closing config.log, so it can be properly (re)opened and
56490# appended to by config.status.  When coming back to configure, we
56491# need to make the FD available again.
56492if test "$no_create" != yes; then
56493  ac_cs_success=:
56494  ac_config_status_args=
56495  test "$silent" = yes &&
56496    ac_config_status_args="$ac_config_status_args --quiet"
56497  exec 5>/dev/null
56498  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56499  exec 5>>config.log
56500  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56501  # would make configure fail if this is the last instruction.
56502  $ac_cs_success || as_fn_exit 1
56503fi
56504if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56505  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56506$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56507fi
56508
56509
56510# After AC_OUTPUT, we need to do final work
56511
56512
56513  # Try to move config.log (generated by autoconf) to the configure-support directory.
56514  if test -e ./config.log; then
56515    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
56516  fi
56517
56518  # Rotate our log file (configure.log)
56519  if test -e "$OUTPUT_ROOT/configure.log.old"; then
56520    $RM -f "$OUTPUT_ROOT/configure.log.old"
56521  fi
56522  if test -e "$OUTPUT_ROOT/configure.log"; then
56523    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
56524  fi
56525
56526  # Move configure.log from current directory to the build output root
56527  if test -e ./configure.log; then
56528    echo found it
56529    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
56530  fi
56531
56532  # Make the compare script executable
56533  $CHMOD +x $OUTPUT_ROOT/compare.sh
56534
56535
56536# Finally output some useful information to the user
56537
56538  # Finally output some useful information to the user
56539
56540  printf "\n"
56541  printf "====================================================\n"
56542  if test "x$no_create" != "xyes"; then
56543    if test "x$IS_RECONFIGURE" != "xyes"; then
56544      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
56545    else
56546      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
56547    fi
56548  else
56549    if test "x$IS_RECONFIGURE" != "xyes"; then
56550      printf "A configuration has been successfully checked but not created\n"
56551    else
56552      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
56553    fi
56554  fi
56555  if test "x$CONFIGURE_COMMAND_LINE" != x; then
56556    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
56557  else
56558    printf "using default settings.\n"
56559  fi
56560
56561  printf "\n"
56562  printf "Configuration summary:\n"
56563  printf "* Debug level:    $DEBUG_LEVEL\n"
56564  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
56565  printf "* JDK variant:    $JDK_VARIANT\n"
56566  printf "* JVM variants:   $with_jvm_variants\n"
56567  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
56568
56569  printf "\n"
56570  printf "Tools summary:\n"
56571  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
56572    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
56573  fi
56574  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
56575  if test "x$TOOLCHAIN_VERSION" != "x"; then
56576    print_version=" $TOOLCHAIN_VERSION"
56577  fi
56578  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
56579  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
56580  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
56581
56582  printf "\n"
56583  printf "Build performance summary:\n"
56584  printf "* Cores to use:   $JOBS\n"
56585  printf "* Memory limit:   $MEMORY_SIZE MB\n"
56586  if test "x$CCACHE_STATUS" != "x"; then
56587    printf "* ccache status:  $CCACHE_STATUS\n"
56588  fi
56589  printf "\n"
56590
56591  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
56592    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
56593    printf "will result in longer build times.\n"
56594    printf "\n"
56595  fi
56596
56597  if test "x$FOUND_ALT_VARIABLES" != "x"; then
56598    printf "WARNING: You have old-style ALT_ environment variables set.\n"
56599    printf "These are not respected, and will be ignored. It is recommended\n"
56600    printf "that you clean your environment. The following variables are set:\n"
56601    printf "$FOUND_ALT_VARIABLES\n"
56602    printf "\n"
56603  fi
56604
56605  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
56606    printf "WARNING: Your build output directory is not on a local disk.\n"
56607    printf "This will severely degrade build performance!\n"
56608    printf "It is recommended that you create an output directory on a local disk,\n"
56609    printf "and run the configure script again from that directory.\n"
56610    printf "\n"
56611  fi
56612
56613  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
56614    printf "WARNING: The result of this configuration has overridden an older\n"
56615    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
56616    printf "proper build. Failure to do so might result in strange build problems.\n"
56617    printf "\n"
56618  fi
56619
56620  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
56621    printf "WARNING: The result of this configuration was not saved.\n"
56622    printf "You should run without '--no-create | -n' to create the configuration.\n"
56623    printf "\n"
56624  fi
56625
56626
56627
56628  # Locate config.log.
56629  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
56630    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
56631  elif test -e "./config.log"; then
56632    CONFIG_LOG_PATH="."
56633  fi
56634
56635  if test -e "$CONFIG_LOG_PATH/config.log"; then
56636    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
56637    if test $? -eq 0; then
56638      printf "The following warnings were produced. Repeated here for convenience:\n"
56639      # We must quote sed expression (using []) to stop m4 from eating the [].
56640      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
56641      printf "\n"
56642    fi
56643  fi
56644
56645