generated-configure.sh revision 1792:f069169dc66f
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649JOBS
650MEMORY_SIZE
651NUM_CORES
652ENABLE_INTREE_EC
653SALIB_NAME
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691ZIP_DEBUGINFO_FILES
692ENABLE_DEBUG_SYMBOLS
693CFLAGS_WARNINGS_ARE_ERRORS
694DISABLE_WARNING_PREFIX
695HOTSPOT_SET_WARNINGS_AS_ERRORS
696WARNINGS_AS_ERRORS
697COMPILER_SUPPORTS_TARGET_BITS_FLAG
698ZERO_ARCHFLAG
699LDFLAGS_TESTEXE
700LDFLAGS_TESTLIB
701LDFLAGS_CXX_JDK
702JDKEXE_LIBS
703JDKLIB_LIBS
704LDFLAGS_JDKEXE
705LDFLAGS_JDKLIB
706CXXFLAGS_TESTEXE
707CXXFLAGS_TESTLIB
708CFLAGS_TESTEXE
709CFLAGS_TESTLIB
710CXXFLAGS_JDKEXE
711CXXFLAGS_JDKLIB
712CFLAGS_JDKEXE
713CFLAGS_JDKLIB
714MACOSX_VERSION_MIN
715CXX_O_FLAG_NONE
716CXX_O_FLAG_DEBUG
717CXX_O_FLAG_NORM
718CXX_O_FLAG_HI
719CXX_O_FLAG_HIGHEST
720C_O_FLAG_NONE
721C_O_FLAG_DEBUG
722C_O_FLAG_NORM
723C_O_FLAG_HI
724C_O_FLAG_HIGHEST
725CXXFLAGS_DEBUG_SYMBOLS
726CFLAGS_DEBUG_SYMBOLS
727CXX_FLAG_DEPS
728C_FLAG_DEPS
729SET_SHARED_LIBRARY_MAPFILE
730SET_SHARED_LIBRARY_NAME
731SET_SHARED_LIBRARY_ORIGIN
732SET_EXECUTABLE_ORIGIN
733CXX_FLAG_REORDER
734C_FLAG_REORDER
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740STRIPFLAGS
741ARFLAGS
742COMPILER_TARGET_BITS_FLAG
743JT_HOME
744JTREGEXE
745USING_BROKEN_SUSE_LD
746PACKAGE_PATH
747USE_CLANG
748HOTSPOT_LD
749HOTSPOT_CXX
750HOTSPOT_RC
751HOTSPOT_MT
752BUILD_AS
753BUILD_LD
754BUILD_AR
755BUILD_NM
756BUILD_CXX
757BUILD_CC
758BUILD_SYSROOT_LDFLAGS
759BUILD_SYSROOT_CFLAGS
760ac_ct_OBJDUMP
761OBJDUMP
762ac_ct_OBJCOPY
763OBJCOPY
764ac_ct_NM
765ac_ct_STRIP
766GNM
767NM
768STRIP
769MSBUILD
770DUMPBIN
771RC
772MT
773LIPO
774ac_ct_AR
775AR
776AS
777LDCXX
778LD
779CXXCPP
780CPP
781ac_ct_CXX
782CXXFLAGS
783CXX
784ac_ct_PROPER_COMPILER_CXX
785PROPER_COMPILER_CXX
786TOOLCHAIN_PATH_CXX
787POTENTIAL_CXX
788OBJEXT
789EXEEXT
790ac_ct_CC
791CPPFLAGS
792LDFLAGS
793CFLAGS
794CC
795ac_ct_PROPER_COMPILER_CC
796PROPER_COMPILER_CC
797TOOLCHAIN_PATH_CC
798POTENTIAL_CC
799VS_LIB
800VS_INCLUDE
801VS_PATH
802CYGWIN_LINK
803SYSROOT_LDFLAGS
804SYSROOT_CFLAGS
805LEGACY_EXTRA_LDFLAGS
806LEGACY_EXTRA_CXXFLAGS
807LEGACY_EXTRA_CFLAGS
808EXE_SUFFIX
809OBJ_SUFFIX
810STATIC_LIBRARY
811SHARED_LIBRARY
812STATIC_LIBRARY_SUFFIX
813SHARED_LIBRARY_SUFFIX
814LIBRARY_PREFIX
815TOOLCHAIN_TYPE
816STATIC_BUILD
817BUILD_HOTSPOT
818HOTSPOT_DIST
819BUILD_OUTPUT
820JDK_TOPDIR
821NASHORN_TOPDIR
822HOTSPOT_TOPDIR
823JAXWS_TOPDIR
824JAXP_TOPDIR
825CORBA_TOPDIR
826LANGTOOLS_TOPDIR
827BOOT_JDK_BITS
828JAVAC_FLAGS
829BOOT_JDK_SOURCETARGET
830JARSIGNER
831JAR
832JAVAH
833JAVAC
834JAVA
835BOOT_JDK
836JAVA_CHECK
837JAVAC_CHECK
838COOKED_BUILD_NUMBER
839JDK_VERSION
840COPYRIGHT_YEAR
841MACOSX_BUNDLE_ID_BASE
842MACOSX_BUNDLE_NAME_BASE
843COMPANY_NAME
844JDK_RC_PLATFORM_NAME
845PRODUCT_SUFFIX
846PRODUCT_NAME
847LAUNCHER_NAME
848MILESTONE
849JDK_BUILD_NUMBER
850JDK_UPDATE_VERSION
851JDK_MICRO_VERSION
852JDK_MINOR_VERSION
853JDK_MAJOR_VERSION
854USER_RELEASE_SUFFIX
855COMPRESS_JARS
856UNLIMITED_CRYPTO
857CACERTS_FILE
858TEST_IN_BUILD
859BUILD_HEADLESS
860SUPPORT_HEADFUL
861SUPPORT_HEADLESS
862OS_VERSION_MICRO
863OS_VERSION_MINOR
864OS_VERSION_MAJOR
865PKG_CONFIG
866BASH_ARGS
867SETFILE
868CODESIGN
869XATTR
870DSYMUTIL
871IS_GNU_TIME
872PATCH
873TIME
874STAT
875HG
876READELF
877OTOOL
878LDD
879ZIP
880UNZIP
881FIND_DELETE
882OUTPUT_SYNC
883OUTPUT_SYNC_SUPPORTED
884CHECK_TOOLSDIR_MAKE
885CHECK_TOOLSDIR_GMAKE
886CHECK_MAKE
887CHECK_GMAKE
888MAKE
889PKGHANDLER
890CONFIGURESUPPORT_OUTPUTDIR
891OUTPUT_ROOT
892CONF_NAME
893SPEC
894SDKROOT
895XCODEBUILD
896BUILD_VARIANT_RELEASE
897DEBUG_CLASSFILES
898FASTDEBUG
899VARIANT
900DEBUG_LEVEL
901MACOSX_UNIVERSAL
902INCLUDE_SA
903JVM_VARIANT_CORE
904JVM_VARIANT_ZEROSHARK
905JVM_VARIANT_ZERO
906JVM_VARIANT_KERNEL
907JVM_VARIANT_MINIMAL1
908JVM_VARIANT_CLIENT
909JVM_VARIANT_SERVER
910JVM_VARIANTS
911JVM_INTERPRETER
912JDK_VARIANT
913SET_OPENJDK
914CANONICAL_TOPDIR
915ORIGINAL_TOPDIR
916TOPDIR
917PATH_SEP
918ZERO_ARCHDEF
919DEFINE_CROSS_COMPILE_ARCH
920LP64
921OPENJDK_TARGET_OS_EXPORT_DIR
922OPENJDK_TARGET_CPU_JLI_CFLAGS
923OPENJDK_TARGET_CPU_OSARCH
924OPENJDK_TARGET_CPU_ISADIR
925OPENJDK_TARGET_CPU_LIBDIR
926OPENJDK_TARGET_CPU_LEGACY_LIB
927OPENJDK_TARGET_CPU_LEGACY
928REQUIRED_OS_VERSION
929REQUIRED_OS_NAME
930COMPILE_TYPE
931OPENJDK_TARGET_CPU_ENDIAN
932OPENJDK_TARGET_CPU_BITS
933OPENJDK_TARGET_CPU_ARCH
934OPENJDK_TARGET_CPU
935OPENJDK_TARGET_OS_ENV
936OPENJDK_TARGET_OS_TYPE
937OPENJDK_TARGET_OS
938OPENJDK_BUILD_CPU_ENDIAN
939OPENJDK_BUILD_CPU_BITS
940OPENJDK_BUILD_CPU_ARCH
941OPENJDK_BUILD_CPU
942OPENJDK_BUILD_OS_ENV
943OPENJDK_BUILD_OS_TYPE
944OPENJDK_BUILD_OS
945OPENJDK_BUILD_AUTOCONF_NAME
946OPENJDK_TARGET_AUTOCONF_NAME
947target_os
948target_vendor
949target_cpu
950target
951host_os
952host_vendor
953host_cpu
954host
955build_os
956build_vendor
957build_cpu
958build
959NICE
960CPIO
961DF
962READLINK
963CYGPATH
964SED
965FGREP
966EGREP
967GREP
968AWK
969XARGS
970WHICH
971WC
972UNIQ
973UNAME
974TR
975TOUCH
976TEE
977TAR
978TAIL
979SORT
980SH
981RMDIR
982RM
983PRINTF
984NAWK
985MV
986MKTEMP
987MKDIR
988LS
989LN
990HEAD
991FIND
992FILE
993EXPR
994ECHO
995DIRNAME
996DIFF
997DATE
998CUT
999CP
1000COMM
1001CMP
1002CHMOD
1003CAT
1004BASH
1005BASENAME
1006DATE_WHEN_CONFIGURED
1007ORIGINAL_PATH
1008CONFIGURE_COMMAND_LINE
1009target_alias
1010host_alias
1011build_alias
1012LIBS
1013ECHO_T
1014ECHO_N
1015ECHO_C
1016DEFS
1017mandir
1018localedir
1019libdir
1020psdir
1021pdfdir
1022dvidir
1023htmldir
1024infodir
1025docdir
1026oldincludedir
1027includedir
1028localstatedir
1029sharedstatedir
1030sysconfdir
1031datadir
1032datarootdir
1033libexecdir
1034sbindir
1035bindir
1036program_transform_name
1037prefix
1038exec_prefix
1039PACKAGE_URL
1040PACKAGE_BUGREPORT
1041PACKAGE_STRING
1042PACKAGE_VERSION
1043PACKAGE_TARNAME
1044PACKAGE_NAME
1045PATH_SEPARATOR
1046SHELL'
1047ac_subst_files=''
1048ac_user_opts='
1049enable_option_checking
1050with_target_bits
1051enable_openjdk_only
1052with_custom_make_dir
1053with_jdk_variant
1054with_jvm_interpreter
1055with_jvm_variants
1056enable_debug
1057with_debug_level
1058with_devkit
1059with_sys_root
1060with_sysroot
1061with_tools_dir
1062with_toolchain_path
1063with_extra_path
1064with_sdk_name
1065with_conf_name
1066with_output_sync
1067enable_headful
1068enable_hotspot_test_in_build
1069with_cacerts_file
1070enable_unlimited_crypto
1071with_milestone
1072with_update_version
1073with_user_release_suffix
1074with_build_number
1075with_copyright_year
1076with_boot_jdk
1077with_add_source_root
1078with_override_source_root
1079with_adds_and_overrides
1080with_override_langtools
1081with_override_corba
1082with_override_jaxp
1083with_override_jaxws
1084with_override_hotspot
1085with_override_nashorn
1086with_override_jdk
1087with_import_hotspot
1088enable_static_build
1089with_toolchain_type
1090with_extra_cflags
1091with_extra_cxxflags
1092with_extra_ldflags
1093with_toolchain_version
1094with_build_devkit
1095with_jtreg
1096enable_warnings_as_errors
1097enable_debug_symbols
1098enable_zip_debug_info
1099enable_native_coverage
1100with_stdc__lib
1101with_msvcr_dll
1102with_msvcp_dll
1103with_x
1104with_cups
1105with_cups_include
1106with_freetype
1107with_freetype_include
1108with_freetype_lib
1109with_freetype_src
1110enable_freetype_bundling
1111with_alsa
1112with_alsa_include
1113with_alsa_lib
1114with_libffi
1115with_libffi_include
1116with_libffi_lib
1117with_libjpeg
1118with_giflib
1119with_libpng
1120with_zlib
1121with_lcms
1122with_dxsdk
1123with_dxsdk_lib
1124with_dxsdk_include
1125with_num_cores
1126with_memory_size
1127with_jobs
1128with_boot_jdk_jvmargs
1129with_sjavac_server_java
1130enable_sjavac
1131enable_javac_server
1132enable_icecc
1133enable_precompiled_headers
1134enable_ccache
1135with_ccache_dir
1136'
1137      ac_precious_vars='build_alias
1138host_alias
1139target_alias
1140BASENAME
1141BASH
1142CAT
1143CHMOD
1144CMP
1145COMM
1146CP
1147CUT
1148DATE
1149DIFF
1150DIRNAME
1151ECHO
1152EXPR
1153FILE
1154FIND
1155HEAD
1156LN
1157LS
1158MKDIR
1159MKTEMP
1160MV
1161NAWK
1162PRINTF
1163RM
1164RMDIR
1165SH
1166SORT
1167TAIL
1168TAR
1169TEE
1170TOUCH
1171TR
1172UNAME
1173UNIQ
1174WC
1175WHICH
1176XARGS
1177AWK
1178GREP
1179EGREP
1180FGREP
1181SED
1182CYGPATH
1183READLINK
1184DF
1185CPIO
1186NICE
1187MAKE
1188UNZIP
1189ZIP
1190LDD
1191OTOOL
1192READELF
1193HG
1194STAT
1195TIME
1196PATCH
1197DSYMUTIL
1198XATTR
1199CODESIGN
1200SETFILE
1201PKG_CONFIG
1202JAVA
1203JAVAC
1204JAVAH
1205JAR
1206JARSIGNER
1207CC
1208CFLAGS
1209LDFLAGS
1210LIBS
1211CPPFLAGS
1212CXX
1213CXXFLAGS
1214CCC
1215CPP
1216CXXCPP
1217AS
1218AR
1219LIPO
1220STRIP
1221NM
1222GNM
1223OBJCOPY
1224OBJDUMP
1225BUILD_CC
1226BUILD_CXX
1227BUILD_NM
1228BUILD_AR
1229JTREGEXE
1230XMKMF
1231FREETYPE_CFLAGS
1232FREETYPE_LIBS
1233ALSA_CFLAGS
1234ALSA_LIBS
1235LIBFFI_CFLAGS
1236LIBFFI_LIBS
1237PNG_CFLAGS
1238PNG_LIBS
1239LCMS_CFLAGS
1240LCMS_LIBS
1241ICECC_CMD
1242ICECC_CREATE_ENV
1243ICECC_WRAPPER
1244CCACHE'
1245
1246
1247# Initialize some variables set by options.
1248ac_init_help=
1249ac_init_version=false
1250ac_unrecognized_opts=
1251ac_unrecognized_sep=
1252# The variables have the same names as the options, with
1253# dashes changed to underlines.
1254cache_file=/dev/null
1255exec_prefix=NONE
1256no_create=
1257no_recursion=
1258prefix=NONE
1259program_prefix=NONE
1260program_suffix=NONE
1261program_transform_name=s,x,x,
1262silent=
1263site=
1264srcdir=
1265verbose=
1266x_includes=NONE
1267x_libraries=NONE
1268
1269# Installation directory options.
1270# These are left unexpanded so users can "make install exec_prefix=/foo"
1271# and all the variables that are supposed to be based on exec_prefix
1272# by default will actually change.
1273# Use braces instead of parens because sh, perl, etc. also accept them.
1274# (The list follows the same order as the GNU Coding Standards.)
1275bindir='${exec_prefix}/bin'
1276sbindir='${exec_prefix}/sbin'
1277libexecdir='${exec_prefix}/libexec'
1278datarootdir='${prefix}/share'
1279datadir='${datarootdir}'
1280sysconfdir='${prefix}/etc'
1281sharedstatedir='${prefix}/com'
1282localstatedir='${prefix}/var'
1283includedir='${prefix}/include'
1284oldincludedir='/usr/include'
1285docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1286infodir='${datarootdir}/info'
1287htmldir='${docdir}'
1288dvidir='${docdir}'
1289pdfdir='${docdir}'
1290psdir='${docdir}'
1291libdir='${exec_prefix}/lib'
1292localedir='${datarootdir}/locale'
1293mandir='${datarootdir}/man'
1294
1295ac_prev=
1296ac_dashdash=
1297for ac_option
1298do
1299  # If the previous option needs an argument, assign it.
1300  if test -n "$ac_prev"; then
1301    eval $ac_prev=\$ac_option
1302    ac_prev=
1303    continue
1304  fi
1305
1306  case $ac_option in
1307  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1308  *=)   ac_optarg= ;;
1309  *)    ac_optarg=yes ;;
1310  esac
1311
1312  # Accept the important Cygnus configure options, so we can diagnose typos.
1313
1314  case $ac_dashdash$ac_option in
1315  --)
1316    ac_dashdash=yes ;;
1317
1318  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1319    ac_prev=bindir ;;
1320  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1321    bindir=$ac_optarg ;;
1322
1323  -build | --build | --buil | --bui | --bu)
1324    ac_prev=build_alias ;;
1325  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1326    build_alias=$ac_optarg ;;
1327
1328  -cache-file | --cache-file | --cache-fil | --cache-fi \
1329  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1330    ac_prev=cache_file ;;
1331  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1332  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1333    cache_file=$ac_optarg ;;
1334
1335  --config-cache | -C)
1336    cache_file=config.cache ;;
1337
1338  -datadir | --datadir | --datadi | --datad)
1339    ac_prev=datadir ;;
1340  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1341    datadir=$ac_optarg ;;
1342
1343  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1344  | --dataroo | --dataro | --datar)
1345    ac_prev=datarootdir ;;
1346  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1347  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1348    datarootdir=$ac_optarg ;;
1349
1350  -disable-* | --disable-*)
1351    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1352    # Reject names that are not valid shell variable names.
1353    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1354      as_fn_error $? "invalid feature name: $ac_useropt"
1355    ac_useropt_orig=$ac_useropt
1356    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1357    case $ac_user_opts in
1358      *"
1359"enable_$ac_useropt"
1360"*) ;;
1361      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1362	 ac_unrecognized_sep=', ';;
1363    esac
1364    eval enable_$ac_useropt=no ;;
1365
1366  -docdir | --docdir | --docdi | --doc | --do)
1367    ac_prev=docdir ;;
1368  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1369    docdir=$ac_optarg ;;
1370
1371  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1372    ac_prev=dvidir ;;
1373  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1374    dvidir=$ac_optarg ;;
1375
1376  -enable-* | --enable-*)
1377    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1378    # Reject names that are not valid shell variable names.
1379    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1380      as_fn_error $? "invalid feature name: $ac_useropt"
1381    ac_useropt_orig=$ac_useropt
1382    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1383    case $ac_user_opts in
1384      *"
1385"enable_$ac_useropt"
1386"*) ;;
1387      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1388	 ac_unrecognized_sep=', ';;
1389    esac
1390    eval enable_$ac_useropt=\$ac_optarg ;;
1391
1392  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1393  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1394  | --exec | --exe | --ex)
1395    ac_prev=exec_prefix ;;
1396  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1397  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1398  | --exec=* | --exe=* | --ex=*)
1399    exec_prefix=$ac_optarg ;;
1400
1401  -gas | --gas | --ga | --g)
1402    # Obsolete; use --with-gas.
1403    with_gas=yes ;;
1404
1405  -help | --help | --hel | --he | -h)
1406    ac_init_help=long ;;
1407  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1408    ac_init_help=recursive ;;
1409  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1410    ac_init_help=short ;;
1411
1412  -host | --host | --hos | --ho)
1413    ac_prev=host_alias ;;
1414  -host=* | --host=* | --hos=* | --ho=*)
1415    host_alias=$ac_optarg ;;
1416
1417  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1418    ac_prev=htmldir ;;
1419  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1420  | --ht=*)
1421    htmldir=$ac_optarg ;;
1422
1423  -includedir | --includedir | --includedi | --included | --include \
1424  | --includ | --inclu | --incl | --inc)
1425    ac_prev=includedir ;;
1426  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1427  | --includ=* | --inclu=* | --incl=* | --inc=*)
1428    includedir=$ac_optarg ;;
1429
1430  -infodir | --infodir | --infodi | --infod | --info | --inf)
1431    ac_prev=infodir ;;
1432  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1433    infodir=$ac_optarg ;;
1434
1435  -libdir | --libdir | --libdi | --libd)
1436    ac_prev=libdir ;;
1437  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1438    libdir=$ac_optarg ;;
1439
1440  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1441  | --libexe | --libex | --libe)
1442    ac_prev=libexecdir ;;
1443  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1444  | --libexe=* | --libex=* | --libe=*)
1445    libexecdir=$ac_optarg ;;
1446
1447  -localedir | --localedir | --localedi | --localed | --locale)
1448    ac_prev=localedir ;;
1449  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1450    localedir=$ac_optarg ;;
1451
1452  -localstatedir | --localstatedir | --localstatedi | --localstated \
1453  | --localstate | --localstat | --localsta | --localst | --locals)
1454    ac_prev=localstatedir ;;
1455  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1456  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1457    localstatedir=$ac_optarg ;;
1458
1459  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1460    ac_prev=mandir ;;
1461  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1462    mandir=$ac_optarg ;;
1463
1464  -nfp | --nfp | --nf)
1465    # Obsolete; use --without-fp.
1466    with_fp=no ;;
1467
1468  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1469  | --no-cr | --no-c | -n)
1470    no_create=yes ;;
1471
1472  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1473  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1474    no_recursion=yes ;;
1475
1476  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1477  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1478  | --oldin | --oldi | --old | --ol | --o)
1479    ac_prev=oldincludedir ;;
1480  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1481  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1482  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1483    oldincludedir=$ac_optarg ;;
1484
1485  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1486    ac_prev=prefix ;;
1487  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1488    prefix=$ac_optarg ;;
1489
1490  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1491  | --program-pre | --program-pr | --program-p)
1492    ac_prev=program_prefix ;;
1493  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1494  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1495    program_prefix=$ac_optarg ;;
1496
1497  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1498  | --program-suf | --program-su | --program-s)
1499    ac_prev=program_suffix ;;
1500  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1501  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1502    program_suffix=$ac_optarg ;;
1503
1504  -program-transform-name | --program-transform-name \
1505  | --program-transform-nam | --program-transform-na \
1506  | --program-transform-n | --program-transform- \
1507  | --program-transform | --program-transfor \
1508  | --program-transfo | --program-transf \
1509  | --program-trans | --program-tran \
1510  | --progr-tra | --program-tr | --program-t)
1511    ac_prev=program_transform_name ;;
1512  -program-transform-name=* | --program-transform-name=* \
1513  | --program-transform-nam=* | --program-transform-na=* \
1514  | --program-transform-n=* | --program-transform-=* \
1515  | --program-transform=* | --program-transfor=* \
1516  | --program-transfo=* | --program-transf=* \
1517  | --program-trans=* | --program-tran=* \
1518  | --progr-tra=* | --program-tr=* | --program-t=*)
1519    program_transform_name=$ac_optarg ;;
1520
1521  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1522    ac_prev=pdfdir ;;
1523  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1524    pdfdir=$ac_optarg ;;
1525
1526  -psdir | --psdir | --psdi | --psd | --ps)
1527    ac_prev=psdir ;;
1528  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1529    psdir=$ac_optarg ;;
1530
1531  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1532  | -silent | --silent | --silen | --sile | --sil)
1533    silent=yes ;;
1534
1535  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1536    ac_prev=sbindir ;;
1537  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1538  | --sbi=* | --sb=*)
1539    sbindir=$ac_optarg ;;
1540
1541  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1542  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1543  | --sharedst | --shareds | --shared | --share | --shar \
1544  | --sha | --sh)
1545    ac_prev=sharedstatedir ;;
1546  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1547  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1548  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1549  | --sha=* | --sh=*)
1550    sharedstatedir=$ac_optarg ;;
1551
1552  -site | --site | --sit)
1553    ac_prev=site ;;
1554  -site=* | --site=* | --sit=*)
1555    site=$ac_optarg ;;
1556
1557  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1558    ac_prev=srcdir ;;
1559  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1560    srcdir=$ac_optarg ;;
1561
1562  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1563  | --syscon | --sysco | --sysc | --sys | --sy)
1564    ac_prev=sysconfdir ;;
1565  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1566  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1567    sysconfdir=$ac_optarg ;;
1568
1569  -target | --target | --targe | --targ | --tar | --ta | --t)
1570    ac_prev=target_alias ;;
1571  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1572    target_alias=$ac_optarg ;;
1573
1574  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1575    verbose=yes ;;
1576
1577  -version | --version | --versio | --versi | --vers | -V)
1578    ac_init_version=: ;;
1579
1580  -with-* | --with-*)
1581    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1582    # Reject names that are not valid shell variable names.
1583    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1584      as_fn_error $? "invalid package name: $ac_useropt"
1585    ac_useropt_orig=$ac_useropt
1586    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1587    case $ac_user_opts in
1588      *"
1589"with_$ac_useropt"
1590"*) ;;
1591      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1592	 ac_unrecognized_sep=', ';;
1593    esac
1594    eval with_$ac_useropt=\$ac_optarg ;;
1595
1596  -without-* | --without-*)
1597    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1598    # Reject names that are not valid shell variable names.
1599    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1600      as_fn_error $? "invalid package name: $ac_useropt"
1601    ac_useropt_orig=$ac_useropt
1602    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1603    case $ac_user_opts in
1604      *"
1605"with_$ac_useropt"
1606"*) ;;
1607      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1608	 ac_unrecognized_sep=', ';;
1609    esac
1610    eval with_$ac_useropt=no ;;
1611
1612  --x)
1613    # Obsolete; use --with-x.
1614    with_x=yes ;;
1615
1616  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1617  | --x-incl | --x-inc | --x-in | --x-i)
1618    ac_prev=x_includes ;;
1619  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1620  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1621    x_includes=$ac_optarg ;;
1622
1623  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1624  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1625    ac_prev=x_libraries ;;
1626  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1627  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1628    x_libraries=$ac_optarg ;;
1629
1630  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1631Try \`$0 --help' for more information"
1632    ;;
1633
1634  *=*)
1635    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1636    # Reject names that are not valid shell variable names.
1637    case $ac_envvar in #(
1638      '' | [0-9]* | *[!_$as_cr_alnum]* )
1639      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1640    esac
1641    eval $ac_envvar=\$ac_optarg
1642    export $ac_envvar ;;
1643
1644  *)
1645    # FIXME: should be removed in autoconf 3.0.
1646    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1647    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1648      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1649    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1650    ;;
1651
1652  esac
1653done
1654
1655if test -n "$ac_prev"; then
1656  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1657  as_fn_error $? "missing argument to $ac_option"
1658fi
1659
1660if test -n "$ac_unrecognized_opts"; then
1661  case $enable_option_checking in
1662    no) ;;
1663    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1664    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1665  esac
1666fi
1667
1668# Check all directory arguments for consistency.
1669for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1670		datadir sysconfdir sharedstatedir localstatedir includedir \
1671		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1672		libdir localedir mandir
1673do
1674  eval ac_val=\$$ac_var
1675  # Remove trailing slashes.
1676  case $ac_val in
1677    */ )
1678      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1679      eval $ac_var=\$ac_val;;
1680  esac
1681  # Be sure to have absolute directory names.
1682  case $ac_val in
1683    [\\/$]* | ?:[\\/]* )  continue;;
1684    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1685  esac
1686  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1687done
1688
1689# There might be people who depend on the old broken behavior: `$host'
1690# used to hold the argument of --host etc.
1691# FIXME: To remove some day.
1692build=$build_alias
1693host=$host_alias
1694target=$target_alias
1695
1696# FIXME: To remove some day.
1697if test "x$host_alias" != x; then
1698  if test "x$build_alias" = x; then
1699    cross_compiling=maybe
1700  elif test "x$build_alias" != "x$host_alias"; then
1701    cross_compiling=yes
1702  fi
1703fi
1704
1705ac_tool_prefix=
1706test -n "$host_alias" && ac_tool_prefix=$host_alias-
1707
1708test "$silent" = yes && exec 6>/dev/null
1709
1710
1711ac_pwd=`pwd` && test -n "$ac_pwd" &&
1712ac_ls_di=`ls -di .` &&
1713ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1714  as_fn_error $? "working directory cannot be determined"
1715test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1716  as_fn_error $? "pwd does not report name of working directory"
1717
1718
1719# Find the source files, if location was not specified.
1720if test -z "$srcdir"; then
1721  ac_srcdir_defaulted=yes
1722  # Try the directory containing this script, then the parent directory.
1723  ac_confdir=`$as_dirname -- "$as_myself" ||
1724$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1725	 X"$as_myself" : 'X\(//\)[^/]' \| \
1726	 X"$as_myself" : 'X\(//\)$' \| \
1727	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1728$as_echo X"$as_myself" |
1729    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1730	    s//\1/
1731	    q
1732	  }
1733	  /^X\(\/\/\)[^/].*/{
1734	    s//\1/
1735	    q
1736	  }
1737	  /^X\(\/\/\)$/{
1738	    s//\1/
1739	    q
1740	  }
1741	  /^X\(\/\).*/{
1742	    s//\1/
1743	    q
1744	  }
1745	  s/.*/./; q'`
1746  srcdir=$ac_confdir
1747  if test ! -r "$srcdir/$ac_unique_file"; then
1748    srcdir=..
1749  fi
1750else
1751  ac_srcdir_defaulted=no
1752fi
1753if test ! -r "$srcdir/$ac_unique_file"; then
1754  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1755  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1756fi
1757ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1758ac_abs_confdir=`(
1759	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1760	pwd)`
1761# When building in place, set srcdir=.
1762if test "$ac_abs_confdir" = "$ac_pwd"; then
1763  srcdir=.
1764fi
1765# Remove unnecessary trailing slashes from srcdir.
1766# Double slashes in file names in object file debugging info
1767# mess up M-x gdb in Emacs.
1768case $srcdir in
1769*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1770esac
1771for ac_var in $ac_precious_vars; do
1772  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1773  eval ac_env_${ac_var}_value=\$${ac_var}
1774  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1775  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1776done
1777
1778#
1779# Report the --help message.
1780#
1781if test "$ac_init_help" = "long"; then
1782  # Omit some internal or obsolete options to make the list less imposing.
1783  # This message is too long to be a string in the A/UX 3.1 sh.
1784  cat <<_ACEOF
1785\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1786
1787Usage: $0 [OPTION]... [VAR=VALUE]...
1788
1789To assign environment variables (e.g., CC, CFLAGS...), specify them as
1790VAR=VALUE.  See below for descriptions of some of the useful variables.
1791
1792Defaults for the options are specified in brackets.
1793
1794Configuration:
1795  -h, --help              display this help and exit
1796      --help=short        display options specific to this package
1797      --help=recursive    display the short help of all the included packages
1798  -V, --version           display version information and exit
1799  -q, --quiet, --silent   do not print \`checking ...' messages
1800      --cache-file=FILE   cache test results in FILE [disabled]
1801  -C, --config-cache      alias for \`--cache-file=config.cache'
1802  -n, --no-create         do not create output files
1803      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1804
1805Installation directories:
1806  --prefix=PREFIX         install architecture-independent files in PREFIX
1807                          [$ac_default_prefix]
1808  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1809                          [PREFIX]
1810
1811By default, \`make install' will install all the files in
1812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1814for instance \`--prefix=\$HOME'.
1815
1816For better control, use the options below.
1817
1818Fine tuning of the installation directories:
1819  --bindir=DIR            user executables [EPREFIX/bin]
1820  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1821  --libexecdir=DIR        program executables [EPREFIX/libexec]
1822  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1823  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1824  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1825  --libdir=DIR            object code libraries [EPREFIX/lib]
1826  --includedir=DIR        C header files [PREFIX/include]
1827  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1828  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1829  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1830  --infodir=DIR           info documentation [DATAROOTDIR/info]
1831  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1832  --mandir=DIR            man documentation [DATAROOTDIR/man]
1833  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1834  --htmldir=DIR           html documentation [DOCDIR]
1835  --dvidir=DIR            dvi documentation [DOCDIR]
1836  --pdfdir=DIR            pdf documentation [DOCDIR]
1837  --psdir=DIR             ps documentation [DOCDIR]
1838_ACEOF
1839
1840  cat <<\_ACEOF
1841
1842X features:
1843  --x-includes=DIR    X include files are in DIR
1844  --x-libraries=DIR   X library files are in DIR
1845
1846System types:
1847  --build=BUILD     configure for building on BUILD [guessed]
1848  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1849  --target=TARGET   configure for building compilers for TARGET [HOST]
1850_ACEOF
1851fi
1852
1853if test -n "$ac_init_help"; then
1854  case $ac_init_help in
1855     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1856   esac
1857  cat <<\_ACEOF
1858
1859Optional Features:
1860  --disable-option-checking  ignore unrecognized --enable/--with options
1861  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1862  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1863  --enable-openjdk-only   suppress building custom source even if present
1864                          [disabled]
1865  --enable-debug          set the debug level to fastdebug (shorthand for
1866                          --with-debug-level=fastdebug) [disabled]
1867  --disable-headful       disable building headful support (graphical UI
1868                          support) [enabled]
1869  --enable-hotspot-test-in-build
1870                          run the Queens test after Hotspot build [disabled]
1871  --enable-unlimited-crypto
1872                          Enable unlimited crypto policy [disabled]
1873  --enable-static-build   enable static library build [disabled]
1874  --disable-warnings-as-errors
1875                          do not consider native warnings to be an error
1876                          [enabled]
1877  --disable-debug-symbols disable generation of debug symbols [enabled]
1878  --disable-zip-debug-info
1879                          disable zipping of debug-info files [enabled]
1880  --enable-native-coverage
1881                          enable native compilation with code coverage
1882                          data[disabled]
1883  --disable-freetype-bundling
1884                          disable bundling of the freetype library with the
1885                          build result [enabled on Windows or when using
1886                          --with-freetype, disabled otherwise]
1887  --enable-sjavac         use sjavac to do fast incremental compiles
1888                          [disabled]
1889  --disable-javac-server  disable javac server [enabled]
1890  --enable-icecc          enable distribted compilation of native code using
1891                          icecc/icecream [disabled]
1892  --disable-precompiled-headers
1893                          disable using precompiled headers when compiling C++
1894                          [enabled]
1895  --enable-ccache         enable using ccache to speed up recompilations
1896                          [disabled]
1897
1898Optional Packages:
1899  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1900  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1901  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1902                          support it), e.g. --with-target-bits=32 [guessed]
1903  --with-custom-make-dir  Deprecated. Option is kept for backwards
1904                          compatibility and is ignored
1905  --with-jdk-variant      JDK variant to build (normal) [normal]
1906  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1907  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1908                          client, minimal1, kernel, zero, zeroshark, core)
1909                          [server]
1910  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1911                          optimized (HotSpot build only)) [release]
1912  --with-devkit           use this devkit for compilers, tools and resources
1913  --with-sys-root         alias for --with-sysroot for backwards compatability
1914  --with-sysroot          use this directory as sysroot
1915  --with-tools-dir        alias for --with-toolchain-path for backwards
1916                          compatibility
1917  --with-toolchain-path   prepend these directories when searching for
1918                          toolchain binaries (compilers etc)
1919  --with-extra-path       prepend these directories to the default path
1920  --with-sdk-name         use the platform SDK of the given name. [macosx]
1921  --with-conf-name        use this as the name of the configuration [generated
1922                          from important configuration options]
1923  --with-output-sync      set make output sync type if supported by make.
1924                          [recurse]
1925  --with-cacerts-file     specify alternative cacerts file
1926  --with-milestone        Set milestone value for build [internal]
1927  --with-update-version   Set update version value for build [b00]
1928  --with-user-release-suffix
1929                          Add a custom string to the version string if build
1930                          number is not set.[username_builddateb00]
1931  --with-build-number     Set build number value for build [b00]
1932  --with-copyright-year   Set copyright year value for build [current year]
1933  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1934  --with-add-source-root  Deprecated. Option is kept for backwards
1935                          compatibility and is ignored
1936  --with-override-source-root
1937                          Deprecated. Option is kept for backwards
1938                          compatibility and is ignored
1939  --with-adds-and-overrides
1940                          Deprecated. Option is kept for backwards
1941                          compatibility and is ignored
1942  --with-override-langtools
1943                          Deprecated. Option is kept for backwards
1944                          compatibility and is ignored
1945  --with-override-corba   Deprecated. Option is kept for backwards
1946                          compatibility and is ignored
1947  --with-override-jaxp    Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-override-jaxws   Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-override-hotspot Deprecated. Option is kept for backwards
1952                          compatibility and is ignored
1953  --with-override-nashorn Deprecated. Option is kept for backwards
1954                          compatibility and is ignored
1955  --with-override-jdk     Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-import-hotspot   import hotspot binaries from this jdk image or
1958                          hotspot build dist dir instead of building from
1959                          source
1960  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1961                          to show possible values [platform dependent]
1962  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1963  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1964  --with-extra-ldflags    extra flags to be used when linking jdk
1965  --with-toolchain-version
1966                          the version of the toolchain to look for, use
1967                          '--help' to show possible values [platform
1968                          dependent]
1969  --with-build-devkit     Devkit to use for the build platform toolchain
1970  --with-jtreg            Regression Test Harness [probed]
1971  --with-stdc++lib=<static>,<dynamic>,<default>
1972                          force linking of the C++ runtime on Linux to either
1973                          static or dynamic, default is static with dynamic as
1974                          fallback
1975  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1976                          (Windows only) [probed]
1977  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1978                          (Windows only) [probed]
1979  --with-x                use the X Window System
1980  --with-cups             specify prefix directory for the cups package
1981                          (expecting the headers under PATH/include)
1982  --with-cups-include     specify directory for the cups include files
1983  --with-freetype         specify prefix directory for the freetype package
1984                          (expecting the libraries under PATH/lib and the
1985                          headers under PATH/include)
1986  --with-freetype-include specify directory for the freetype include files
1987  --with-freetype-lib     specify directory for the freetype library
1988  --with-freetype-src     specify directory with freetype sources to
1989                          automatically build the library (experimental,
1990                          Windows-only)
1991  --with-alsa             specify prefix directory for the alsa package
1992                          (expecting the libraries under PATH/lib and the
1993                          headers under PATH/include)
1994  --with-alsa-include     specify directory for the alsa include files
1995  --with-alsa-lib         specify directory for the alsa library
1996  --with-libffi           specify prefix directory for the libffi package
1997                          (expecting the libraries under PATH/lib and the
1998                          headers under PATH/include)
1999  --with-libffi-include   specify directory for the libffi include files
2000  --with-libffi-lib       specify directory for the libffi library
2001  --with-libjpeg          use libjpeg from build system or OpenJDK source
2002                          (system, bundled) [bundled]
2003  --with-giflib           use giflib from build system or OpenJDK source
2004                          (system, bundled) [bundled]
2005  --with-libpng           use libpng from build system or OpenJDK source
2006                          (system, bundled) [bundled]
2007  --with-zlib             use zlib from build system or OpenJDK source
2008                          (system, bundled) [bundled]
2009  --with-lcms             use lcms2 from build system or OpenJDK source
2010                          (system, bundled) [bundled]
2011  --with-dxsdk            Deprecated. Option is kept for backwards
2012                          compatibility and is ignored
2013  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2014                          compatibility and is ignored
2015  --with-dxsdk-include    Deprecated. Option is kept for backwards
2016                          compatibility and is ignored
2017  --with-num-cores        number of cores in the build system, e.g.
2018                          --with-num-cores=8 [probed]
2019  --with-memory-size      memory (in MB) available in the build system, e.g.
2020                          --with-memory-size=1024 [probed]
2021  --with-jobs             number of parallel jobs to let make run [calculated
2022                          based on cores and memory]
2023  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2024                          invocations of boot JDK, overriding the default
2025                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2026                          -enableassertions"
2027  --with-sjavac-server-java
2028                          use this java binary for running the sjavac
2029                          background server [Boot JDK java]
2030  --with-ccache-dir       where to store ccache files [~/.ccache]
2031
2032Some influential environment variables:
2033  BASENAME    Override default value for BASENAME
2034  BASH        Override default value for BASH
2035  CAT         Override default value for CAT
2036  CHMOD       Override default value for CHMOD
2037  CMP         Override default value for CMP
2038  COMM        Override default value for COMM
2039  CP          Override default value for CP
2040  CUT         Override default value for CUT
2041  DATE        Override default value for DATE
2042  DIFF        Override default value for DIFF
2043  DIRNAME     Override default value for DIRNAME
2044  ECHO        Override default value for ECHO
2045  EXPR        Override default value for EXPR
2046  FILE        Override default value for FILE
2047  FIND        Override default value for FIND
2048  HEAD        Override default value for HEAD
2049  LN          Override default value for LN
2050  LS          Override default value for LS
2051  MKDIR       Override default value for MKDIR
2052  MKTEMP      Override default value for MKTEMP
2053  MV          Override default value for MV
2054  NAWK        Override default value for NAWK
2055  PRINTF      Override default value for PRINTF
2056  RM          Override default value for RM
2057  RMDIR       Override default value for RMDIR
2058  SH          Override default value for SH
2059  SORT        Override default value for SORT
2060  TAIL        Override default value for TAIL
2061  TAR         Override default value for TAR
2062  TEE         Override default value for TEE
2063  TOUCH       Override default value for TOUCH
2064  TR          Override default value for TR
2065  UNAME       Override default value for UNAME
2066  UNIQ        Override default value for UNIQ
2067  WC          Override default value for WC
2068  WHICH       Override default value for WHICH
2069  XARGS       Override default value for XARGS
2070  AWK         Override default value for AWK
2071  GREP        Override default value for GREP
2072  EGREP       Override default value for EGREP
2073  FGREP       Override default value for FGREP
2074  SED         Override default value for SED
2075  CYGPATH     Override default value for CYGPATH
2076  READLINK    Override default value for READLINK
2077  DF          Override default value for DF
2078  CPIO        Override default value for CPIO
2079  NICE        Override default value for NICE
2080  MAKE        Override default value for MAKE
2081  UNZIP       Override default value for UNZIP
2082  ZIP         Override default value for ZIP
2083  LDD         Override default value for LDD
2084  OTOOL       Override default value for OTOOL
2085  READELF     Override default value for READELF
2086  HG          Override default value for HG
2087  STAT        Override default value for STAT
2088  TIME        Override default value for TIME
2089  PATCH       Override default value for PATCH
2090  DSYMUTIL    Override default value for DSYMUTIL
2091  XATTR       Override default value for XATTR
2092  CODESIGN    Override default value for CODESIGN
2093  SETFILE     Override default value for SETFILE
2094  PKG_CONFIG  path to pkg-config utility
2095  JAVA        Override default value for JAVA
2096  JAVAC       Override default value for JAVAC
2097  JAVAH       Override default value for JAVAH
2098  JAR         Override default value for JAR
2099  JARSIGNER   Override default value for JARSIGNER
2100  CC          C compiler command
2101  CFLAGS      C compiler flags
2102  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2103              nonstandard directory <lib dir>
2104  LIBS        libraries to pass to the linker, e.g. -l<library>
2105  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2106              you have headers in a nonstandard directory <include dir>
2107  CXX         C++ compiler command
2108  CXXFLAGS    C++ compiler flags
2109  CPP         C preprocessor
2110  CXXCPP      C++ preprocessor
2111  AS          Override default value for AS
2112  AR          Override default value for AR
2113  LIPO        Override default value for LIPO
2114  STRIP       Override default value for STRIP
2115  NM          Override default value for NM
2116  GNM         Override default value for GNM
2117  OBJCOPY     Override default value for OBJCOPY
2118  OBJDUMP     Override default value for OBJDUMP
2119  BUILD_CC    Override default value for BUILD_CC
2120  BUILD_CXX   Override default value for BUILD_CXX
2121  BUILD_NM    Override default value for BUILD_NM
2122  BUILD_AR    Override default value for BUILD_AR
2123  JTREGEXE    Override default value for JTREGEXE
2124  XMKMF       Path to xmkmf, Makefile generator for X Window System
2125  FREETYPE_CFLAGS
2126              C compiler flags for FREETYPE, overriding pkg-config
2127  FREETYPE_LIBS
2128              linker flags for FREETYPE, overriding pkg-config
2129  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2130  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2131  LIBFFI_CFLAGS
2132              C compiler flags for LIBFFI, overriding pkg-config
2133  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2134  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2135  PNG_LIBS    linker flags for PNG, overriding pkg-config
2136  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2137  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2138  ICECC_CMD   Override default value for ICECC_CMD
2139  ICECC_CREATE_ENV
2140              Override default value for ICECC_CREATE_ENV
2141  ICECC_WRAPPER
2142              Override default value for ICECC_WRAPPER
2143  CCACHE      Override default value for CCACHE
2144
2145Use these variables to override the choices made by `configure' or to help
2146it to find libraries and programs with nonstandard names/locations.
2147
2148Report bugs to <build-dev@openjdk.java.net>.
2149OpenJDK home page: <http://openjdk.java.net>.
2150_ACEOF
2151ac_status=$?
2152fi
2153
2154if test "$ac_init_help" = "recursive"; then
2155  # If there are subdirs, report their specific --help.
2156  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2157    test -d "$ac_dir" ||
2158      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2159      continue
2160    ac_builddir=.
2161
2162case "$ac_dir" in
2163.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2164*)
2165  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2166  # A ".." for each directory in $ac_dir_suffix.
2167  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2168  case $ac_top_builddir_sub in
2169  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2170  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2171  esac ;;
2172esac
2173ac_abs_top_builddir=$ac_pwd
2174ac_abs_builddir=$ac_pwd$ac_dir_suffix
2175# for backward compatibility:
2176ac_top_builddir=$ac_top_build_prefix
2177
2178case $srcdir in
2179  .)  # We are building in place.
2180    ac_srcdir=.
2181    ac_top_srcdir=$ac_top_builddir_sub
2182    ac_abs_top_srcdir=$ac_pwd ;;
2183  [\\/]* | ?:[\\/]* )  # Absolute name.
2184    ac_srcdir=$srcdir$ac_dir_suffix;
2185    ac_top_srcdir=$srcdir
2186    ac_abs_top_srcdir=$srcdir ;;
2187  *) # Relative name.
2188    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2189    ac_top_srcdir=$ac_top_build_prefix$srcdir
2190    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2191esac
2192ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2193
2194    cd "$ac_dir" || { ac_status=$?; continue; }
2195    # Check for guested configure.
2196    if test -f "$ac_srcdir/configure.gnu"; then
2197      echo &&
2198      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2199    elif test -f "$ac_srcdir/configure"; then
2200      echo &&
2201      $SHELL "$ac_srcdir/configure" --help=recursive
2202    else
2203      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2204    fi || ac_status=$?
2205    cd "$ac_pwd" || { ac_status=$?; break; }
2206  done
2207fi
2208
2209test -n "$ac_init_help" && exit $ac_status
2210if $ac_init_version; then
2211  cat <<\_ACEOF
2212OpenJDK configure jdk9
2213generated by GNU Autoconf 2.69
2214
2215Copyright (C) 2012 Free Software Foundation, Inc.
2216This configure script is free software; the Free Software Foundation
2217gives unlimited permission to copy, distribute and modify it.
2218_ACEOF
2219  exit
2220fi
2221
2222## ------------------------ ##
2223## Autoconf initialization. ##
2224## ------------------------ ##
2225
2226# ac_fn_c_try_compile LINENO
2227# --------------------------
2228# Try to compile conftest.$ac_ext, and return whether this succeeded.
2229ac_fn_c_try_compile ()
2230{
2231  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2232  rm -f conftest.$ac_objext
2233  if { { ac_try="$ac_compile"
2234case "(($ac_try" in
2235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2236  *) ac_try_echo=$ac_try;;
2237esac
2238eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2239$as_echo "$ac_try_echo"; } >&5
2240  (eval "$ac_compile") 2>conftest.err
2241  ac_status=$?
2242  if test -s conftest.err; then
2243    grep -v '^ *+' conftest.err >conftest.er1
2244    cat conftest.er1 >&5
2245    mv -f conftest.er1 conftest.err
2246  fi
2247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2248  test $ac_status = 0; } && {
2249	 test -z "$ac_c_werror_flag" ||
2250	 test ! -s conftest.err
2251       } && test -s conftest.$ac_objext; then :
2252  ac_retval=0
2253else
2254  $as_echo "$as_me: failed program was:" >&5
2255sed 's/^/| /' conftest.$ac_ext >&5
2256
2257	ac_retval=1
2258fi
2259  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260  as_fn_set_status $ac_retval
2261
2262} # ac_fn_c_try_compile
2263
2264# ac_fn_cxx_try_compile LINENO
2265# ----------------------------
2266# Try to compile conftest.$ac_ext, and return whether this succeeded.
2267ac_fn_cxx_try_compile ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  rm -f conftest.$ac_objext
2271  if { { ac_try="$ac_compile"
2272case "(($ac_try" in
2273  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2274  *) ac_try_echo=$ac_try;;
2275esac
2276eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2277$as_echo "$ac_try_echo"; } >&5
2278  (eval "$ac_compile") 2>conftest.err
2279  ac_status=$?
2280  if test -s conftest.err; then
2281    grep -v '^ *+' conftest.err >conftest.er1
2282    cat conftest.er1 >&5
2283    mv -f conftest.er1 conftest.err
2284  fi
2285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2286  test $ac_status = 0; } && {
2287	 test -z "$ac_cxx_werror_flag" ||
2288	 test ! -s conftest.err
2289       } && test -s conftest.$ac_objext; then :
2290  ac_retval=0
2291else
2292  $as_echo "$as_me: failed program was:" >&5
2293sed 's/^/| /' conftest.$ac_ext >&5
2294
2295	ac_retval=1
2296fi
2297  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298  as_fn_set_status $ac_retval
2299
2300} # ac_fn_cxx_try_compile
2301
2302# ac_fn_c_try_cpp LINENO
2303# ----------------------
2304# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2305ac_fn_c_try_cpp ()
2306{
2307  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308  if { { ac_try="$ac_cpp conftest.$ac_ext"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } > conftest.i && {
2324	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2325	 test ! -s conftest.err
2326       }; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332    ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_c_try_cpp
2338
2339# ac_fn_cxx_try_cpp LINENO
2340# ------------------------
2341# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_cxx_try_cpp ()
2343{
2344  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345  if { { ac_try="$ac_cpp conftest.$ac_ext"
2346case "(($ac_try" in
2347  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2348  *) ac_try_echo=$ac_try;;
2349esac
2350eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2351$as_echo "$ac_try_echo"; } >&5
2352  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2353  ac_status=$?
2354  if test -s conftest.err; then
2355    grep -v '^ *+' conftest.err >conftest.er1
2356    cat conftest.er1 >&5
2357    mv -f conftest.er1 conftest.err
2358  fi
2359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2360  test $ac_status = 0; } > conftest.i && {
2361	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2362	 test ! -s conftest.err
2363       }; then :
2364  ac_retval=0
2365else
2366  $as_echo "$as_me: failed program was:" >&5
2367sed 's/^/| /' conftest.$ac_ext >&5
2368
2369    ac_retval=1
2370fi
2371  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2372  as_fn_set_status $ac_retval
2373
2374} # ac_fn_cxx_try_cpp
2375
2376# ac_fn_c_try_link LINENO
2377# -----------------------
2378# Try to link conftest.$ac_ext, and return whether this succeeded.
2379ac_fn_c_try_link ()
2380{
2381  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382  rm -f conftest.$ac_objext conftest$ac_exeext
2383  if { { ac_try="$ac_link"
2384case "(($ac_try" in
2385  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2386  *) ac_try_echo=$ac_try;;
2387esac
2388eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2389$as_echo "$ac_try_echo"; } >&5
2390  (eval "$ac_link") 2>conftest.err
2391  ac_status=$?
2392  if test -s conftest.err; then
2393    grep -v '^ *+' conftest.err >conftest.er1
2394    cat conftest.er1 >&5
2395    mv -f conftest.er1 conftest.err
2396  fi
2397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2398  test $ac_status = 0; } && {
2399	 test -z "$ac_c_werror_flag" ||
2400	 test ! -s conftest.err
2401       } && test -s conftest$ac_exeext && {
2402	 test "$cross_compiling" = yes ||
2403	 test -x conftest$ac_exeext
2404       }; then :
2405  ac_retval=0
2406else
2407  $as_echo "$as_me: failed program was:" >&5
2408sed 's/^/| /' conftest.$ac_ext >&5
2409
2410	ac_retval=1
2411fi
2412  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2413  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2414  # interfere with the next link command; also delete a directory that is
2415  # left behind by Apple's compiler.  We do this before executing the actions.
2416  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_c_try_link
2421
2422# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2423# ---------------------------------------------------------
2424# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2425# the include files in INCLUDES and setting the cache variable VAR
2426# accordingly.
2427ac_fn_cxx_check_header_mongrel ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  if eval \${$3+:} false; then :
2431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2432$as_echo_n "checking for $2... " >&6; }
2433if eval \${$3+:} false; then :
2434  $as_echo_n "(cached) " >&6
2435fi
2436eval ac_res=\$$3
2437	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438$as_echo "$ac_res" >&6; }
2439else
2440  # Is the header compilable?
2441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2442$as_echo_n "checking $2 usability... " >&6; }
2443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444/* end confdefs.h.  */
2445$4
2446#include <$2>
2447_ACEOF
2448if ac_fn_cxx_try_compile "$LINENO"; then :
2449  ac_header_compiler=yes
2450else
2451  ac_header_compiler=no
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2455$as_echo "$ac_header_compiler" >&6; }
2456
2457# Is the header present?
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2459$as_echo_n "checking $2 presence... " >&6; }
2460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2461/* end confdefs.h.  */
2462#include <$2>
2463_ACEOF
2464if ac_fn_cxx_try_cpp "$LINENO"; then :
2465  ac_header_preproc=yes
2466else
2467  ac_header_preproc=no
2468fi
2469rm -f conftest.err conftest.i conftest.$ac_ext
2470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2471$as_echo "$ac_header_preproc" >&6; }
2472
2473# So?  What about this header?
2474case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2475  yes:no: )
2476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2477$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480    ;;
2481  no:yes:* )
2482    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2483$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2485$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2487$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2489$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2491$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2492( $as_echo "## ----------------------------------------- ##
2493## Report this to build-dev@openjdk.java.net ##
2494## ----------------------------------------- ##"
2495     ) | sed "s/^/$as_me: WARNING:     /" >&2
2496    ;;
2497esac
2498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2499$as_echo_n "checking for $2... " >&6; }
2500if eval \${$3+:} false; then :
2501  $as_echo_n "(cached) " >&6
2502else
2503  eval "$3=\$ac_header_compiler"
2504fi
2505eval ac_res=\$$3
2506	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2507$as_echo "$ac_res" >&6; }
2508fi
2509  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2510
2511} # ac_fn_cxx_check_header_mongrel
2512
2513# ac_fn_cxx_try_run LINENO
2514# ------------------------
2515# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2516# that executables *can* be run.
2517ac_fn_cxx_try_run ()
2518{
2519  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520  if { { ac_try="$ac_link"
2521case "(($ac_try" in
2522  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2523  *) ac_try_echo=$ac_try;;
2524esac
2525eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2526$as_echo "$ac_try_echo"; } >&5
2527  (eval "$ac_link") 2>&5
2528  ac_status=$?
2529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2530  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2531  { { case "(($ac_try" in
2532  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2533  *) ac_try_echo=$ac_try;;
2534esac
2535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2536$as_echo "$ac_try_echo"; } >&5
2537  (eval "$ac_try") 2>&5
2538  ac_status=$?
2539  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540  test $ac_status = 0; }; }; then :
2541  ac_retval=0
2542else
2543  $as_echo "$as_me: program exited with status $ac_status" >&5
2544       $as_echo "$as_me: failed program was:" >&5
2545sed 's/^/| /' conftest.$ac_ext >&5
2546
2547       ac_retval=$ac_status
2548fi
2549  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2550  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2551  as_fn_set_status $ac_retval
2552
2553} # ac_fn_cxx_try_run
2554
2555# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2556# ---------------------------------------------------------
2557# Tests whether HEADER exists and can be compiled using the include files in
2558# INCLUDES, setting the cache variable VAR accordingly.
2559ac_fn_cxx_check_header_compile ()
2560{
2561  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2563$as_echo_n "checking for $2... " >&6; }
2564if eval \${$3+:} false; then :
2565  $as_echo_n "(cached) " >&6
2566else
2567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2568/* end confdefs.h.  */
2569$4
2570#include <$2>
2571_ACEOF
2572if ac_fn_cxx_try_compile "$LINENO"; then :
2573  eval "$3=yes"
2574else
2575  eval "$3=no"
2576fi
2577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2578fi
2579eval ac_res=\$$3
2580	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2581$as_echo "$ac_res" >&6; }
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583
2584} # ac_fn_cxx_check_header_compile
2585
2586# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2587# ----------------------------------------------
2588# Tries to find the compile-time value of EXPR in a program that includes
2589# INCLUDES, setting VAR accordingly. Returns whether the value could be
2590# computed
2591ac_fn_cxx_compute_int ()
2592{
2593  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2594  if test "$cross_compiling" = yes; then
2595    # Depending upon the size, compute the lo and hi bounds.
2596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2597/* end confdefs.h.  */
2598$4
2599int
2600main ()
2601{
2602static int test_array [1 - 2 * !(($2) >= 0)];
2603test_array [0] = 0;
2604return test_array [0];
2605
2606  ;
2607  return 0;
2608}
2609_ACEOF
2610if ac_fn_cxx_try_compile "$LINENO"; then :
2611  ac_lo=0 ac_mid=0
2612  while :; do
2613    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616int
2617main ()
2618{
2619static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2620test_array [0] = 0;
2621return test_array [0];
2622
2623  ;
2624  return 0;
2625}
2626_ACEOF
2627if ac_fn_cxx_try_compile "$LINENO"; then :
2628  ac_hi=$ac_mid; break
2629else
2630  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2631			if test $ac_lo -le $ac_mid; then
2632			  ac_lo= ac_hi=
2633			  break
2634			fi
2635			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2636fi
2637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2638  done
2639else
2640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2641/* end confdefs.h.  */
2642$4
2643int
2644main ()
2645{
2646static int test_array [1 - 2 * !(($2) < 0)];
2647test_array [0] = 0;
2648return test_array [0];
2649
2650  ;
2651  return 0;
2652}
2653_ACEOF
2654if ac_fn_cxx_try_compile "$LINENO"; then :
2655  ac_hi=-1 ac_mid=-1
2656  while :; do
2657    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658/* end confdefs.h.  */
2659$4
2660int
2661main ()
2662{
2663static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2664test_array [0] = 0;
2665return test_array [0];
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_compile "$LINENO"; then :
2672  ac_lo=$ac_mid; break
2673else
2674  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2675			if test $ac_mid -le $ac_hi; then
2676			  ac_lo= ac_hi=
2677			  break
2678			fi
2679			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2680fi
2681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2682  done
2683else
2684  ac_lo= ac_hi=
2685fi
2686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687fi
2688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689# Binary search between lo and hi bounds.
2690while test "x$ac_lo" != "x$ac_hi"; do
2691  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2693/* end confdefs.h.  */
2694$4
2695int
2696main ()
2697{
2698static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2699test_array [0] = 0;
2700return test_array [0];
2701
2702  ;
2703  return 0;
2704}
2705_ACEOF
2706if ac_fn_cxx_try_compile "$LINENO"; then :
2707  ac_hi=$ac_mid
2708else
2709  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2710fi
2711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2712done
2713case $ac_lo in #((
2714?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2715'') ac_retval=1 ;;
2716esac
2717  else
2718    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719/* end confdefs.h.  */
2720$4
2721static long int longval () { return $2; }
2722static unsigned long int ulongval () { return $2; }
2723#include <stdio.h>
2724#include <stdlib.h>
2725int
2726main ()
2727{
2728
2729  FILE *f = fopen ("conftest.val", "w");
2730  if (! f)
2731    return 1;
2732  if (($2) < 0)
2733    {
2734      long int i = longval ();
2735      if (i != ($2))
2736	return 1;
2737      fprintf (f, "%ld", i);
2738    }
2739  else
2740    {
2741      unsigned long int i = ulongval ();
2742      if (i != ($2))
2743	return 1;
2744      fprintf (f, "%lu", i);
2745    }
2746  /* Do not output a trailing newline, as this causes \r\n confusion
2747     on some platforms.  */
2748  return ferror (f) || fclose (f) != 0;
2749
2750  ;
2751  return 0;
2752}
2753_ACEOF
2754if ac_fn_cxx_try_run "$LINENO"; then :
2755  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2756else
2757  ac_retval=1
2758fi
2759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2760  conftest.$ac_objext conftest.beam conftest.$ac_ext
2761rm -f conftest.val
2762
2763  fi
2764  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2765  as_fn_set_status $ac_retval
2766
2767} # ac_fn_cxx_compute_int
2768
2769# ac_fn_cxx_try_link LINENO
2770# -------------------------
2771# Try to link conftest.$ac_ext, and return whether this succeeded.
2772ac_fn_cxx_try_link ()
2773{
2774  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2775  rm -f conftest.$ac_objext conftest$ac_exeext
2776  if { { ac_try="$ac_link"
2777case "(($ac_try" in
2778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2779  *) ac_try_echo=$ac_try;;
2780esac
2781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2782$as_echo "$ac_try_echo"; } >&5
2783  (eval "$ac_link") 2>conftest.err
2784  ac_status=$?
2785  if test -s conftest.err; then
2786    grep -v '^ *+' conftest.err >conftest.er1
2787    cat conftest.er1 >&5
2788    mv -f conftest.er1 conftest.err
2789  fi
2790  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2791  test $ac_status = 0; } && {
2792	 test -z "$ac_cxx_werror_flag" ||
2793	 test ! -s conftest.err
2794       } && test -s conftest$ac_exeext && {
2795	 test "$cross_compiling" = yes ||
2796	 test -x conftest$ac_exeext
2797       }; then :
2798  ac_retval=0
2799else
2800  $as_echo "$as_me: failed program was:" >&5
2801sed 's/^/| /' conftest.$ac_ext >&5
2802
2803	ac_retval=1
2804fi
2805  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2806  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2807  # interfere with the next link command; also delete a directory that is
2808  # left behind by Apple's compiler.  We do this before executing the actions.
2809  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_try_link
2814
2815# ac_fn_cxx_check_func LINENO FUNC VAR
2816# ------------------------------------
2817# Tests whether FUNC exists, setting the cache variable VAR accordingly
2818ac_fn_cxx_check_func ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2822$as_echo_n "checking for $2... " >&6; }
2823if eval \${$3+:} false; then :
2824  $as_echo_n "(cached) " >&6
2825else
2826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2827/* end confdefs.h.  */
2828/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2829   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2830#define $2 innocuous_$2
2831
2832/* System header to define __stub macros and hopefully few prototypes,
2833    which can conflict with char $2 (); below.
2834    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2835    <limits.h> exists even on freestanding compilers.  */
2836
2837#ifdef __STDC__
2838# include <limits.h>
2839#else
2840# include <assert.h>
2841#endif
2842
2843#undef $2
2844
2845/* Override any GCC internal prototype to avoid an error.
2846   Use char because int might match the return type of a GCC
2847   builtin and then its argument prototype would still apply.  */
2848#ifdef __cplusplus
2849extern "C"
2850#endif
2851char $2 ();
2852/* The GNU C library defines this for functions which it implements
2853    to always fail with ENOSYS.  Some functions are actually named
2854    something starting with __ and the normal name is an alias.  */
2855#if defined __stub_$2 || defined __stub___$2
2856choke me
2857#endif
2858
2859int
2860main ()
2861{
2862return $2 ();
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_link "$LINENO"; then :
2868  eval "$3=yes"
2869else
2870  eval "$3=no"
2871fi
2872rm -f core conftest.err conftest.$ac_objext \
2873    conftest$ac_exeext conftest.$ac_ext
2874fi
2875eval ac_res=\$$3
2876	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2877$as_echo "$ac_res" >&6; }
2878  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2879
2880} # ac_fn_cxx_check_func
2881
2882# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2883# -------------------------------------------------------
2884# Tests whether HEADER exists and can be compiled using the include files in
2885# INCLUDES, setting the cache variable VAR accordingly.
2886ac_fn_c_check_header_compile ()
2887{
2888  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2890$as_echo_n "checking for $2... " >&6; }
2891if eval \${$3+:} false; then :
2892  $as_echo_n "(cached) " >&6
2893else
2894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2895/* end confdefs.h.  */
2896$4
2897#include <$2>
2898_ACEOF
2899if ac_fn_c_try_compile "$LINENO"; then :
2900  eval "$3=yes"
2901else
2902  eval "$3=no"
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
2906eval ac_res=\$$3
2907	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2908$as_echo "$ac_res" >&6; }
2909  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2910
2911} # ac_fn_c_check_header_compile
2912cat >config.log <<_ACEOF
2913This file contains any messages produced by compilers while
2914running configure, to aid debugging if configure makes a mistake.
2915
2916It was created by OpenJDK $as_me jdk9, which was
2917generated by GNU Autoconf 2.69.  Invocation command line was
2918
2919  $ $0 $@
2920
2921_ACEOF
2922exec 5>>config.log
2923{
2924cat <<_ASUNAME
2925## --------- ##
2926## Platform. ##
2927## --------- ##
2928
2929hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2930uname -m = `(uname -m) 2>/dev/null || echo unknown`
2931uname -r = `(uname -r) 2>/dev/null || echo unknown`
2932uname -s = `(uname -s) 2>/dev/null || echo unknown`
2933uname -v = `(uname -v) 2>/dev/null || echo unknown`
2934
2935/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2936/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2937
2938/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2939/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2940/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2941/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2942/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2943/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2944/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2945
2946_ASUNAME
2947
2948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2949for as_dir in $PATH
2950do
2951  IFS=$as_save_IFS
2952  test -z "$as_dir" && as_dir=.
2953    $as_echo "PATH: $as_dir"
2954  done
2955IFS=$as_save_IFS
2956
2957} >&5
2958
2959cat >&5 <<_ACEOF
2960
2961
2962## ----------- ##
2963## Core tests. ##
2964## ----------- ##
2965
2966_ACEOF
2967
2968
2969# Keep a trace of the command line.
2970# Strip out --no-create and --no-recursion so they do not pile up.
2971# Strip out --silent because we don't want to record it for future runs.
2972# Also quote any args containing shell meta-characters.
2973# Make two passes to allow for proper duplicate-argument suppression.
2974ac_configure_args=
2975ac_configure_args0=
2976ac_configure_args1=
2977ac_must_keep_next=false
2978for ac_pass in 1 2
2979do
2980  for ac_arg
2981  do
2982    case $ac_arg in
2983    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2984    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2985    | -silent | --silent | --silen | --sile | --sil)
2986      continue ;;
2987    *\'*)
2988      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2989    esac
2990    case $ac_pass in
2991    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2992    2)
2993      as_fn_append ac_configure_args1 " '$ac_arg'"
2994      if test $ac_must_keep_next = true; then
2995	ac_must_keep_next=false # Got value, back to normal.
2996      else
2997	case $ac_arg in
2998	  *=* | --config-cache | -C | -disable-* | --disable-* \
2999	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3000	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3001	  | -with-* | --with-* | -without-* | --without-* | --x)
3002	    case "$ac_configure_args0 " in
3003	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3004	    esac
3005	    ;;
3006	  -* ) ac_must_keep_next=true ;;
3007	esac
3008      fi
3009      as_fn_append ac_configure_args " '$ac_arg'"
3010      ;;
3011    esac
3012  done
3013done
3014{ ac_configure_args0=; unset ac_configure_args0;}
3015{ ac_configure_args1=; unset ac_configure_args1;}
3016
3017# When interrupted or exit'd, cleanup temporary files, and complete
3018# config.log.  We remove comments because anyway the quotes in there
3019# would cause problems or look ugly.
3020# WARNING: Use '\'' to represent an apostrophe within the trap.
3021# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3022trap 'exit_status=$?
3023  # Save into config.log some information that might help in debugging.
3024  {
3025    echo
3026
3027    $as_echo "## ---------------- ##
3028## Cache variables. ##
3029## ---------------- ##"
3030    echo
3031    # The following way of writing the cache mishandles newlines in values,
3032(
3033  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3034    eval ac_val=\$$ac_var
3035    case $ac_val in #(
3036    *${as_nl}*)
3037      case $ac_var in #(
3038      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3039$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3040      esac
3041      case $ac_var in #(
3042      _ | IFS | as_nl) ;; #(
3043      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3044      *) { eval $ac_var=; unset $ac_var;} ;;
3045      esac ;;
3046    esac
3047  done
3048  (set) 2>&1 |
3049    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3050    *${as_nl}ac_space=\ *)
3051      sed -n \
3052	"s/'\''/'\''\\\\'\'''\''/g;
3053	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3054      ;; #(
3055    *)
3056      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3057      ;;
3058    esac |
3059    sort
3060)
3061    echo
3062
3063    $as_echo "## ----------------- ##
3064## Output variables. ##
3065## ----------------- ##"
3066    echo
3067    for ac_var in $ac_subst_vars
3068    do
3069      eval ac_val=\$$ac_var
3070      case $ac_val in
3071      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3072      esac
3073      $as_echo "$ac_var='\''$ac_val'\''"
3074    done | sort
3075    echo
3076
3077    if test -n "$ac_subst_files"; then
3078      $as_echo "## ------------------- ##
3079## File substitutions. ##
3080## ------------------- ##"
3081      echo
3082      for ac_var in $ac_subst_files
3083      do
3084	eval ac_val=\$$ac_var
3085	case $ac_val in
3086	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3087	esac
3088	$as_echo "$ac_var='\''$ac_val'\''"
3089      done | sort
3090      echo
3091    fi
3092
3093    if test -s confdefs.h; then
3094      $as_echo "## ----------- ##
3095## confdefs.h. ##
3096## ----------- ##"
3097      echo
3098      cat confdefs.h
3099      echo
3100    fi
3101    test "$ac_signal" != 0 &&
3102      $as_echo "$as_me: caught signal $ac_signal"
3103    $as_echo "$as_me: exit $exit_status"
3104  } >&5
3105  rm -f core *.core core.conftest.* &&
3106    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3107    exit $exit_status
3108' 0
3109for ac_signal in 1 2 13 15; do
3110  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3111done
3112ac_signal=0
3113
3114# confdefs.h avoids OS command line length limits that DEFS can exceed.
3115rm -f -r conftest* confdefs.h
3116
3117$as_echo "/* confdefs.h */" > confdefs.h
3118
3119# Predefined preprocessor variables.
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_NAME "$PACKAGE_NAME"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3127_ACEOF
3128
3129cat >>confdefs.h <<_ACEOF
3130#define PACKAGE_VERSION "$PACKAGE_VERSION"
3131_ACEOF
3132
3133cat >>confdefs.h <<_ACEOF
3134#define PACKAGE_STRING "$PACKAGE_STRING"
3135_ACEOF
3136
3137cat >>confdefs.h <<_ACEOF
3138#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3139_ACEOF
3140
3141cat >>confdefs.h <<_ACEOF
3142#define PACKAGE_URL "$PACKAGE_URL"
3143_ACEOF
3144
3145
3146# Let the site file select an alternate cache file if it wants to.
3147# Prefer an explicitly selected file to automatically selected ones.
3148ac_site_file1=NONE
3149ac_site_file2=NONE
3150if test -n "$CONFIG_SITE"; then
3151  # We do not want a PATH search for config.site.
3152  case $CONFIG_SITE in #((
3153    -*)  ac_site_file1=./$CONFIG_SITE;;
3154    */*) ac_site_file1=$CONFIG_SITE;;
3155    *)   ac_site_file1=./$CONFIG_SITE;;
3156  esac
3157elif test "x$prefix" != xNONE; then
3158  ac_site_file1=$prefix/share/config.site
3159  ac_site_file2=$prefix/etc/config.site
3160else
3161  ac_site_file1=$ac_default_prefix/share/config.site
3162  ac_site_file2=$ac_default_prefix/etc/config.site
3163fi
3164for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3165do
3166  test "x$ac_site_file" = xNONE && continue
3167  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3168    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3169$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3170    sed 's/^/| /' "$ac_site_file" >&5
3171    . "$ac_site_file" \
3172      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3174as_fn_error $? "failed to load site script $ac_site_file
3175See \`config.log' for more details" "$LINENO" 5; }
3176  fi
3177done
3178
3179if test -r "$cache_file"; then
3180  # Some versions of bash will fail to source /dev/null (special files
3181  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3182  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3183    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3184$as_echo "$as_me: loading cache $cache_file" >&6;}
3185    case $cache_file in
3186      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3187      *)                      . "./$cache_file";;
3188    esac
3189  fi
3190else
3191  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3192$as_echo "$as_me: creating cache $cache_file" >&6;}
3193  >$cache_file
3194fi
3195
3196# Check that the precious variables saved in the cache have kept the same
3197# value.
3198ac_cache_corrupted=false
3199for ac_var in $ac_precious_vars; do
3200  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3201  eval ac_new_set=\$ac_env_${ac_var}_set
3202  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3203  eval ac_new_val=\$ac_env_${ac_var}_value
3204  case $ac_old_set,$ac_new_set in
3205    set,)
3206      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3207$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3208      ac_cache_corrupted=: ;;
3209    ,set)
3210      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3211$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3212      ac_cache_corrupted=: ;;
3213    ,);;
3214    *)
3215      if test "x$ac_old_val" != "x$ac_new_val"; then
3216	# differences in whitespace do not lead to failure.
3217	ac_old_val_w=`echo x $ac_old_val`
3218	ac_new_val_w=`echo x $ac_new_val`
3219	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3220	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3221$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3222	  ac_cache_corrupted=:
3223	else
3224	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3225$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3226	  eval $ac_var=\$ac_old_val
3227	fi
3228	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3229$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3230	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3231$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3232      fi;;
3233  esac
3234  # Pass precious variables to config.status.
3235  if test "$ac_new_set" = set; then
3236    case $ac_new_val in
3237    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3238    *) ac_arg=$ac_var=$ac_new_val ;;
3239    esac
3240    case " $ac_configure_args " in
3241      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3242      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3243    esac
3244  fi
3245done
3246if $ac_cache_corrupted; then
3247  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3249  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3250$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3251  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3252fi
3253## -------------------- ##
3254## Main body of script. ##
3255## -------------------- ##
3256
3257ac_ext=c
3258ac_cpp='$CPP $CPPFLAGS'
3259ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3260ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3261ac_compiler_gnu=$ac_cv_c_compiler_gnu
3262
3263
3264
3265ac_aux_dir=
3266for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3267  if test -f "$ac_dir/install-sh"; then
3268    ac_aux_dir=$ac_dir
3269    ac_install_sh="$ac_aux_dir/install-sh -c"
3270    break
3271  elif test -f "$ac_dir/install.sh"; then
3272    ac_aux_dir=$ac_dir
3273    ac_install_sh="$ac_aux_dir/install.sh -c"
3274    break
3275  elif test -f "$ac_dir/shtool"; then
3276    ac_aux_dir=$ac_dir
3277    ac_install_sh="$ac_aux_dir/shtool install -c"
3278    break
3279  fi
3280done
3281if test -z "$ac_aux_dir"; then
3282  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3283fi
3284
3285# These three variables are undocumented and unsupported,
3286# and are intended to be withdrawn in a future Autoconf release.
3287# They can cause serious problems if a builder's source tree is in a directory
3288# whose full name contains unusual characters.
3289ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3290ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3291ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3292
3293
3294# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3295
3296#
3297# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3298# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3299#
3300# This code is free software; you can redistribute it and/or modify it
3301# under the terms of the GNU General Public License version 2 only, as
3302# published by the Free Software Foundation.  Oracle designates this
3303# particular file as subject to the "Classpath" exception as provided
3304# by Oracle in the LICENSE file that accompanied this code.
3305#
3306# This code is distributed in the hope that it will be useful, but WITHOUT
3307# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3308# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3309# version 2 for more details (a copy is included in the LICENSE file that
3310# accompanied this code).
3311#
3312# You should have received a copy of the GNU General Public License version
3313# 2 along with this work; if not, write to the Free Software Foundation,
3314# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3315#
3316# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3317# or visit www.oracle.com if you need additional information or have any
3318# questions.
3319#
3320
3321#
3322# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3323#
3324# This program is free software; you can redistribute it and/or modify
3325# it under the terms of the GNU General Public License as published by
3326# the Free Software Foundation; either version 2 of the License, or
3327# (at your option) any later version.
3328#
3329# This program is distributed in the hope that it will be useful, but
3330# WITHOUT ANY WARRANTY; without even the implied warranty of
3331# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3332# General Public License for more details.
3333#
3334# You should have received a copy of the GNU General Public License
3335# along with this program; if not, write to the Free Software
3336# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3337#
3338# As a special exception to the GNU General Public License, if you
3339# distribute this file as part of a program that contains a
3340# configuration script generated by Autoconf, you may include it under
3341# the same distribution terms that you use for the rest of that program.
3342
3343# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3344# ----------------------------------
3345# PKG_PROG_PKG_CONFIG
3346
3347# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3348#
3349# Check to see whether a particular set of modules exists.  Similar
3350# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3351#
3352#
3353# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3354# this or PKG_CHECK_MODULES is called, or make sure to call
3355# PKG_CHECK_EXISTS manually
3356# --------------------------------------------------------------
3357
3358
3359
3360# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3361# ---------------------------------------------
3362# _PKG_CONFIG
3363
3364# _PKG_SHORT_ERRORS_SUPPORTED
3365# -----------------------------
3366# _PKG_SHORT_ERRORS_SUPPORTED
3367
3368
3369# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3370# [ACTION-IF-NOT-FOUND])
3371#
3372#
3373# Note that if there is a possibility the first call to
3374# PKG_CHECK_MODULES might not happen, you should be sure to include an
3375# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3376#
3377#
3378# --------------------------------------------------------------
3379# PKG_CHECK_MODULES
3380
3381
3382# Include these first...
3383#
3384# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3385# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3386#
3387# This code is free software; you can redistribute it and/or modify it
3388# under the terms of the GNU General Public License version 2 only, as
3389# published by the Free Software Foundation.  Oracle designates this
3390# particular file as subject to the "Classpath" exception as provided
3391# by Oracle in the LICENSE file that accompanied this code.
3392#
3393# This code is distributed in the hope that it will be useful, but WITHOUT
3394# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3395# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3396# version 2 for more details (a copy is included in the LICENSE file that
3397# accompanied this code).
3398#
3399# You should have received a copy of the GNU General Public License version
3400# 2 along with this work; if not, write to the Free Software Foundation,
3401# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3402#
3403# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3404# or visit www.oracle.com if you need additional information or have any
3405# questions.
3406#
3407
3408# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3409# If so, then append $1 to $2 \
3410# Also set JVM_ARG_OK to true/false depending on outcome.
3411
3412
3413# Appends a string to a path variable, only adding the : when needed.
3414
3415
3416# Prepends a string to a path variable, only adding the : when needed.
3417
3418
3419# This will make sure the given variable points to a full and proper
3420# path. This means:
3421# 1) There will be no spaces in the path. On unix platforms,
3422#    spaces in the path will result in an error. On Windows,
3423#    the path will be rewritten using short-style to be space-free.
3424# 2) The path will be absolute, and it will be in unix-style (on
3425#     cygwin).
3426# $1: The name of the variable to fix
3427
3428
3429# This will make sure the given variable points to a executable
3430# with a full and proper path. This means:
3431# 1) There will be no spaces in the path. On unix platforms,
3432#    spaces in the path will result in an error. On Windows,
3433#    the path will be rewritten using short-style to be space-free.
3434# 2) The path will be absolute, and it will be in unix-style (on
3435#     cygwin).
3436# Any arguments given to the executable is preserved.
3437# If the input variable does not have a directory specification, then
3438# it need to be in the PATH.
3439# $1: The name of the variable to fix
3440
3441
3442
3443
3444# Register a --with argument but mark it as deprecated
3445# $1: The name of the with argument to deprecate, not including --with-
3446
3447
3448# Register a --enable argument but mark it as deprecated
3449# $1: The name of the with argument to deprecate, not including --enable-
3450# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3451
3452
3453
3454
3455# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3456# $1: variable to check
3457
3458
3459# Check that there are no unprocessed overridden variables left.
3460# If so, they are an incorrect argument and we will exit with an error.
3461
3462
3463# Setup a tool for the given variable. If correctly specified by the user,
3464# use that value, otherwise search for the tool using the supplied code snippet.
3465# $1: variable to set
3466# $2: code snippet to call to look for the tool
3467# $3: code snippet to call if variable was used to find tool
3468
3469
3470# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3471# $1: variable to set
3472# $2: executable name (or list of names) to look for
3473
3474
3475# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3476# $1: variable to set
3477# $2: executable name (or list of names) to look for
3478
3479
3480# Like BASIC_PATH_PROGS but fails if no tool was found.
3481# $1: variable to set
3482# $2: executable name (or list of names) to look for
3483
3484
3485# Like BASIC_SETUP_TOOL but fails if no tool was found.
3486# $1: variable to set
3487# $2: autoconf macro to call to look for the special tool
3488
3489
3490# Setup the most fundamental tools that relies on not much else to set up,
3491# but is used by much of the early bootstrap code.
3492
3493
3494# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3495
3496
3497# Evaluates platform specific overrides for devkit variables.
3498# $1: Name of variable
3499
3500
3501
3502
3503
3504
3505#%%% Simple tools %%%
3506
3507# Check if we have found a usable version of make
3508# $1: the path to a potential make binary (or empty)
3509# $2: the description on how we found this
3510
3511
3512
3513
3514# Goes looking for a usable version of GNU make.
3515
3516
3517
3518
3519
3520
3521# Check if build directory is on local disk. If not possible to determine,
3522# we prefer to claim it's local.
3523# Argument 1: directory to test
3524# Argument 2: what to do if it is on local disk
3525# Argument 3: what to do otherwise (remote disk or failure)
3526
3527
3528# Check that source files have basic read permissions set. This might
3529# not be the case in cygwin in certain conditions.
3530
3531
3532
3533
3534# Check for support for specific options in bash
3535
3536
3537# Code to run after AC_OUTPUT
3538
3539
3540#
3541# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3542# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3543#
3544# This code is free software; you can redistribute it and/or modify it
3545# under the terms of the GNU General Public License version 2 only, as
3546# published by the Free Software Foundation.  Oracle designates this
3547# particular file as subject to the "Classpath" exception as provided
3548# by Oracle in the LICENSE file that accompanied this code.
3549#
3550# This code is distributed in the hope that it will be useful, but WITHOUT
3551# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3552# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3553# version 2 for more details (a copy is included in the LICENSE file that
3554# accompanied this code).
3555#
3556# You should have received a copy of the GNU General Public License version
3557# 2 along with this work; if not, write to the Free Software Foundation,
3558# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3559#
3560# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3561# or visit www.oracle.com if you need additional information or have any
3562# questions.
3563#
3564
3565
3566
3567
3568
3569# Helper function which possibly converts a path using DOS-style short mode.
3570# If so, the updated path is stored in $new_path.
3571# $1: The path to check
3572
3573
3574# Helper function which possibly converts a path using DOS-style short mode.
3575# If so, the updated path is stored in $new_path.
3576# $1: The path to check
3577
3578
3579# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3580# and could probably be heavily simplified. However, all changes in this
3581# area tend to need lot of testing in different scenarios, and in lack of
3582# proper unit testing, cleaning this up has not been deemed worth the effort
3583# at the moment.
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3594
3595
3596
3597
3598# ... then the rest
3599#
3600# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3601# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3602#
3603# This code is free software; you can redistribute it and/or modify it
3604# under the terms of the GNU General Public License version 2 only, as
3605# published by the Free Software Foundation.  Oracle designates this
3606# particular file as subject to the "Classpath" exception as provided
3607# by Oracle in the LICENSE file that accompanied this code.
3608#
3609# This code is distributed in the hope that it will be useful, but WITHOUT
3610# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3611# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3612# version 2 for more details (a copy is included in the LICENSE file that
3613# accompanied this code).
3614#
3615# You should have received a copy of the GNU General Public License version
3616# 2 along with this work; if not, write to the Free Software Foundation,
3617# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3618#
3619# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3620# or visit www.oracle.com if you need additional information or have any
3621# questions.
3622#
3623
3624########################################################################
3625# This file handles detection of the Boot JDK. The Boot JDK detection
3626# process has been developed as a response to solve a complex real-world
3627# problem. Initially, it was simple, but it has grown as platform after
3628# platform, idiosyncracy after idiosyncracy has been supported.
3629#
3630# The basic idea is this:
3631# 1) You need an acceptable *) JDK to use as a Boot JDK
3632# 2) There are several ways to locate a JDK, that are mostly platform
3633#    dependent **)
3634# 3) You can have multiple JDKs installed
3635# 4) If possible, configure should try to dig out an acceptable JDK
3636#    automatically, without having to resort to command-line options
3637#
3638# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3639#     javac) and not a JRE, etc.
3640#
3641# **) On Windows we typically use a well-known path.
3642#     On MacOSX we typically use the tool java_home.
3643#     On Linux we typically find javac in the $PATH, and then follow a
3644#     chain of symlinks that often ends up in a real JDK.
3645#
3646# This leads to the code where we check in different ways to locate a
3647# JDK, and if one is found, check if it is acceptable. If not, we print
3648# our reasons for rejecting it (useful when debugging non-working
3649# configure situations) and continue checking the next one.
3650########################################################################
3651
3652# Execute the check given as argument, and verify the result
3653# If the Boot JDK was previously found, do nothing
3654# $1 A command line (typically autoconf macro) to execute
3655
3656
3657# Test: Is bootjdk explicitely set by command line arguments?
3658
3659
3660# Test: Is $JAVA_HOME set?
3661
3662
3663# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3664
3665
3666# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3667# $1: Argument to the java_home binary (optional)
3668
3669
3670# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3671
3672
3673# Look for a jdk in the given path. If there are multiple, try to select the newest.
3674# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3675# $1 = Path to directory containing jdk installations.
3676# $2 = String to append to the found JDK directory to get the proper JDK home
3677
3678
3679# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3680# environmental variable as base for where to look.
3681# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3682
3683
3684# Test: Is there a JDK installed in default, well-known locations?
3685
3686
3687# Check that a command-line tool in the Boot JDK is correct
3688# $1 = name of variable to assign
3689# $2 = name of binary
3690
3691
3692###############################################################################
3693#
3694# We need a Boot JDK to bootstrap the build.
3695#
3696
3697
3698
3699
3700
3701#
3702# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3703# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3704#
3705# This code is free software; you can redistribute it and/or modify it
3706# under the terms of the GNU General Public License version 2 only, as
3707# published by the Free Software Foundation.  Oracle designates this
3708# particular file as subject to the "Classpath" exception as provided
3709# by Oracle in the LICENSE file that accompanied this code.
3710#
3711# This code is distributed in the hope that it will be useful, but WITHOUT
3712# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3713# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3714# version 2 for more details (a copy is included in the LICENSE file that
3715# accompanied this code).
3716#
3717# You should have received a copy of the GNU General Public License version
3718# 2 along with this work; if not, write to the Free Software Foundation,
3719# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3720#
3721# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3722# or visit www.oracle.com if you need additional information or have any
3723# questions.
3724#
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740################################################################################
3741#
3742# Optionally enable distributed compilation of native code using icecc/icecream
3743#
3744
3745
3746
3747
3748
3749
3750
3751#
3752# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3754#
3755# This code is free software; you can redistribute it and/or modify it
3756# under the terms of the GNU General Public License version 2 only, as
3757# published by the Free Software Foundation.  Oracle designates this
3758# particular file as subject to the "Classpath" exception as provided
3759# by Oracle in the LICENSE file that accompanied this code.
3760#
3761# This code is distributed in the hope that it will be useful, but WITHOUT
3762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3764# version 2 for more details (a copy is included in the LICENSE file that
3765# accompanied this code).
3766#
3767# You should have received a copy of the GNU General Public License version
3768# 2 along with this work; if not, write to the Free Software Foundation,
3769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3770#
3771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3772# or visit www.oracle.com if you need additional information or have any
3773# questions.
3774#
3775
3776# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3777# corresponding configure arguments instead
3778
3779
3780# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3781# that configure can use them while detecting compilers.
3782# TOOLCHAIN_TYPE is available here.
3783# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3784
3785
3786
3787
3788
3789
3790# Documentation on common flags used for solstudio in HIGHEST.
3791#
3792# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3793#          done with care, there are some assumptions below that need to
3794#          be understood about the use of pointers, and IEEE behavior.
3795#
3796# -fns: Use non-standard floating point mode (not IEEE 754)
3797# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3798# -fsingle: Use single precision floating point with 'float'
3799# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3800#   (Source with excessing pointer casting and data access with mixed
3801#    pointer types are not recommended)
3802# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3803#   (If you expect perfect errno behavior, do not use this)
3804# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3805# -xrestrict: Pointer parameters to functions do not overlap
3806#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3807#    If you pass in multiple pointers to the same data, do not use this)
3808# -xlibmil: Inline some library routines
3809#   (If you expect perfect errno behavior, do not use this)
3810# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3811#   (If you expect perfect errno behavior, do not use this)
3812#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3813
3814    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3815    # Bug?
3816    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3817    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3818    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3819    #fi
3820
3821
3822
3823
3824
3825# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3826#                                   [RUN-IF-FALSE])
3827# ------------------------------------------------------------
3828# Check that the c and c++ compilers support an argument
3829
3830
3831# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3832#                                    [RUN-IF-FALSE])
3833# ------------------------------------------------------------
3834# Check that the linker support an argument
3835
3836
3837
3838
3839#
3840# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3841# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3842#
3843# This code is free software; you can redistribute it and/or modify it
3844# under the terms of the GNU General Public License version 2 only, as
3845# published by the Free Software Foundation.  Oracle designates this
3846# particular file as subject to the "Classpath" exception as provided
3847# by Oracle in the LICENSE file that accompanied this code.
3848#
3849# This code is distributed in the hope that it will be useful, but WITHOUT
3850# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3851# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3852# version 2 for more details (a copy is included in the LICENSE file that
3853# accompanied this code).
3854#
3855# You should have received a copy of the GNU General Public License version
3856# 2 along with this work; if not, write to the Free Software Foundation,
3857# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3858#
3859# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3860# or visit www.oracle.com if you need additional information or have any
3861# questions.
3862#
3863
3864
3865
3866
3867
3868cygwin_help() {
3869  case $1 in
3870    unzip)
3871      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3873      ;;
3874    zip)
3875      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3876      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3877      ;;
3878    make)
3879      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3880      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3881      ;;
3882    freetype)
3883      HELP_MSG="
3884The freetype library can now be build during the configure process.
3885Download the freetype sources and unpack them into an arbitrary directory:
3886
3887wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3888tar -xzf freetype-2.5.3.tar.gz
3889
3890Then run configure with '--with-freetype-src=<freetype_src>'. This will
3891automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3892builds or into '<freetype_src>/lib32' for 32-bit builds.
3893Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3894and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3895      ;;
3896  esac
3897}
3898
3899msys_help() {
3900  PKGHANDLER_COMMAND=""
3901}
3902
3903apt_help() {
3904  case $1 in
3905    reduced)
3906      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3907    devkit)
3908      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3909    openjdk)
3910      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3911    alsa)
3912      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3913    cups)
3914      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3915    freetype)
3916      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3917    ffi)
3918      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3919    x11)
3920      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3921    ccache)
3922      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3923  esac
3924}
3925
3926yum_help() {
3927  case $1 in
3928    devkit)
3929      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3930    openjdk)
3931      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3932    alsa)
3933      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3934    cups)
3935      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3936    freetype)
3937      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3938    x11)
3939      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3940    ccache)
3941      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3942  esac
3943}
3944
3945port_help() {
3946  PKGHANDLER_COMMAND=""
3947}
3948
3949pkgutil_help() {
3950  PKGHANDLER_COMMAND=""
3951}
3952
3953pkgadd_help() {
3954  PKGHANDLER_COMMAND=""
3955}
3956
3957# This function will check if we're called from the "configure" wrapper while
3958# printing --help. If so, we will print out additional information that can
3959# only be extracted within the autoconf script, and then exit. This must be
3960# called at the very beginning in configure.ac.
3961
3962
3963
3964
3965
3966
3967#
3968# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3969# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3970#
3971# This code is free software; you can redistribute it and/or modify it
3972# under the terms of the GNU General Public License version 2 only, as
3973# published by the Free Software Foundation.  Oracle designates this
3974# particular file as subject to the "Classpath" exception as provided
3975# by Oracle in the LICENSE file that accompanied this code.
3976#
3977# This code is distributed in the hope that it will be useful, but WITHOUT
3978# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3979# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3980# version 2 for more details (a copy is included in the LICENSE file that
3981# accompanied this code).
3982#
3983# You should have received a copy of the GNU General Public License version
3984# 2 along with this work; if not, write to the Free Software Foundation,
3985# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3986#
3987# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3988# or visit www.oracle.com if you need additional information or have any
3989# questions.
3990#
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001###############################################################################
4002#
4003# Should we build only OpenJDK even if closed sources are present?
4004#
4005
4006
4007
4008
4009###############################################################################
4010#
4011# Setup version numbers
4012#
4013
4014
4015
4016
4017
4018
4019################################################################################
4020#
4021# Gcov coverage data for hotspot
4022#
4023
4024
4025################################################################################
4026#
4027# Static build support.  When enabled will generate static
4028# libraries instead of shared libraries for all JDK libs.
4029#
4030
4031
4032
4033
4034#
4035# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4036# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4037#
4038# This code is free software; you can redistribute it and/or modify it
4039# under the terms of the GNU General Public License version 2 only, as
4040# published by the Free Software Foundation.  Oracle designates this
4041# particular file as subject to the "Classpath" exception as provided
4042# by Oracle in the LICENSE file that accompanied this code.
4043#
4044# This code is distributed in the hope that it will be useful, but WITHOUT
4045# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4046# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4047# version 2 for more details (a copy is included in the LICENSE file that
4048# accompanied this code).
4049#
4050# You should have received a copy of the GNU General Public License version
4051# 2 along with this work; if not, write to the Free Software Foundation,
4052# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4053#
4054# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4055# or visit www.oracle.com if you need additional information or have any
4056# questions.
4057#
4058
4059# Major library component reside in separate files.
4060#
4061# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4062# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4063#
4064# This code is free software; you can redistribute it and/or modify it
4065# under the terms of the GNU General Public License version 2 only, as
4066# published by the Free Software Foundation.  Oracle designates this
4067# particular file as subject to the "Classpath" exception as provided
4068# by Oracle in the LICENSE file that accompanied this code.
4069#
4070# This code is distributed in the hope that it will be useful, but WITHOUT
4071# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4072# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4073# version 2 for more details (a copy is included in the LICENSE file that
4074# accompanied this code).
4075#
4076# You should have received a copy of the GNU General Public License version
4077# 2 along with this work; if not, write to the Free Software Foundation,
4078# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4079#
4080# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4081# or visit www.oracle.com if you need additional information or have any
4082# questions.
4083#
4084
4085################################################################################
4086# Setup alsa (Advanced Linux Sound Architecture)
4087################################################################################
4088
4089
4090#
4091# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4092# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4093#
4094# This code is free software; you can redistribute it and/or modify it
4095# under the terms of the GNU General Public License version 2 only, as
4096# published by the Free Software Foundation.  Oracle designates this
4097# particular file as subject to the "Classpath" exception as provided
4098# by Oracle in the LICENSE file that accompanied this code.
4099#
4100# This code is distributed in the hope that it will be useful, but WITHOUT
4101# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4102# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4103# version 2 for more details (a copy is included in the LICENSE file that
4104# accompanied this code).
4105#
4106# You should have received a copy of the GNU General Public License version
4107# 2 along with this work; if not, write to the Free Software Foundation,
4108# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4109#
4110# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4111# or visit www.oracle.com if you need additional information or have any
4112# questions.
4113#
4114
4115################################################################################
4116# Setup bundled libraries.
4117#
4118# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4119# OpenJDK repository. Default is to use these libraries as bundled, but they
4120# might be replaced by en external version by the user.
4121################################################################################
4122
4123
4124################################################################################
4125# Setup libjpeg
4126################################################################################
4127
4128
4129################################################################################
4130# Setup giflib
4131################################################################################
4132
4133
4134################################################################################
4135# Setup libpng
4136################################################################################
4137
4138
4139################################################################################
4140# Setup zlib
4141################################################################################
4142
4143
4144################################################################################
4145# Setup lcms (Little CMS)
4146################################################################################
4147
4148
4149#
4150# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4151# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4152#
4153# This code is free software; you can redistribute it and/or modify it
4154# under the terms of the GNU General Public License version 2 only, as
4155# published by the Free Software Foundation.  Oracle designates this
4156# particular file as subject to the "Classpath" exception as provided
4157# by Oracle in the LICENSE file that accompanied this code.
4158#
4159# This code is distributed in the hope that it will be useful, but WITHOUT
4160# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4161# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4162# version 2 for more details (a copy is included in the LICENSE file that
4163# accompanied this code).
4164#
4165# You should have received a copy of the GNU General Public License version
4166# 2 along with this work; if not, write to the Free Software Foundation,
4167# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4168#
4169# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4170# or visit www.oracle.com if you need additional information or have any
4171# questions.
4172#
4173
4174################################################################################
4175# Setup cups (Common Unix Printing System)
4176################################################################################
4177
4178
4179#
4180# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4181# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4182#
4183# This code is free software; you can redistribute it and/or modify it
4184# under the terms of the GNU General Public License version 2 only, as
4185# published by the Free Software Foundation.  Oracle designates this
4186# particular file as subject to the "Classpath" exception as provided
4187# by Oracle in the LICENSE file that accompanied this code.
4188#
4189# This code is distributed in the hope that it will be useful, but WITHOUT
4190# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4191# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4192# version 2 for more details (a copy is included in the LICENSE file that
4193# accompanied this code).
4194#
4195# You should have received a copy of the GNU General Public License version
4196# 2 along with this work; if not, write to the Free Software Foundation,
4197# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4198#
4199# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4200# or visit www.oracle.com if you need additional information or have any
4201# questions.
4202#
4203
4204################################################################################
4205# Setup libffi (Foreign Function Interface)
4206################################################################################
4207
4208
4209#
4210# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4211# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4212#
4213# This code is free software; you can redistribute it and/or modify it
4214# under the terms of the GNU General Public License version 2 only, as
4215# published by the Free Software Foundation.  Oracle designates this
4216# particular file as subject to the "Classpath" exception as provided
4217# by Oracle in the LICENSE file that accompanied this code.
4218#
4219# This code is distributed in the hope that it will be useful, but WITHOUT
4220# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4221# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4222# version 2 for more details (a copy is included in the LICENSE file that
4223# accompanied this code).
4224#
4225# You should have received a copy of the GNU General Public License version
4226# 2 along with this work; if not, write to the Free Software Foundation,
4227# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4228#
4229# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4230# or visit www.oracle.com if you need additional information or have any
4231# questions.
4232#
4233
4234################################################################################
4235# Build the freetype lib from source
4236################################################################################
4237
4238
4239################################################################################
4240# Check if a potential freeype library match is correct and usable
4241################################################################################
4242
4243
4244################################################################################
4245# Setup freetype (The FreeType2 font rendering library)
4246################################################################################
4247
4248
4249#
4250# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4252#
4253# This code is free software; you can redistribute it and/or modify it
4254# under the terms of the GNU General Public License version 2 only, as
4255# published by the Free Software Foundation.  Oracle designates this
4256# particular file as subject to the "Classpath" exception as provided
4257# by Oracle in the LICENSE file that accompanied this code.
4258#
4259# This code is distributed in the hope that it will be useful, but WITHOUT
4260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4262# version 2 for more details (a copy is included in the LICENSE file that
4263# accompanied this code).
4264#
4265# You should have received a copy of the GNU General Public License version
4266# 2 along with this work; if not, write to the Free Software Foundation,
4267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4268#
4269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4270# or visit www.oracle.com if you need additional information or have any
4271# questions.
4272#
4273
4274################################################################################
4275# Setup the standard C/C++ runtime libraries.
4276#
4277# Most importantly, determine if stdc++ should be linked statically or
4278# dynamically.
4279################################################################################
4280
4281
4282#
4283# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4284# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4285#
4286# This code is free software; you can redistribute it and/or modify it
4287# under the terms of the GNU General Public License version 2 only, as
4288# published by the Free Software Foundation.  Oracle designates this
4289# particular file as subject to the "Classpath" exception as provided
4290# by Oracle in the LICENSE file that accompanied this code.
4291#
4292# This code is distributed in the hope that it will be useful, but WITHOUT
4293# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4294# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4295# version 2 for more details (a copy is included in the LICENSE file that
4296# accompanied this code).
4297#
4298# You should have received a copy of the GNU General Public License version
4299# 2 along with this work; if not, write to the Free Software Foundation,
4300# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4301#
4302# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4303# or visit www.oracle.com if you need additional information or have any
4304# questions.
4305#
4306
4307################################################################################
4308# Setup X11 Windows system
4309################################################################################
4310
4311
4312
4313################################################################################
4314# Determine which libraries are needed for this configuration
4315################################################################################
4316
4317
4318################################################################################
4319# Parse library options, and setup needed libraries
4320################################################################################
4321
4322
4323################################################################################
4324# Setup llvm (Low-Level VM)
4325################################################################################
4326
4327
4328################################################################################
4329# Setup various libraries, typically small system libraries
4330################################################################################
4331
4332
4333#
4334# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4335# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4336#
4337# This code is free software; you can redistribute it and/or modify it
4338# under the terms of the GNU General Public License version 2 only, as
4339# published by the Free Software Foundation.  Oracle designates this
4340# particular file as subject to the "Classpath" exception as provided
4341# by Oracle in the LICENSE file that accompanied this code.
4342#
4343# This code is distributed in the hope that it will be useful, but WITHOUT
4344# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4345# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4346# version 2 for more details (a copy is included in the LICENSE file that
4347# accompanied this code).
4348#
4349# You should have received a copy of the GNU General Public License version
4350# 2 along with this work; if not, write to the Free Software Foundation,
4351# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4352#
4353# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4354# or visit www.oracle.com if you need additional information or have any
4355# questions.
4356#
4357
4358# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4359# Converts autoconf style CPU name to OpenJDK style, into
4360# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4361
4362
4363# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4364# Converts autoconf style OS name to OpenJDK style, into
4365# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4366
4367
4368# Expects $host_os $host_cpu $build_os and $build_cpu
4369# and $with_target_bits to have been setup!
4370#
4371# Translate the standard triplet(quadruplet) definition
4372# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4373# OPENJDK_BUILD_OS, etc.
4374
4375
4376# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4377# accordingly. Must be done after setting up build and target system, but before
4378# doing anything else with these values.
4379
4380
4381# Setup the legacy variables, for controlling the old makefiles.
4382#
4383
4384
4385
4386
4387#%%% Build and target systems %%%
4388
4389
4390
4391
4392# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4393# Add -mX to various FLAGS variables.
4394
4395
4396
4397
4398
4399
4400#
4401# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4402# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4403#
4404# This code is free software; you can redistribute it and/or modify it
4405# under the terms of the GNU General Public License version 2 only, as
4406# published by the Free Software Foundation.  Oracle designates this
4407# particular file as subject to the "Classpath" exception as provided
4408# by Oracle in the LICENSE file that accompanied this code.
4409#
4410# This code is distributed in the hope that it will be useful, but WITHOUT
4411# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4412# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4413# version 2 for more details (a copy is included in the LICENSE file that
4414# accompanied this code).
4415#
4416# You should have received a copy of the GNU General Public License version
4417# 2 along with this work; if not, write to the Free Software Foundation,
4418# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4419#
4420# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4421# or visit www.oracle.com if you need additional information or have any
4422# questions.
4423#
4424
4425
4426
4427
4428
4429
4430
4431#
4432# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4433# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4434#
4435# This code is free software; you can redistribute it and/or modify it
4436# under the terms of the GNU General Public License version 2 only, as
4437# published by the Free Software Foundation.  Oracle designates this
4438# particular file as subject to the "Classpath" exception as provided
4439# by Oracle in the LICENSE file that accompanied this code.
4440#
4441# This code is distributed in the hope that it will be useful, but WITHOUT
4442# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4443# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4444# version 2 for more details (a copy is included in the LICENSE file that
4445# accompanied this code).
4446#
4447# You should have received a copy of the GNU General Public License version
4448# 2 along with this work; if not, write to the Free Software Foundation,
4449# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4450#
4451# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4452# or visit www.oracle.com if you need additional information or have any
4453# questions.
4454#
4455
4456########################################################################
4457# This file is responsible for detecting, verifying and setting up the
4458# toolchain, i.e. the compiler, linker and related utilities. It will setup
4459# proper paths to the binaries, but it will not setup any flags.
4460#
4461# The binaries used is determined by the toolchain type, which is the family of
4462# compilers and related tools that are used.
4463########################################################################
4464
4465
4466# All valid toolchains, regardless of platform (used by help.m4)
4467VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4468
4469# These toolchains are valid on different platforms
4470VALID_TOOLCHAINS_linux="gcc clang"
4471VALID_TOOLCHAINS_solaris="solstudio"
4472VALID_TOOLCHAINS_macosx="gcc clang"
4473VALID_TOOLCHAINS_aix="xlc"
4474VALID_TOOLCHAINS_windows="microsoft"
4475
4476# Toolchain descriptions
4477TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4478TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4479TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4480TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4481TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4482
4483# Setup a number of variables describing how native output files are
4484# named on this platform/toolchain.
4485
4486
4487# Determine which toolchain type to use, and make sure it is valid for this
4488# platform. Setup various information about the selected toolchain.
4489
4490
4491# Before we start detecting the toolchain executables, we might need some
4492# special setup, e.g. additional paths etc.
4493
4494
4495# Restore path, etc
4496
4497
4498# Check if a compiler is of the toolchain type we expect, and save the version
4499# information from it. If the compiler does not match the expected type,
4500# this function will abort using AC_MSG_ERROR. If it matches, the version will
4501# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4502# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4503#
4504# $1 = compiler to test (CC or CXX)
4505# $2 = human readable name of compiler (C or C++)
4506
4507
4508# Try to locate the given C or C++ compiler in the path, or otherwise.
4509#
4510# $1 = compiler to test (CC or CXX)
4511# $2 = human readable name of compiler (C or C++)
4512# $3 = list of compiler names to search for
4513
4514
4515# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4516# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4517# archiver (AR). Verify that the compilers are correct according to the
4518# toolchain type.
4519
4520
4521# Setup additional tools that is considered a part of the toolchain, but not the
4522# core part. Many of these are highly platform-specific and do not exist,
4523# and/or are not needed on all platforms.
4524
4525
4526# Setup the build tools (i.e, the compiler and linker used to build programs
4527# that should be run on the build platform, not the target platform, as a build
4528# helper). Since the non-cross-compile case uses the normal, target compilers
4529# for this, we can only do this after these have been setup.
4530
4531
4532# Setup legacy variables that are still needed as alternative ways to refer to
4533# parts of the toolchain.
4534
4535
4536# Do some additional checks on the detected tools.
4537
4538
4539# Setup the JTReg Regression Test Harness.
4540
4541
4542#
4543# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4545#
4546# This code is free software; you can redistribute it and/or modify it
4547# under the terms of the GNU General Public License version 2 only, as
4548# published by the Free Software Foundation.  Oracle designates this
4549# particular file as subject to the "Classpath" exception as provided
4550# by Oracle in the LICENSE file that accompanied this code.
4551#
4552# This code is distributed in the hope that it will be useful, but WITHOUT
4553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4555# version 2 for more details (a copy is included in the LICENSE file that
4556# accompanied this code).
4557#
4558# You should have received a copy of the GNU General Public License version
4559# 2 along with this work; if not, write to the Free Software Foundation,
4560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4561#
4562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4563# or visit www.oracle.com if you need additional information or have any
4564# questions.
4565#
4566
4567################################################################################
4568# The order of these defines the priority by which we try to find them.
4569VALID_VS_VERSIONS="2013 2012 2010"
4570
4571VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4572VS_VERSION_INTERNAL_2010=100
4573VS_MSVCR_2010=msvcr100.dll
4574# We don't use msvcp on Visual Studio 2010
4575#VS_MSVCP_2010=msvcp100.dll
4576VS_ENVVAR_2010="VS100COMNTOOLS"
4577VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4578VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4579VS_VS_PLATFORM_NAME_2010="v100"
4580VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4581
4582VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4583VS_VERSION_INTERNAL_2012=110
4584VS_MSVCR_2012=msvcr110.dll
4585VS_MSVCP_2012=msvcp110.dll
4586VS_ENVVAR_2012="VS110COMNTOOLS"
4587VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4588VS_SDK_INSTALLDIR_2012=
4589VS_VS_PLATFORM_NAME_2012="v110"
4590VS_SDK_PLATFORM_NAME_2012=
4591
4592VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4593VS_VERSION_INTERNAL_2013=120
4594VS_MSVCR_2013=msvcr120.dll
4595VS_MSVCP_2013=msvcp120.dll
4596VS_ENVVAR_2013="VS120COMNTOOLS"
4597VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4598VS_SDK_INSTALLDIR_2013=
4599VS_VS_PLATFORM_NAME_2013="v120"
4600VS_SDK_PLATFORM_NAME_2013=
4601
4602################################################################################
4603
4604
4605
4606################################################################################
4607
4608
4609
4610################################################################################
4611# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4612# build environment and assigns it to VS_ENV_CMD
4613
4614
4615################################################################################
4616
4617
4618
4619################################################################################
4620# Check if the VS env variables were setup prior to running configure.
4621# If not, then find vcvarsall.bat and run it automatically, and integrate
4622# the set env variables into the spec file.
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637# This line needs to be here, verbatim, after all includes and the dummy hook
4638# definitions. It is replaced with custom functionality when building
4639# custom sources.
4640#CUSTOM_AUTOCONF_INCLUDE
4641
4642# Do not change or remove the following line, it is needed for consistency checks:
4643DATE_WHEN_GENERATED=1448463381
4644
4645###############################################################################
4646#
4647# Initialization / Boot-strapping
4648#
4649# The bootstrapping process needs to solve the "chicken or the egg" problem,
4650# thus it jumps back and forth, each time gaining something needed later on.
4651#
4652###############################################################################
4653
4654# If we are requested to print additional help, do that and then exit.
4655# This must be the very first call.
4656
4657  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4658    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4659    $PRINTF "Which are valid to use depends on the build platform.\n"
4660    for toolchain in $VALID_TOOLCHAINS_all; do
4661      # Use indirect variable referencing
4662      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4663      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4664      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4665    done
4666
4667    # And now exit directly
4668    exit 0
4669  fi
4670
4671
4672# Basic initialization that must happen first of all in the normal process.
4673
4674  # Save the original command line. This is passed to us by the wrapper configure script.
4675
4676  # Save the path variable before it gets changed
4677  ORIGINAL_PATH="$PATH"
4678
4679  DATE_WHEN_CONFIGURED=`LANG=C date`
4680
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4682$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4683  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4684$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4685
4686
4687  # Start with tools that do not need have cross compilation support
4688  # and can be expected to be found in the default PATH. These tools are
4689  # used by configure.
4690
4691  # First are all the simple required tools.
4692
4693
4694
4695  # Publish this variable in the help.
4696
4697
4698  if [ -z "${BASENAME+x}" ]; then
4699    # The variable is not set by user, try to locate tool using the code snippet
4700    for ac_prog in basename
4701do
4702  # Extract the first word of "$ac_prog", so it can be a program name with args.
4703set dummy $ac_prog; ac_word=$2
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
4706if ${ac_cv_path_BASENAME+:} false; then :
4707  $as_echo_n "(cached) " >&6
4708else
4709  case $BASENAME in
4710  [\\/]* | ?:[\\/]*)
4711  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4712  ;;
4713  *)
4714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715for as_dir in $PATH
4716do
4717  IFS=$as_save_IFS
4718  test -z "$as_dir" && as_dir=.
4719    for ac_exec_ext in '' $ac_executable_extensions; do
4720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4721    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4723    break 2
4724  fi
4725done
4726  done
4727IFS=$as_save_IFS
4728
4729  ;;
4730esac
4731fi
4732BASENAME=$ac_cv_path_BASENAME
4733if test -n "$BASENAME"; then
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4735$as_echo "$BASENAME" >&6; }
4736else
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
4739fi
4740
4741
4742  test -n "$BASENAME" && break
4743done
4744
4745  else
4746    # The variable is set, but is it from the command line or the environment?
4747
4748    # Try to remove the string !BASENAME! from our list.
4749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4751      # If it failed, the variable was not from the command line. Ignore it,
4752      # but warn the user (except for BASH, which is always set by the calling BASH).
4753      if test "xBASENAME" != xBASH; then
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4755$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4756      fi
4757      # Try to locate tool using the code snippet
4758      for ac_prog in basename
4759do
4760  # Extract the first word of "$ac_prog", so it can be a program name with args.
4761set dummy $ac_prog; ac_word=$2
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4763$as_echo_n "checking for $ac_word... " >&6; }
4764if ${ac_cv_path_BASENAME+:} false; then :
4765  $as_echo_n "(cached) " >&6
4766else
4767  case $BASENAME in
4768  [\\/]* | ?:[\\/]*)
4769  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4770  ;;
4771  *)
4772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773for as_dir in $PATH
4774do
4775  IFS=$as_save_IFS
4776  test -z "$as_dir" && as_dir=.
4777    for ac_exec_ext in '' $ac_executable_extensions; do
4778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4779    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781    break 2
4782  fi
4783done
4784  done
4785IFS=$as_save_IFS
4786
4787  ;;
4788esac
4789fi
4790BASENAME=$ac_cv_path_BASENAME
4791if test -n "$BASENAME"; then
4792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4793$as_echo "$BASENAME" >&6; }
4794else
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796$as_echo "no" >&6; }
4797fi
4798
4799
4800  test -n "$BASENAME" && break
4801done
4802
4803    else
4804      # If it succeeded, then it was overridden by the user. We will use it
4805      # for the tool.
4806
4807      # First remove it from the list of overridden variables, so we can test
4808      # for unknown variables in the end.
4809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4810
4811      # Check if we try to supply an empty value
4812      if test "x$BASENAME" = x; then
4813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4814$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4816$as_echo_n "checking for BASENAME... " >&6; }
4817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4818$as_echo "disabled" >&6; }
4819      else
4820        # Check if the provided tool contains a complete path.
4821        tool_specified="$BASENAME"
4822        tool_basename="${tool_specified##*/}"
4823        if test "x$tool_basename" = "x$tool_specified"; then
4824          # A command without a complete path is provided, search $PATH.
4825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4826$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4827          # Extract the first word of "$tool_basename", so it can be a program name with args.
4828set dummy $tool_basename; ac_word=$2
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830$as_echo_n "checking for $ac_word... " >&6; }
4831if ${ac_cv_path_BASENAME+:} false; then :
4832  $as_echo_n "(cached) " >&6
4833else
4834  case $BASENAME in
4835  [\\/]* | ?:[\\/]*)
4836  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4837  ;;
4838  *)
4839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840for as_dir in $PATH
4841do
4842  IFS=$as_save_IFS
4843  test -z "$as_dir" && as_dir=.
4844    for ac_exec_ext in '' $ac_executable_extensions; do
4845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4846    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4848    break 2
4849  fi
4850done
4851  done
4852IFS=$as_save_IFS
4853
4854  ;;
4855esac
4856fi
4857BASENAME=$ac_cv_path_BASENAME
4858if test -n "$BASENAME"; then
4859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4860$as_echo "$BASENAME" >&6; }
4861else
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863$as_echo "no" >&6; }
4864fi
4865
4866
4867          if test "x$BASENAME" = x; then
4868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4869          fi
4870        else
4871          # Otherwise we believe it is a complete path. Use it as it is.
4872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4873$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4875$as_echo_n "checking for BASENAME... " >&6; }
4876          if test ! -x "$tool_specified"; then
4877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4878$as_echo "not found" >&6; }
4879            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4880          fi
4881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4882$as_echo "$tool_specified" >&6; }
4883        fi
4884      fi
4885    fi
4886
4887  fi
4888
4889
4890
4891  if test "x$BASENAME" = x; then
4892    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4893  fi
4894
4895
4896
4897
4898
4899  # Publish this variable in the help.
4900
4901
4902  if [ -z "${BASH+x}" ]; then
4903    # The variable is not set by user, try to locate tool using the code snippet
4904    for ac_prog in bash
4905do
4906  # Extract the first word of "$ac_prog", so it can be a program name with args.
4907set dummy $ac_prog; ac_word=$2
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4909$as_echo_n "checking for $ac_word... " >&6; }
4910if ${ac_cv_path_BASH+:} false; then :
4911  $as_echo_n "(cached) " >&6
4912else
4913  case $BASH in
4914  [\\/]* | ?:[\\/]*)
4915  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4916  ;;
4917  *)
4918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4919for as_dir in $PATH
4920do
4921  IFS=$as_save_IFS
4922  test -z "$as_dir" && as_dir=.
4923    for ac_exec_ext in '' $ac_executable_extensions; do
4924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4925    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4927    break 2
4928  fi
4929done
4930  done
4931IFS=$as_save_IFS
4932
4933  ;;
4934esac
4935fi
4936BASH=$ac_cv_path_BASH
4937if test -n "$BASH"; then
4938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4939$as_echo "$BASH" >&6; }
4940else
4941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4942$as_echo "no" >&6; }
4943fi
4944
4945
4946  test -n "$BASH" && break
4947done
4948
4949  else
4950    # The variable is set, but is it from the command line or the environment?
4951
4952    # Try to remove the string !BASH! from our list.
4953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4955      # If it failed, the variable was not from the command line. Ignore it,
4956      # but warn the user (except for BASH, which is always set by the calling BASH).
4957      if test "xBASH" != xBASH; then
4958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4959$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4960      fi
4961      # Try to locate tool using the code snippet
4962      for ac_prog in bash
4963do
4964  # Extract the first word of "$ac_prog", so it can be a program name with args.
4965set dummy $ac_prog; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
4968if ${ac_cv_path_BASH+:} false; then :
4969  $as_echo_n "(cached) " >&6
4970else
4971  case $BASH in
4972  [\\/]* | ?:[\\/]*)
4973  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4974  ;;
4975  *)
4976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in $PATH
4978do
4979  IFS=$as_save_IFS
4980  test -z "$as_dir" && as_dir=.
4981    for ac_exec_ext in '' $ac_executable_extensions; do
4982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985    break 2
4986  fi
4987done
4988  done
4989IFS=$as_save_IFS
4990
4991  ;;
4992esac
4993fi
4994BASH=$ac_cv_path_BASH
4995if test -n "$BASH"; then
4996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4997$as_echo "$BASH" >&6; }
4998else
4999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000$as_echo "no" >&6; }
5001fi
5002
5003
5004  test -n "$BASH" && break
5005done
5006
5007    else
5008      # If it succeeded, then it was overridden by the user. We will use it
5009      # for the tool.
5010
5011      # First remove it from the list of overridden variables, so we can test
5012      # for unknown variables in the end.
5013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5014
5015      # Check if we try to supply an empty value
5016      if test "x$BASH" = x; then
5017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5018$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5020$as_echo_n "checking for BASH... " >&6; }
5021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5022$as_echo "disabled" >&6; }
5023      else
5024        # Check if the provided tool contains a complete path.
5025        tool_specified="$BASH"
5026        tool_basename="${tool_specified##*/}"
5027        if test "x$tool_basename" = "x$tool_specified"; then
5028          # A command without a complete path is provided, search $PATH.
5029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5030$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5031          # Extract the first word of "$tool_basename", so it can be a program name with args.
5032set dummy $tool_basename; ac_word=$2
5033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
5035if ${ac_cv_path_BASH+:} false; then :
5036  $as_echo_n "(cached) " >&6
5037else
5038  case $BASH in
5039  [\\/]* | ?:[\\/]*)
5040  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5041  ;;
5042  *)
5043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5044for as_dir in $PATH
5045do
5046  IFS=$as_save_IFS
5047  test -z "$as_dir" && as_dir=.
5048    for ac_exec_ext in '' $ac_executable_extensions; do
5049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5050    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5052    break 2
5053  fi
5054done
5055  done
5056IFS=$as_save_IFS
5057
5058  ;;
5059esac
5060fi
5061BASH=$ac_cv_path_BASH
5062if test -n "$BASH"; then
5063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5064$as_echo "$BASH" >&6; }
5065else
5066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5067$as_echo "no" >&6; }
5068fi
5069
5070
5071          if test "x$BASH" = x; then
5072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5073          fi
5074        else
5075          # Otherwise we believe it is a complete path. Use it as it is.
5076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5077$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5079$as_echo_n "checking for BASH... " >&6; }
5080          if test ! -x "$tool_specified"; then
5081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5082$as_echo "not found" >&6; }
5083            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5084          fi
5085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5086$as_echo "$tool_specified" >&6; }
5087        fi
5088      fi
5089    fi
5090
5091  fi
5092
5093
5094
5095  if test "x$BASH" = x; then
5096    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5097  fi
5098
5099
5100
5101
5102
5103  # Publish this variable in the help.
5104
5105
5106  if [ -z "${CAT+x}" ]; then
5107    # The variable is not set by user, try to locate tool using the code snippet
5108    for ac_prog in cat
5109do
5110  # Extract the first word of "$ac_prog", so it can be a program name with args.
5111set dummy $ac_prog; ac_word=$2
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113$as_echo_n "checking for $ac_word... " >&6; }
5114if ${ac_cv_path_CAT+:} false; then :
5115  $as_echo_n "(cached) " >&6
5116else
5117  case $CAT in
5118  [\\/]* | ?:[\\/]*)
5119  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5120  ;;
5121  *)
5122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125  IFS=$as_save_IFS
5126  test -z "$as_dir" && as_dir=.
5127    for ac_exec_ext in '' $ac_executable_extensions; do
5128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5129    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131    break 2
5132  fi
5133done
5134  done
5135IFS=$as_save_IFS
5136
5137  ;;
5138esac
5139fi
5140CAT=$ac_cv_path_CAT
5141if test -n "$CAT"; then
5142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5143$as_echo "$CAT" >&6; }
5144else
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5146$as_echo "no" >&6; }
5147fi
5148
5149
5150  test -n "$CAT" && break
5151done
5152
5153  else
5154    # The variable is set, but is it from the command line or the environment?
5155
5156    # Try to remove the string !CAT! from our list.
5157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5159      # If it failed, the variable was not from the command line. Ignore it,
5160      # but warn the user (except for BASH, which is always set by the calling BASH).
5161      if test "xCAT" != xBASH; then
5162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5163$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5164      fi
5165      # Try to locate tool using the code snippet
5166      for ac_prog in cat
5167do
5168  # Extract the first word of "$ac_prog", so it can be a program name with args.
5169set dummy $ac_prog; ac_word=$2
5170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5171$as_echo_n "checking for $ac_word... " >&6; }
5172if ${ac_cv_path_CAT+:} false; then :
5173  $as_echo_n "(cached) " >&6
5174else
5175  case $CAT in
5176  [\\/]* | ?:[\\/]*)
5177  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5178  ;;
5179  *)
5180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181for as_dir in $PATH
5182do
5183  IFS=$as_save_IFS
5184  test -z "$as_dir" && as_dir=.
5185    for ac_exec_ext in '' $ac_executable_extensions; do
5186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5187    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5189    break 2
5190  fi
5191done
5192  done
5193IFS=$as_save_IFS
5194
5195  ;;
5196esac
5197fi
5198CAT=$ac_cv_path_CAT
5199if test -n "$CAT"; then
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5201$as_echo "$CAT" >&6; }
5202else
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5204$as_echo "no" >&6; }
5205fi
5206
5207
5208  test -n "$CAT" && break
5209done
5210
5211    else
5212      # If it succeeded, then it was overridden by the user. We will use it
5213      # for the tool.
5214
5215      # First remove it from the list of overridden variables, so we can test
5216      # for unknown variables in the end.
5217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5218
5219      # Check if we try to supply an empty value
5220      if test "x$CAT" = x; then
5221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5222$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5224$as_echo_n "checking for CAT... " >&6; }
5225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5226$as_echo "disabled" >&6; }
5227      else
5228        # Check if the provided tool contains a complete path.
5229        tool_specified="$CAT"
5230        tool_basename="${tool_specified##*/}"
5231        if test "x$tool_basename" = "x$tool_specified"; then
5232          # A command without a complete path is provided, search $PATH.
5233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5234$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5235          # Extract the first word of "$tool_basename", so it can be a program name with args.
5236set dummy $tool_basename; ac_word=$2
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5238$as_echo_n "checking for $ac_word... " >&6; }
5239if ${ac_cv_path_CAT+:} false; then :
5240  $as_echo_n "(cached) " >&6
5241else
5242  case $CAT in
5243  [\\/]* | ?:[\\/]*)
5244  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5245  ;;
5246  *)
5247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5248for as_dir in $PATH
5249do
5250  IFS=$as_save_IFS
5251  test -z "$as_dir" && as_dir=.
5252    for ac_exec_ext in '' $ac_executable_extensions; do
5253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5254    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5256    break 2
5257  fi
5258done
5259  done
5260IFS=$as_save_IFS
5261
5262  ;;
5263esac
5264fi
5265CAT=$ac_cv_path_CAT
5266if test -n "$CAT"; then
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5268$as_echo "$CAT" >&6; }
5269else
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271$as_echo "no" >&6; }
5272fi
5273
5274
5275          if test "x$CAT" = x; then
5276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5277          fi
5278        else
5279          # Otherwise we believe it is a complete path. Use it as it is.
5280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5281$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5283$as_echo_n "checking for CAT... " >&6; }
5284          if test ! -x "$tool_specified"; then
5285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5286$as_echo "not found" >&6; }
5287            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5288          fi
5289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5290$as_echo "$tool_specified" >&6; }
5291        fi
5292      fi
5293    fi
5294
5295  fi
5296
5297
5298
5299  if test "x$CAT" = x; then
5300    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5301  fi
5302
5303
5304
5305
5306
5307  # Publish this variable in the help.
5308
5309
5310  if [ -z "${CHMOD+x}" ]; then
5311    # The variable is not set by user, try to locate tool using the code snippet
5312    for ac_prog in chmod
5313do
5314  # Extract the first word of "$ac_prog", so it can be a program name with args.
5315set dummy $ac_prog; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if ${ac_cv_path_CHMOD+:} false; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $CHMOD in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5324  ;;
5325  *)
5326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329  IFS=$as_save_IFS
5330  test -z "$as_dir" && as_dir=.
5331    for ac_exec_ext in '' $ac_executable_extensions; do
5332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5333    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335    break 2
5336  fi
5337done
5338  done
5339IFS=$as_save_IFS
5340
5341  ;;
5342esac
5343fi
5344CHMOD=$ac_cv_path_CHMOD
5345if test -n "$CHMOD"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5347$as_echo "$CHMOD" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354  test -n "$CHMOD" && break
5355done
5356
5357  else
5358    # The variable is set, but is it from the command line or the environment?
5359
5360    # Try to remove the string !CHMOD! from our list.
5361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5363      # If it failed, the variable was not from the command line. Ignore it,
5364      # but warn the user (except for BASH, which is always set by the calling BASH).
5365      if test "xCHMOD" != xBASH; then
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5367$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5368      fi
5369      # Try to locate tool using the code snippet
5370      for ac_prog in chmod
5371do
5372  # Extract the first word of "$ac_prog", so it can be a program name with args.
5373set dummy $ac_prog; ac_word=$2
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5375$as_echo_n "checking for $ac_word... " >&6; }
5376if ${ac_cv_path_CHMOD+:} false; then :
5377  $as_echo_n "(cached) " >&6
5378else
5379  case $CHMOD in
5380  [\\/]* | ?:[\\/]*)
5381  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5382  ;;
5383  *)
5384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385for as_dir in $PATH
5386do
5387  IFS=$as_save_IFS
5388  test -z "$as_dir" && as_dir=.
5389    for ac_exec_ext in '' $ac_executable_extensions; do
5390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5391    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5393    break 2
5394  fi
5395done
5396  done
5397IFS=$as_save_IFS
5398
5399  ;;
5400esac
5401fi
5402CHMOD=$ac_cv_path_CHMOD
5403if test -n "$CHMOD"; then
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5405$as_echo "$CHMOD" >&6; }
5406else
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5408$as_echo "no" >&6; }
5409fi
5410
5411
5412  test -n "$CHMOD" && break
5413done
5414
5415    else
5416      # If it succeeded, then it was overridden by the user. We will use it
5417      # for the tool.
5418
5419      # First remove it from the list of overridden variables, so we can test
5420      # for unknown variables in the end.
5421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5422
5423      # Check if we try to supply an empty value
5424      if test "x$CHMOD" = x; then
5425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5426$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5428$as_echo_n "checking for CHMOD... " >&6; }
5429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5430$as_echo "disabled" >&6; }
5431      else
5432        # Check if the provided tool contains a complete path.
5433        tool_specified="$CHMOD"
5434        tool_basename="${tool_specified##*/}"
5435        if test "x$tool_basename" = "x$tool_specified"; then
5436          # A command without a complete path is provided, search $PATH.
5437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5438$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5439          # Extract the first word of "$tool_basename", so it can be a program name with args.
5440set dummy $tool_basename; ac_word=$2
5441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442$as_echo_n "checking for $ac_word... " >&6; }
5443if ${ac_cv_path_CHMOD+:} false; then :
5444  $as_echo_n "(cached) " >&6
5445else
5446  case $CHMOD in
5447  [\\/]* | ?:[\\/]*)
5448  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5449  ;;
5450  *)
5451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
5454  IFS=$as_save_IFS
5455  test -z "$as_dir" && as_dir=.
5456    for ac_exec_ext in '' $ac_executable_extensions; do
5457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460    break 2
5461  fi
5462done
5463  done
5464IFS=$as_save_IFS
5465
5466  ;;
5467esac
5468fi
5469CHMOD=$ac_cv_path_CHMOD
5470if test -n "$CHMOD"; then
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5472$as_echo "$CHMOD" >&6; }
5473else
5474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475$as_echo "no" >&6; }
5476fi
5477
5478
5479          if test "x$CHMOD" = x; then
5480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5481          fi
5482        else
5483          # Otherwise we believe it is a complete path. Use it as it is.
5484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5485$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5487$as_echo_n "checking for CHMOD... " >&6; }
5488          if test ! -x "$tool_specified"; then
5489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5490$as_echo "not found" >&6; }
5491            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5492          fi
5493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5494$as_echo "$tool_specified" >&6; }
5495        fi
5496      fi
5497    fi
5498
5499  fi
5500
5501
5502
5503  if test "x$CHMOD" = x; then
5504    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5505  fi
5506
5507
5508
5509
5510
5511  # Publish this variable in the help.
5512
5513
5514  if [ -z "${CMP+x}" ]; then
5515    # The variable is not set by user, try to locate tool using the code snippet
5516    for ac_prog in cmp
5517do
5518  # Extract the first word of "$ac_prog", so it can be a program name with args.
5519set dummy $ac_prog; ac_word=$2
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5521$as_echo_n "checking for $ac_word... " >&6; }
5522if ${ac_cv_path_CMP+:} false; then :
5523  $as_echo_n "(cached) " >&6
5524else
5525  case $CMP in
5526  [\\/]* | ?:[\\/]*)
5527  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5528  ;;
5529  *)
5530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5531for as_dir in $PATH
5532do
5533  IFS=$as_save_IFS
5534  test -z "$as_dir" && as_dir=.
5535    for ac_exec_ext in '' $ac_executable_extensions; do
5536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5537    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5539    break 2
5540  fi
5541done
5542  done
5543IFS=$as_save_IFS
5544
5545  ;;
5546esac
5547fi
5548CMP=$ac_cv_path_CMP
5549if test -n "$CMP"; then
5550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5551$as_echo "$CMP" >&6; }
5552else
5553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5554$as_echo "no" >&6; }
5555fi
5556
5557
5558  test -n "$CMP" && break
5559done
5560
5561  else
5562    # The variable is set, but is it from the command line or the environment?
5563
5564    # Try to remove the string !CMP! from our list.
5565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5567      # If it failed, the variable was not from the command line. Ignore it,
5568      # but warn the user (except for BASH, which is always set by the calling BASH).
5569      if test "xCMP" != xBASH; then
5570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5571$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5572      fi
5573      # Try to locate tool using the code snippet
5574      for ac_prog in cmp
5575do
5576  # Extract the first word of "$ac_prog", so it can be a program name with args.
5577set dummy $ac_prog; ac_word=$2
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5579$as_echo_n "checking for $ac_word... " >&6; }
5580if ${ac_cv_path_CMP+:} false; then :
5581  $as_echo_n "(cached) " >&6
5582else
5583  case $CMP in
5584  [\\/]* | ?:[\\/]*)
5585  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5586  ;;
5587  *)
5588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5589for as_dir in $PATH
5590do
5591  IFS=$as_save_IFS
5592  test -z "$as_dir" && as_dir=.
5593    for ac_exec_ext in '' $ac_executable_extensions; do
5594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5595    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5597    break 2
5598  fi
5599done
5600  done
5601IFS=$as_save_IFS
5602
5603  ;;
5604esac
5605fi
5606CMP=$ac_cv_path_CMP
5607if test -n "$CMP"; then
5608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5609$as_echo "$CMP" >&6; }
5610else
5611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5612$as_echo "no" >&6; }
5613fi
5614
5615
5616  test -n "$CMP" && break
5617done
5618
5619    else
5620      # If it succeeded, then it was overridden by the user. We will use it
5621      # for the tool.
5622
5623      # First remove it from the list of overridden variables, so we can test
5624      # for unknown variables in the end.
5625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5626
5627      # Check if we try to supply an empty value
5628      if test "x$CMP" = x; then
5629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5630$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5632$as_echo_n "checking for CMP... " >&6; }
5633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5634$as_echo "disabled" >&6; }
5635      else
5636        # Check if the provided tool contains a complete path.
5637        tool_specified="$CMP"
5638        tool_basename="${tool_specified##*/}"
5639        if test "x$tool_basename" = "x$tool_specified"; then
5640          # A command without a complete path is provided, search $PATH.
5641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5642$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5643          # Extract the first word of "$tool_basename", so it can be a program name with args.
5644set dummy $tool_basename; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_path_CMP+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650  case $CMP in
5651  [\\/]* | ?:[\\/]*)
5652  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5653  ;;
5654  *)
5655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656for as_dir in $PATH
5657do
5658  IFS=$as_save_IFS
5659  test -z "$as_dir" && as_dir=.
5660    for ac_exec_ext in '' $ac_executable_extensions; do
5661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5664    break 2
5665  fi
5666done
5667  done
5668IFS=$as_save_IFS
5669
5670  ;;
5671esac
5672fi
5673CMP=$ac_cv_path_CMP
5674if test -n "$CMP"; then
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5676$as_echo "$CMP" >&6; }
5677else
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
5680fi
5681
5682
5683          if test "x$CMP" = x; then
5684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5685          fi
5686        else
5687          # Otherwise we believe it is a complete path. Use it as it is.
5688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5689$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5691$as_echo_n "checking for CMP... " >&6; }
5692          if test ! -x "$tool_specified"; then
5693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5694$as_echo "not found" >&6; }
5695            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5696          fi
5697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5698$as_echo "$tool_specified" >&6; }
5699        fi
5700      fi
5701    fi
5702
5703  fi
5704
5705
5706
5707  if test "x$CMP" = x; then
5708    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5709  fi
5710
5711
5712
5713
5714
5715  # Publish this variable in the help.
5716
5717
5718  if [ -z "${COMM+x}" ]; then
5719    # The variable is not set by user, try to locate tool using the code snippet
5720    for ac_prog in comm
5721do
5722  # Extract the first word of "$ac_prog", so it can be a program name with args.
5723set dummy $ac_prog; ac_word=$2
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725$as_echo_n "checking for $ac_word... " >&6; }
5726if ${ac_cv_path_COMM+:} false; then :
5727  $as_echo_n "(cached) " >&6
5728else
5729  case $COMM in
5730  [\\/]* | ?:[\\/]*)
5731  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5732  ;;
5733  *)
5734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5735for as_dir in $PATH
5736do
5737  IFS=$as_save_IFS
5738  test -z "$as_dir" && as_dir=.
5739    for ac_exec_ext in '' $ac_executable_extensions; do
5740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5741    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5743    break 2
5744  fi
5745done
5746  done
5747IFS=$as_save_IFS
5748
5749  ;;
5750esac
5751fi
5752COMM=$ac_cv_path_COMM
5753if test -n "$COMM"; then
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5755$as_echo "$COMM" >&6; }
5756else
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
5759fi
5760
5761
5762  test -n "$COMM" && break
5763done
5764
5765  else
5766    # The variable is set, but is it from the command line or the environment?
5767
5768    # Try to remove the string !COMM! from our list.
5769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5771      # If it failed, the variable was not from the command line. Ignore it,
5772      # but warn the user (except for BASH, which is always set by the calling BASH).
5773      if test "xCOMM" != xBASH; then
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5775$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5776      fi
5777      # Try to locate tool using the code snippet
5778      for ac_prog in comm
5779do
5780  # Extract the first word of "$ac_prog", so it can be a program name with args.
5781set dummy $ac_prog; ac_word=$2
5782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783$as_echo_n "checking for $ac_word... " >&6; }
5784if ${ac_cv_path_COMM+:} false; then :
5785  $as_echo_n "(cached) " >&6
5786else
5787  case $COMM in
5788  [\\/]* | ?:[\\/]*)
5789  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5790  ;;
5791  *)
5792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793for as_dir in $PATH
5794do
5795  IFS=$as_save_IFS
5796  test -z "$as_dir" && as_dir=.
5797    for ac_exec_ext in '' $ac_executable_extensions; do
5798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5799    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801    break 2
5802  fi
5803done
5804  done
5805IFS=$as_save_IFS
5806
5807  ;;
5808esac
5809fi
5810COMM=$ac_cv_path_COMM
5811if test -n "$COMM"; then
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5813$as_echo "$COMM" >&6; }
5814else
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816$as_echo "no" >&6; }
5817fi
5818
5819
5820  test -n "$COMM" && break
5821done
5822
5823    else
5824      # If it succeeded, then it was overridden by the user. We will use it
5825      # for the tool.
5826
5827      # First remove it from the list of overridden variables, so we can test
5828      # for unknown variables in the end.
5829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5830
5831      # Check if we try to supply an empty value
5832      if test "x$COMM" = x; then
5833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5834$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5836$as_echo_n "checking for COMM... " >&6; }
5837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5838$as_echo "disabled" >&6; }
5839      else
5840        # Check if the provided tool contains a complete path.
5841        tool_specified="$COMM"
5842        tool_basename="${tool_specified##*/}"
5843        if test "x$tool_basename" = "x$tool_specified"; then
5844          # A command without a complete path is provided, search $PATH.
5845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5846$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5847          # Extract the first word of "$tool_basename", so it can be a program name with args.
5848set dummy $tool_basename; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if ${ac_cv_path_COMM+:} false; then :
5852  $as_echo_n "(cached) " >&6
5853else
5854  case $COMM in
5855  [\\/]* | ?:[\\/]*)
5856  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5857  ;;
5858  *)
5859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5860for as_dir in $PATH
5861do
5862  IFS=$as_save_IFS
5863  test -z "$as_dir" && as_dir=.
5864    for ac_exec_ext in '' $ac_executable_extensions; do
5865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5866    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5868    break 2
5869  fi
5870done
5871  done
5872IFS=$as_save_IFS
5873
5874  ;;
5875esac
5876fi
5877COMM=$ac_cv_path_COMM
5878if test -n "$COMM"; then
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5880$as_echo "$COMM" >&6; }
5881else
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883$as_echo "no" >&6; }
5884fi
5885
5886
5887          if test "x$COMM" = x; then
5888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5889          fi
5890        else
5891          # Otherwise we believe it is a complete path. Use it as it is.
5892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5893$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5895$as_echo_n "checking for COMM... " >&6; }
5896          if test ! -x "$tool_specified"; then
5897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5898$as_echo "not found" >&6; }
5899            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5900          fi
5901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5902$as_echo "$tool_specified" >&6; }
5903        fi
5904      fi
5905    fi
5906
5907  fi
5908
5909
5910
5911  if test "x$COMM" = x; then
5912    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5913  fi
5914
5915
5916
5917
5918
5919  # Publish this variable in the help.
5920
5921
5922  if [ -z "${CP+x}" ]; then
5923    # The variable is not set by user, try to locate tool using the code snippet
5924    for ac_prog in cp
5925do
5926  # Extract the first word of "$ac_prog", so it can be a program name with args.
5927set dummy $ac_prog; ac_word=$2
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929$as_echo_n "checking for $ac_word... " >&6; }
5930if ${ac_cv_path_CP+:} false; then :
5931  $as_echo_n "(cached) " >&6
5932else
5933  case $CP in
5934  [\\/]* | ?:[\\/]*)
5935  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5936  ;;
5937  *)
5938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941  IFS=$as_save_IFS
5942  test -z "$as_dir" && as_dir=.
5943    for ac_exec_ext in '' $ac_executable_extensions; do
5944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5945    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5947    break 2
5948  fi
5949done
5950  done
5951IFS=$as_save_IFS
5952
5953  ;;
5954esac
5955fi
5956CP=$ac_cv_path_CP
5957if test -n "$CP"; then
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5959$as_echo "$CP" >&6; }
5960else
5961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
5963fi
5964
5965
5966  test -n "$CP" && break
5967done
5968
5969  else
5970    # The variable is set, but is it from the command line or the environment?
5971
5972    # Try to remove the string !CP! from our list.
5973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5975      # If it failed, the variable was not from the command line. Ignore it,
5976      # but warn the user (except for BASH, which is always set by the calling BASH).
5977      if test "xCP" != xBASH; then
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5979$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5980      fi
5981      # Try to locate tool using the code snippet
5982      for ac_prog in cp
5983do
5984  # Extract the first word of "$ac_prog", so it can be a program name with args.
5985set dummy $ac_prog; ac_word=$2
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if ${ac_cv_path_CP+:} false; then :
5989  $as_echo_n "(cached) " >&6
5990else
5991  case $CP in
5992  [\\/]* | ?:[\\/]*)
5993  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5994  ;;
5995  *)
5996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999  IFS=$as_save_IFS
6000  test -z "$as_dir" && as_dir=.
6001    for ac_exec_ext in '' $ac_executable_extensions; do
6002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6003    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005    break 2
6006  fi
6007done
6008  done
6009IFS=$as_save_IFS
6010
6011  ;;
6012esac
6013fi
6014CP=$ac_cv_path_CP
6015if test -n "$CP"; then
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6017$as_echo "$CP" >&6; }
6018else
6019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024  test -n "$CP" && break
6025done
6026
6027    else
6028      # If it succeeded, then it was overridden by the user. We will use it
6029      # for the tool.
6030
6031      # First remove it from the list of overridden variables, so we can test
6032      # for unknown variables in the end.
6033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6034
6035      # Check if we try to supply an empty value
6036      if test "x$CP" = x; then
6037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6038$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6040$as_echo_n "checking for CP... " >&6; }
6041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6042$as_echo "disabled" >&6; }
6043      else
6044        # Check if the provided tool contains a complete path.
6045        tool_specified="$CP"
6046        tool_basename="${tool_specified##*/}"
6047        if test "x$tool_basename" = "x$tool_specified"; then
6048          # A command without a complete path is provided, search $PATH.
6049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6050$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6051          # Extract the first word of "$tool_basename", so it can be a program name with args.
6052set dummy $tool_basename; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_path_CP+:} false; then :
6056  $as_echo_n "(cached) " >&6
6057else
6058  case $CP in
6059  [\\/]* | ?:[\\/]*)
6060  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6061  ;;
6062  *)
6063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064for as_dir in $PATH
6065do
6066  IFS=$as_save_IFS
6067  test -z "$as_dir" && as_dir=.
6068    for ac_exec_ext in '' $ac_executable_extensions; do
6069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6070    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6072    break 2
6073  fi
6074done
6075  done
6076IFS=$as_save_IFS
6077
6078  ;;
6079esac
6080fi
6081CP=$ac_cv_path_CP
6082if test -n "$CP"; then
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6084$as_echo "$CP" >&6; }
6085else
6086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087$as_echo "no" >&6; }
6088fi
6089
6090
6091          if test "x$CP" = x; then
6092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6093          fi
6094        else
6095          # Otherwise we believe it is a complete path. Use it as it is.
6096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6097$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6099$as_echo_n "checking for CP... " >&6; }
6100          if test ! -x "$tool_specified"; then
6101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6102$as_echo "not found" >&6; }
6103            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6104          fi
6105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6106$as_echo "$tool_specified" >&6; }
6107        fi
6108      fi
6109    fi
6110
6111  fi
6112
6113
6114
6115  if test "x$CP" = x; then
6116    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6117  fi
6118
6119
6120
6121
6122
6123  # Publish this variable in the help.
6124
6125
6126  if [ -z "${CUT+x}" ]; then
6127    # The variable is not set by user, try to locate tool using the code snippet
6128    for ac_prog in cut
6129do
6130  # Extract the first word of "$ac_prog", so it can be a program name with args.
6131set dummy $ac_prog; ac_word=$2
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133$as_echo_n "checking for $ac_word... " >&6; }
6134if ${ac_cv_path_CUT+:} false; then :
6135  $as_echo_n "(cached) " >&6
6136else
6137  case $CUT in
6138  [\\/]* | ?:[\\/]*)
6139  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6140  ;;
6141  *)
6142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6143for as_dir in $PATH
6144do
6145  IFS=$as_save_IFS
6146  test -z "$as_dir" && as_dir=.
6147    for ac_exec_ext in '' $ac_executable_extensions; do
6148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6149    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6151    break 2
6152  fi
6153done
6154  done
6155IFS=$as_save_IFS
6156
6157  ;;
6158esac
6159fi
6160CUT=$ac_cv_path_CUT
6161if test -n "$CUT"; then
6162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6163$as_echo "$CUT" >&6; }
6164else
6165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166$as_echo "no" >&6; }
6167fi
6168
6169
6170  test -n "$CUT" && break
6171done
6172
6173  else
6174    # The variable is set, but is it from the command line or the environment?
6175
6176    # Try to remove the string !CUT! from our list.
6177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6179      # If it failed, the variable was not from the command line. Ignore it,
6180      # but warn the user (except for BASH, which is always set by the calling BASH).
6181      if test "xCUT" != xBASH; then
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6183$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6184      fi
6185      # Try to locate tool using the code snippet
6186      for ac_prog in cut
6187do
6188  # Extract the first word of "$ac_prog", so it can be a program name with args.
6189set dummy $ac_prog; ac_word=$2
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191$as_echo_n "checking for $ac_word... " >&6; }
6192if ${ac_cv_path_CUT+:} false; then :
6193  $as_echo_n "(cached) " >&6
6194else
6195  case $CUT in
6196  [\\/]* | ?:[\\/]*)
6197  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6198  ;;
6199  *)
6200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6201for as_dir in $PATH
6202do
6203  IFS=$as_save_IFS
6204  test -z "$as_dir" && as_dir=.
6205    for ac_exec_ext in '' $ac_executable_extensions; do
6206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6207    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6209    break 2
6210  fi
6211done
6212  done
6213IFS=$as_save_IFS
6214
6215  ;;
6216esac
6217fi
6218CUT=$ac_cv_path_CUT
6219if test -n "$CUT"; then
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6221$as_echo "$CUT" >&6; }
6222else
6223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224$as_echo "no" >&6; }
6225fi
6226
6227
6228  test -n "$CUT" && break
6229done
6230
6231    else
6232      # If it succeeded, then it was overridden by the user. We will use it
6233      # for the tool.
6234
6235      # First remove it from the list of overridden variables, so we can test
6236      # for unknown variables in the end.
6237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6238
6239      # Check if we try to supply an empty value
6240      if test "x$CUT" = x; then
6241        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6242$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6244$as_echo_n "checking for CUT... " >&6; }
6245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6246$as_echo "disabled" >&6; }
6247      else
6248        # Check if the provided tool contains a complete path.
6249        tool_specified="$CUT"
6250        tool_basename="${tool_specified##*/}"
6251        if test "x$tool_basename" = "x$tool_specified"; then
6252          # A command without a complete path is provided, search $PATH.
6253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6254$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6255          # Extract the first word of "$tool_basename", so it can be a program name with args.
6256set dummy $tool_basename; ac_word=$2
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6258$as_echo_n "checking for $ac_word... " >&6; }
6259if ${ac_cv_path_CUT+:} false; then :
6260  $as_echo_n "(cached) " >&6
6261else
6262  case $CUT in
6263  [\\/]* | ?:[\\/]*)
6264  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6265  ;;
6266  *)
6267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6268for as_dir in $PATH
6269do
6270  IFS=$as_save_IFS
6271  test -z "$as_dir" && as_dir=.
6272    for ac_exec_ext in '' $ac_executable_extensions; do
6273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6274    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6276    break 2
6277  fi
6278done
6279  done
6280IFS=$as_save_IFS
6281
6282  ;;
6283esac
6284fi
6285CUT=$ac_cv_path_CUT
6286if test -n "$CUT"; then
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6288$as_echo "$CUT" >&6; }
6289else
6290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6291$as_echo "no" >&6; }
6292fi
6293
6294
6295          if test "x$CUT" = x; then
6296            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6297          fi
6298        else
6299          # Otherwise we believe it is a complete path. Use it as it is.
6300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6301$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6302          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6303$as_echo_n "checking for CUT... " >&6; }
6304          if test ! -x "$tool_specified"; then
6305            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6306$as_echo "not found" >&6; }
6307            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6308          fi
6309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6310$as_echo "$tool_specified" >&6; }
6311        fi
6312      fi
6313    fi
6314
6315  fi
6316
6317
6318
6319  if test "x$CUT" = x; then
6320    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6321  fi
6322
6323
6324
6325
6326
6327  # Publish this variable in the help.
6328
6329
6330  if [ -z "${DATE+x}" ]; then
6331    # The variable is not set by user, try to locate tool using the code snippet
6332    for ac_prog in date
6333do
6334  # Extract the first word of "$ac_prog", so it can be a program name with args.
6335set dummy $ac_prog; ac_word=$2
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337$as_echo_n "checking for $ac_word... " >&6; }
6338if ${ac_cv_path_DATE+:} false; then :
6339  $as_echo_n "(cached) " >&6
6340else
6341  case $DATE in
6342  [\\/]* | ?:[\\/]*)
6343  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6344  ;;
6345  *)
6346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347for as_dir in $PATH
6348do
6349  IFS=$as_save_IFS
6350  test -z "$as_dir" && as_dir=.
6351    for ac_exec_ext in '' $ac_executable_extensions; do
6352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6353    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355    break 2
6356  fi
6357done
6358  done
6359IFS=$as_save_IFS
6360
6361  ;;
6362esac
6363fi
6364DATE=$ac_cv_path_DATE
6365if test -n "$DATE"; then
6366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6367$as_echo "$DATE" >&6; }
6368else
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
6371fi
6372
6373
6374  test -n "$DATE" && break
6375done
6376
6377  else
6378    # The variable is set, but is it from the command line or the environment?
6379
6380    # Try to remove the string !DATE! from our list.
6381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6383      # If it failed, the variable was not from the command line. Ignore it,
6384      # but warn the user (except for BASH, which is always set by the calling BASH).
6385      if test "xDATE" != xBASH; then
6386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6387$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6388      fi
6389      # Try to locate tool using the code snippet
6390      for ac_prog in date
6391do
6392  # Extract the first word of "$ac_prog", so it can be a program name with args.
6393set dummy $ac_prog; ac_word=$2
6394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6395$as_echo_n "checking for $ac_word... " >&6; }
6396if ${ac_cv_path_DATE+:} false; then :
6397  $as_echo_n "(cached) " >&6
6398else
6399  case $DATE in
6400  [\\/]* | ?:[\\/]*)
6401  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6402  ;;
6403  *)
6404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6405for as_dir in $PATH
6406do
6407  IFS=$as_save_IFS
6408  test -z "$as_dir" && as_dir=.
6409    for ac_exec_ext in '' $ac_executable_extensions; do
6410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6411    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6413    break 2
6414  fi
6415done
6416  done
6417IFS=$as_save_IFS
6418
6419  ;;
6420esac
6421fi
6422DATE=$ac_cv_path_DATE
6423if test -n "$DATE"; then
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6425$as_echo "$DATE" >&6; }
6426else
6427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428$as_echo "no" >&6; }
6429fi
6430
6431
6432  test -n "$DATE" && break
6433done
6434
6435    else
6436      # If it succeeded, then it was overridden by the user. We will use it
6437      # for the tool.
6438
6439      # First remove it from the list of overridden variables, so we can test
6440      # for unknown variables in the end.
6441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6442
6443      # Check if we try to supply an empty value
6444      if test "x$DATE" = x; then
6445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6446$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6448$as_echo_n "checking for DATE... " >&6; }
6449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6450$as_echo "disabled" >&6; }
6451      else
6452        # Check if the provided tool contains a complete path.
6453        tool_specified="$DATE"
6454        tool_basename="${tool_specified##*/}"
6455        if test "x$tool_basename" = "x$tool_specified"; then
6456          # A command without a complete path is provided, search $PATH.
6457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6458$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6459          # Extract the first word of "$tool_basename", so it can be a program name with args.
6460set dummy $tool_basename; ac_word=$2
6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6462$as_echo_n "checking for $ac_word... " >&6; }
6463if ${ac_cv_path_DATE+:} false; then :
6464  $as_echo_n "(cached) " >&6
6465else
6466  case $DATE in
6467  [\\/]* | ?:[\\/]*)
6468  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6469  ;;
6470  *)
6471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6472for as_dir in $PATH
6473do
6474  IFS=$as_save_IFS
6475  test -z "$as_dir" && as_dir=.
6476    for ac_exec_ext in '' $ac_executable_extensions; do
6477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6478    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6480    break 2
6481  fi
6482done
6483  done
6484IFS=$as_save_IFS
6485
6486  ;;
6487esac
6488fi
6489DATE=$ac_cv_path_DATE
6490if test -n "$DATE"; then
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6492$as_echo "$DATE" >&6; }
6493else
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6495$as_echo "no" >&6; }
6496fi
6497
6498
6499          if test "x$DATE" = x; then
6500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6501          fi
6502        else
6503          # Otherwise we believe it is a complete path. Use it as it is.
6504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6505$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6507$as_echo_n "checking for DATE... " >&6; }
6508          if test ! -x "$tool_specified"; then
6509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6510$as_echo "not found" >&6; }
6511            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6512          fi
6513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6514$as_echo "$tool_specified" >&6; }
6515        fi
6516      fi
6517    fi
6518
6519  fi
6520
6521
6522
6523  if test "x$DATE" = x; then
6524    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6525  fi
6526
6527
6528
6529
6530
6531  # Publish this variable in the help.
6532
6533
6534  if [ -z "${DIFF+x}" ]; then
6535    # The variable is not set by user, try to locate tool using the code snippet
6536    for ac_prog in gdiff diff
6537do
6538  # Extract the first word of "$ac_prog", so it can be a program name with args.
6539set dummy $ac_prog; ac_word=$2
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6541$as_echo_n "checking for $ac_word... " >&6; }
6542if ${ac_cv_path_DIFF+:} false; then :
6543  $as_echo_n "(cached) " >&6
6544else
6545  case $DIFF in
6546  [\\/]* | ?:[\\/]*)
6547  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6548  ;;
6549  *)
6550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6551for as_dir in $PATH
6552do
6553  IFS=$as_save_IFS
6554  test -z "$as_dir" && as_dir=.
6555    for ac_exec_ext in '' $ac_executable_extensions; do
6556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6557    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6559    break 2
6560  fi
6561done
6562  done
6563IFS=$as_save_IFS
6564
6565  ;;
6566esac
6567fi
6568DIFF=$ac_cv_path_DIFF
6569if test -n "$DIFF"; then
6570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6571$as_echo "$DIFF" >&6; }
6572else
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574$as_echo "no" >&6; }
6575fi
6576
6577
6578  test -n "$DIFF" && break
6579done
6580
6581  else
6582    # The variable is set, but is it from the command line or the environment?
6583
6584    # Try to remove the string !DIFF! from our list.
6585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6587      # If it failed, the variable was not from the command line. Ignore it,
6588      # but warn the user (except for BASH, which is always set by the calling BASH).
6589      if test "xDIFF" != xBASH; then
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6591$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6592      fi
6593      # Try to locate tool using the code snippet
6594      for ac_prog in gdiff diff
6595do
6596  # Extract the first word of "$ac_prog", so it can be a program name with args.
6597set dummy $ac_prog; ac_word=$2
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599$as_echo_n "checking for $ac_word... " >&6; }
6600if ${ac_cv_path_DIFF+:} false; then :
6601  $as_echo_n "(cached) " >&6
6602else
6603  case $DIFF in
6604  [\\/]* | ?:[\\/]*)
6605  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6606  ;;
6607  *)
6608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609for as_dir in $PATH
6610do
6611  IFS=$as_save_IFS
6612  test -z "$as_dir" && as_dir=.
6613    for ac_exec_ext in '' $ac_executable_extensions; do
6614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6615    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6617    break 2
6618  fi
6619done
6620  done
6621IFS=$as_save_IFS
6622
6623  ;;
6624esac
6625fi
6626DIFF=$ac_cv_path_DIFF
6627if test -n "$DIFF"; then
6628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6629$as_echo "$DIFF" >&6; }
6630else
6631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632$as_echo "no" >&6; }
6633fi
6634
6635
6636  test -n "$DIFF" && break
6637done
6638
6639    else
6640      # If it succeeded, then it was overridden by the user. We will use it
6641      # for the tool.
6642
6643      # First remove it from the list of overridden variables, so we can test
6644      # for unknown variables in the end.
6645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6646
6647      # Check if we try to supply an empty value
6648      if test "x$DIFF" = x; then
6649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6650$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6652$as_echo_n "checking for DIFF... " >&6; }
6653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6654$as_echo "disabled" >&6; }
6655      else
6656        # Check if the provided tool contains a complete path.
6657        tool_specified="$DIFF"
6658        tool_basename="${tool_specified##*/}"
6659        if test "x$tool_basename" = "x$tool_specified"; then
6660          # A command without a complete path is provided, search $PATH.
6661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6662$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6663          # Extract the first word of "$tool_basename", so it can be a program name with args.
6664set dummy $tool_basename; ac_word=$2
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6666$as_echo_n "checking for $ac_word... " >&6; }
6667if ${ac_cv_path_DIFF+:} false; then :
6668  $as_echo_n "(cached) " >&6
6669else
6670  case $DIFF in
6671  [\\/]* | ?:[\\/]*)
6672  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6673  ;;
6674  *)
6675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6676for as_dir in $PATH
6677do
6678  IFS=$as_save_IFS
6679  test -z "$as_dir" && as_dir=.
6680    for ac_exec_ext in '' $ac_executable_extensions; do
6681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6682    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6684    break 2
6685  fi
6686done
6687  done
6688IFS=$as_save_IFS
6689
6690  ;;
6691esac
6692fi
6693DIFF=$ac_cv_path_DIFF
6694if test -n "$DIFF"; then
6695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6696$as_echo "$DIFF" >&6; }
6697else
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6699$as_echo "no" >&6; }
6700fi
6701
6702
6703          if test "x$DIFF" = x; then
6704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6705          fi
6706        else
6707          # Otherwise we believe it is a complete path. Use it as it is.
6708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6709$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6711$as_echo_n "checking for DIFF... " >&6; }
6712          if test ! -x "$tool_specified"; then
6713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6714$as_echo "not found" >&6; }
6715            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6716          fi
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6718$as_echo "$tool_specified" >&6; }
6719        fi
6720      fi
6721    fi
6722
6723  fi
6724
6725
6726
6727  if test "x$DIFF" = x; then
6728    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6729  fi
6730
6731
6732
6733
6734
6735  # Publish this variable in the help.
6736
6737
6738  if [ -z "${DIRNAME+x}" ]; then
6739    # The variable is not set by user, try to locate tool using the code snippet
6740    for ac_prog in dirname
6741do
6742  # Extract the first word of "$ac_prog", so it can be a program name with args.
6743set dummy $ac_prog; ac_word=$2
6744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6745$as_echo_n "checking for $ac_word... " >&6; }
6746if ${ac_cv_path_DIRNAME+:} false; then :
6747  $as_echo_n "(cached) " >&6
6748else
6749  case $DIRNAME in
6750  [\\/]* | ?:[\\/]*)
6751  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6752  ;;
6753  *)
6754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6755for as_dir in $PATH
6756do
6757  IFS=$as_save_IFS
6758  test -z "$as_dir" && as_dir=.
6759    for ac_exec_ext in '' $ac_executable_extensions; do
6760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6761    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6763    break 2
6764  fi
6765done
6766  done
6767IFS=$as_save_IFS
6768
6769  ;;
6770esac
6771fi
6772DIRNAME=$ac_cv_path_DIRNAME
6773if test -n "$DIRNAME"; then
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6775$as_echo "$DIRNAME" >&6; }
6776else
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778$as_echo "no" >&6; }
6779fi
6780
6781
6782  test -n "$DIRNAME" && break
6783done
6784
6785  else
6786    # The variable is set, but is it from the command line or the environment?
6787
6788    # Try to remove the string !DIRNAME! from our list.
6789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6791      # If it failed, the variable was not from the command line. Ignore it,
6792      # but warn the user (except for BASH, which is always set by the calling BASH).
6793      if test "xDIRNAME" != xBASH; then
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6795$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6796      fi
6797      # Try to locate tool using the code snippet
6798      for ac_prog in dirname
6799do
6800  # Extract the first word of "$ac_prog", so it can be a program name with args.
6801set dummy $ac_prog; ac_word=$2
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803$as_echo_n "checking for $ac_word... " >&6; }
6804if ${ac_cv_path_DIRNAME+:} false; then :
6805  $as_echo_n "(cached) " >&6
6806else
6807  case $DIRNAME in
6808  [\\/]* | ?:[\\/]*)
6809  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6810  ;;
6811  *)
6812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813for as_dir in $PATH
6814do
6815  IFS=$as_save_IFS
6816  test -z "$as_dir" && as_dir=.
6817    for ac_exec_ext in '' $ac_executable_extensions; do
6818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6819    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6821    break 2
6822  fi
6823done
6824  done
6825IFS=$as_save_IFS
6826
6827  ;;
6828esac
6829fi
6830DIRNAME=$ac_cv_path_DIRNAME
6831if test -n "$DIRNAME"; then
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6833$as_echo "$DIRNAME" >&6; }
6834else
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836$as_echo "no" >&6; }
6837fi
6838
6839
6840  test -n "$DIRNAME" && break
6841done
6842
6843    else
6844      # If it succeeded, then it was overridden by the user. We will use it
6845      # for the tool.
6846
6847      # First remove it from the list of overridden variables, so we can test
6848      # for unknown variables in the end.
6849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6850
6851      # Check if we try to supply an empty value
6852      if test "x$DIRNAME" = x; then
6853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6854$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6856$as_echo_n "checking for DIRNAME... " >&6; }
6857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6858$as_echo "disabled" >&6; }
6859      else
6860        # Check if the provided tool contains a complete path.
6861        tool_specified="$DIRNAME"
6862        tool_basename="${tool_specified##*/}"
6863        if test "x$tool_basename" = "x$tool_specified"; then
6864          # A command without a complete path is provided, search $PATH.
6865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6866$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6867          # Extract the first word of "$tool_basename", so it can be a program name with args.
6868set dummy $tool_basename; ac_word=$2
6869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6870$as_echo_n "checking for $ac_word... " >&6; }
6871if ${ac_cv_path_DIRNAME+:} false; then :
6872  $as_echo_n "(cached) " >&6
6873else
6874  case $DIRNAME in
6875  [\\/]* | ?:[\\/]*)
6876  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6877  ;;
6878  *)
6879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6880for as_dir in $PATH
6881do
6882  IFS=$as_save_IFS
6883  test -z "$as_dir" && as_dir=.
6884    for ac_exec_ext in '' $ac_executable_extensions; do
6885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6886    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6888    break 2
6889  fi
6890done
6891  done
6892IFS=$as_save_IFS
6893
6894  ;;
6895esac
6896fi
6897DIRNAME=$ac_cv_path_DIRNAME
6898if test -n "$DIRNAME"; then
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6900$as_echo "$DIRNAME" >&6; }
6901else
6902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6903$as_echo "no" >&6; }
6904fi
6905
6906
6907          if test "x$DIRNAME" = x; then
6908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6909          fi
6910        else
6911          # Otherwise we believe it is a complete path. Use it as it is.
6912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6913$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6915$as_echo_n "checking for DIRNAME... " >&6; }
6916          if test ! -x "$tool_specified"; then
6917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6918$as_echo "not found" >&6; }
6919            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6920          fi
6921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6922$as_echo "$tool_specified" >&6; }
6923        fi
6924      fi
6925    fi
6926
6927  fi
6928
6929
6930
6931  if test "x$DIRNAME" = x; then
6932    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6933  fi
6934
6935
6936
6937
6938
6939  # Publish this variable in the help.
6940
6941
6942  if [ -z "${ECHO+x}" ]; then
6943    # The variable is not set by user, try to locate tool using the code snippet
6944    for ac_prog in echo
6945do
6946  # Extract the first word of "$ac_prog", so it can be a program name with args.
6947set dummy $ac_prog; ac_word=$2
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6949$as_echo_n "checking for $ac_word... " >&6; }
6950if ${ac_cv_path_ECHO+:} false; then :
6951  $as_echo_n "(cached) " >&6
6952else
6953  case $ECHO in
6954  [\\/]* | ?:[\\/]*)
6955  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6956  ;;
6957  *)
6958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6959for as_dir in $PATH
6960do
6961  IFS=$as_save_IFS
6962  test -z "$as_dir" && as_dir=.
6963    for ac_exec_ext in '' $ac_executable_extensions; do
6964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6965    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6967    break 2
6968  fi
6969done
6970  done
6971IFS=$as_save_IFS
6972
6973  ;;
6974esac
6975fi
6976ECHO=$ac_cv_path_ECHO
6977if test -n "$ECHO"; then
6978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6979$as_echo "$ECHO" >&6; }
6980else
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6982$as_echo "no" >&6; }
6983fi
6984
6985
6986  test -n "$ECHO" && break
6987done
6988
6989  else
6990    # The variable is set, but is it from the command line or the environment?
6991
6992    # Try to remove the string !ECHO! from our list.
6993    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6994    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6995      # If it failed, the variable was not from the command line. Ignore it,
6996      # but warn the user (except for BASH, which is always set by the calling BASH).
6997      if test "xECHO" != xBASH; then
6998        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6999$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7000      fi
7001      # Try to locate tool using the code snippet
7002      for ac_prog in echo
7003do
7004  # Extract the first word of "$ac_prog", so it can be a program name with args.
7005set dummy $ac_prog; ac_word=$2
7006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7007$as_echo_n "checking for $ac_word... " >&6; }
7008if ${ac_cv_path_ECHO+:} false; then :
7009  $as_echo_n "(cached) " >&6
7010else
7011  case $ECHO in
7012  [\\/]* | ?:[\\/]*)
7013  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7014  ;;
7015  *)
7016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7017for as_dir in $PATH
7018do
7019  IFS=$as_save_IFS
7020  test -z "$as_dir" && as_dir=.
7021    for ac_exec_ext in '' $ac_executable_extensions; do
7022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7023    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7025    break 2
7026  fi
7027done
7028  done
7029IFS=$as_save_IFS
7030
7031  ;;
7032esac
7033fi
7034ECHO=$ac_cv_path_ECHO
7035if test -n "$ECHO"; then
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7037$as_echo "$ECHO" >&6; }
7038else
7039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7040$as_echo "no" >&6; }
7041fi
7042
7043
7044  test -n "$ECHO" && break
7045done
7046
7047    else
7048      # If it succeeded, then it was overridden by the user. We will use it
7049      # for the tool.
7050
7051      # First remove it from the list of overridden variables, so we can test
7052      # for unknown variables in the end.
7053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7054
7055      # Check if we try to supply an empty value
7056      if test "x$ECHO" = x; then
7057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7058$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7060$as_echo_n "checking for ECHO... " >&6; }
7061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7062$as_echo "disabled" >&6; }
7063      else
7064        # Check if the provided tool contains a complete path.
7065        tool_specified="$ECHO"
7066        tool_basename="${tool_specified##*/}"
7067        if test "x$tool_basename" = "x$tool_specified"; then
7068          # A command without a complete path is provided, search $PATH.
7069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7070$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7071          # Extract the first word of "$tool_basename", so it can be a program name with args.
7072set dummy $tool_basename; ac_word=$2
7073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7074$as_echo_n "checking for $ac_word... " >&6; }
7075if ${ac_cv_path_ECHO+:} false; then :
7076  $as_echo_n "(cached) " >&6
7077else
7078  case $ECHO in
7079  [\\/]* | ?:[\\/]*)
7080  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7081  ;;
7082  *)
7083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084for as_dir in $PATH
7085do
7086  IFS=$as_save_IFS
7087  test -z "$as_dir" && as_dir=.
7088    for ac_exec_ext in '' $ac_executable_extensions; do
7089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7090    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7092    break 2
7093  fi
7094done
7095  done
7096IFS=$as_save_IFS
7097
7098  ;;
7099esac
7100fi
7101ECHO=$ac_cv_path_ECHO
7102if test -n "$ECHO"; then
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7104$as_echo "$ECHO" >&6; }
7105else
7106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7107$as_echo "no" >&6; }
7108fi
7109
7110
7111          if test "x$ECHO" = x; then
7112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7113          fi
7114        else
7115          # Otherwise we believe it is a complete path. Use it as it is.
7116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7117$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7119$as_echo_n "checking for ECHO... " >&6; }
7120          if test ! -x "$tool_specified"; then
7121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7122$as_echo "not found" >&6; }
7123            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7124          fi
7125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7126$as_echo "$tool_specified" >&6; }
7127        fi
7128      fi
7129    fi
7130
7131  fi
7132
7133
7134
7135  if test "x$ECHO" = x; then
7136    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7137  fi
7138
7139
7140
7141
7142
7143  # Publish this variable in the help.
7144
7145
7146  if [ -z "${EXPR+x}" ]; then
7147    # The variable is not set by user, try to locate tool using the code snippet
7148    for ac_prog in expr
7149do
7150  # Extract the first word of "$ac_prog", so it can be a program name with args.
7151set dummy $ac_prog; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_EXPR+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $EXPR in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180EXPR=$ac_cv_path_EXPR
7181if test -n "$EXPR"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7183$as_echo "$EXPR" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190  test -n "$EXPR" && break
7191done
7192
7193  else
7194    # The variable is set, but is it from the command line or the environment?
7195
7196    # Try to remove the string !EXPR! from our list.
7197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7199      # If it failed, the variable was not from the command line. Ignore it,
7200      # but warn the user (except for BASH, which is always set by the calling BASH).
7201      if test "xEXPR" != xBASH; then
7202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7203$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7204      fi
7205      # Try to locate tool using the code snippet
7206      for ac_prog in expr
7207do
7208  # Extract the first word of "$ac_prog", so it can be a program name with args.
7209set dummy $ac_prog; ac_word=$2
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
7212if ${ac_cv_path_EXPR+:} false; then :
7213  $as_echo_n "(cached) " >&6
7214else
7215  case $EXPR in
7216  [\\/]* | ?:[\\/]*)
7217  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7218  ;;
7219  *)
7220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221for as_dir in $PATH
7222do
7223  IFS=$as_save_IFS
7224  test -z "$as_dir" && as_dir=.
7225    for ac_exec_ext in '' $ac_executable_extensions; do
7226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229    break 2
7230  fi
7231done
7232  done
7233IFS=$as_save_IFS
7234
7235  ;;
7236esac
7237fi
7238EXPR=$ac_cv_path_EXPR
7239if test -n "$EXPR"; then
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7241$as_echo "$EXPR" >&6; }
7242else
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
7245fi
7246
7247
7248  test -n "$EXPR" && break
7249done
7250
7251    else
7252      # If it succeeded, then it was overridden by the user. We will use it
7253      # for the tool.
7254
7255      # First remove it from the list of overridden variables, so we can test
7256      # for unknown variables in the end.
7257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7258
7259      # Check if we try to supply an empty value
7260      if test "x$EXPR" = x; then
7261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7262$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7264$as_echo_n "checking for EXPR... " >&6; }
7265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7266$as_echo "disabled" >&6; }
7267      else
7268        # Check if the provided tool contains a complete path.
7269        tool_specified="$EXPR"
7270        tool_basename="${tool_specified##*/}"
7271        if test "x$tool_basename" = "x$tool_specified"; then
7272          # A command without a complete path is provided, search $PATH.
7273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7274$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7275          # Extract the first word of "$tool_basename", so it can be a program name with args.
7276set dummy $tool_basename; ac_word=$2
7277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7278$as_echo_n "checking for $ac_word... " >&6; }
7279if ${ac_cv_path_EXPR+:} false; then :
7280  $as_echo_n "(cached) " >&6
7281else
7282  case $EXPR in
7283  [\\/]* | ?:[\\/]*)
7284  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7285  ;;
7286  *)
7287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7288for as_dir in $PATH
7289do
7290  IFS=$as_save_IFS
7291  test -z "$as_dir" && as_dir=.
7292    for ac_exec_ext in '' $ac_executable_extensions; do
7293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7294    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7296    break 2
7297  fi
7298done
7299  done
7300IFS=$as_save_IFS
7301
7302  ;;
7303esac
7304fi
7305EXPR=$ac_cv_path_EXPR
7306if test -n "$EXPR"; then
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7308$as_echo "$EXPR" >&6; }
7309else
7310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311$as_echo "no" >&6; }
7312fi
7313
7314
7315          if test "x$EXPR" = x; then
7316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7317          fi
7318        else
7319          # Otherwise we believe it is a complete path. Use it as it is.
7320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7321$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7323$as_echo_n "checking for EXPR... " >&6; }
7324          if test ! -x "$tool_specified"; then
7325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7326$as_echo "not found" >&6; }
7327            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7328          fi
7329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7330$as_echo "$tool_specified" >&6; }
7331        fi
7332      fi
7333    fi
7334
7335  fi
7336
7337
7338
7339  if test "x$EXPR" = x; then
7340    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7341  fi
7342
7343
7344
7345
7346
7347  # Publish this variable in the help.
7348
7349
7350  if [ -z "${FILE+x}" ]; then
7351    # The variable is not set by user, try to locate tool using the code snippet
7352    for ac_prog in file
7353do
7354  # Extract the first word of "$ac_prog", so it can be a program name with args.
7355set dummy $ac_prog; ac_word=$2
7356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7357$as_echo_n "checking for $ac_word... " >&6; }
7358if ${ac_cv_path_FILE+:} false; then :
7359  $as_echo_n "(cached) " >&6
7360else
7361  case $FILE in
7362  [\\/]* | ?:[\\/]*)
7363  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7364  ;;
7365  *)
7366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7367for as_dir in $PATH
7368do
7369  IFS=$as_save_IFS
7370  test -z "$as_dir" && as_dir=.
7371    for ac_exec_ext in '' $ac_executable_extensions; do
7372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7373    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7375    break 2
7376  fi
7377done
7378  done
7379IFS=$as_save_IFS
7380
7381  ;;
7382esac
7383fi
7384FILE=$ac_cv_path_FILE
7385if test -n "$FILE"; then
7386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7387$as_echo "$FILE" >&6; }
7388else
7389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390$as_echo "no" >&6; }
7391fi
7392
7393
7394  test -n "$FILE" && break
7395done
7396
7397  else
7398    # The variable is set, but is it from the command line or the environment?
7399
7400    # Try to remove the string !FILE! from our list.
7401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7403      # If it failed, the variable was not from the command line. Ignore it,
7404      # but warn the user (except for BASH, which is always set by the calling BASH).
7405      if test "xFILE" != xBASH; then
7406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7407$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7408      fi
7409      # Try to locate tool using the code snippet
7410      for ac_prog in file
7411do
7412  # Extract the first word of "$ac_prog", so it can be a program name with args.
7413set dummy $ac_prog; ac_word=$2
7414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7415$as_echo_n "checking for $ac_word... " >&6; }
7416if ${ac_cv_path_FILE+:} false; then :
7417  $as_echo_n "(cached) " >&6
7418else
7419  case $FILE in
7420  [\\/]* | ?:[\\/]*)
7421  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7422  ;;
7423  *)
7424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7425for as_dir in $PATH
7426do
7427  IFS=$as_save_IFS
7428  test -z "$as_dir" && as_dir=.
7429    for ac_exec_ext in '' $ac_executable_extensions; do
7430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7431    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7433    break 2
7434  fi
7435done
7436  done
7437IFS=$as_save_IFS
7438
7439  ;;
7440esac
7441fi
7442FILE=$ac_cv_path_FILE
7443if test -n "$FILE"; then
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7445$as_echo "$FILE" >&6; }
7446else
7447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448$as_echo "no" >&6; }
7449fi
7450
7451
7452  test -n "$FILE" && break
7453done
7454
7455    else
7456      # If it succeeded, then it was overridden by the user. We will use it
7457      # for the tool.
7458
7459      # First remove it from the list of overridden variables, so we can test
7460      # for unknown variables in the end.
7461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7462
7463      # Check if we try to supply an empty value
7464      if test "x$FILE" = x; then
7465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7466$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7468$as_echo_n "checking for FILE... " >&6; }
7469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7470$as_echo "disabled" >&6; }
7471      else
7472        # Check if the provided tool contains a complete path.
7473        tool_specified="$FILE"
7474        tool_basename="${tool_specified##*/}"
7475        if test "x$tool_basename" = "x$tool_specified"; then
7476          # A command without a complete path is provided, search $PATH.
7477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7478$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7479          # Extract the first word of "$tool_basename", so it can be a program name with args.
7480set dummy $tool_basename; ac_word=$2
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7482$as_echo_n "checking for $ac_word... " >&6; }
7483if ${ac_cv_path_FILE+:} false; then :
7484  $as_echo_n "(cached) " >&6
7485else
7486  case $FILE in
7487  [\\/]* | ?:[\\/]*)
7488  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7489  ;;
7490  *)
7491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492for as_dir in $PATH
7493do
7494  IFS=$as_save_IFS
7495  test -z "$as_dir" && as_dir=.
7496    for ac_exec_ext in '' $ac_executable_extensions; do
7497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7498    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7500    break 2
7501  fi
7502done
7503  done
7504IFS=$as_save_IFS
7505
7506  ;;
7507esac
7508fi
7509FILE=$ac_cv_path_FILE
7510if test -n "$FILE"; then
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7512$as_echo "$FILE" >&6; }
7513else
7514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7515$as_echo "no" >&6; }
7516fi
7517
7518
7519          if test "x$FILE" = x; then
7520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7521          fi
7522        else
7523          # Otherwise we believe it is a complete path. Use it as it is.
7524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7525$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7527$as_echo_n "checking for FILE... " >&6; }
7528          if test ! -x "$tool_specified"; then
7529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7530$as_echo "not found" >&6; }
7531            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7532          fi
7533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7534$as_echo "$tool_specified" >&6; }
7535        fi
7536      fi
7537    fi
7538
7539  fi
7540
7541
7542
7543  if test "x$FILE" = x; then
7544    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7545  fi
7546
7547
7548
7549
7550
7551  # Publish this variable in the help.
7552
7553
7554  if [ -z "${FIND+x}" ]; then
7555    # The variable is not set by user, try to locate tool using the code snippet
7556    for ac_prog in find
7557do
7558  # Extract the first word of "$ac_prog", so it can be a program name with args.
7559set dummy $ac_prog; ac_word=$2
7560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7561$as_echo_n "checking for $ac_word... " >&6; }
7562if ${ac_cv_path_FIND+:} false; then :
7563  $as_echo_n "(cached) " >&6
7564else
7565  case $FIND in
7566  [\\/]* | ?:[\\/]*)
7567  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7568  ;;
7569  *)
7570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7571for as_dir in $PATH
7572do
7573  IFS=$as_save_IFS
7574  test -z "$as_dir" && as_dir=.
7575    for ac_exec_ext in '' $ac_executable_extensions; do
7576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7577    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7579    break 2
7580  fi
7581done
7582  done
7583IFS=$as_save_IFS
7584
7585  ;;
7586esac
7587fi
7588FIND=$ac_cv_path_FIND
7589if test -n "$FIND"; then
7590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7591$as_echo "$FIND" >&6; }
7592else
7593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7594$as_echo "no" >&6; }
7595fi
7596
7597
7598  test -n "$FIND" && break
7599done
7600
7601  else
7602    # The variable is set, but is it from the command line or the environment?
7603
7604    # Try to remove the string !FIND! from our list.
7605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7607      # If it failed, the variable was not from the command line. Ignore it,
7608      # but warn the user (except for BASH, which is always set by the calling BASH).
7609      if test "xFIND" != xBASH; then
7610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7611$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7612      fi
7613      # Try to locate tool using the code snippet
7614      for ac_prog in find
7615do
7616  # Extract the first word of "$ac_prog", so it can be a program name with args.
7617set dummy $ac_prog; ac_word=$2
7618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7619$as_echo_n "checking for $ac_word... " >&6; }
7620if ${ac_cv_path_FIND+:} false; then :
7621  $as_echo_n "(cached) " >&6
7622else
7623  case $FIND in
7624  [\\/]* | ?:[\\/]*)
7625  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7626  ;;
7627  *)
7628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7629for as_dir in $PATH
7630do
7631  IFS=$as_save_IFS
7632  test -z "$as_dir" && as_dir=.
7633    for ac_exec_ext in '' $ac_executable_extensions; do
7634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7635    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7637    break 2
7638  fi
7639done
7640  done
7641IFS=$as_save_IFS
7642
7643  ;;
7644esac
7645fi
7646FIND=$ac_cv_path_FIND
7647if test -n "$FIND"; then
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7649$as_echo "$FIND" >&6; }
7650else
7651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7652$as_echo "no" >&6; }
7653fi
7654
7655
7656  test -n "$FIND" && break
7657done
7658
7659    else
7660      # If it succeeded, then it was overridden by the user. We will use it
7661      # for the tool.
7662
7663      # First remove it from the list of overridden variables, so we can test
7664      # for unknown variables in the end.
7665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7666
7667      # Check if we try to supply an empty value
7668      if test "x$FIND" = x; then
7669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7670$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7672$as_echo_n "checking for FIND... " >&6; }
7673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7674$as_echo "disabled" >&6; }
7675      else
7676        # Check if the provided tool contains a complete path.
7677        tool_specified="$FIND"
7678        tool_basename="${tool_specified##*/}"
7679        if test "x$tool_basename" = "x$tool_specified"; then
7680          # A command without a complete path is provided, search $PATH.
7681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7682$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7683          # Extract the first word of "$tool_basename", so it can be a program name with args.
7684set dummy $tool_basename; ac_word=$2
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7686$as_echo_n "checking for $ac_word... " >&6; }
7687if ${ac_cv_path_FIND+:} false; then :
7688  $as_echo_n "(cached) " >&6
7689else
7690  case $FIND in
7691  [\\/]* | ?:[\\/]*)
7692  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7693  ;;
7694  *)
7695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7696for as_dir in $PATH
7697do
7698  IFS=$as_save_IFS
7699  test -z "$as_dir" && as_dir=.
7700    for ac_exec_ext in '' $ac_executable_extensions; do
7701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7702    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7704    break 2
7705  fi
7706done
7707  done
7708IFS=$as_save_IFS
7709
7710  ;;
7711esac
7712fi
7713FIND=$ac_cv_path_FIND
7714if test -n "$FIND"; then
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7716$as_echo "$FIND" >&6; }
7717else
7718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7719$as_echo "no" >&6; }
7720fi
7721
7722
7723          if test "x$FIND" = x; then
7724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7725          fi
7726        else
7727          # Otherwise we believe it is a complete path. Use it as it is.
7728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7729$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7731$as_echo_n "checking for FIND... " >&6; }
7732          if test ! -x "$tool_specified"; then
7733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7734$as_echo "not found" >&6; }
7735            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7736          fi
7737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7738$as_echo "$tool_specified" >&6; }
7739        fi
7740      fi
7741    fi
7742
7743  fi
7744
7745
7746
7747  if test "x$FIND" = x; then
7748    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7749  fi
7750
7751
7752
7753
7754
7755  # Publish this variable in the help.
7756
7757
7758  if [ -z "${HEAD+x}" ]; then
7759    # The variable is not set by user, try to locate tool using the code snippet
7760    for ac_prog in head
7761do
7762  # Extract the first word of "$ac_prog", so it can be a program name with args.
7763set dummy $ac_prog; ac_word=$2
7764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7765$as_echo_n "checking for $ac_word... " >&6; }
7766if ${ac_cv_path_HEAD+:} false; then :
7767  $as_echo_n "(cached) " >&6
7768else
7769  case $HEAD in
7770  [\\/]* | ?:[\\/]*)
7771  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7772  ;;
7773  *)
7774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775for as_dir in $PATH
7776do
7777  IFS=$as_save_IFS
7778  test -z "$as_dir" && as_dir=.
7779    for ac_exec_ext in '' $ac_executable_extensions; do
7780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783    break 2
7784  fi
7785done
7786  done
7787IFS=$as_save_IFS
7788
7789  ;;
7790esac
7791fi
7792HEAD=$ac_cv_path_HEAD
7793if test -n "$HEAD"; then
7794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7795$as_echo "$HEAD" >&6; }
7796else
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7798$as_echo "no" >&6; }
7799fi
7800
7801
7802  test -n "$HEAD" && break
7803done
7804
7805  else
7806    # The variable is set, but is it from the command line or the environment?
7807
7808    # Try to remove the string !HEAD! from our list.
7809    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7810    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7811      # If it failed, the variable was not from the command line. Ignore it,
7812      # but warn the user (except for BASH, which is always set by the calling BASH).
7813      if test "xHEAD" != xBASH; then
7814        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7815$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7816      fi
7817      # Try to locate tool using the code snippet
7818      for ac_prog in head
7819do
7820  # Extract the first word of "$ac_prog", so it can be a program name with args.
7821set dummy $ac_prog; ac_word=$2
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823$as_echo_n "checking for $ac_word... " >&6; }
7824if ${ac_cv_path_HEAD+:} false; then :
7825  $as_echo_n "(cached) " >&6
7826else
7827  case $HEAD in
7828  [\\/]* | ?:[\\/]*)
7829  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7830  ;;
7831  *)
7832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833for as_dir in $PATH
7834do
7835  IFS=$as_save_IFS
7836  test -z "$as_dir" && as_dir=.
7837    for ac_exec_ext in '' $ac_executable_extensions; do
7838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7839    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7841    break 2
7842  fi
7843done
7844  done
7845IFS=$as_save_IFS
7846
7847  ;;
7848esac
7849fi
7850HEAD=$ac_cv_path_HEAD
7851if test -n "$HEAD"; then
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7853$as_echo "$HEAD" >&6; }
7854else
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856$as_echo "no" >&6; }
7857fi
7858
7859
7860  test -n "$HEAD" && break
7861done
7862
7863    else
7864      # If it succeeded, then it was overridden by the user. We will use it
7865      # for the tool.
7866
7867      # First remove it from the list of overridden variables, so we can test
7868      # for unknown variables in the end.
7869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7870
7871      # Check if we try to supply an empty value
7872      if test "x$HEAD" = x; then
7873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7874$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7876$as_echo_n "checking for HEAD... " >&6; }
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7878$as_echo "disabled" >&6; }
7879      else
7880        # Check if the provided tool contains a complete path.
7881        tool_specified="$HEAD"
7882        tool_basename="${tool_specified##*/}"
7883        if test "x$tool_basename" = "x$tool_specified"; then
7884          # A command without a complete path is provided, search $PATH.
7885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7886$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7887          # Extract the first word of "$tool_basename", so it can be a program name with args.
7888set dummy $tool_basename; ac_word=$2
7889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7890$as_echo_n "checking for $ac_word... " >&6; }
7891if ${ac_cv_path_HEAD+:} false; then :
7892  $as_echo_n "(cached) " >&6
7893else
7894  case $HEAD in
7895  [\\/]* | ?:[\\/]*)
7896  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7897  ;;
7898  *)
7899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7900for as_dir in $PATH
7901do
7902  IFS=$as_save_IFS
7903  test -z "$as_dir" && as_dir=.
7904    for ac_exec_ext in '' $ac_executable_extensions; do
7905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7906    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7908    break 2
7909  fi
7910done
7911  done
7912IFS=$as_save_IFS
7913
7914  ;;
7915esac
7916fi
7917HEAD=$ac_cv_path_HEAD
7918if test -n "$HEAD"; then
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7920$as_echo "$HEAD" >&6; }
7921else
7922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7923$as_echo "no" >&6; }
7924fi
7925
7926
7927          if test "x$HEAD" = x; then
7928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7929          fi
7930        else
7931          # Otherwise we believe it is a complete path. Use it as it is.
7932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7933$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7935$as_echo_n "checking for HEAD... " >&6; }
7936          if test ! -x "$tool_specified"; then
7937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7938$as_echo "not found" >&6; }
7939            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7940          fi
7941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7942$as_echo "$tool_specified" >&6; }
7943        fi
7944      fi
7945    fi
7946
7947  fi
7948
7949
7950
7951  if test "x$HEAD" = x; then
7952    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7953  fi
7954
7955
7956
7957
7958
7959  # Publish this variable in the help.
7960
7961
7962  if [ -z "${LN+x}" ]; then
7963    # The variable is not set by user, try to locate tool using the code snippet
7964    for ac_prog in ln
7965do
7966  # Extract the first word of "$ac_prog", so it can be a program name with args.
7967set dummy $ac_prog; ac_word=$2
7968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7969$as_echo_n "checking for $ac_word... " >&6; }
7970if ${ac_cv_path_LN+:} false; then :
7971  $as_echo_n "(cached) " >&6
7972else
7973  case $LN in
7974  [\\/]* | ?:[\\/]*)
7975  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7976  ;;
7977  *)
7978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7979for as_dir in $PATH
7980do
7981  IFS=$as_save_IFS
7982  test -z "$as_dir" && as_dir=.
7983    for ac_exec_ext in '' $ac_executable_extensions; do
7984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7985    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7987    break 2
7988  fi
7989done
7990  done
7991IFS=$as_save_IFS
7992
7993  ;;
7994esac
7995fi
7996LN=$ac_cv_path_LN
7997if test -n "$LN"; then
7998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7999$as_echo "$LN" >&6; }
8000else
8001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8002$as_echo "no" >&6; }
8003fi
8004
8005
8006  test -n "$LN" && break
8007done
8008
8009  else
8010    # The variable is set, but is it from the command line or the environment?
8011
8012    # Try to remove the string !LN! from our list.
8013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8015      # If it failed, the variable was not from the command line. Ignore it,
8016      # but warn the user (except for BASH, which is always set by the calling BASH).
8017      if test "xLN" != xBASH; then
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8019$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8020      fi
8021      # Try to locate tool using the code snippet
8022      for ac_prog in ln
8023do
8024  # Extract the first word of "$ac_prog", so it can be a program name with args.
8025set dummy $ac_prog; ac_word=$2
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8027$as_echo_n "checking for $ac_word... " >&6; }
8028if ${ac_cv_path_LN+:} false; then :
8029  $as_echo_n "(cached) " >&6
8030else
8031  case $LN in
8032  [\\/]* | ?:[\\/]*)
8033  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8034  ;;
8035  *)
8036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8037for as_dir in $PATH
8038do
8039  IFS=$as_save_IFS
8040  test -z "$as_dir" && as_dir=.
8041    for ac_exec_ext in '' $ac_executable_extensions; do
8042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8043    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8045    break 2
8046  fi
8047done
8048  done
8049IFS=$as_save_IFS
8050
8051  ;;
8052esac
8053fi
8054LN=$ac_cv_path_LN
8055if test -n "$LN"; then
8056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8057$as_echo "$LN" >&6; }
8058else
8059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060$as_echo "no" >&6; }
8061fi
8062
8063
8064  test -n "$LN" && break
8065done
8066
8067    else
8068      # If it succeeded, then it was overridden by the user. We will use it
8069      # for the tool.
8070
8071      # First remove it from the list of overridden variables, so we can test
8072      # for unknown variables in the end.
8073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8074
8075      # Check if we try to supply an empty value
8076      if test "x$LN" = x; then
8077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8078$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8080$as_echo_n "checking for LN... " >&6; }
8081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8082$as_echo "disabled" >&6; }
8083      else
8084        # Check if the provided tool contains a complete path.
8085        tool_specified="$LN"
8086        tool_basename="${tool_specified##*/}"
8087        if test "x$tool_basename" = "x$tool_specified"; then
8088          # A command without a complete path is provided, search $PATH.
8089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8090$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8091          # Extract the first word of "$tool_basename", so it can be a program name with args.
8092set dummy $tool_basename; ac_word=$2
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8094$as_echo_n "checking for $ac_word... " >&6; }
8095if ${ac_cv_path_LN+:} false; then :
8096  $as_echo_n "(cached) " >&6
8097else
8098  case $LN in
8099  [\\/]* | ?:[\\/]*)
8100  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8101  ;;
8102  *)
8103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8104for as_dir in $PATH
8105do
8106  IFS=$as_save_IFS
8107  test -z "$as_dir" && as_dir=.
8108    for ac_exec_ext in '' $ac_executable_extensions; do
8109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8110    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8112    break 2
8113  fi
8114done
8115  done
8116IFS=$as_save_IFS
8117
8118  ;;
8119esac
8120fi
8121LN=$ac_cv_path_LN
8122if test -n "$LN"; then
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8124$as_echo "$LN" >&6; }
8125else
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127$as_echo "no" >&6; }
8128fi
8129
8130
8131          if test "x$LN" = x; then
8132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8133          fi
8134        else
8135          # Otherwise we believe it is a complete path. Use it as it is.
8136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8137$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8139$as_echo_n "checking for LN... " >&6; }
8140          if test ! -x "$tool_specified"; then
8141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8142$as_echo "not found" >&6; }
8143            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8144          fi
8145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8146$as_echo "$tool_specified" >&6; }
8147        fi
8148      fi
8149    fi
8150
8151  fi
8152
8153
8154
8155  if test "x$LN" = x; then
8156    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8157  fi
8158
8159
8160
8161
8162
8163  # Publish this variable in the help.
8164
8165
8166  if [ -z "${LS+x}" ]; then
8167    # The variable is not set by user, try to locate tool using the code snippet
8168    for ac_prog in ls
8169do
8170  # Extract the first word of "$ac_prog", so it can be a program name with args.
8171set dummy $ac_prog; ac_word=$2
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8173$as_echo_n "checking for $ac_word... " >&6; }
8174if ${ac_cv_path_LS+:} false; then :
8175  $as_echo_n "(cached) " >&6
8176else
8177  case $LS in
8178  [\\/]* | ?:[\\/]*)
8179  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8180  ;;
8181  *)
8182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8183for as_dir in $PATH
8184do
8185  IFS=$as_save_IFS
8186  test -z "$as_dir" && as_dir=.
8187    for ac_exec_ext in '' $ac_executable_extensions; do
8188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8189    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8191    break 2
8192  fi
8193done
8194  done
8195IFS=$as_save_IFS
8196
8197  ;;
8198esac
8199fi
8200LS=$ac_cv_path_LS
8201if test -n "$LS"; then
8202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8203$as_echo "$LS" >&6; }
8204else
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
8207fi
8208
8209
8210  test -n "$LS" && break
8211done
8212
8213  else
8214    # The variable is set, but is it from the command line or the environment?
8215
8216    # Try to remove the string !LS! from our list.
8217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8219      # If it failed, the variable was not from the command line. Ignore it,
8220      # but warn the user (except for BASH, which is always set by the calling BASH).
8221      if test "xLS" != xBASH; then
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8223$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8224      fi
8225      # Try to locate tool using the code snippet
8226      for ac_prog in ls
8227do
8228  # Extract the first word of "$ac_prog", so it can be a program name with args.
8229set dummy $ac_prog; ac_word=$2
8230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8231$as_echo_n "checking for $ac_word... " >&6; }
8232if ${ac_cv_path_LS+:} false; then :
8233  $as_echo_n "(cached) " >&6
8234else
8235  case $LS in
8236  [\\/]* | ?:[\\/]*)
8237  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8238  ;;
8239  *)
8240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8241for as_dir in $PATH
8242do
8243  IFS=$as_save_IFS
8244  test -z "$as_dir" && as_dir=.
8245    for ac_exec_ext in '' $ac_executable_extensions; do
8246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8247    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8249    break 2
8250  fi
8251done
8252  done
8253IFS=$as_save_IFS
8254
8255  ;;
8256esac
8257fi
8258LS=$ac_cv_path_LS
8259if test -n "$LS"; then
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8261$as_echo "$LS" >&6; }
8262else
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8264$as_echo "no" >&6; }
8265fi
8266
8267
8268  test -n "$LS" && break
8269done
8270
8271    else
8272      # If it succeeded, then it was overridden by the user. We will use it
8273      # for the tool.
8274
8275      # First remove it from the list of overridden variables, so we can test
8276      # for unknown variables in the end.
8277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8278
8279      # Check if we try to supply an empty value
8280      if test "x$LS" = x; then
8281        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8282$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8284$as_echo_n "checking for LS... " >&6; }
8285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8286$as_echo "disabled" >&6; }
8287      else
8288        # Check if the provided tool contains a complete path.
8289        tool_specified="$LS"
8290        tool_basename="${tool_specified##*/}"
8291        if test "x$tool_basename" = "x$tool_specified"; then
8292          # A command without a complete path is provided, search $PATH.
8293          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8294$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8295          # Extract the first word of "$tool_basename", so it can be a program name with args.
8296set dummy $tool_basename; ac_word=$2
8297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8298$as_echo_n "checking for $ac_word... " >&6; }
8299if ${ac_cv_path_LS+:} false; then :
8300  $as_echo_n "(cached) " >&6
8301else
8302  case $LS in
8303  [\\/]* | ?:[\\/]*)
8304  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8305  ;;
8306  *)
8307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8308for as_dir in $PATH
8309do
8310  IFS=$as_save_IFS
8311  test -z "$as_dir" && as_dir=.
8312    for ac_exec_ext in '' $ac_executable_extensions; do
8313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8314    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8316    break 2
8317  fi
8318done
8319  done
8320IFS=$as_save_IFS
8321
8322  ;;
8323esac
8324fi
8325LS=$ac_cv_path_LS
8326if test -n "$LS"; then
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8328$as_echo "$LS" >&6; }
8329else
8330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8331$as_echo "no" >&6; }
8332fi
8333
8334
8335          if test "x$LS" = x; then
8336            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8337          fi
8338        else
8339          # Otherwise we believe it is a complete path. Use it as it is.
8340          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8341$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8342          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8343$as_echo_n "checking for LS... " >&6; }
8344          if test ! -x "$tool_specified"; then
8345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8346$as_echo "not found" >&6; }
8347            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8348          fi
8349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8350$as_echo "$tool_specified" >&6; }
8351        fi
8352      fi
8353    fi
8354
8355  fi
8356
8357
8358
8359  if test "x$LS" = x; then
8360    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8361  fi
8362
8363
8364
8365
8366
8367  # Publish this variable in the help.
8368
8369
8370  if [ -z "${MKDIR+x}" ]; then
8371    # The variable is not set by user, try to locate tool using the code snippet
8372    for ac_prog in mkdir
8373do
8374  # Extract the first word of "$ac_prog", so it can be a program name with args.
8375set dummy $ac_prog; ac_word=$2
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8377$as_echo_n "checking for $ac_word... " >&6; }
8378if ${ac_cv_path_MKDIR+:} false; then :
8379  $as_echo_n "(cached) " >&6
8380else
8381  case $MKDIR in
8382  [\\/]* | ?:[\\/]*)
8383  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8384  ;;
8385  *)
8386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8387for as_dir in $PATH
8388do
8389  IFS=$as_save_IFS
8390  test -z "$as_dir" && as_dir=.
8391    for ac_exec_ext in '' $ac_executable_extensions; do
8392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8393    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8395    break 2
8396  fi
8397done
8398  done
8399IFS=$as_save_IFS
8400
8401  ;;
8402esac
8403fi
8404MKDIR=$ac_cv_path_MKDIR
8405if test -n "$MKDIR"; then
8406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8407$as_echo "$MKDIR" >&6; }
8408else
8409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8410$as_echo "no" >&6; }
8411fi
8412
8413
8414  test -n "$MKDIR" && break
8415done
8416
8417  else
8418    # The variable is set, but is it from the command line or the environment?
8419
8420    # Try to remove the string !MKDIR! from our list.
8421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8423      # If it failed, the variable was not from the command line. Ignore it,
8424      # but warn the user (except for BASH, which is always set by the calling BASH).
8425      if test "xMKDIR" != xBASH; then
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8427$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8428      fi
8429      # Try to locate tool using the code snippet
8430      for ac_prog in mkdir
8431do
8432  # Extract the first word of "$ac_prog", so it can be a program name with args.
8433set dummy $ac_prog; ac_word=$2
8434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8435$as_echo_n "checking for $ac_word... " >&6; }
8436if ${ac_cv_path_MKDIR+:} false; then :
8437  $as_echo_n "(cached) " >&6
8438else
8439  case $MKDIR in
8440  [\\/]* | ?:[\\/]*)
8441  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8442  ;;
8443  *)
8444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445for as_dir in $PATH
8446do
8447  IFS=$as_save_IFS
8448  test -z "$as_dir" && as_dir=.
8449    for ac_exec_ext in '' $ac_executable_extensions; do
8450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8451    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8453    break 2
8454  fi
8455done
8456  done
8457IFS=$as_save_IFS
8458
8459  ;;
8460esac
8461fi
8462MKDIR=$ac_cv_path_MKDIR
8463if test -n "$MKDIR"; then
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8465$as_echo "$MKDIR" >&6; }
8466else
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468$as_echo "no" >&6; }
8469fi
8470
8471
8472  test -n "$MKDIR" && break
8473done
8474
8475    else
8476      # If it succeeded, then it was overridden by the user. We will use it
8477      # for the tool.
8478
8479      # First remove it from the list of overridden variables, so we can test
8480      # for unknown variables in the end.
8481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8482
8483      # Check if we try to supply an empty value
8484      if test "x$MKDIR" = x; then
8485        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8486$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8488$as_echo_n "checking for MKDIR... " >&6; }
8489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8490$as_echo "disabled" >&6; }
8491      else
8492        # Check if the provided tool contains a complete path.
8493        tool_specified="$MKDIR"
8494        tool_basename="${tool_specified##*/}"
8495        if test "x$tool_basename" = "x$tool_specified"; then
8496          # A command without a complete path is provided, search $PATH.
8497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8498$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8499          # Extract the first word of "$tool_basename", so it can be a program name with args.
8500set dummy $tool_basename; ac_word=$2
8501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8502$as_echo_n "checking for $ac_word... " >&6; }
8503if ${ac_cv_path_MKDIR+:} false; then :
8504  $as_echo_n "(cached) " >&6
8505else
8506  case $MKDIR in
8507  [\\/]* | ?:[\\/]*)
8508  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8509  ;;
8510  *)
8511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8512for as_dir in $PATH
8513do
8514  IFS=$as_save_IFS
8515  test -z "$as_dir" && as_dir=.
8516    for ac_exec_ext in '' $ac_executable_extensions; do
8517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8518    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8520    break 2
8521  fi
8522done
8523  done
8524IFS=$as_save_IFS
8525
8526  ;;
8527esac
8528fi
8529MKDIR=$ac_cv_path_MKDIR
8530if test -n "$MKDIR"; then
8531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8532$as_echo "$MKDIR" >&6; }
8533else
8534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8535$as_echo "no" >&6; }
8536fi
8537
8538
8539          if test "x$MKDIR" = x; then
8540            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8541          fi
8542        else
8543          # Otherwise we believe it is a complete path. Use it as it is.
8544          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8545$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8546          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8547$as_echo_n "checking for MKDIR... " >&6; }
8548          if test ! -x "$tool_specified"; then
8549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8550$as_echo "not found" >&6; }
8551            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8552          fi
8553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8554$as_echo "$tool_specified" >&6; }
8555        fi
8556      fi
8557    fi
8558
8559  fi
8560
8561
8562
8563  if test "x$MKDIR" = x; then
8564    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8565  fi
8566
8567
8568
8569
8570
8571  # Publish this variable in the help.
8572
8573
8574  if [ -z "${MKTEMP+x}" ]; then
8575    # The variable is not set by user, try to locate tool using the code snippet
8576    for ac_prog in mktemp
8577do
8578  # Extract the first word of "$ac_prog", so it can be a program name with args.
8579set dummy $ac_prog; ac_word=$2
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581$as_echo_n "checking for $ac_word... " >&6; }
8582if ${ac_cv_path_MKTEMP+:} false; then :
8583  $as_echo_n "(cached) " >&6
8584else
8585  case $MKTEMP in
8586  [\\/]* | ?:[\\/]*)
8587  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8588  ;;
8589  *)
8590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593  IFS=$as_save_IFS
8594  test -z "$as_dir" && as_dir=.
8595    for ac_exec_ext in '' $ac_executable_extensions; do
8596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8597    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8599    break 2
8600  fi
8601done
8602  done
8603IFS=$as_save_IFS
8604
8605  ;;
8606esac
8607fi
8608MKTEMP=$ac_cv_path_MKTEMP
8609if test -n "$MKTEMP"; then
8610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8611$as_echo "$MKTEMP" >&6; }
8612else
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614$as_echo "no" >&6; }
8615fi
8616
8617
8618  test -n "$MKTEMP" && break
8619done
8620
8621  else
8622    # The variable is set, but is it from the command line or the environment?
8623
8624    # Try to remove the string !MKTEMP! from our list.
8625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8627      # If it failed, the variable was not from the command line. Ignore it,
8628      # but warn the user (except for BASH, which is always set by the calling BASH).
8629      if test "xMKTEMP" != xBASH; then
8630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8631$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8632      fi
8633      # Try to locate tool using the code snippet
8634      for ac_prog in mktemp
8635do
8636  # Extract the first word of "$ac_prog", so it can be a program name with args.
8637set dummy $ac_prog; ac_word=$2
8638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639$as_echo_n "checking for $ac_word... " >&6; }
8640if ${ac_cv_path_MKTEMP+:} false; then :
8641  $as_echo_n "(cached) " >&6
8642else
8643  case $MKTEMP in
8644  [\\/]* | ?:[\\/]*)
8645  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8646  ;;
8647  *)
8648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649for as_dir in $PATH
8650do
8651  IFS=$as_save_IFS
8652  test -z "$as_dir" && as_dir=.
8653    for ac_exec_ext in '' $ac_executable_extensions; do
8654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657    break 2
8658  fi
8659done
8660  done
8661IFS=$as_save_IFS
8662
8663  ;;
8664esac
8665fi
8666MKTEMP=$ac_cv_path_MKTEMP
8667if test -n "$MKTEMP"; then
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8669$as_echo "$MKTEMP" >&6; }
8670else
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672$as_echo "no" >&6; }
8673fi
8674
8675
8676  test -n "$MKTEMP" && break
8677done
8678
8679    else
8680      # If it succeeded, then it was overridden by the user. We will use it
8681      # for the tool.
8682
8683      # First remove it from the list of overridden variables, so we can test
8684      # for unknown variables in the end.
8685      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8686
8687      # Check if we try to supply an empty value
8688      if test "x$MKTEMP" = x; then
8689        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8690$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8692$as_echo_n "checking for MKTEMP... " >&6; }
8693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8694$as_echo "disabled" >&6; }
8695      else
8696        # Check if the provided tool contains a complete path.
8697        tool_specified="$MKTEMP"
8698        tool_basename="${tool_specified##*/}"
8699        if test "x$tool_basename" = "x$tool_specified"; then
8700          # A command without a complete path is provided, search $PATH.
8701          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8702$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8703          # Extract the first word of "$tool_basename", so it can be a program name with args.
8704set dummy $tool_basename; ac_word=$2
8705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8706$as_echo_n "checking for $ac_word... " >&6; }
8707if ${ac_cv_path_MKTEMP+:} false; then :
8708  $as_echo_n "(cached) " >&6
8709else
8710  case $MKTEMP in
8711  [\\/]* | ?:[\\/]*)
8712  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8713  ;;
8714  *)
8715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8716for as_dir in $PATH
8717do
8718  IFS=$as_save_IFS
8719  test -z "$as_dir" && as_dir=.
8720    for ac_exec_ext in '' $ac_executable_extensions; do
8721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8722    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8724    break 2
8725  fi
8726done
8727  done
8728IFS=$as_save_IFS
8729
8730  ;;
8731esac
8732fi
8733MKTEMP=$ac_cv_path_MKTEMP
8734if test -n "$MKTEMP"; then
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8736$as_echo "$MKTEMP" >&6; }
8737else
8738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8739$as_echo "no" >&6; }
8740fi
8741
8742
8743          if test "x$MKTEMP" = x; then
8744            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8745          fi
8746        else
8747          # Otherwise we believe it is a complete path. Use it as it is.
8748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8749$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8750          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8751$as_echo_n "checking for MKTEMP... " >&6; }
8752          if test ! -x "$tool_specified"; then
8753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8754$as_echo "not found" >&6; }
8755            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8756          fi
8757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8758$as_echo "$tool_specified" >&6; }
8759        fi
8760      fi
8761    fi
8762
8763  fi
8764
8765
8766
8767  if test "x$MKTEMP" = x; then
8768    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8769  fi
8770
8771
8772
8773
8774
8775  # Publish this variable in the help.
8776
8777
8778  if [ -z "${MV+x}" ]; then
8779    # The variable is not set by user, try to locate tool using the code snippet
8780    for ac_prog in mv
8781do
8782  # Extract the first word of "$ac_prog", so it can be a program name with args.
8783set dummy $ac_prog; ac_word=$2
8784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8785$as_echo_n "checking for $ac_word... " >&6; }
8786if ${ac_cv_path_MV+:} false; then :
8787  $as_echo_n "(cached) " >&6
8788else
8789  case $MV in
8790  [\\/]* | ?:[\\/]*)
8791  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8792  ;;
8793  *)
8794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8795for as_dir in $PATH
8796do
8797  IFS=$as_save_IFS
8798  test -z "$as_dir" && as_dir=.
8799    for ac_exec_ext in '' $ac_executable_extensions; do
8800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8801    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8803    break 2
8804  fi
8805done
8806  done
8807IFS=$as_save_IFS
8808
8809  ;;
8810esac
8811fi
8812MV=$ac_cv_path_MV
8813if test -n "$MV"; then
8814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8815$as_echo "$MV" >&6; }
8816else
8817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
8819fi
8820
8821
8822  test -n "$MV" && break
8823done
8824
8825  else
8826    # The variable is set, but is it from the command line or the environment?
8827
8828    # Try to remove the string !MV! from our list.
8829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8831      # If it failed, the variable was not from the command line. Ignore it,
8832      # but warn the user (except for BASH, which is always set by the calling BASH).
8833      if test "xMV" != xBASH; then
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8835$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8836      fi
8837      # Try to locate tool using the code snippet
8838      for ac_prog in mv
8839do
8840  # Extract the first word of "$ac_prog", so it can be a program name with args.
8841set dummy $ac_prog; ac_word=$2
8842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8843$as_echo_n "checking for $ac_word... " >&6; }
8844if ${ac_cv_path_MV+:} false; then :
8845  $as_echo_n "(cached) " >&6
8846else
8847  case $MV in
8848  [\\/]* | ?:[\\/]*)
8849  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8850  ;;
8851  *)
8852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8853for as_dir in $PATH
8854do
8855  IFS=$as_save_IFS
8856  test -z "$as_dir" && as_dir=.
8857    for ac_exec_ext in '' $ac_executable_extensions; do
8858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8859    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8861    break 2
8862  fi
8863done
8864  done
8865IFS=$as_save_IFS
8866
8867  ;;
8868esac
8869fi
8870MV=$ac_cv_path_MV
8871if test -n "$MV"; then
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8873$as_echo "$MV" >&6; }
8874else
8875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876$as_echo "no" >&6; }
8877fi
8878
8879
8880  test -n "$MV" && break
8881done
8882
8883    else
8884      # If it succeeded, then it was overridden by the user. We will use it
8885      # for the tool.
8886
8887      # First remove it from the list of overridden variables, so we can test
8888      # for unknown variables in the end.
8889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8890
8891      # Check if we try to supply an empty value
8892      if test "x$MV" = x; then
8893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8894$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8896$as_echo_n "checking for MV... " >&6; }
8897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8898$as_echo "disabled" >&6; }
8899      else
8900        # Check if the provided tool contains a complete path.
8901        tool_specified="$MV"
8902        tool_basename="${tool_specified##*/}"
8903        if test "x$tool_basename" = "x$tool_specified"; then
8904          # A command without a complete path is provided, search $PATH.
8905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8906$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8907          # Extract the first word of "$tool_basename", so it can be a program name with args.
8908set dummy $tool_basename; ac_word=$2
8909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8910$as_echo_n "checking for $ac_word... " >&6; }
8911if ${ac_cv_path_MV+:} false; then :
8912  $as_echo_n "(cached) " >&6
8913else
8914  case $MV in
8915  [\\/]* | ?:[\\/]*)
8916  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8917  ;;
8918  *)
8919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8920for as_dir in $PATH
8921do
8922  IFS=$as_save_IFS
8923  test -z "$as_dir" && as_dir=.
8924    for ac_exec_ext in '' $ac_executable_extensions; do
8925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8926    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8928    break 2
8929  fi
8930done
8931  done
8932IFS=$as_save_IFS
8933
8934  ;;
8935esac
8936fi
8937MV=$ac_cv_path_MV
8938if test -n "$MV"; then
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8940$as_echo "$MV" >&6; }
8941else
8942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8943$as_echo "no" >&6; }
8944fi
8945
8946
8947          if test "x$MV" = x; then
8948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8949          fi
8950        else
8951          # Otherwise we believe it is a complete path. Use it as it is.
8952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8953$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8955$as_echo_n "checking for MV... " >&6; }
8956          if test ! -x "$tool_specified"; then
8957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8958$as_echo "not found" >&6; }
8959            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8960          fi
8961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8962$as_echo "$tool_specified" >&6; }
8963        fi
8964      fi
8965    fi
8966
8967  fi
8968
8969
8970
8971  if test "x$MV" = x; then
8972    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8973  fi
8974
8975
8976
8977
8978
8979  # Publish this variable in the help.
8980
8981
8982  if [ -z "${NAWK+x}" ]; then
8983    # The variable is not set by user, try to locate tool using the code snippet
8984    for ac_prog in nawk gawk awk
8985do
8986  # Extract the first word of "$ac_prog", so it can be a program name with args.
8987set dummy $ac_prog; ac_word=$2
8988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8989$as_echo_n "checking for $ac_word... " >&6; }
8990if ${ac_cv_path_NAWK+:} false; then :
8991  $as_echo_n "(cached) " >&6
8992else
8993  case $NAWK in
8994  [\\/]* | ?:[\\/]*)
8995  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8996  ;;
8997  *)
8998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8999for as_dir in $PATH
9000do
9001  IFS=$as_save_IFS
9002  test -z "$as_dir" && as_dir=.
9003    for ac_exec_ext in '' $ac_executable_extensions; do
9004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9005    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9007    break 2
9008  fi
9009done
9010  done
9011IFS=$as_save_IFS
9012
9013  ;;
9014esac
9015fi
9016NAWK=$ac_cv_path_NAWK
9017if test -n "$NAWK"; then
9018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9019$as_echo "$NAWK" >&6; }
9020else
9021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9022$as_echo "no" >&6; }
9023fi
9024
9025
9026  test -n "$NAWK" && break
9027done
9028
9029  else
9030    # The variable is set, but is it from the command line or the environment?
9031
9032    # Try to remove the string !NAWK! from our list.
9033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9035      # If it failed, the variable was not from the command line. Ignore it,
9036      # but warn the user (except for BASH, which is always set by the calling BASH).
9037      if test "xNAWK" != xBASH; then
9038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9039$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9040      fi
9041      # Try to locate tool using the code snippet
9042      for ac_prog in nawk gawk awk
9043do
9044  # Extract the first word of "$ac_prog", so it can be a program name with args.
9045set dummy $ac_prog; ac_word=$2
9046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9047$as_echo_n "checking for $ac_word... " >&6; }
9048if ${ac_cv_path_NAWK+:} false; then :
9049  $as_echo_n "(cached) " >&6
9050else
9051  case $NAWK in
9052  [\\/]* | ?:[\\/]*)
9053  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9054  ;;
9055  *)
9056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9057for as_dir in $PATH
9058do
9059  IFS=$as_save_IFS
9060  test -z "$as_dir" && as_dir=.
9061    for ac_exec_ext in '' $ac_executable_extensions; do
9062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9063    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9065    break 2
9066  fi
9067done
9068  done
9069IFS=$as_save_IFS
9070
9071  ;;
9072esac
9073fi
9074NAWK=$ac_cv_path_NAWK
9075if test -n "$NAWK"; then
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9077$as_echo "$NAWK" >&6; }
9078else
9079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
9081fi
9082
9083
9084  test -n "$NAWK" && break
9085done
9086
9087    else
9088      # If it succeeded, then it was overridden by the user. We will use it
9089      # for the tool.
9090
9091      # First remove it from the list of overridden variables, so we can test
9092      # for unknown variables in the end.
9093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9094
9095      # Check if we try to supply an empty value
9096      if test "x$NAWK" = x; then
9097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9098$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9100$as_echo_n "checking for NAWK... " >&6; }
9101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9102$as_echo "disabled" >&6; }
9103      else
9104        # Check if the provided tool contains a complete path.
9105        tool_specified="$NAWK"
9106        tool_basename="${tool_specified##*/}"
9107        if test "x$tool_basename" = "x$tool_specified"; then
9108          # A command without a complete path is provided, search $PATH.
9109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9110$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9111          # Extract the first word of "$tool_basename", so it can be a program name with args.
9112set dummy $tool_basename; ac_word=$2
9113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9114$as_echo_n "checking for $ac_word... " >&6; }
9115if ${ac_cv_path_NAWK+:} false; then :
9116  $as_echo_n "(cached) " >&6
9117else
9118  case $NAWK in
9119  [\\/]* | ?:[\\/]*)
9120  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9121  ;;
9122  *)
9123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9124for as_dir in $PATH
9125do
9126  IFS=$as_save_IFS
9127  test -z "$as_dir" && as_dir=.
9128    for ac_exec_ext in '' $ac_executable_extensions; do
9129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9130    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9132    break 2
9133  fi
9134done
9135  done
9136IFS=$as_save_IFS
9137
9138  ;;
9139esac
9140fi
9141NAWK=$ac_cv_path_NAWK
9142if test -n "$NAWK"; then
9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9144$as_echo "$NAWK" >&6; }
9145else
9146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9147$as_echo "no" >&6; }
9148fi
9149
9150
9151          if test "x$NAWK" = x; then
9152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9153          fi
9154        else
9155          # Otherwise we believe it is a complete path. Use it as it is.
9156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9157$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9159$as_echo_n "checking for NAWK... " >&6; }
9160          if test ! -x "$tool_specified"; then
9161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9162$as_echo "not found" >&6; }
9163            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9164          fi
9165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9166$as_echo "$tool_specified" >&6; }
9167        fi
9168      fi
9169    fi
9170
9171  fi
9172
9173
9174
9175  if test "x$NAWK" = x; then
9176    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9177  fi
9178
9179
9180
9181
9182
9183  # Publish this variable in the help.
9184
9185
9186  if [ -z "${PRINTF+x}" ]; then
9187    # The variable is not set by user, try to locate tool using the code snippet
9188    for ac_prog in printf
9189do
9190  # Extract the first word of "$ac_prog", so it can be a program name with args.
9191set dummy $ac_prog; ac_word=$2
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9193$as_echo_n "checking for $ac_word... " >&6; }
9194if ${ac_cv_path_PRINTF+:} false; then :
9195  $as_echo_n "(cached) " >&6
9196else
9197  case $PRINTF in
9198  [\\/]* | ?:[\\/]*)
9199  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9200  ;;
9201  *)
9202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9203for as_dir in $PATH
9204do
9205  IFS=$as_save_IFS
9206  test -z "$as_dir" && as_dir=.
9207    for ac_exec_ext in '' $ac_executable_extensions; do
9208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9209    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9211    break 2
9212  fi
9213done
9214  done
9215IFS=$as_save_IFS
9216
9217  ;;
9218esac
9219fi
9220PRINTF=$ac_cv_path_PRINTF
9221if test -n "$PRINTF"; then
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9223$as_echo "$PRINTF" >&6; }
9224else
9225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9226$as_echo "no" >&6; }
9227fi
9228
9229
9230  test -n "$PRINTF" && break
9231done
9232
9233  else
9234    # The variable is set, but is it from the command line or the environment?
9235
9236    # Try to remove the string !PRINTF! from our list.
9237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9239      # If it failed, the variable was not from the command line. Ignore it,
9240      # but warn the user (except for BASH, which is always set by the calling BASH).
9241      if test "xPRINTF" != xBASH; then
9242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9243$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9244      fi
9245      # Try to locate tool using the code snippet
9246      for ac_prog in printf
9247do
9248  # Extract the first word of "$ac_prog", so it can be a program name with args.
9249set dummy $ac_prog; ac_word=$2
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9251$as_echo_n "checking for $ac_word... " >&6; }
9252if ${ac_cv_path_PRINTF+:} false; then :
9253  $as_echo_n "(cached) " >&6
9254else
9255  case $PRINTF in
9256  [\\/]* | ?:[\\/]*)
9257  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9258  ;;
9259  *)
9260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9261for as_dir in $PATH
9262do
9263  IFS=$as_save_IFS
9264  test -z "$as_dir" && as_dir=.
9265    for ac_exec_ext in '' $ac_executable_extensions; do
9266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9267    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9269    break 2
9270  fi
9271done
9272  done
9273IFS=$as_save_IFS
9274
9275  ;;
9276esac
9277fi
9278PRINTF=$ac_cv_path_PRINTF
9279if test -n "$PRINTF"; then
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9281$as_echo "$PRINTF" >&6; }
9282else
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
9285fi
9286
9287
9288  test -n "$PRINTF" && break
9289done
9290
9291    else
9292      # If it succeeded, then it was overridden by the user. We will use it
9293      # for the tool.
9294
9295      # First remove it from the list of overridden variables, so we can test
9296      # for unknown variables in the end.
9297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9298
9299      # Check if we try to supply an empty value
9300      if test "x$PRINTF" = x; then
9301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9302$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9304$as_echo_n "checking for PRINTF... " >&6; }
9305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9306$as_echo "disabled" >&6; }
9307      else
9308        # Check if the provided tool contains a complete path.
9309        tool_specified="$PRINTF"
9310        tool_basename="${tool_specified##*/}"
9311        if test "x$tool_basename" = "x$tool_specified"; then
9312          # A command without a complete path is provided, search $PATH.
9313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9314$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9315          # Extract the first word of "$tool_basename", so it can be a program name with args.
9316set dummy $tool_basename; ac_word=$2
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9318$as_echo_n "checking for $ac_word... " >&6; }
9319if ${ac_cv_path_PRINTF+:} false; then :
9320  $as_echo_n "(cached) " >&6
9321else
9322  case $PRINTF in
9323  [\\/]* | ?:[\\/]*)
9324  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9325  ;;
9326  *)
9327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328for as_dir in $PATH
9329do
9330  IFS=$as_save_IFS
9331  test -z "$as_dir" && as_dir=.
9332    for ac_exec_ext in '' $ac_executable_extensions; do
9333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9334    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9336    break 2
9337  fi
9338done
9339  done
9340IFS=$as_save_IFS
9341
9342  ;;
9343esac
9344fi
9345PRINTF=$ac_cv_path_PRINTF
9346if test -n "$PRINTF"; then
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9348$as_echo "$PRINTF" >&6; }
9349else
9350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
9352fi
9353
9354
9355          if test "x$PRINTF" = x; then
9356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9357          fi
9358        else
9359          # Otherwise we believe it is a complete path. Use it as it is.
9360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9361$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9363$as_echo_n "checking for PRINTF... " >&6; }
9364          if test ! -x "$tool_specified"; then
9365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9366$as_echo "not found" >&6; }
9367            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9368          fi
9369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9370$as_echo "$tool_specified" >&6; }
9371        fi
9372      fi
9373    fi
9374
9375  fi
9376
9377
9378
9379  if test "x$PRINTF" = x; then
9380    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9381  fi
9382
9383
9384
9385
9386
9387  # Publish this variable in the help.
9388
9389
9390  if [ -z "${RM+x}" ]; then
9391    # The variable is not set by user, try to locate tool using the code snippet
9392    for ac_prog in rm
9393do
9394  # Extract the first word of "$ac_prog", so it can be a program name with args.
9395set dummy $ac_prog; ac_word=$2
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9397$as_echo_n "checking for $ac_word... " >&6; }
9398if ${ac_cv_path_RM+:} false; then :
9399  $as_echo_n "(cached) " >&6
9400else
9401  case $RM in
9402  [\\/]* | ?:[\\/]*)
9403  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9404  ;;
9405  *)
9406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9407for as_dir in $PATH
9408do
9409  IFS=$as_save_IFS
9410  test -z "$as_dir" && as_dir=.
9411    for ac_exec_ext in '' $ac_executable_extensions; do
9412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9413    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9415    break 2
9416  fi
9417done
9418  done
9419IFS=$as_save_IFS
9420
9421  ;;
9422esac
9423fi
9424RM=$ac_cv_path_RM
9425if test -n "$RM"; then
9426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9427$as_echo "$RM" >&6; }
9428else
9429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430$as_echo "no" >&6; }
9431fi
9432
9433
9434  test -n "$RM" && break
9435done
9436
9437  else
9438    # The variable is set, but is it from the command line or the environment?
9439
9440    # Try to remove the string !RM! from our list.
9441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9443      # If it failed, the variable was not from the command line. Ignore it,
9444      # but warn the user (except for BASH, which is always set by the calling BASH).
9445      if test "xRM" != xBASH; then
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9447$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9448      fi
9449      # Try to locate tool using the code snippet
9450      for ac_prog in rm
9451do
9452  # Extract the first word of "$ac_prog", so it can be a program name with args.
9453set dummy $ac_prog; ac_word=$2
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9455$as_echo_n "checking for $ac_word... " >&6; }
9456if ${ac_cv_path_RM+:} false; then :
9457  $as_echo_n "(cached) " >&6
9458else
9459  case $RM in
9460  [\\/]* | ?:[\\/]*)
9461  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9462  ;;
9463  *)
9464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9465for as_dir in $PATH
9466do
9467  IFS=$as_save_IFS
9468  test -z "$as_dir" && as_dir=.
9469    for ac_exec_ext in '' $ac_executable_extensions; do
9470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9471    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9473    break 2
9474  fi
9475done
9476  done
9477IFS=$as_save_IFS
9478
9479  ;;
9480esac
9481fi
9482RM=$ac_cv_path_RM
9483if test -n "$RM"; then
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9485$as_echo "$RM" >&6; }
9486else
9487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9488$as_echo "no" >&6; }
9489fi
9490
9491
9492  test -n "$RM" && break
9493done
9494
9495    else
9496      # If it succeeded, then it was overridden by the user. We will use it
9497      # for the tool.
9498
9499      # First remove it from the list of overridden variables, so we can test
9500      # for unknown variables in the end.
9501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9502
9503      # Check if we try to supply an empty value
9504      if test "x$RM" = x; then
9505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9506$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9508$as_echo_n "checking for RM... " >&6; }
9509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9510$as_echo "disabled" >&6; }
9511      else
9512        # Check if the provided tool contains a complete path.
9513        tool_specified="$RM"
9514        tool_basename="${tool_specified##*/}"
9515        if test "x$tool_basename" = "x$tool_specified"; then
9516          # A command without a complete path is provided, search $PATH.
9517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9518$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9519          # Extract the first word of "$tool_basename", so it can be a program name with args.
9520set dummy $tool_basename; ac_word=$2
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9522$as_echo_n "checking for $ac_word... " >&6; }
9523if ${ac_cv_path_RM+:} false; then :
9524  $as_echo_n "(cached) " >&6
9525else
9526  case $RM in
9527  [\\/]* | ?:[\\/]*)
9528  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9529  ;;
9530  *)
9531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9532for as_dir in $PATH
9533do
9534  IFS=$as_save_IFS
9535  test -z "$as_dir" && as_dir=.
9536    for ac_exec_ext in '' $ac_executable_extensions; do
9537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9538    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9540    break 2
9541  fi
9542done
9543  done
9544IFS=$as_save_IFS
9545
9546  ;;
9547esac
9548fi
9549RM=$ac_cv_path_RM
9550if test -n "$RM"; then
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9552$as_echo "$RM" >&6; }
9553else
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
9556fi
9557
9558
9559          if test "x$RM" = x; then
9560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9561          fi
9562        else
9563          # Otherwise we believe it is a complete path. Use it as it is.
9564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9565$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9567$as_echo_n "checking for RM... " >&6; }
9568          if test ! -x "$tool_specified"; then
9569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9570$as_echo "not found" >&6; }
9571            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9572          fi
9573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9574$as_echo "$tool_specified" >&6; }
9575        fi
9576      fi
9577    fi
9578
9579  fi
9580
9581
9582
9583  if test "x$RM" = x; then
9584    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9585  fi
9586
9587
9588
9589
9590
9591  # Publish this variable in the help.
9592
9593
9594  if [ -z "${RMDIR+x}" ]; then
9595    # The variable is not set by user, try to locate tool using the code snippet
9596    for ac_prog in rmdir
9597do
9598  # Extract the first word of "$ac_prog", so it can be a program name with args.
9599set dummy $ac_prog; ac_word=$2
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9601$as_echo_n "checking for $ac_word... " >&6; }
9602if ${ac_cv_path_RMDIR+:} false; then :
9603  $as_echo_n "(cached) " >&6
9604else
9605  case $RMDIR in
9606  [\\/]* | ?:[\\/]*)
9607  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9608  ;;
9609  *)
9610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9611for as_dir in $PATH
9612do
9613  IFS=$as_save_IFS
9614  test -z "$as_dir" && as_dir=.
9615    for ac_exec_ext in '' $ac_executable_extensions; do
9616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9617    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9619    break 2
9620  fi
9621done
9622  done
9623IFS=$as_save_IFS
9624
9625  ;;
9626esac
9627fi
9628RMDIR=$ac_cv_path_RMDIR
9629if test -n "$RMDIR"; then
9630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9631$as_echo "$RMDIR" >&6; }
9632else
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
9635fi
9636
9637
9638  test -n "$RMDIR" && break
9639done
9640
9641  else
9642    # The variable is set, but is it from the command line or the environment?
9643
9644    # Try to remove the string !RMDIR! from our list.
9645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9647      # If it failed, the variable was not from the command line. Ignore it,
9648      # but warn the user (except for BASH, which is always set by the calling BASH).
9649      if test "xRMDIR" != xBASH; then
9650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9651$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9652      fi
9653      # Try to locate tool using the code snippet
9654      for ac_prog in rmdir
9655do
9656  # Extract the first word of "$ac_prog", so it can be a program name with args.
9657set dummy $ac_prog; ac_word=$2
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9659$as_echo_n "checking for $ac_word... " >&6; }
9660if ${ac_cv_path_RMDIR+:} false; then :
9661  $as_echo_n "(cached) " >&6
9662else
9663  case $RMDIR in
9664  [\\/]* | ?:[\\/]*)
9665  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9666  ;;
9667  *)
9668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9669for as_dir in $PATH
9670do
9671  IFS=$as_save_IFS
9672  test -z "$as_dir" && as_dir=.
9673    for ac_exec_ext in '' $ac_executable_extensions; do
9674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9675    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9677    break 2
9678  fi
9679done
9680  done
9681IFS=$as_save_IFS
9682
9683  ;;
9684esac
9685fi
9686RMDIR=$ac_cv_path_RMDIR
9687if test -n "$RMDIR"; then
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9689$as_echo "$RMDIR" >&6; }
9690else
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692$as_echo "no" >&6; }
9693fi
9694
9695
9696  test -n "$RMDIR" && break
9697done
9698
9699    else
9700      # If it succeeded, then it was overridden by the user. We will use it
9701      # for the tool.
9702
9703      # First remove it from the list of overridden variables, so we can test
9704      # for unknown variables in the end.
9705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9706
9707      # Check if we try to supply an empty value
9708      if test "x$RMDIR" = x; then
9709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9710$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9712$as_echo_n "checking for RMDIR... " >&6; }
9713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9714$as_echo "disabled" >&6; }
9715      else
9716        # Check if the provided tool contains a complete path.
9717        tool_specified="$RMDIR"
9718        tool_basename="${tool_specified##*/}"
9719        if test "x$tool_basename" = "x$tool_specified"; then
9720          # A command without a complete path is provided, search $PATH.
9721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9722$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9723          # Extract the first word of "$tool_basename", so it can be a program name with args.
9724set dummy $tool_basename; ac_word=$2
9725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9726$as_echo_n "checking for $ac_word... " >&6; }
9727if ${ac_cv_path_RMDIR+:} false; then :
9728  $as_echo_n "(cached) " >&6
9729else
9730  case $RMDIR in
9731  [\\/]* | ?:[\\/]*)
9732  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9733  ;;
9734  *)
9735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9736for as_dir in $PATH
9737do
9738  IFS=$as_save_IFS
9739  test -z "$as_dir" && as_dir=.
9740    for ac_exec_ext in '' $ac_executable_extensions; do
9741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9742    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9744    break 2
9745  fi
9746done
9747  done
9748IFS=$as_save_IFS
9749
9750  ;;
9751esac
9752fi
9753RMDIR=$ac_cv_path_RMDIR
9754if test -n "$RMDIR"; then
9755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9756$as_echo "$RMDIR" >&6; }
9757else
9758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9759$as_echo "no" >&6; }
9760fi
9761
9762
9763          if test "x$RMDIR" = x; then
9764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9765          fi
9766        else
9767          # Otherwise we believe it is a complete path. Use it as it is.
9768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9769$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9771$as_echo_n "checking for RMDIR... " >&6; }
9772          if test ! -x "$tool_specified"; then
9773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9774$as_echo "not found" >&6; }
9775            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9776          fi
9777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9778$as_echo "$tool_specified" >&6; }
9779        fi
9780      fi
9781    fi
9782
9783  fi
9784
9785
9786
9787  if test "x$RMDIR" = x; then
9788    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9789  fi
9790
9791
9792
9793
9794
9795  # Publish this variable in the help.
9796
9797
9798  if [ -z "${SH+x}" ]; then
9799    # The variable is not set by user, try to locate tool using the code snippet
9800    for ac_prog in sh
9801do
9802  # Extract the first word of "$ac_prog", so it can be a program name with args.
9803set dummy $ac_prog; ac_word=$2
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9805$as_echo_n "checking for $ac_word... " >&6; }
9806if ${ac_cv_path_SH+:} false; then :
9807  $as_echo_n "(cached) " >&6
9808else
9809  case $SH in
9810  [\\/]* | ?:[\\/]*)
9811  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9812  ;;
9813  *)
9814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817  IFS=$as_save_IFS
9818  test -z "$as_dir" && as_dir=.
9819    for ac_exec_ext in '' $ac_executable_extensions; do
9820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9821    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9823    break 2
9824  fi
9825done
9826  done
9827IFS=$as_save_IFS
9828
9829  ;;
9830esac
9831fi
9832SH=$ac_cv_path_SH
9833if test -n "$SH"; then
9834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9835$as_echo "$SH" >&6; }
9836else
9837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9838$as_echo "no" >&6; }
9839fi
9840
9841
9842  test -n "$SH" && break
9843done
9844
9845  else
9846    # The variable is set, but is it from the command line or the environment?
9847
9848    # Try to remove the string !SH! from our list.
9849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9851      # If it failed, the variable was not from the command line. Ignore it,
9852      # but warn the user (except for BASH, which is always set by the calling BASH).
9853      if test "xSH" != xBASH; then
9854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9855$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9856      fi
9857      # Try to locate tool using the code snippet
9858      for ac_prog in sh
9859do
9860  # Extract the first word of "$ac_prog", so it can be a program name with args.
9861set dummy $ac_prog; ac_word=$2
9862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863$as_echo_n "checking for $ac_word... " >&6; }
9864if ${ac_cv_path_SH+:} false; then :
9865  $as_echo_n "(cached) " >&6
9866else
9867  case $SH in
9868  [\\/]* | ?:[\\/]*)
9869  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9870  ;;
9871  *)
9872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873for as_dir in $PATH
9874do
9875  IFS=$as_save_IFS
9876  test -z "$as_dir" && as_dir=.
9877    for ac_exec_ext in '' $ac_executable_extensions; do
9878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881    break 2
9882  fi
9883done
9884  done
9885IFS=$as_save_IFS
9886
9887  ;;
9888esac
9889fi
9890SH=$ac_cv_path_SH
9891if test -n "$SH"; then
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9893$as_echo "$SH" >&6; }
9894else
9895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896$as_echo "no" >&6; }
9897fi
9898
9899
9900  test -n "$SH" && break
9901done
9902
9903    else
9904      # If it succeeded, then it was overridden by the user. We will use it
9905      # for the tool.
9906
9907      # First remove it from the list of overridden variables, so we can test
9908      # for unknown variables in the end.
9909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9910
9911      # Check if we try to supply an empty value
9912      if test "x$SH" = x; then
9913        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9914$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9916$as_echo_n "checking for SH... " >&6; }
9917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9918$as_echo "disabled" >&6; }
9919      else
9920        # Check if the provided tool contains a complete path.
9921        tool_specified="$SH"
9922        tool_basename="${tool_specified##*/}"
9923        if test "x$tool_basename" = "x$tool_specified"; then
9924          # A command without a complete path is provided, search $PATH.
9925          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9926$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9927          # Extract the first word of "$tool_basename", so it can be a program name with args.
9928set dummy $tool_basename; ac_word=$2
9929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9930$as_echo_n "checking for $ac_word... " >&6; }
9931if ${ac_cv_path_SH+:} false; then :
9932  $as_echo_n "(cached) " >&6
9933else
9934  case $SH in
9935  [\\/]* | ?:[\\/]*)
9936  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9937  ;;
9938  *)
9939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9940for as_dir in $PATH
9941do
9942  IFS=$as_save_IFS
9943  test -z "$as_dir" && as_dir=.
9944    for ac_exec_ext in '' $ac_executable_extensions; do
9945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9946    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9948    break 2
9949  fi
9950done
9951  done
9952IFS=$as_save_IFS
9953
9954  ;;
9955esac
9956fi
9957SH=$ac_cv_path_SH
9958if test -n "$SH"; then
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9960$as_echo "$SH" >&6; }
9961else
9962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
9964fi
9965
9966
9967          if test "x$SH" = x; then
9968            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9969          fi
9970        else
9971          # Otherwise we believe it is a complete path. Use it as it is.
9972          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9973$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9974          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9975$as_echo_n "checking for SH... " >&6; }
9976          if test ! -x "$tool_specified"; then
9977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9978$as_echo "not found" >&6; }
9979            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9980          fi
9981          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9982$as_echo "$tool_specified" >&6; }
9983        fi
9984      fi
9985    fi
9986
9987  fi
9988
9989
9990
9991  if test "x$SH" = x; then
9992    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9993  fi
9994
9995
9996
9997
9998
9999  # Publish this variable in the help.
10000
10001
10002  if [ -z "${SORT+x}" ]; then
10003    # The variable is not set by user, try to locate tool using the code snippet
10004    for ac_prog in sort
10005do
10006  # Extract the first word of "$ac_prog", so it can be a program name with args.
10007set dummy $ac_prog; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if ${ac_cv_path_SORT+:} false; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $SORT in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10025    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036SORT=$ac_cv_path_SORT
10037if test -n "$SORT"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10039$as_echo "$SORT" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046  test -n "$SORT" && break
10047done
10048
10049  else
10050    # The variable is set, but is it from the command line or the environment?
10051
10052    # Try to remove the string !SORT! from our list.
10053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10055      # If it failed, the variable was not from the command line. Ignore it,
10056      # but warn the user (except for BASH, which is always set by the calling BASH).
10057      if test "xSORT" != xBASH; then
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10059$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10060      fi
10061      # Try to locate tool using the code snippet
10062      for ac_prog in sort
10063do
10064  # Extract the first word of "$ac_prog", so it can be a program name with args.
10065set dummy $ac_prog; ac_word=$2
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10067$as_echo_n "checking for $ac_word... " >&6; }
10068if ${ac_cv_path_SORT+:} false; then :
10069  $as_echo_n "(cached) " >&6
10070else
10071  case $SORT in
10072  [\\/]* | ?:[\\/]*)
10073  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10074  ;;
10075  *)
10076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10077for as_dir in $PATH
10078do
10079  IFS=$as_save_IFS
10080  test -z "$as_dir" && as_dir=.
10081    for ac_exec_ext in '' $ac_executable_extensions; do
10082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10083    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10085    break 2
10086  fi
10087done
10088  done
10089IFS=$as_save_IFS
10090
10091  ;;
10092esac
10093fi
10094SORT=$ac_cv_path_SORT
10095if test -n "$SORT"; then
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10097$as_echo "$SORT" >&6; }
10098else
10099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100$as_echo "no" >&6; }
10101fi
10102
10103
10104  test -n "$SORT" && break
10105done
10106
10107    else
10108      # If it succeeded, then it was overridden by the user. We will use it
10109      # for the tool.
10110
10111      # First remove it from the list of overridden variables, so we can test
10112      # for unknown variables in the end.
10113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10114
10115      # Check if we try to supply an empty value
10116      if test "x$SORT" = x; then
10117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10118$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10120$as_echo_n "checking for SORT... " >&6; }
10121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10122$as_echo "disabled" >&6; }
10123      else
10124        # Check if the provided tool contains a complete path.
10125        tool_specified="$SORT"
10126        tool_basename="${tool_specified##*/}"
10127        if test "x$tool_basename" = "x$tool_specified"; then
10128          # A command without a complete path is provided, search $PATH.
10129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10130$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10131          # Extract the first word of "$tool_basename", so it can be a program name with args.
10132set dummy $tool_basename; ac_word=$2
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10134$as_echo_n "checking for $ac_word... " >&6; }
10135if ${ac_cv_path_SORT+:} false; then :
10136  $as_echo_n "(cached) " >&6
10137else
10138  case $SORT in
10139  [\\/]* | ?:[\\/]*)
10140  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10141  ;;
10142  *)
10143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10144for as_dir in $PATH
10145do
10146  IFS=$as_save_IFS
10147  test -z "$as_dir" && as_dir=.
10148    for ac_exec_ext in '' $ac_executable_extensions; do
10149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10150    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10152    break 2
10153  fi
10154done
10155  done
10156IFS=$as_save_IFS
10157
10158  ;;
10159esac
10160fi
10161SORT=$ac_cv_path_SORT
10162if test -n "$SORT"; then
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10164$as_echo "$SORT" >&6; }
10165else
10166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10167$as_echo "no" >&6; }
10168fi
10169
10170
10171          if test "x$SORT" = x; then
10172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10173          fi
10174        else
10175          # Otherwise we believe it is a complete path. Use it as it is.
10176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10177$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10179$as_echo_n "checking for SORT... " >&6; }
10180          if test ! -x "$tool_specified"; then
10181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10182$as_echo "not found" >&6; }
10183            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10184          fi
10185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10186$as_echo "$tool_specified" >&6; }
10187        fi
10188      fi
10189    fi
10190
10191  fi
10192
10193
10194
10195  if test "x$SORT" = x; then
10196    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10197  fi
10198
10199
10200
10201
10202
10203  # Publish this variable in the help.
10204
10205
10206  if [ -z "${TAIL+x}" ]; then
10207    # The variable is not set by user, try to locate tool using the code snippet
10208    for ac_prog in tail
10209do
10210  # Extract the first word of "$ac_prog", so it can be a program name with args.
10211set dummy $ac_prog; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if ${ac_cv_path_TAIL+:} false; then :
10215  $as_echo_n "(cached) " >&6
10216else
10217  case $TAIL in
10218  [\\/]* | ?:[\\/]*)
10219  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10220  ;;
10221  *)
10222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  ;;
10238esac
10239fi
10240TAIL=$ac_cv_path_TAIL
10241if test -n "$TAIL"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10243$as_echo "$TAIL" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250  test -n "$TAIL" && break
10251done
10252
10253  else
10254    # The variable is set, but is it from the command line or the environment?
10255
10256    # Try to remove the string !TAIL! from our list.
10257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10259      # If it failed, the variable was not from the command line. Ignore it,
10260      # but warn the user (except for BASH, which is always set by the calling BASH).
10261      if test "xTAIL" != xBASH; then
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10263$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10264      fi
10265      # Try to locate tool using the code snippet
10266      for ac_prog in tail
10267do
10268  # Extract the first word of "$ac_prog", so it can be a program name with args.
10269set dummy $ac_prog; ac_word=$2
10270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10271$as_echo_n "checking for $ac_word... " >&6; }
10272if ${ac_cv_path_TAIL+:} false; then :
10273  $as_echo_n "(cached) " >&6
10274else
10275  case $TAIL in
10276  [\\/]* | ?:[\\/]*)
10277  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10278  ;;
10279  *)
10280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10281for as_dir in $PATH
10282do
10283  IFS=$as_save_IFS
10284  test -z "$as_dir" && as_dir=.
10285    for ac_exec_ext in '' $ac_executable_extensions; do
10286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10287    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10289    break 2
10290  fi
10291done
10292  done
10293IFS=$as_save_IFS
10294
10295  ;;
10296esac
10297fi
10298TAIL=$ac_cv_path_TAIL
10299if test -n "$TAIL"; then
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10301$as_echo "$TAIL" >&6; }
10302else
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
10305fi
10306
10307
10308  test -n "$TAIL" && break
10309done
10310
10311    else
10312      # If it succeeded, then it was overridden by the user. We will use it
10313      # for the tool.
10314
10315      # First remove it from the list of overridden variables, so we can test
10316      # for unknown variables in the end.
10317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10318
10319      # Check if we try to supply an empty value
10320      if test "x$TAIL" = x; then
10321        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10322$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10324$as_echo_n "checking for TAIL... " >&6; }
10325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10326$as_echo "disabled" >&6; }
10327      else
10328        # Check if the provided tool contains a complete path.
10329        tool_specified="$TAIL"
10330        tool_basename="${tool_specified##*/}"
10331        if test "x$tool_basename" = "x$tool_specified"; then
10332          # A command without a complete path is provided, search $PATH.
10333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10334$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10335          # Extract the first word of "$tool_basename", so it can be a program name with args.
10336set dummy $tool_basename; ac_word=$2
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10338$as_echo_n "checking for $ac_word... " >&6; }
10339if ${ac_cv_path_TAIL+:} false; then :
10340  $as_echo_n "(cached) " >&6
10341else
10342  case $TAIL in
10343  [\\/]* | ?:[\\/]*)
10344  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10345  ;;
10346  *)
10347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10348for as_dir in $PATH
10349do
10350  IFS=$as_save_IFS
10351  test -z "$as_dir" && as_dir=.
10352    for ac_exec_ext in '' $ac_executable_extensions; do
10353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10354    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10356    break 2
10357  fi
10358done
10359  done
10360IFS=$as_save_IFS
10361
10362  ;;
10363esac
10364fi
10365TAIL=$ac_cv_path_TAIL
10366if test -n "$TAIL"; then
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10368$as_echo "$TAIL" >&6; }
10369else
10370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371$as_echo "no" >&6; }
10372fi
10373
10374
10375          if test "x$TAIL" = x; then
10376            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10377          fi
10378        else
10379          # Otherwise we believe it is a complete path. Use it as it is.
10380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10381$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10383$as_echo_n "checking for TAIL... " >&6; }
10384          if test ! -x "$tool_specified"; then
10385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10386$as_echo "not found" >&6; }
10387            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10388          fi
10389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10390$as_echo "$tool_specified" >&6; }
10391        fi
10392      fi
10393    fi
10394
10395  fi
10396
10397
10398
10399  if test "x$TAIL" = x; then
10400    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10401  fi
10402
10403
10404
10405
10406
10407  # Publish this variable in the help.
10408
10409
10410  if [ -z "${TAR+x}" ]; then
10411    # The variable is not set by user, try to locate tool using the code snippet
10412    for ac_prog in tar
10413do
10414  # Extract the first word of "$ac_prog", so it can be a program name with args.
10415set dummy $ac_prog; ac_word=$2
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10417$as_echo_n "checking for $ac_word... " >&6; }
10418if ${ac_cv_path_TAR+:} false; then :
10419  $as_echo_n "(cached) " >&6
10420else
10421  case $TAR in
10422  [\\/]* | ?:[\\/]*)
10423  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10424  ;;
10425  *)
10426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10427for as_dir in $PATH
10428do
10429  IFS=$as_save_IFS
10430  test -z "$as_dir" && as_dir=.
10431    for ac_exec_ext in '' $ac_executable_extensions; do
10432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10433    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10435    break 2
10436  fi
10437done
10438  done
10439IFS=$as_save_IFS
10440
10441  ;;
10442esac
10443fi
10444TAR=$ac_cv_path_TAR
10445if test -n "$TAR"; then
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10447$as_echo "$TAR" >&6; }
10448else
10449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450$as_echo "no" >&6; }
10451fi
10452
10453
10454  test -n "$TAR" && break
10455done
10456
10457  else
10458    # The variable is set, but is it from the command line or the environment?
10459
10460    # Try to remove the string !TAR! from our list.
10461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10463      # If it failed, the variable was not from the command line. Ignore it,
10464      # but warn the user (except for BASH, which is always set by the calling BASH).
10465      if test "xTAR" != xBASH; then
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10467$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10468      fi
10469      # Try to locate tool using the code snippet
10470      for ac_prog in tar
10471do
10472  # Extract the first word of "$ac_prog", so it can be a program name with args.
10473set dummy $ac_prog; ac_word=$2
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10475$as_echo_n "checking for $ac_word... " >&6; }
10476if ${ac_cv_path_TAR+:} false; then :
10477  $as_echo_n "(cached) " >&6
10478else
10479  case $TAR in
10480  [\\/]* | ?:[\\/]*)
10481  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10482  ;;
10483  *)
10484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10485for as_dir in $PATH
10486do
10487  IFS=$as_save_IFS
10488  test -z "$as_dir" && as_dir=.
10489    for ac_exec_ext in '' $ac_executable_extensions; do
10490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10491    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10493    break 2
10494  fi
10495done
10496  done
10497IFS=$as_save_IFS
10498
10499  ;;
10500esac
10501fi
10502TAR=$ac_cv_path_TAR
10503if test -n "$TAR"; then
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10505$as_echo "$TAR" >&6; }
10506else
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508$as_echo "no" >&6; }
10509fi
10510
10511
10512  test -n "$TAR" && break
10513done
10514
10515    else
10516      # If it succeeded, then it was overridden by the user. We will use it
10517      # for the tool.
10518
10519      # First remove it from the list of overridden variables, so we can test
10520      # for unknown variables in the end.
10521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10522
10523      # Check if we try to supply an empty value
10524      if test "x$TAR" = x; then
10525        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10526$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10528$as_echo_n "checking for TAR... " >&6; }
10529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10530$as_echo "disabled" >&6; }
10531      else
10532        # Check if the provided tool contains a complete path.
10533        tool_specified="$TAR"
10534        tool_basename="${tool_specified##*/}"
10535        if test "x$tool_basename" = "x$tool_specified"; then
10536          # A command without a complete path is provided, search $PATH.
10537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10538$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10539          # Extract the first word of "$tool_basename", so it can be a program name with args.
10540set dummy $tool_basename; ac_word=$2
10541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10542$as_echo_n "checking for $ac_word... " >&6; }
10543if ${ac_cv_path_TAR+:} false; then :
10544  $as_echo_n "(cached) " >&6
10545else
10546  case $TAR in
10547  [\\/]* | ?:[\\/]*)
10548  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10549  ;;
10550  *)
10551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10552for as_dir in $PATH
10553do
10554  IFS=$as_save_IFS
10555  test -z "$as_dir" && as_dir=.
10556    for ac_exec_ext in '' $ac_executable_extensions; do
10557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10558    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10560    break 2
10561  fi
10562done
10563  done
10564IFS=$as_save_IFS
10565
10566  ;;
10567esac
10568fi
10569TAR=$ac_cv_path_TAR
10570if test -n "$TAR"; then
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10572$as_echo "$TAR" >&6; }
10573else
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
10576fi
10577
10578
10579          if test "x$TAR" = x; then
10580            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10581          fi
10582        else
10583          # Otherwise we believe it is a complete path. Use it as it is.
10584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10585$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10587$as_echo_n "checking for TAR... " >&6; }
10588          if test ! -x "$tool_specified"; then
10589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10590$as_echo "not found" >&6; }
10591            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10592          fi
10593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10594$as_echo "$tool_specified" >&6; }
10595        fi
10596      fi
10597    fi
10598
10599  fi
10600
10601
10602
10603  if test "x$TAR" = x; then
10604    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10605  fi
10606
10607
10608
10609
10610
10611  # Publish this variable in the help.
10612
10613
10614  if [ -z "${TEE+x}" ]; then
10615    # The variable is not set by user, try to locate tool using the code snippet
10616    for ac_prog in tee
10617do
10618  # Extract the first word of "$ac_prog", so it can be a program name with args.
10619set dummy $ac_prog; ac_word=$2
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10621$as_echo_n "checking for $ac_word... " >&6; }
10622if ${ac_cv_path_TEE+:} false; then :
10623  $as_echo_n "(cached) " >&6
10624else
10625  case $TEE in
10626  [\\/]* | ?:[\\/]*)
10627  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10628  ;;
10629  *)
10630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10631for as_dir in $PATH
10632do
10633  IFS=$as_save_IFS
10634  test -z "$as_dir" && as_dir=.
10635    for ac_exec_ext in '' $ac_executable_extensions; do
10636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10637    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10639    break 2
10640  fi
10641done
10642  done
10643IFS=$as_save_IFS
10644
10645  ;;
10646esac
10647fi
10648TEE=$ac_cv_path_TEE
10649if test -n "$TEE"; then
10650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10651$as_echo "$TEE" >&6; }
10652else
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654$as_echo "no" >&6; }
10655fi
10656
10657
10658  test -n "$TEE" && break
10659done
10660
10661  else
10662    # The variable is set, but is it from the command line or the environment?
10663
10664    # Try to remove the string !TEE! from our list.
10665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10667      # If it failed, the variable was not from the command line. Ignore it,
10668      # but warn the user (except for BASH, which is always set by the calling BASH).
10669      if test "xTEE" != xBASH; then
10670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10671$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10672      fi
10673      # Try to locate tool using the code snippet
10674      for ac_prog in tee
10675do
10676  # Extract the first word of "$ac_prog", so it can be a program name with args.
10677set dummy $ac_prog; ac_word=$2
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679$as_echo_n "checking for $ac_word... " >&6; }
10680if ${ac_cv_path_TEE+:} false; then :
10681  $as_echo_n "(cached) " >&6
10682else
10683  case $TEE in
10684  [\\/]* | ?:[\\/]*)
10685  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10686  ;;
10687  *)
10688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689for as_dir in $PATH
10690do
10691  IFS=$as_save_IFS
10692  test -z "$as_dir" && as_dir=.
10693    for ac_exec_ext in '' $ac_executable_extensions; do
10694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697    break 2
10698  fi
10699done
10700  done
10701IFS=$as_save_IFS
10702
10703  ;;
10704esac
10705fi
10706TEE=$ac_cv_path_TEE
10707if test -n "$TEE"; then
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10709$as_echo "$TEE" >&6; }
10710else
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
10713fi
10714
10715
10716  test -n "$TEE" && break
10717done
10718
10719    else
10720      # If it succeeded, then it was overridden by the user. We will use it
10721      # for the tool.
10722
10723      # First remove it from the list of overridden variables, so we can test
10724      # for unknown variables in the end.
10725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10726
10727      # Check if we try to supply an empty value
10728      if test "x$TEE" = x; then
10729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10730$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10732$as_echo_n "checking for TEE... " >&6; }
10733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10734$as_echo "disabled" >&6; }
10735      else
10736        # Check if the provided tool contains a complete path.
10737        tool_specified="$TEE"
10738        tool_basename="${tool_specified##*/}"
10739        if test "x$tool_basename" = "x$tool_specified"; then
10740          # A command without a complete path is provided, search $PATH.
10741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10742$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10743          # Extract the first word of "$tool_basename", so it can be a program name with args.
10744set dummy $tool_basename; ac_word=$2
10745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10746$as_echo_n "checking for $ac_word... " >&6; }
10747if ${ac_cv_path_TEE+:} false; then :
10748  $as_echo_n "(cached) " >&6
10749else
10750  case $TEE in
10751  [\\/]* | ?:[\\/]*)
10752  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10753  ;;
10754  *)
10755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10756for as_dir in $PATH
10757do
10758  IFS=$as_save_IFS
10759  test -z "$as_dir" && as_dir=.
10760    for ac_exec_ext in '' $ac_executable_extensions; do
10761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10762    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10764    break 2
10765  fi
10766done
10767  done
10768IFS=$as_save_IFS
10769
10770  ;;
10771esac
10772fi
10773TEE=$ac_cv_path_TEE
10774if test -n "$TEE"; then
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10776$as_echo "$TEE" >&6; }
10777else
10778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10779$as_echo "no" >&6; }
10780fi
10781
10782
10783          if test "x$TEE" = x; then
10784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10785          fi
10786        else
10787          # Otherwise we believe it is a complete path. Use it as it is.
10788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10789$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10791$as_echo_n "checking for TEE... " >&6; }
10792          if test ! -x "$tool_specified"; then
10793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10794$as_echo "not found" >&6; }
10795            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10796          fi
10797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10798$as_echo "$tool_specified" >&6; }
10799        fi
10800      fi
10801    fi
10802
10803  fi
10804
10805
10806
10807  if test "x$TEE" = x; then
10808    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10809  fi
10810
10811
10812
10813
10814
10815  # Publish this variable in the help.
10816
10817
10818  if [ -z "${TOUCH+x}" ]; then
10819    # The variable is not set by user, try to locate tool using the code snippet
10820    for ac_prog in touch
10821do
10822  # Extract the first word of "$ac_prog", so it can be a program name with args.
10823set dummy $ac_prog; ac_word=$2
10824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10825$as_echo_n "checking for $ac_word... " >&6; }
10826if ${ac_cv_path_TOUCH+:} false; then :
10827  $as_echo_n "(cached) " >&6
10828else
10829  case $TOUCH in
10830  [\\/]* | ?:[\\/]*)
10831  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10832  ;;
10833  *)
10834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10835for as_dir in $PATH
10836do
10837  IFS=$as_save_IFS
10838  test -z "$as_dir" && as_dir=.
10839    for ac_exec_ext in '' $ac_executable_extensions; do
10840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10841    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10843    break 2
10844  fi
10845done
10846  done
10847IFS=$as_save_IFS
10848
10849  ;;
10850esac
10851fi
10852TOUCH=$ac_cv_path_TOUCH
10853if test -n "$TOUCH"; then
10854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10855$as_echo "$TOUCH" >&6; }
10856else
10857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10858$as_echo "no" >&6; }
10859fi
10860
10861
10862  test -n "$TOUCH" && break
10863done
10864
10865  else
10866    # The variable is set, but is it from the command line or the environment?
10867
10868    # Try to remove the string !TOUCH! from our list.
10869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10871      # If it failed, the variable was not from the command line. Ignore it,
10872      # but warn the user (except for BASH, which is always set by the calling BASH).
10873      if test "xTOUCH" != xBASH; then
10874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10875$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10876      fi
10877      # Try to locate tool using the code snippet
10878      for ac_prog in touch
10879do
10880  # Extract the first word of "$ac_prog", so it can be a program name with args.
10881set dummy $ac_prog; ac_word=$2
10882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10883$as_echo_n "checking for $ac_word... " >&6; }
10884if ${ac_cv_path_TOUCH+:} false; then :
10885  $as_echo_n "(cached) " >&6
10886else
10887  case $TOUCH in
10888  [\\/]* | ?:[\\/]*)
10889  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10890  ;;
10891  *)
10892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10893for as_dir in $PATH
10894do
10895  IFS=$as_save_IFS
10896  test -z "$as_dir" && as_dir=.
10897    for ac_exec_ext in '' $ac_executable_extensions; do
10898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10899    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10901    break 2
10902  fi
10903done
10904  done
10905IFS=$as_save_IFS
10906
10907  ;;
10908esac
10909fi
10910TOUCH=$ac_cv_path_TOUCH
10911if test -n "$TOUCH"; then
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10913$as_echo "$TOUCH" >&6; }
10914else
10915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10916$as_echo "no" >&6; }
10917fi
10918
10919
10920  test -n "$TOUCH" && break
10921done
10922
10923    else
10924      # If it succeeded, then it was overridden by the user. We will use it
10925      # for the tool.
10926
10927      # First remove it from the list of overridden variables, so we can test
10928      # for unknown variables in the end.
10929      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10930
10931      # Check if we try to supply an empty value
10932      if test "x$TOUCH" = x; then
10933        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10934$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10936$as_echo_n "checking for TOUCH... " >&6; }
10937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10938$as_echo "disabled" >&6; }
10939      else
10940        # Check if the provided tool contains a complete path.
10941        tool_specified="$TOUCH"
10942        tool_basename="${tool_specified##*/}"
10943        if test "x$tool_basename" = "x$tool_specified"; then
10944          # A command without a complete path is provided, search $PATH.
10945          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10946$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10947          # Extract the first word of "$tool_basename", so it can be a program name with args.
10948set dummy $tool_basename; ac_word=$2
10949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10950$as_echo_n "checking for $ac_word... " >&6; }
10951if ${ac_cv_path_TOUCH+:} false; then :
10952  $as_echo_n "(cached) " >&6
10953else
10954  case $TOUCH in
10955  [\\/]* | ?:[\\/]*)
10956  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10957  ;;
10958  *)
10959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10960for as_dir in $PATH
10961do
10962  IFS=$as_save_IFS
10963  test -z "$as_dir" && as_dir=.
10964    for ac_exec_ext in '' $ac_executable_extensions; do
10965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10966    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10968    break 2
10969  fi
10970done
10971  done
10972IFS=$as_save_IFS
10973
10974  ;;
10975esac
10976fi
10977TOUCH=$ac_cv_path_TOUCH
10978if test -n "$TOUCH"; then
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10980$as_echo "$TOUCH" >&6; }
10981else
10982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10983$as_echo "no" >&6; }
10984fi
10985
10986
10987          if test "x$TOUCH" = x; then
10988            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10989          fi
10990        else
10991          # Otherwise we believe it is a complete path. Use it as it is.
10992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10993$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10994          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10995$as_echo_n "checking for TOUCH... " >&6; }
10996          if test ! -x "$tool_specified"; then
10997            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10998$as_echo "not found" >&6; }
10999            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11000          fi
11001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11002$as_echo "$tool_specified" >&6; }
11003        fi
11004      fi
11005    fi
11006
11007  fi
11008
11009
11010
11011  if test "x$TOUCH" = x; then
11012    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11013  fi
11014
11015
11016
11017
11018
11019  # Publish this variable in the help.
11020
11021
11022  if [ -z "${TR+x}" ]; then
11023    # The variable is not set by user, try to locate tool using the code snippet
11024    for ac_prog in tr
11025do
11026  # Extract the first word of "$ac_prog", so it can be a program name with args.
11027set dummy $ac_prog; ac_word=$2
11028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11029$as_echo_n "checking for $ac_word... " >&6; }
11030if ${ac_cv_path_TR+:} false; then :
11031  $as_echo_n "(cached) " >&6
11032else
11033  case $TR in
11034  [\\/]* | ?:[\\/]*)
11035  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11036  ;;
11037  *)
11038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11039for as_dir in $PATH
11040do
11041  IFS=$as_save_IFS
11042  test -z "$as_dir" && as_dir=.
11043    for ac_exec_ext in '' $ac_executable_extensions; do
11044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11045    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11047    break 2
11048  fi
11049done
11050  done
11051IFS=$as_save_IFS
11052
11053  ;;
11054esac
11055fi
11056TR=$ac_cv_path_TR
11057if test -n "$TR"; then
11058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11059$as_echo "$TR" >&6; }
11060else
11061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11062$as_echo "no" >&6; }
11063fi
11064
11065
11066  test -n "$TR" && break
11067done
11068
11069  else
11070    # The variable is set, but is it from the command line or the environment?
11071
11072    # Try to remove the string !TR! from our list.
11073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11075      # If it failed, the variable was not from the command line. Ignore it,
11076      # but warn the user (except for BASH, which is always set by the calling BASH).
11077      if test "xTR" != xBASH; then
11078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11079$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11080      fi
11081      # Try to locate tool using the code snippet
11082      for ac_prog in tr
11083do
11084  # Extract the first word of "$ac_prog", so it can be a program name with args.
11085set dummy $ac_prog; ac_word=$2
11086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11087$as_echo_n "checking for $ac_word... " >&6; }
11088if ${ac_cv_path_TR+:} false; then :
11089  $as_echo_n "(cached) " >&6
11090else
11091  case $TR in
11092  [\\/]* | ?:[\\/]*)
11093  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11094  ;;
11095  *)
11096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11097for as_dir in $PATH
11098do
11099  IFS=$as_save_IFS
11100  test -z "$as_dir" && as_dir=.
11101    for ac_exec_ext in '' $ac_executable_extensions; do
11102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11103    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11105    break 2
11106  fi
11107done
11108  done
11109IFS=$as_save_IFS
11110
11111  ;;
11112esac
11113fi
11114TR=$ac_cv_path_TR
11115if test -n "$TR"; then
11116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11117$as_echo "$TR" >&6; }
11118else
11119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11120$as_echo "no" >&6; }
11121fi
11122
11123
11124  test -n "$TR" && break
11125done
11126
11127    else
11128      # If it succeeded, then it was overridden by the user. We will use it
11129      # for the tool.
11130
11131      # First remove it from the list of overridden variables, so we can test
11132      # for unknown variables in the end.
11133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11134
11135      # Check if we try to supply an empty value
11136      if test "x$TR" = x; then
11137        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11138$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11140$as_echo_n "checking for TR... " >&6; }
11141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11142$as_echo "disabled" >&6; }
11143      else
11144        # Check if the provided tool contains a complete path.
11145        tool_specified="$TR"
11146        tool_basename="${tool_specified##*/}"
11147        if test "x$tool_basename" = "x$tool_specified"; then
11148          # A command without a complete path is provided, search $PATH.
11149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11150$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11151          # Extract the first word of "$tool_basename", so it can be a program name with args.
11152set dummy $tool_basename; ac_word=$2
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11154$as_echo_n "checking for $ac_word... " >&6; }
11155if ${ac_cv_path_TR+:} false; then :
11156  $as_echo_n "(cached) " >&6
11157else
11158  case $TR in
11159  [\\/]* | ?:[\\/]*)
11160  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11161  ;;
11162  *)
11163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11164for as_dir in $PATH
11165do
11166  IFS=$as_save_IFS
11167  test -z "$as_dir" && as_dir=.
11168    for ac_exec_ext in '' $ac_executable_extensions; do
11169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11170    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11172    break 2
11173  fi
11174done
11175  done
11176IFS=$as_save_IFS
11177
11178  ;;
11179esac
11180fi
11181TR=$ac_cv_path_TR
11182if test -n "$TR"; then
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11184$as_echo "$TR" >&6; }
11185else
11186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11187$as_echo "no" >&6; }
11188fi
11189
11190
11191          if test "x$TR" = x; then
11192            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11193          fi
11194        else
11195          # Otherwise we believe it is a complete path. Use it as it is.
11196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11197$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11198          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11199$as_echo_n "checking for TR... " >&6; }
11200          if test ! -x "$tool_specified"; then
11201            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11202$as_echo "not found" >&6; }
11203            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11204          fi
11205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11206$as_echo "$tool_specified" >&6; }
11207        fi
11208      fi
11209    fi
11210
11211  fi
11212
11213
11214
11215  if test "x$TR" = x; then
11216    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11217  fi
11218
11219
11220
11221
11222
11223  # Publish this variable in the help.
11224
11225
11226  if [ -z "${UNAME+x}" ]; then
11227    # The variable is not set by user, try to locate tool using the code snippet
11228    for ac_prog in uname
11229do
11230  # Extract the first word of "$ac_prog", so it can be a program name with args.
11231set dummy $ac_prog; ac_word=$2
11232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233$as_echo_n "checking for $ac_word... " >&6; }
11234if ${ac_cv_path_UNAME+:} false; then :
11235  $as_echo_n "(cached) " >&6
11236else
11237  case $UNAME in
11238  [\\/]* | ?:[\\/]*)
11239  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11240  ;;
11241  *)
11242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11243for as_dir in $PATH
11244do
11245  IFS=$as_save_IFS
11246  test -z "$as_dir" && as_dir=.
11247    for ac_exec_ext in '' $ac_executable_extensions; do
11248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11249    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11251    break 2
11252  fi
11253done
11254  done
11255IFS=$as_save_IFS
11256
11257  ;;
11258esac
11259fi
11260UNAME=$ac_cv_path_UNAME
11261if test -n "$UNAME"; then
11262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11263$as_echo "$UNAME" >&6; }
11264else
11265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
11267fi
11268
11269
11270  test -n "$UNAME" && break
11271done
11272
11273  else
11274    # The variable is set, but is it from the command line or the environment?
11275
11276    # Try to remove the string !UNAME! from our list.
11277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11279      # If it failed, the variable was not from the command line. Ignore it,
11280      # but warn the user (except for BASH, which is always set by the calling BASH).
11281      if test "xUNAME" != xBASH; then
11282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11283$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11284      fi
11285      # Try to locate tool using the code snippet
11286      for ac_prog in uname
11287do
11288  # Extract the first word of "$ac_prog", so it can be a program name with args.
11289set dummy $ac_prog; ac_word=$2
11290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291$as_echo_n "checking for $ac_word... " >&6; }
11292if ${ac_cv_path_UNAME+:} false; then :
11293  $as_echo_n "(cached) " >&6
11294else
11295  case $UNAME in
11296  [\\/]* | ?:[\\/]*)
11297  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11298  ;;
11299  *)
11300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301for as_dir in $PATH
11302do
11303  IFS=$as_save_IFS
11304  test -z "$as_dir" && as_dir=.
11305    for ac_exec_ext in '' $ac_executable_extensions; do
11306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11307    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11309    break 2
11310  fi
11311done
11312  done
11313IFS=$as_save_IFS
11314
11315  ;;
11316esac
11317fi
11318UNAME=$ac_cv_path_UNAME
11319if test -n "$UNAME"; then
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11321$as_echo "$UNAME" >&6; }
11322else
11323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324$as_echo "no" >&6; }
11325fi
11326
11327
11328  test -n "$UNAME" && break
11329done
11330
11331    else
11332      # If it succeeded, then it was overridden by the user. We will use it
11333      # for the tool.
11334
11335      # First remove it from the list of overridden variables, so we can test
11336      # for unknown variables in the end.
11337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11338
11339      # Check if we try to supply an empty value
11340      if test "x$UNAME" = x; then
11341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11342$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11344$as_echo_n "checking for UNAME... " >&6; }
11345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11346$as_echo "disabled" >&6; }
11347      else
11348        # Check if the provided tool contains a complete path.
11349        tool_specified="$UNAME"
11350        tool_basename="${tool_specified##*/}"
11351        if test "x$tool_basename" = "x$tool_specified"; then
11352          # A command without a complete path is provided, search $PATH.
11353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11354$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11355          # Extract the first word of "$tool_basename", so it can be a program name with args.
11356set dummy $tool_basename; ac_word=$2
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11358$as_echo_n "checking for $ac_word... " >&6; }
11359if ${ac_cv_path_UNAME+:} false; then :
11360  $as_echo_n "(cached) " >&6
11361else
11362  case $UNAME in
11363  [\\/]* | ?:[\\/]*)
11364  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11365  ;;
11366  *)
11367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11368for as_dir in $PATH
11369do
11370  IFS=$as_save_IFS
11371  test -z "$as_dir" && as_dir=.
11372    for ac_exec_ext in '' $ac_executable_extensions; do
11373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11374    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11376    break 2
11377  fi
11378done
11379  done
11380IFS=$as_save_IFS
11381
11382  ;;
11383esac
11384fi
11385UNAME=$ac_cv_path_UNAME
11386if test -n "$UNAME"; then
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11388$as_echo "$UNAME" >&6; }
11389else
11390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
11392fi
11393
11394
11395          if test "x$UNAME" = x; then
11396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11397          fi
11398        else
11399          # Otherwise we believe it is a complete path. Use it as it is.
11400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11401$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11403$as_echo_n "checking for UNAME... " >&6; }
11404          if test ! -x "$tool_specified"; then
11405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11406$as_echo "not found" >&6; }
11407            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11408          fi
11409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11410$as_echo "$tool_specified" >&6; }
11411        fi
11412      fi
11413    fi
11414
11415  fi
11416
11417
11418
11419  if test "x$UNAME" = x; then
11420    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11421  fi
11422
11423
11424
11425
11426
11427  # Publish this variable in the help.
11428
11429
11430  if [ -z "${UNIQ+x}" ]; then
11431    # The variable is not set by user, try to locate tool using the code snippet
11432    for ac_prog in uniq
11433do
11434  # Extract the first word of "$ac_prog", so it can be a program name with args.
11435set dummy $ac_prog; ac_word=$2
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11437$as_echo_n "checking for $ac_word... " >&6; }
11438if ${ac_cv_path_UNIQ+:} false; then :
11439  $as_echo_n "(cached) " >&6
11440else
11441  case $UNIQ in
11442  [\\/]* | ?:[\\/]*)
11443  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11444  ;;
11445  *)
11446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11447for as_dir in $PATH
11448do
11449  IFS=$as_save_IFS
11450  test -z "$as_dir" && as_dir=.
11451    for ac_exec_ext in '' $ac_executable_extensions; do
11452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11453    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11455    break 2
11456  fi
11457done
11458  done
11459IFS=$as_save_IFS
11460
11461  ;;
11462esac
11463fi
11464UNIQ=$ac_cv_path_UNIQ
11465if test -n "$UNIQ"; then
11466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11467$as_echo "$UNIQ" >&6; }
11468else
11469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
11471fi
11472
11473
11474  test -n "$UNIQ" && break
11475done
11476
11477  else
11478    # The variable is set, but is it from the command line or the environment?
11479
11480    # Try to remove the string !UNIQ! from our list.
11481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11483      # If it failed, the variable was not from the command line. Ignore it,
11484      # but warn the user (except for BASH, which is always set by the calling BASH).
11485      if test "xUNIQ" != xBASH; then
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11487$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11488      fi
11489      # Try to locate tool using the code snippet
11490      for ac_prog in uniq
11491do
11492  # Extract the first word of "$ac_prog", so it can be a program name with args.
11493set dummy $ac_prog; ac_word=$2
11494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11495$as_echo_n "checking for $ac_word... " >&6; }
11496if ${ac_cv_path_UNIQ+:} false; then :
11497  $as_echo_n "(cached) " >&6
11498else
11499  case $UNIQ in
11500  [\\/]* | ?:[\\/]*)
11501  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11502  ;;
11503  *)
11504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11505for as_dir in $PATH
11506do
11507  IFS=$as_save_IFS
11508  test -z "$as_dir" && as_dir=.
11509    for ac_exec_ext in '' $ac_executable_extensions; do
11510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11511    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11513    break 2
11514  fi
11515done
11516  done
11517IFS=$as_save_IFS
11518
11519  ;;
11520esac
11521fi
11522UNIQ=$ac_cv_path_UNIQ
11523if test -n "$UNIQ"; then
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11525$as_echo "$UNIQ" >&6; }
11526else
11527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
11529fi
11530
11531
11532  test -n "$UNIQ" && break
11533done
11534
11535    else
11536      # If it succeeded, then it was overridden by the user. We will use it
11537      # for the tool.
11538
11539      # First remove it from the list of overridden variables, so we can test
11540      # for unknown variables in the end.
11541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11542
11543      # Check if we try to supply an empty value
11544      if test "x$UNIQ" = x; then
11545        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11546$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11548$as_echo_n "checking for UNIQ... " >&6; }
11549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11550$as_echo "disabled" >&6; }
11551      else
11552        # Check if the provided tool contains a complete path.
11553        tool_specified="$UNIQ"
11554        tool_basename="${tool_specified##*/}"
11555        if test "x$tool_basename" = "x$tool_specified"; then
11556          # A command without a complete path is provided, search $PATH.
11557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11558$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11559          # Extract the first word of "$tool_basename", so it can be a program name with args.
11560set dummy $tool_basename; ac_word=$2
11561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11562$as_echo_n "checking for $ac_word... " >&6; }
11563if ${ac_cv_path_UNIQ+:} false; then :
11564  $as_echo_n "(cached) " >&6
11565else
11566  case $UNIQ in
11567  [\\/]* | ?:[\\/]*)
11568  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11569  ;;
11570  *)
11571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11572for as_dir in $PATH
11573do
11574  IFS=$as_save_IFS
11575  test -z "$as_dir" && as_dir=.
11576    for ac_exec_ext in '' $ac_executable_extensions; do
11577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11578    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11580    break 2
11581  fi
11582done
11583  done
11584IFS=$as_save_IFS
11585
11586  ;;
11587esac
11588fi
11589UNIQ=$ac_cv_path_UNIQ
11590if test -n "$UNIQ"; then
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11592$as_echo "$UNIQ" >&6; }
11593else
11594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
11596fi
11597
11598
11599          if test "x$UNIQ" = x; then
11600            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11601          fi
11602        else
11603          # Otherwise we believe it is a complete path. Use it as it is.
11604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11605$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11607$as_echo_n "checking for UNIQ... " >&6; }
11608          if test ! -x "$tool_specified"; then
11609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11610$as_echo "not found" >&6; }
11611            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11612          fi
11613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11614$as_echo "$tool_specified" >&6; }
11615        fi
11616      fi
11617    fi
11618
11619  fi
11620
11621
11622
11623  if test "x$UNIQ" = x; then
11624    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11625  fi
11626
11627
11628
11629
11630
11631  # Publish this variable in the help.
11632
11633
11634  if [ -z "${WC+x}" ]; then
11635    # The variable is not set by user, try to locate tool using the code snippet
11636    for ac_prog in wc
11637do
11638  # Extract the first word of "$ac_prog", so it can be a program name with args.
11639set dummy $ac_prog; ac_word=$2
11640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11641$as_echo_n "checking for $ac_word... " >&6; }
11642if ${ac_cv_path_WC+:} false; then :
11643  $as_echo_n "(cached) " >&6
11644else
11645  case $WC in
11646  [\\/]* | ?:[\\/]*)
11647  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11648  ;;
11649  *)
11650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11651for as_dir in $PATH
11652do
11653  IFS=$as_save_IFS
11654  test -z "$as_dir" && as_dir=.
11655    for ac_exec_ext in '' $ac_executable_extensions; do
11656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11657    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11659    break 2
11660  fi
11661done
11662  done
11663IFS=$as_save_IFS
11664
11665  ;;
11666esac
11667fi
11668WC=$ac_cv_path_WC
11669if test -n "$WC"; then
11670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11671$as_echo "$WC" >&6; }
11672else
11673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674$as_echo "no" >&6; }
11675fi
11676
11677
11678  test -n "$WC" && break
11679done
11680
11681  else
11682    # The variable is set, but is it from the command line or the environment?
11683
11684    # Try to remove the string !WC! from our list.
11685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11687      # If it failed, the variable was not from the command line. Ignore it,
11688      # but warn the user (except for BASH, which is always set by the calling BASH).
11689      if test "xWC" != xBASH; then
11690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11691$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11692      fi
11693      # Try to locate tool using the code snippet
11694      for ac_prog in wc
11695do
11696  # Extract the first word of "$ac_prog", so it can be a program name with args.
11697set dummy $ac_prog; ac_word=$2
11698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11699$as_echo_n "checking for $ac_word... " >&6; }
11700if ${ac_cv_path_WC+:} false; then :
11701  $as_echo_n "(cached) " >&6
11702else
11703  case $WC in
11704  [\\/]* | ?:[\\/]*)
11705  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11706  ;;
11707  *)
11708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11709for as_dir in $PATH
11710do
11711  IFS=$as_save_IFS
11712  test -z "$as_dir" && as_dir=.
11713    for ac_exec_ext in '' $ac_executable_extensions; do
11714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11715    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11717    break 2
11718  fi
11719done
11720  done
11721IFS=$as_save_IFS
11722
11723  ;;
11724esac
11725fi
11726WC=$ac_cv_path_WC
11727if test -n "$WC"; then
11728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11729$as_echo "$WC" >&6; }
11730else
11731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732$as_echo "no" >&6; }
11733fi
11734
11735
11736  test -n "$WC" && break
11737done
11738
11739    else
11740      # If it succeeded, then it was overridden by the user. We will use it
11741      # for the tool.
11742
11743      # First remove it from the list of overridden variables, so we can test
11744      # for unknown variables in the end.
11745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11746
11747      # Check if we try to supply an empty value
11748      if test "x$WC" = x; then
11749        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11750$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11751        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11752$as_echo_n "checking for WC... " >&6; }
11753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11754$as_echo "disabled" >&6; }
11755      else
11756        # Check if the provided tool contains a complete path.
11757        tool_specified="$WC"
11758        tool_basename="${tool_specified##*/}"
11759        if test "x$tool_basename" = "x$tool_specified"; then
11760          # A command without a complete path is provided, search $PATH.
11761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11762$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11763          # Extract the first word of "$tool_basename", so it can be a program name with args.
11764set dummy $tool_basename; ac_word=$2
11765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11766$as_echo_n "checking for $ac_word... " >&6; }
11767if ${ac_cv_path_WC+:} false; then :
11768  $as_echo_n "(cached) " >&6
11769else
11770  case $WC in
11771  [\\/]* | ?:[\\/]*)
11772  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11773  ;;
11774  *)
11775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11776for as_dir in $PATH
11777do
11778  IFS=$as_save_IFS
11779  test -z "$as_dir" && as_dir=.
11780    for ac_exec_ext in '' $ac_executable_extensions; do
11781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11782    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11784    break 2
11785  fi
11786done
11787  done
11788IFS=$as_save_IFS
11789
11790  ;;
11791esac
11792fi
11793WC=$ac_cv_path_WC
11794if test -n "$WC"; then
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11796$as_echo "$WC" >&6; }
11797else
11798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
11800fi
11801
11802
11803          if test "x$WC" = x; then
11804            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11805          fi
11806        else
11807          # Otherwise we believe it is a complete path. Use it as it is.
11808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11809$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11810          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11811$as_echo_n "checking for WC... " >&6; }
11812          if test ! -x "$tool_specified"; then
11813            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11814$as_echo "not found" >&6; }
11815            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11816          fi
11817          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11818$as_echo "$tool_specified" >&6; }
11819        fi
11820      fi
11821    fi
11822
11823  fi
11824
11825
11826
11827  if test "x$WC" = x; then
11828    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11829  fi
11830
11831
11832
11833
11834
11835  # Publish this variable in the help.
11836
11837
11838  if [ -z "${WHICH+x}" ]; then
11839    # The variable is not set by user, try to locate tool using the code snippet
11840    for ac_prog in which
11841do
11842  # Extract the first word of "$ac_prog", so it can be a program name with args.
11843set dummy $ac_prog; ac_word=$2
11844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11845$as_echo_n "checking for $ac_word... " >&6; }
11846if ${ac_cv_path_WHICH+:} false; then :
11847  $as_echo_n "(cached) " >&6
11848else
11849  case $WHICH in
11850  [\\/]* | ?:[\\/]*)
11851  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11852  ;;
11853  *)
11854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11855for as_dir in $PATH
11856do
11857  IFS=$as_save_IFS
11858  test -z "$as_dir" && as_dir=.
11859    for ac_exec_ext in '' $ac_executable_extensions; do
11860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11861    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11863    break 2
11864  fi
11865done
11866  done
11867IFS=$as_save_IFS
11868
11869  ;;
11870esac
11871fi
11872WHICH=$ac_cv_path_WHICH
11873if test -n "$WHICH"; then
11874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11875$as_echo "$WHICH" >&6; }
11876else
11877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
11879fi
11880
11881
11882  test -n "$WHICH" && break
11883done
11884
11885  else
11886    # The variable is set, but is it from the command line or the environment?
11887
11888    # Try to remove the string !WHICH! from our list.
11889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11891      # If it failed, the variable was not from the command line. Ignore it,
11892      # but warn the user (except for BASH, which is always set by the calling BASH).
11893      if test "xWHICH" != xBASH; then
11894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11895$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11896      fi
11897      # Try to locate tool using the code snippet
11898      for ac_prog in which
11899do
11900  # Extract the first word of "$ac_prog", so it can be a program name with args.
11901set dummy $ac_prog; ac_word=$2
11902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11903$as_echo_n "checking for $ac_word... " >&6; }
11904if ${ac_cv_path_WHICH+:} false; then :
11905  $as_echo_n "(cached) " >&6
11906else
11907  case $WHICH in
11908  [\\/]* | ?:[\\/]*)
11909  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11910  ;;
11911  *)
11912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11913for as_dir in $PATH
11914do
11915  IFS=$as_save_IFS
11916  test -z "$as_dir" && as_dir=.
11917    for ac_exec_ext in '' $ac_executable_extensions; do
11918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11919    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11921    break 2
11922  fi
11923done
11924  done
11925IFS=$as_save_IFS
11926
11927  ;;
11928esac
11929fi
11930WHICH=$ac_cv_path_WHICH
11931if test -n "$WHICH"; then
11932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11933$as_echo "$WHICH" >&6; }
11934else
11935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11936$as_echo "no" >&6; }
11937fi
11938
11939
11940  test -n "$WHICH" && break
11941done
11942
11943    else
11944      # If it succeeded, then it was overridden by the user. We will use it
11945      # for the tool.
11946
11947      # First remove it from the list of overridden variables, so we can test
11948      # for unknown variables in the end.
11949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11950
11951      # Check if we try to supply an empty value
11952      if test "x$WHICH" = x; then
11953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11954$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11956$as_echo_n "checking for WHICH... " >&6; }
11957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11958$as_echo "disabled" >&6; }
11959      else
11960        # Check if the provided tool contains a complete path.
11961        tool_specified="$WHICH"
11962        tool_basename="${tool_specified##*/}"
11963        if test "x$tool_basename" = "x$tool_specified"; then
11964          # A command without a complete path is provided, search $PATH.
11965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11966$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11967          # Extract the first word of "$tool_basename", so it can be a program name with args.
11968set dummy $tool_basename; ac_word=$2
11969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11970$as_echo_n "checking for $ac_word... " >&6; }
11971if ${ac_cv_path_WHICH+:} false; then :
11972  $as_echo_n "(cached) " >&6
11973else
11974  case $WHICH in
11975  [\\/]* | ?:[\\/]*)
11976  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11977  ;;
11978  *)
11979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11980for as_dir in $PATH
11981do
11982  IFS=$as_save_IFS
11983  test -z "$as_dir" && as_dir=.
11984    for ac_exec_ext in '' $ac_executable_extensions; do
11985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11986    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11988    break 2
11989  fi
11990done
11991  done
11992IFS=$as_save_IFS
11993
11994  ;;
11995esac
11996fi
11997WHICH=$ac_cv_path_WHICH
11998if test -n "$WHICH"; then
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12000$as_echo "$WHICH" >&6; }
12001else
12002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12003$as_echo "no" >&6; }
12004fi
12005
12006
12007          if test "x$WHICH" = x; then
12008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12009          fi
12010        else
12011          # Otherwise we believe it is a complete path. Use it as it is.
12012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12013$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12015$as_echo_n "checking for WHICH... " >&6; }
12016          if test ! -x "$tool_specified"; then
12017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12018$as_echo "not found" >&6; }
12019            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12020          fi
12021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12022$as_echo "$tool_specified" >&6; }
12023        fi
12024      fi
12025    fi
12026
12027  fi
12028
12029
12030
12031  if test "x$WHICH" = x; then
12032    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12033  fi
12034
12035
12036
12037
12038
12039  # Publish this variable in the help.
12040
12041
12042  if [ -z "${XARGS+x}" ]; then
12043    # The variable is not set by user, try to locate tool using the code snippet
12044    for ac_prog in xargs
12045do
12046  # Extract the first word of "$ac_prog", so it can be a program name with args.
12047set dummy $ac_prog; ac_word=$2
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12049$as_echo_n "checking for $ac_word... " >&6; }
12050if ${ac_cv_path_XARGS+:} false; then :
12051  $as_echo_n "(cached) " >&6
12052else
12053  case $XARGS in
12054  [\\/]* | ?:[\\/]*)
12055  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12056  ;;
12057  *)
12058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12059for as_dir in $PATH
12060do
12061  IFS=$as_save_IFS
12062  test -z "$as_dir" && as_dir=.
12063    for ac_exec_ext in '' $ac_executable_extensions; do
12064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12065    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12067    break 2
12068  fi
12069done
12070  done
12071IFS=$as_save_IFS
12072
12073  ;;
12074esac
12075fi
12076XARGS=$ac_cv_path_XARGS
12077if test -n "$XARGS"; then
12078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12079$as_echo "$XARGS" >&6; }
12080else
12081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12082$as_echo "no" >&6; }
12083fi
12084
12085
12086  test -n "$XARGS" && break
12087done
12088
12089  else
12090    # The variable is set, but is it from the command line or the environment?
12091
12092    # Try to remove the string !XARGS! from our list.
12093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12095      # If it failed, the variable was not from the command line. Ignore it,
12096      # but warn the user (except for BASH, which is always set by the calling BASH).
12097      if test "xXARGS" != xBASH; then
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12099$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12100      fi
12101      # Try to locate tool using the code snippet
12102      for ac_prog in xargs
12103do
12104  # Extract the first word of "$ac_prog", so it can be a program name with args.
12105set dummy $ac_prog; ac_word=$2
12106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12107$as_echo_n "checking for $ac_word... " >&6; }
12108if ${ac_cv_path_XARGS+:} false; then :
12109  $as_echo_n "(cached) " >&6
12110else
12111  case $XARGS in
12112  [\\/]* | ?:[\\/]*)
12113  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12114  ;;
12115  *)
12116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12117for as_dir in $PATH
12118do
12119  IFS=$as_save_IFS
12120  test -z "$as_dir" && as_dir=.
12121    for ac_exec_ext in '' $ac_executable_extensions; do
12122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12123    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12125    break 2
12126  fi
12127done
12128  done
12129IFS=$as_save_IFS
12130
12131  ;;
12132esac
12133fi
12134XARGS=$ac_cv_path_XARGS
12135if test -n "$XARGS"; then
12136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12137$as_echo "$XARGS" >&6; }
12138else
12139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12140$as_echo "no" >&6; }
12141fi
12142
12143
12144  test -n "$XARGS" && break
12145done
12146
12147    else
12148      # If it succeeded, then it was overridden by the user. We will use it
12149      # for the tool.
12150
12151      # First remove it from the list of overridden variables, so we can test
12152      # for unknown variables in the end.
12153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12154
12155      # Check if we try to supply an empty value
12156      if test "x$XARGS" = x; then
12157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12158$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12160$as_echo_n "checking for XARGS... " >&6; }
12161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12162$as_echo "disabled" >&6; }
12163      else
12164        # Check if the provided tool contains a complete path.
12165        tool_specified="$XARGS"
12166        tool_basename="${tool_specified##*/}"
12167        if test "x$tool_basename" = "x$tool_specified"; then
12168          # A command without a complete path is provided, search $PATH.
12169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12170$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12171          # Extract the first word of "$tool_basename", so it can be a program name with args.
12172set dummy $tool_basename; ac_word=$2
12173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12174$as_echo_n "checking for $ac_word... " >&6; }
12175if ${ac_cv_path_XARGS+:} false; then :
12176  $as_echo_n "(cached) " >&6
12177else
12178  case $XARGS in
12179  [\\/]* | ?:[\\/]*)
12180  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12181  ;;
12182  *)
12183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12184for as_dir in $PATH
12185do
12186  IFS=$as_save_IFS
12187  test -z "$as_dir" && as_dir=.
12188    for ac_exec_ext in '' $ac_executable_extensions; do
12189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12190    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12192    break 2
12193  fi
12194done
12195  done
12196IFS=$as_save_IFS
12197
12198  ;;
12199esac
12200fi
12201XARGS=$ac_cv_path_XARGS
12202if test -n "$XARGS"; then
12203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12204$as_echo "$XARGS" >&6; }
12205else
12206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12207$as_echo "no" >&6; }
12208fi
12209
12210
12211          if test "x$XARGS" = x; then
12212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12213          fi
12214        else
12215          # Otherwise we believe it is a complete path. Use it as it is.
12216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12217$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12219$as_echo_n "checking for XARGS... " >&6; }
12220          if test ! -x "$tool_specified"; then
12221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12222$as_echo "not found" >&6; }
12223            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12224          fi
12225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12226$as_echo "$tool_specified" >&6; }
12227        fi
12228      fi
12229    fi
12230
12231  fi
12232
12233
12234
12235  if test "x$XARGS" = x; then
12236    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12237  fi
12238
12239
12240
12241  # Then required tools that require some special treatment.
12242
12243
12244  # Publish this variable in the help.
12245
12246
12247  if [ -z "${AWK+x}" ]; then
12248    # The variable is not set by user, try to locate tool using the code snippet
12249    for ac_prog in gawk mawk nawk awk
12250do
12251  # Extract the first word of "$ac_prog", so it can be a program name with args.
12252set dummy $ac_prog; ac_word=$2
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12254$as_echo_n "checking for $ac_word... " >&6; }
12255if ${ac_cv_prog_AWK+:} false; then :
12256  $as_echo_n "(cached) " >&6
12257else
12258  if test -n "$AWK"; then
12259  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12260else
12261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12262for as_dir in $PATH
12263do
12264  IFS=$as_save_IFS
12265  test -z "$as_dir" && as_dir=.
12266    for ac_exec_ext in '' $ac_executable_extensions; do
12267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12268    ac_cv_prog_AWK="$ac_prog"
12269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12270    break 2
12271  fi
12272done
12273  done
12274IFS=$as_save_IFS
12275
12276fi
12277fi
12278AWK=$ac_cv_prog_AWK
12279if test -n "$AWK"; then
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12281$as_echo "$AWK" >&6; }
12282else
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12284$as_echo "no" >&6; }
12285fi
12286
12287
12288  test -n "$AWK" && break
12289done
12290
12291  else
12292    # The variable is set, but is it from the command line or the environment?
12293
12294    # Try to remove the string !AWK! from our list.
12295    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12296    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12297      # If it failed, the variable was not from the command line. Ignore it,
12298      # but warn the user (except for BASH, which is always set by the calling BASH).
12299      if test "xAWK" != xBASH; then
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12301$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12302      fi
12303      # Try to locate tool using the code snippet
12304      for ac_prog in gawk mawk nawk awk
12305do
12306  # Extract the first word of "$ac_prog", so it can be a program name with args.
12307set dummy $ac_prog; ac_word=$2
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12309$as_echo_n "checking for $ac_word... " >&6; }
12310if ${ac_cv_prog_AWK+:} false; then :
12311  $as_echo_n "(cached) " >&6
12312else
12313  if test -n "$AWK"; then
12314  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12315else
12316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317for as_dir in $PATH
12318do
12319  IFS=$as_save_IFS
12320  test -z "$as_dir" && as_dir=.
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12323    ac_cv_prog_AWK="$ac_prog"
12324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12325    break 2
12326  fi
12327done
12328  done
12329IFS=$as_save_IFS
12330
12331fi
12332fi
12333AWK=$ac_cv_prog_AWK
12334if test -n "$AWK"; then
12335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12336$as_echo "$AWK" >&6; }
12337else
12338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
12340fi
12341
12342
12343  test -n "$AWK" && break
12344done
12345
12346    else
12347      # If it succeeded, then it was overridden by the user. We will use it
12348      # for the tool.
12349
12350      # First remove it from the list of overridden variables, so we can test
12351      # for unknown variables in the end.
12352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12353
12354      # Check if we try to supply an empty value
12355      if test "x$AWK" = x; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12357$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12359$as_echo_n "checking for AWK... " >&6; }
12360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12361$as_echo "disabled" >&6; }
12362      else
12363        # Check if the provided tool contains a complete path.
12364        tool_specified="$AWK"
12365        tool_basename="${tool_specified##*/}"
12366        if test "x$tool_basename" = "x$tool_specified"; then
12367          # A command without a complete path is provided, search $PATH.
12368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12369$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12370          # Extract the first word of "$tool_basename", so it can be a program name with args.
12371set dummy $tool_basename; ac_word=$2
12372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12373$as_echo_n "checking for $ac_word... " >&6; }
12374if ${ac_cv_path_AWK+:} false; then :
12375  $as_echo_n "(cached) " >&6
12376else
12377  case $AWK in
12378  [\\/]* | ?:[\\/]*)
12379  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12380  ;;
12381  *)
12382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383for as_dir in $PATH
12384do
12385  IFS=$as_save_IFS
12386  test -z "$as_dir" && as_dir=.
12387    for ac_exec_ext in '' $ac_executable_extensions; do
12388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12389    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12391    break 2
12392  fi
12393done
12394  done
12395IFS=$as_save_IFS
12396
12397  ;;
12398esac
12399fi
12400AWK=$ac_cv_path_AWK
12401if test -n "$AWK"; then
12402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12403$as_echo "$AWK" >&6; }
12404else
12405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
12407fi
12408
12409
12410          if test "x$AWK" = x; then
12411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12412          fi
12413        else
12414          # Otherwise we believe it is a complete path. Use it as it is.
12415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12416$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12418$as_echo_n "checking for AWK... " >&6; }
12419          if test ! -x "$tool_specified"; then
12420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12421$as_echo "not found" >&6; }
12422            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12423          fi
12424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12425$as_echo "$tool_specified" >&6; }
12426        fi
12427      fi
12428    fi
12429
12430  fi
12431
12432
12433  if test "x$AWK" = x; then
12434    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12435  fi
12436
12437
12438
12439
12440  # Publish this variable in the help.
12441
12442
12443  if [ -z "${GREP+x}" ]; then
12444    # The variable is not set by user, try to locate tool using the code snippet
12445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12446$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12447if ${ac_cv_path_GREP+:} false; then :
12448  $as_echo_n "(cached) " >&6
12449else
12450  if test -z "$GREP"; then
12451  ac_path_GREP_found=false
12452  # Loop through the user's path and test for each of PROGNAME-LIST
12453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12454for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12455do
12456  IFS=$as_save_IFS
12457  test -z "$as_dir" && as_dir=.
12458    for ac_prog in grep ggrep; do
12459    for ac_exec_ext in '' $ac_executable_extensions; do
12460      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12461      as_fn_executable_p "$ac_path_GREP" || continue
12462# Check for GNU ac_path_GREP and select it if it is found.
12463  # Check for GNU $ac_path_GREP
12464case `"$ac_path_GREP" --version 2>&1` in
12465*GNU*)
12466  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12467*)
12468  ac_count=0
12469  $as_echo_n 0123456789 >"conftest.in"
12470  while :
12471  do
12472    cat "conftest.in" "conftest.in" >"conftest.tmp"
12473    mv "conftest.tmp" "conftest.in"
12474    cp "conftest.in" "conftest.nl"
12475    $as_echo 'GREP' >> "conftest.nl"
12476    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12477    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12478    as_fn_arith $ac_count + 1 && ac_count=$as_val
12479    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12480      # Best one so far, save it but keep looking for a better one
12481      ac_cv_path_GREP="$ac_path_GREP"
12482      ac_path_GREP_max=$ac_count
12483    fi
12484    # 10*(2^10) chars as input seems more than enough
12485    test $ac_count -gt 10 && break
12486  done
12487  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12488esac
12489
12490      $ac_path_GREP_found && break 3
12491    done
12492  done
12493  done
12494IFS=$as_save_IFS
12495  if test -z "$ac_cv_path_GREP"; then
12496    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12497  fi
12498else
12499  ac_cv_path_GREP=$GREP
12500fi
12501
12502fi
12503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12504$as_echo "$ac_cv_path_GREP" >&6; }
12505 GREP="$ac_cv_path_GREP"
12506
12507
12508  else
12509    # The variable is set, but is it from the command line or the environment?
12510
12511    # Try to remove the string !GREP! from our list.
12512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12514      # If it failed, the variable was not from the command line. Ignore it,
12515      # but warn the user (except for BASH, which is always set by the calling BASH).
12516      if test "xGREP" != xBASH; then
12517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12518$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12519      fi
12520      # Try to locate tool using the code snippet
12521      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12522$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12523if ${ac_cv_path_GREP+:} false; then :
12524  $as_echo_n "(cached) " >&6
12525else
12526  if test -z "$GREP"; then
12527  ac_path_GREP_found=false
12528  # Loop through the user's path and test for each of PROGNAME-LIST
12529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12530for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12531do
12532  IFS=$as_save_IFS
12533  test -z "$as_dir" && as_dir=.
12534    for ac_prog in grep ggrep; do
12535    for ac_exec_ext in '' $ac_executable_extensions; do
12536      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12537      as_fn_executable_p "$ac_path_GREP" || continue
12538# Check for GNU ac_path_GREP and select it if it is found.
12539  # Check for GNU $ac_path_GREP
12540case `"$ac_path_GREP" --version 2>&1` in
12541*GNU*)
12542  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12543*)
12544  ac_count=0
12545  $as_echo_n 0123456789 >"conftest.in"
12546  while :
12547  do
12548    cat "conftest.in" "conftest.in" >"conftest.tmp"
12549    mv "conftest.tmp" "conftest.in"
12550    cp "conftest.in" "conftest.nl"
12551    $as_echo 'GREP' >> "conftest.nl"
12552    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12553    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12554    as_fn_arith $ac_count + 1 && ac_count=$as_val
12555    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12556      # Best one so far, save it but keep looking for a better one
12557      ac_cv_path_GREP="$ac_path_GREP"
12558      ac_path_GREP_max=$ac_count
12559    fi
12560    # 10*(2^10) chars as input seems more than enough
12561    test $ac_count -gt 10 && break
12562  done
12563  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12564esac
12565
12566      $ac_path_GREP_found && break 3
12567    done
12568  done
12569  done
12570IFS=$as_save_IFS
12571  if test -z "$ac_cv_path_GREP"; then
12572    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12573  fi
12574else
12575  ac_cv_path_GREP=$GREP
12576fi
12577
12578fi
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12580$as_echo "$ac_cv_path_GREP" >&6; }
12581 GREP="$ac_cv_path_GREP"
12582
12583
12584    else
12585      # If it succeeded, then it was overridden by the user. We will use it
12586      # for the tool.
12587
12588      # First remove it from the list of overridden variables, so we can test
12589      # for unknown variables in the end.
12590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12591
12592      # Check if we try to supply an empty value
12593      if test "x$GREP" = x; then
12594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12595$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12597$as_echo_n "checking for GREP... " >&6; }
12598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12599$as_echo "disabled" >&6; }
12600      else
12601        # Check if the provided tool contains a complete path.
12602        tool_specified="$GREP"
12603        tool_basename="${tool_specified##*/}"
12604        if test "x$tool_basename" = "x$tool_specified"; then
12605          # A command without a complete path is provided, search $PATH.
12606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12607$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12608          # Extract the first word of "$tool_basename", so it can be a program name with args.
12609set dummy $tool_basename; ac_word=$2
12610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12611$as_echo_n "checking for $ac_word... " >&6; }
12612if ${ac_cv_path_GREP+:} false; then :
12613  $as_echo_n "(cached) " >&6
12614else
12615  case $GREP in
12616  [\\/]* | ?:[\\/]*)
12617  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12618  ;;
12619  *)
12620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12621for as_dir in $PATH
12622do
12623  IFS=$as_save_IFS
12624  test -z "$as_dir" && as_dir=.
12625    for ac_exec_ext in '' $ac_executable_extensions; do
12626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12627    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12629    break 2
12630  fi
12631done
12632  done
12633IFS=$as_save_IFS
12634
12635  ;;
12636esac
12637fi
12638GREP=$ac_cv_path_GREP
12639if test -n "$GREP"; then
12640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12641$as_echo "$GREP" >&6; }
12642else
12643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12644$as_echo "no" >&6; }
12645fi
12646
12647
12648          if test "x$GREP" = x; then
12649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12650          fi
12651        else
12652          # Otherwise we believe it is a complete path. Use it as it is.
12653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12654$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12656$as_echo_n "checking for GREP... " >&6; }
12657          if test ! -x "$tool_specified"; then
12658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12659$as_echo "not found" >&6; }
12660            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12661          fi
12662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12663$as_echo "$tool_specified" >&6; }
12664        fi
12665      fi
12666    fi
12667
12668  fi
12669
12670
12671  if test "x$GREP" = x; then
12672    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12673  fi
12674
12675
12676
12677
12678  # Publish this variable in the help.
12679
12680
12681  if [ -z "${EGREP+x}" ]; then
12682    # The variable is not set by user, try to locate tool using the code snippet
12683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12684$as_echo_n "checking for egrep... " >&6; }
12685if ${ac_cv_path_EGREP+:} false; then :
12686  $as_echo_n "(cached) " >&6
12687else
12688  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12689   then ac_cv_path_EGREP="$GREP -E"
12690   else
12691     if test -z "$EGREP"; then
12692  ac_path_EGREP_found=false
12693  # Loop through the user's path and test for each of PROGNAME-LIST
12694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12696do
12697  IFS=$as_save_IFS
12698  test -z "$as_dir" && as_dir=.
12699    for ac_prog in egrep; do
12700    for ac_exec_ext in '' $ac_executable_extensions; do
12701      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12702      as_fn_executable_p "$ac_path_EGREP" || continue
12703# Check for GNU ac_path_EGREP and select it if it is found.
12704  # Check for GNU $ac_path_EGREP
12705case `"$ac_path_EGREP" --version 2>&1` in
12706*GNU*)
12707  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12708*)
12709  ac_count=0
12710  $as_echo_n 0123456789 >"conftest.in"
12711  while :
12712  do
12713    cat "conftest.in" "conftest.in" >"conftest.tmp"
12714    mv "conftest.tmp" "conftest.in"
12715    cp "conftest.in" "conftest.nl"
12716    $as_echo 'EGREP' >> "conftest.nl"
12717    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12718    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12719    as_fn_arith $ac_count + 1 && ac_count=$as_val
12720    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12721      # Best one so far, save it but keep looking for a better one
12722      ac_cv_path_EGREP="$ac_path_EGREP"
12723      ac_path_EGREP_max=$ac_count
12724    fi
12725    # 10*(2^10) chars as input seems more than enough
12726    test $ac_count -gt 10 && break
12727  done
12728  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12729esac
12730
12731      $ac_path_EGREP_found && break 3
12732    done
12733  done
12734  done
12735IFS=$as_save_IFS
12736  if test -z "$ac_cv_path_EGREP"; then
12737    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12738  fi
12739else
12740  ac_cv_path_EGREP=$EGREP
12741fi
12742
12743   fi
12744fi
12745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12746$as_echo "$ac_cv_path_EGREP" >&6; }
12747 EGREP="$ac_cv_path_EGREP"
12748
12749
12750  else
12751    # The variable is set, but is it from the command line or the environment?
12752
12753    # Try to remove the string !EGREP! from our list.
12754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12756      # If it failed, the variable was not from the command line. Ignore it,
12757      # but warn the user (except for BASH, which is always set by the calling BASH).
12758      if test "xEGREP" != xBASH; then
12759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12760$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12761      fi
12762      # Try to locate tool using the code snippet
12763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12764$as_echo_n "checking for egrep... " >&6; }
12765if ${ac_cv_path_EGREP+:} false; then :
12766  $as_echo_n "(cached) " >&6
12767else
12768  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12769   then ac_cv_path_EGREP="$GREP -E"
12770   else
12771     if test -z "$EGREP"; then
12772  ac_path_EGREP_found=false
12773  # Loop through the user's path and test for each of PROGNAME-LIST
12774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12775for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12776do
12777  IFS=$as_save_IFS
12778  test -z "$as_dir" && as_dir=.
12779    for ac_prog in egrep; do
12780    for ac_exec_ext in '' $ac_executable_extensions; do
12781      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12782      as_fn_executable_p "$ac_path_EGREP" || continue
12783# Check for GNU ac_path_EGREP and select it if it is found.
12784  # Check for GNU $ac_path_EGREP
12785case `"$ac_path_EGREP" --version 2>&1` in
12786*GNU*)
12787  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12788*)
12789  ac_count=0
12790  $as_echo_n 0123456789 >"conftest.in"
12791  while :
12792  do
12793    cat "conftest.in" "conftest.in" >"conftest.tmp"
12794    mv "conftest.tmp" "conftest.in"
12795    cp "conftest.in" "conftest.nl"
12796    $as_echo 'EGREP' >> "conftest.nl"
12797    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12798    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12799    as_fn_arith $ac_count + 1 && ac_count=$as_val
12800    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12801      # Best one so far, save it but keep looking for a better one
12802      ac_cv_path_EGREP="$ac_path_EGREP"
12803      ac_path_EGREP_max=$ac_count
12804    fi
12805    # 10*(2^10) chars as input seems more than enough
12806    test $ac_count -gt 10 && break
12807  done
12808  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12809esac
12810
12811      $ac_path_EGREP_found && break 3
12812    done
12813  done
12814  done
12815IFS=$as_save_IFS
12816  if test -z "$ac_cv_path_EGREP"; then
12817    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12818  fi
12819else
12820  ac_cv_path_EGREP=$EGREP
12821fi
12822
12823   fi
12824fi
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12826$as_echo "$ac_cv_path_EGREP" >&6; }
12827 EGREP="$ac_cv_path_EGREP"
12828
12829
12830    else
12831      # If it succeeded, then it was overridden by the user. We will use it
12832      # for the tool.
12833
12834      # First remove it from the list of overridden variables, so we can test
12835      # for unknown variables in the end.
12836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12837
12838      # Check if we try to supply an empty value
12839      if test "x$EGREP" = x; then
12840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12841$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12843$as_echo_n "checking for EGREP... " >&6; }
12844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12845$as_echo "disabled" >&6; }
12846      else
12847        # Check if the provided tool contains a complete path.
12848        tool_specified="$EGREP"
12849        tool_basename="${tool_specified##*/}"
12850        if test "x$tool_basename" = "x$tool_specified"; then
12851          # A command without a complete path is provided, search $PATH.
12852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12853$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12854          # Extract the first word of "$tool_basename", so it can be a program name with args.
12855set dummy $tool_basename; ac_word=$2
12856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12857$as_echo_n "checking for $ac_word... " >&6; }
12858if ${ac_cv_path_EGREP+:} false; then :
12859  $as_echo_n "(cached) " >&6
12860else
12861  case $EGREP in
12862  [\\/]* | ?:[\\/]*)
12863  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12864  ;;
12865  *)
12866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12867for as_dir in $PATH
12868do
12869  IFS=$as_save_IFS
12870  test -z "$as_dir" && as_dir=.
12871    for ac_exec_ext in '' $ac_executable_extensions; do
12872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12873    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12875    break 2
12876  fi
12877done
12878  done
12879IFS=$as_save_IFS
12880
12881  ;;
12882esac
12883fi
12884EGREP=$ac_cv_path_EGREP
12885if test -n "$EGREP"; then
12886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12887$as_echo "$EGREP" >&6; }
12888else
12889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12890$as_echo "no" >&6; }
12891fi
12892
12893
12894          if test "x$EGREP" = x; then
12895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12896          fi
12897        else
12898          # Otherwise we believe it is a complete path. Use it as it is.
12899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12900$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12902$as_echo_n "checking for EGREP... " >&6; }
12903          if test ! -x "$tool_specified"; then
12904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12905$as_echo "not found" >&6; }
12906            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12907          fi
12908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12909$as_echo "$tool_specified" >&6; }
12910        fi
12911      fi
12912    fi
12913
12914  fi
12915
12916
12917  if test "x$EGREP" = x; then
12918    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12919  fi
12920
12921
12922
12923
12924  # Publish this variable in the help.
12925
12926
12927  if [ -z "${FGREP+x}" ]; then
12928    # The variable is not set by user, try to locate tool using the code snippet
12929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12930$as_echo_n "checking for fgrep... " >&6; }
12931if ${ac_cv_path_FGREP+:} false; then :
12932  $as_echo_n "(cached) " >&6
12933else
12934  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12935   then ac_cv_path_FGREP="$GREP -F"
12936   else
12937     if test -z "$FGREP"; then
12938  ac_path_FGREP_found=false
12939  # Loop through the user's path and test for each of PROGNAME-LIST
12940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12941for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12942do
12943  IFS=$as_save_IFS
12944  test -z "$as_dir" && as_dir=.
12945    for ac_prog in fgrep; do
12946    for ac_exec_ext in '' $ac_executable_extensions; do
12947      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12948      as_fn_executable_p "$ac_path_FGREP" || continue
12949# Check for GNU ac_path_FGREP and select it if it is found.
12950  # Check for GNU $ac_path_FGREP
12951case `"$ac_path_FGREP" --version 2>&1` in
12952*GNU*)
12953  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12954*)
12955  ac_count=0
12956  $as_echo_n 0123456789 >"conftest.in"
12957  while :
12958  do
12959    cat "conftest.in" "conftest.in" >"conftest.tmp"
12960    mv "conftest.tmp" "conftest.in"
12961    cp "conftest.in" "conftest.nl"
12962    $as_echo 'FGREP' >> "conftest.nl"
12963    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12964    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12965    as_fn_arith $ac_count + 1 && ac_count=$as_val
12966    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12967      # Best one so far, save it but keep looking for a better one
12968      ac_cv_path_FGREP="$ac_path_FGREP"
12969      ac_path_FGREP_max=$ac_count
12970    fi
12971    # 10*(2^10) chars as input seems more than enough
12972    test $ac_count -gt 10 && break
12973  done
12974  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12975esac
12976
12977      $ac_path_FGREP_found && break 3
12978    done
12979  done
12980  done
12981IFS=$as_save_IFS
12982  if test -z "$ac_cv_path_FGREP"; then
12983    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12984  fi
12985else
12986  ac_cv_path_FGREP=$FGREP
12987fi
12988
12989   fi
12990fi
12991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12992$as_echo "$ac_cv_path_FGREP" >&6; }
12993 FGREP="$ac_cv_path_FGREP"
12994
12995
12996  else
12997    # The variable is set, but is it from the command line or the environment?
12998
12999    # Try to remove the string !FGREP! from our list.
13000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13002      # If it failed, the variable was not from the command line. Ignore it,
13003      # but warn the user (except for BASH, which is always set by the calling BASH).
13004      if test "xFGREP" != xBASH; then
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13006$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13007      fi
13008      # Try to locate tool using the code snippet
13009      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13010$as_echo_n "checking for fgrep... " >&6; }
13011if ${ac_cv_path_FGREP+:} false; then :
13012  $as_echo_n "(cached) " >&6
13013else
13014  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13015   then ac_cv_path_FGREP="$GREP -F"
13016   else
13017     if test -z "$FGREP"; then
13018  ac_path_FGREP_found=false
13019  # Loop through the user's path and test for each of PROGNAME-LIST
13020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13021for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13022do
13023  IFS=$as_save_IFS
13024  test -z "$as_dir" && as_dir=.
13025    for ac_prog in fgrep; do
13026    for ac_exec_ext in '' $ac_executable_extensions; do
13027      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13028      as_fn_executable_p "$ac_path_FGREP" || continue
13029# Check for GNU ac_path_FGREP and select it if it is found.
13030  # Check for GNU $ac_path_FGREP
13031case `"$ac_path_FGREP" --version 2>&1` in
13032*GNU*)
13033  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13034*)
13035  ac_count=0
13036  $as_echo_n 0123456789 >"conftest.in"
13037  while :
13038  do
13039    cat "conftest.in" "conftest.in" >"conftest.tmp"
13040    mv "conftest.tmp" "conftest.in"
13041    cp "conftest.in" "conftest.nl"
13042    $as_echo 'FGREP' >> "conftest.nl"
13043    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13044    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13045    as_fn_arith $ac_count + 1 && ac_count=$as_val
13046    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13047      # Best one so far, save it but keep looking for a better one
13048      ac_cv_path_FGREP="$ac_path_FGREP"
13049      ac_path_FGREP_max=$ac_count
13050    fi
13051    # 10*(2^10) chars as input seems more than enough
13052    test $ac_count -gt 10 && break
13053  done
13054  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13055esac
13056
13057      $ac_path_FGREP_found && break 3
13058    done
13059  done
13060  done
13061IFS=$as_save_IFS
13062  if test -z "$ac_cv_path_FGREP"; then
13063    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13064  fi
13065else
13066  ac_cv_path_FGREP=$FGREP
13067fi
13068
13069   fi
13070fi
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13072$as_echo "$ac_cv_path_FGREP" >&6; }
13073 FGREP="$ac_cv_path_FGREP"
13074
13075
13076    else
13077      # If it succeeded, then it was overridden by the user. We will use it
13078      # for the tool.
13079
13080      # First remove it from the list of overridden variables, so we can test
13081      # for unknown variables in the end.
13082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13083
13084      # Check if we try to supply an empty value
13085      if test "x$FGREP" = x; then
13086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13087$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13089$as_echo_n "checking for FGREP... " >&6; }
13090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13091$as_echo "disabled" >&6; }
13092      else
13093        # Check if the provided tool contains a complete path.
13094        tool_specified="$FGREP"
13095        tool_basename="${tool_specified##*/}"
13096        if test "x$tool_basename" = "x$tool_specified"; then
13097          # A command without a complete path is provided, search $PATH.
13098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13099$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13100          # Extract the first word of "$tool_basename", so it can be a program name with args.
13101set dummy $tool_basename; ac_word=$2
13102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13103$as_echo_n "checking for $ac_word... " >&6; }
13104if ${ac_cv_path_FGREP+:} false; then :
13105  $as_echo_n "(cached) " >&6
13106else
13107  case $FGREP in
13108  [\\/]* | ?:[\\/]*)
13109  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13110  ;;
13111  *)
13112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13113for as_dir in $PATH
13114do
13115  IFS=$as_save_IFS
13116  test -z "$as_dir" && as_dir=.
13117    for ac_exec_ext in '' $ac_executable_extensions; do
13118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13119    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13121    break 2
13122  fi
13123done
13124  done
13125IFS=$as_save_IFS
13126
13127  ;;
13128esac
13129fi
13130FGREP=$ac_cv_path_FGREP
13131if test -n "$FGREP"; then
13132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13133$as_echo "$FGREP" >&6; }
13134else
13135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13136$as_echo "no" >&6; }
13137fi
13138
13139
13140          if test "x$FGREP" = x; then
13141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13142          fi
13143        else
13144          # Otherwise we believe it is a complete path. Use it as it is.
13145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13146$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13148$as_echo_n "checking for FGREP... " >&6; }
13149          if test ! -x "$tool_specified"; then
13150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13151$as_echo "not found" >&6; }
13152            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13153          fi
13154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13155$as_echo "$tool_specified" >&6; }
13156        fi
13157      fi
13158    fi
13159
13160  fi
13161
13162
13163  if test "x$FGREP" = x; then
13164    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13165  fi
13166
13167
13168
13169
13170  # Publish this variable in the help.
13171
13172
13173  if [ -z "${SED+x}" ]; then
13174    # The variable is not set by user, try to locate tool using the code snippet
13175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13176$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13177if ${ac_cv_path_SED+:} false; then :
13178  $as_echo_n "(cached) " >&6
13179else
13180            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13181     for ac_i in 1 2 3 4 5 6 7; do
13182       ac_script="$ac_script$as_nl$ac_script"
13183     done
13184     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13185     { ac_script=; unset ac_script;}
13186     if test -z "$SED"; then
13187  ac_path_SED_found=false
13188  # Loop through the user's path and test for each of PROGNAME-LIST
13189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13190for as_dir in $PATH
13191do
13192  IFS=$as_save_IFS
13193  test -z "$as_dir" && as_dir=.
13194    for ac_prog in sed gsed; do
13195    for ac_exec_ext in '' $ac_executable_extensions; do
13196      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13197      as_fn_executable_p "$ac_path_SED" || continue
13198# Check for GNU ac_path_SED and select it if it is found.
13199  # Check for GNU $ac_path_SED
13200case `"$ac_path_SED" --version 2>&1` in
13201*GNU*)
13202  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13203*)
13204  ac_count=0
13205  $as_echo_n 0123456789 >"conftest.in"
13206  while :
13207  do
13208    cat "conftest.in" "conftest.in" >"conftest.tmp"
13209    mv "conftest.tmp" "conftest.in"
13210    cp "conftest.in" "conftest.nl"
13211    $as_echo '' >> "conftest.nl"
13212    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13213    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13214    as_fn_arith $ac_count + 1 && ac_count=$as_val
13215    if test $ac_count -gt ${ac_path_SED_max-0}; then
13216      # Best one so far, save it but keep looking for a better one
13217      ac_cv_path_SED="$ac_path_SED"
13218      ac_path_SED_max=$ac_count
13219    fi
13220    # 10*(2^10) chars as input seems more than enough
13221    test $ac_count -gt 10 && break
13222  done
13223  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13224esac
13225
13226      $ac_path_SED_found && break 3
13227    done
13228  done
13229  done
13230IFS=$as_save_IFS
13231  if test -z "$ac_cv_path_SED"; then
13232    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13233  fi
13234else
13235  ac_cv_path_SED=$SED
13236fi
13237
13238fi
13239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13240$as_echo "$ac_cv_path_SED" >&6; }
13241 SED="$ac_cv_path_SED"
13242  rm -f conftest.sed
13243
13244  else
13245    # The variable is set, but is it from the command line or the environment?
13246
13247    # Try to remove the string !SED! from our list.
13248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13250      # If it failed, the variable was not from the command line. Ignore it,
13251      # but warn the user (except for BASH, which is always set by the calling BASH).
13252      if test "xSED" != xBASH; then
13253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13254$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13255      fi
13256      # Try to locate tool using the code snippet
13257      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13258$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13259if ${ac_cv_path_SED+:} false; then :
13260  $as_echo_n "(cached) " >&6
13261else
13262            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13263     for ac_i in 1 2 3 4 5 6 7; do
13264       ac_script="$ac_script$as_nl$ac_script"
13265     done
13266     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13267     { ac_script=; unset ac_script;}
13268     if test -z "$SED"; then
13269  ac_path_SED_found=false
13270  # Loop through the user's path and test for each of PROGNAME-LIST
13271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13272for as_dir in $PATH
13273do
13274  IFS=$as_save_IFS
13275  test -z "$as_dir" && as_dir=.
13276    for ac_prog in sed gsed; do
13277    for ac_exec_ext in '' $ac_executable_extensions; do
13278      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13279      as_fn_executable_p "$ac_path_SED" || continue
13280# Check for GNU ac_path_SED and select it if it is found.
13281  # Check for GNU $ac_path_SED
13282case `"$ac_path_SED" --version 2>&1` in
13283*GNU*)
13284  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13285*)
13286  ac_count=0
13287  $as_echo_n 0123456789 >"conftest.in"
13288  while :
13289  do
13290    cat "conftest.in" "conftest.in" >"conftest.tmp"
13291    mv "conftest.tmp" "conftest.in"
13292    cp "conftest.in" "conftest.nl"
13293    $as_echo '' >> "conftest.nl"
13294    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13295    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13296    as_fn_arith $ac_count + 1 && ac_count=$as_val
13297    if test $ac_count -gt ${ac_path_SED_max-0}; then
13298      # Best one so far, save it but keep looking for a better one
13299      ac_cv_path_SED="$ac_path_SED"
13300      ac_path_SED_max=$ac_count
13301    fi
13302    # 10*(2^10) chars as input seems more than enough
13303    test $ac_count -gt 10 && break
13304  done
13305  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13306esac
13307
13308      $ac_path_SED_found && break 3
13309    done
13310  done
13311  done
13312IFS=$as_save_IFS
13313  if test -z "$ac_cv_path_SED"; then
13314    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13315  fi
13316else
13317  ac_cv_path_SED=$SED
13318fi
13319
13320fi
13321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13322$as_echo "$ac_cv_path_SED" >&6; }
13323 SED="$ac_cv_path_SED"
13324  rm -f conftest.sed
13325
13326    else
13327      # If it succeeded, then it was overridden by the user. We will use it
13328      # for the tool.
13329
13330      # First remove it from the list of overridden variables, so we can test
13331      # for unknown variables in the end.
13332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13333
13334      # Check if we try to supply an empty value
13335      if test "x$SED" = x; then
13336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13337$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13339$as_echo_n "checking for SED... " >&6; }
13340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13341$as_echo "disabled" >&6; }
13342      else
13343        # Check if the provided tool contains a complete path.
13344        tool_specified="$SED"
13345        tool_basename="${tool_specified##*/}"
13346        if test "x$tool_basename" = "x$tool_specified"; then
13347          # A command without a complete path is provided, search $PATH.
13348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13349$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13350          # Extract the first word of "$tool_basename", so it can be a program name with args.
13351set dummy $tool_basename; ac_word=$2
13352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13353$as_echo_n "checking for $ac_word... " >&6; }
13354if ${ac_cv_path_SED+:} false; then :
13355  $as_echo_n "(cached) " >&6
13356else
13357  case $SED in
13358  [\\/]* | ?:[\\/]*)
13359  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13360  ;;
13361  *)
13362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13363for as_dir in $PATH
13364do
13365  IFS=$as_save_IFS
13366  test -z "$as_dir" && as_dir=.
13367    for ac_exec_ext in '' $ac_executable_extensions; do
13368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13369    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13371    break 2
13372  fi
13373done
13374  done
13375IFS=$as_save_IFS
13376
13377  ;;
13378esac
13379fi
13380SED=$ac_cv_path_SED
13381if test -n "$SED"; then
13382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13383$as_echo "$SED" >&6; }
13384else
13385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13386$as_echo "no" >&6; }
13387fi
13388
13389
13390          if test "x$SED" = x; then
13391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13392          fi
13393        else
13394          # Otherwise we believe it is a complete path. Use it as it is.
13395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13396$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13398$as_echo_n "checking for SED... " >&6; }
13399          if test ! -x "$tool_specified"; then
13400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13401$as_echo "not found" >&6; }
13402            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13403          fi
13404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13405$as_echo "$tool_specified" >&6; }
13406        fi
13407      fi
13408    fi
13409
13410  fi
13411
13412
13413  if test "x$SED" = x; then
13414    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13415  fi
13416
13417
13418
13419  # Always force rm.
13420  RM="$RM -f"
13421
13422  # pwd behaves differently on various platforms and some don't support the -L flag.
13423  # Always use the bash builtin pwd to get uniform behavior.
13424  THEPWDCMD=pwd
13425
13426  # These are not required on all platforms
13427
13428
13429  # Publish this variable in the help.
13430
13431
13432  if [ -z "${CYGPATH+x}" ]; then
13433    # The variable is not set by user, try to locate tool using the code snippet
13434    for ac_prog in cygpath
13435do
13436  # Extract the first word of "$ac_prog", so it can be a program name with args.
13437set dummy $ac_prog; ac_word=$2
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13439$as_echo_n "checking for $ac_word... " >&6; }
13440if ${ac_cv_path_CYGPATH+:} false; then :
13441  $as_echo_n "(cached) " >&6
13442else
13443  case $CYGPATH in
13444  [\\/]* | ?:[\\/]*)
13445  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13446  ;;
13447  *)
13448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13449for as_dir in $PATH
13450do
13451  IFS=$as_save_IFS
13452  test -z "$as_dir" && as_dir=.
13453    for ac_exec_ext in '' $ac_executable_extensions; do
13454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13455    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13457    break 2
13458  fi
13459done
13460  done
13461IFS=$as_save_IFS
13462
13463  ;;
13464esac
13465fi
13466CYGPATH=$ac_cv_path_CYGPATH
13467if test -n "$CYGPATH"; then
13468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13469$as_echo "$CYGPATH" >&6; }
13470else
13471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13472$as_echo "no" >&6; }
13473fi
13474
13475
13476  test -n "$CYGPATH" && break
13477done
13478
13479  else
13480    # The variable is set, but is it from the command line or the environment?
13481
13482    # Try to remove the string !CYGPATH! from our list.
13483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13485      # If it failed, the variable was not from the command line. Ignore it,
13486      # but warn the user (except for BASH, which is always set by the calling BASH).
13487      if test "xCYGPATH" != xBASH; then
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13489$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13490      fi
13491      # Try to locate tool using the code snippet
13492      for ac_prog in cygpath
13493do
13494  # Extract the first word of "$ac_prog", so it can be a program name with args.
13495set dummy $ac_prog; ac_word=$2
13496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13497$as_echo_n "checking for $ac_word... " >&6; }
13498if ${ac_cv_path_CYGPATH+:} false; then :
13499  $as_echo_n "(cached) " >&6
13500else
13501  case $CYGPATH in
13502  [\\/]* | ?:[\\/]*)
13503  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13504  ;;
13505  *)
13506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13507for as_dir in $PATH
13508do
13509  IFS=$as_save_IFS
13510  test -z "$as_dir" && as_dir=.
13511    for ac_exec_ext in '' $ac_executable_extensions; do
13512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13513    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13515    break 2
13516  fi
13517done
13518  done
13519IFS=$as_save_IFS
13520
13521  ;;
13522esac
13523fi
13524CYGPATH=$ac_cv_path_CYGPATH
13525if test -n "$CYGPATH"; then
13526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13527$as_echo "$CYGPATH" >&6; }
13528else
13529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13530$as_echo "no" >&6; }
13531fi
13532
13533
13534  test -n "$CYGPATH" && break
13535done
13536
13537    else
13538      # If it succeeded, then it was overridden by the user. We will use it
13539      # for the tool.
13540
13541      # First remove it from the list of overridden variables, so we can test
13542      # for unknown variables in the end.
13543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13544
13545      # Check if we try to supply an empty value
13546      if test "x$CYGPATH" = x; then
13547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13548$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13550$as_echo_n "checking for CYGPATH... " >&6; }
13551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13552$as_echo "disabled" >&6; }
13553      else
13554        # Check if the provided tool contains a complete path.
13555        tool_specified="$CYGPATH"
13556        tool_basename="${tool_specified##*/}"
13557        if test "x$tool_basename" = "x$tool_specified"; then
13558          # A command without a complete path is provided, search $PATH.
13559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13560$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13561          # Extract the first word of "$tool_basename", so it can be a program name with args.
13562set dummy $tool_basename; ac_word=$2
13563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13564$as_echo_n "checking for $ac_word... " >&6; }
13565if ${ac_cv_path_CYGPATH+:} false; then :
13566  $as_echo_n "(cached) " >&6
13567else
13568  case $CYGPATH in
13569  [\\/]* | ?:[\\/]*)
13570  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13571  ;;
13572  *)
13573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13574for as_dir in $PATH
13575do
13576  IFS=$as_save_IFS
13577  test -z "$as_dir" && as_dir=.
13578    for ac_exec_ext in '' $ac_executable_extensions; do
13579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13580    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13582    break 2
13583  fi
13584done
13585  done
13586IFS=$as_save_IFS
13587
13588  ;;
13589esac
13590fi
13591CYGPATH=$ac_cv_path_CYGPATH
13592if test -n "$CYGPATH"; then
13593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13594$as_echo "$CYGPATH" >&6; }
13595else
13596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13597$as_echo "no" >&6; }
13598fi
13599
13600
13601          if test "x$CYGPATH" = x; then
13602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13603          fi
13604        else
13605          # Otherwise we believe it is a complete path. Use it as it is.
13606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13607$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13609$as_echo_n "checking for CYGPATH... " >&6; }
13610          if test ! -x "$tool_specified"; then
13611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13612$as_echo "not found" >&6; }
13613            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13614          fi
13615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13616$as_echo "$tool_specified" >&6; }
13617        fi
13618      fi
13619    fi
13620
13621  fi
13622
13623
13624
13625
13626  # Publish this variable in the help.
13627
13628
13629  if [ -z "${READLINK+x}" ]; then
13630    # The variable is not set by user, try to locate tool using the code snippet
13631    for ac_prog in greadlink readlink
13632do
13633  # Extract the first word of "$ac_prog", so it can be a program name with args.
13634set dummy $ac_prog; ac_word=$2
13635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13636$as_echo_n "checking for $ac_word... " >&6; }
13637if ${ac_cv_path_READLINK+:} false; then :
13638  $as_echo_n "(cached) " >&6
13639else
13640  case $READLINK in
13641  [\\/]* | ?:[\\/]*)
13642  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13643  ;;
13644  *)
13645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13646for as_dir in $PATH
13647do
13648  IFS=$as_save_IFS
13649  test -z "$as_dir" && as_dir=.
13650    for ac_exec_ext in '' $ac_executable_extensions; do
13651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13652    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13654    break 2
13655  fi
13656done
13657  done
13658IFS=$as_save_IFS
13659
13660  ;;
13661esac
13662fi
13663READLINK=$ac_cv_path_READLINK
13664if test -n "$READLINK"; then
13665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13666$as_echo "$READLINK" >&6; }
13667else
13668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13669$as_echo "no" >&6; }
13670fi
13671
13672
13673  test -n "$READLINK" && break
13674done
13675
13676  else
13677    # The variable is set, but is it from the command line or the environment?
13678
13679    # Try to remove the string !READLINK! from our list.
13680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13682      # If it failed, the variable was not from the command line. Ignore it,
13683      # but warn the user (except for BASH, which is always set by the calling BASH).
13684      if test "xREADLINK" != xBASH; then
13685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13686$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13687      fi
13688      # Try to locate tool using the code snippet
13689      for ac_prog in greadlink readlink
13690do
13691  # Extract the first word of "$ac_prog", so it can be a program name with args.
13692set dummy $ac_prog; ac_word=$2
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13694$as_echo_n "checking for $ac_word... " >&6; }
13695if ${ac_cv_path_READLINK+:} false; then :
13696  $as_echo_n "(cached) " >&6
13697else
13698  case $READLINK in
13699  [\\/]* | ?:[\\/]*)
13700  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13701  ;;
13702  *)
13703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13704for as_dir in $PATH
13705do
13706  IFS=$as_save_IFS
13707  test -z "$as_dir" && as_dir=.
13708    for ac_exec_ext in '' $ac_executable_extensions; do
13709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13710    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13712    break 2
13713  fi
13714done
13715  done
13716IFS=$as_save_IFS
13717
13718  ;;
13719esac
13720fi
13721READLINK=$ac_cv_path_READLINK
13722if test -n "$READLINK"; then
13723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13724$as_echo "$READLINK" >&6; }
13725else
13726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13727$as_echo "no" >&6; }
13728fi
13729
13730
13731  test -n "$READLINK" && break
13732done
13733
13734    else
13735      # If it succeeded, then it was overridden by the user. We will use it
13736      # for the tool.
13737
13738      # First remove it from the list of overridden variables, so we can test
13739      # for unknown variables in the end.
13740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13741
13742      # Check if we try to supply an empty value
13743      if test "x$READLINK" = x; then
13744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13745$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13747$as_echo_n "checking for READLINK... " >&6; }
13748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13749$as_echo "disabled" >&6; }
13750      else
13751        # Check if the provided tool contains a complete path.
13752        tool_specified="$READLINK"
13753        tool_basename="${tool_specified##*/}"
13754        if test "x$tool_basename" = "x$tool_specified"; then
13755          # A command without a complete path is provided, search $PATH.
13756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13757$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13758          # Extract the first word of "$tool_basename", so it can be a program name with args.
13759set dummy $tool_basename; ac_word=$2
13760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13761$as_echo_n "checking for $ac_word... " >&6; }
13762if ${ac_cv_path_READLINK+:} false; then :
13763  $as_echo_n "(cached) " >&6
13764else
13765  case $READLINK in
13766  [\\/]* | ?:[\\/]*)
13767  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13768  ;;
13769  *)
13770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13771for as_dir in $PATH
13772do
13773  IFS=$as_save_IFS
13774  test -z "$as_dir" && as_dir=.
13775    for ac_exec_ext in '' $ac_executable_extensions; do
13776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13777    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13779    break 2
13780  fi
13781done
13782  done
13783IFS=$as_save_IFS
13784
13785  ;;
13786esac
13787fi
13788READLINK=$ac_cv_path_READLINK
13789if test -n "$READLINK"; then
13790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13791$as_echo "$READLINK" >&6; }
13792else
13793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13794$as_echo "no" >&6; }
13795fi
13796
13797
13798          if test "x$READLINK" = x; then
13799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13800          fi
13801        else
13802          # Otherwise we believe it is a complete path. Use it as it is.
13803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13804$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13806$as_echo_n "checking for READLINK... " >&6; }
13807          if test ! -x "$tool_specified"; then
13808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13809$as_echo "not found" >&6; }
13810            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13811          fi
13812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13813$as_echo "$tool_specified" >&6; }
13814        fi
13815      fi
13816    fi
13817
13818  fi
13819
13820
13821
13822
13823  # Publish this variable in the help.
13824
13825
13826  if [ -z "${DF+x}" ]; then
13827    # The variable is not set by user, try to locate tool using the code snippet
13828    for ac_prog in df
13829do
13830  # Extract the first word of "$ac_prog", so it can be a program name with args.
13831set dummy $ac_prog; ac_word=$2
13832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13833$as_echo_n "checking for $ac_word... " >&6; }
13834if ${ac_cv_path_DF+:} false; then :
13835  $as_echo_n "(cached) " >&6
13836else
13837  case $DF in
13838  [\\/]* | ?:[\\/]*)
13839  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13840  ;;
13841  *)
13842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13843for as_dir in $PATH
13844do
13845  IFS=$as_save_IFS
13846  test -z "$as_dir" && as_dir=.
13847    for ac_exec_ext in '' $ac_executable_extensions; do
13848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13849    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13851    break 2
13852  fi
13853done
13854  done
13855IFS=$as_save_IFS
13856
13857  ;;
13858esac
13859fi
13860DF=$ac_cv_path_DF
13861if test -n "$DF"; then
13862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13863$as_echo "$DF" >&6; }
13864else
13865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13866$as_echo "no" >&6; }
13867fi
13868
13869
13870  test -n "$DF" && break
13871done
13872
13873  else
13874    # The variable is set, but is it from the command line or the environment?
13875
13876    # Try to remove the string !DF! from our list.
13877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13879      # If it failed, the variable was not from the command line. Ignore it,
13880      # but warn the user (except for BASH, which is always set by the calling BASH).
13881      if test "xDF" != xBASH; then
13882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13883$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13884      fi
13885      # Try to locate tool using the code snippet
13886      for ac_prog in df
13887do
13888  # Extract the first word of "$ac_prog", so it can be a program name with args.
13889set dummy $ac_prog; ac_word=$2
13890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13891$as_echo_n "checking for $ac_word... " >&6; }
13892if ${ac_cv_path_DF+:} false; then :
13893  $as_echo_n "(cached) " >&6
13894else
13895  case $DF in
13896  [\\/]* | ?:[\\/]*)
13897  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13898  ;;
13899  *)
13900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13901for as_dir in $PATH
13902do
13903  IFS=$as_save_IFS
13904  test -z "$as_dir" && as_dir=.
13905    for ac_exec_ext in '' $ac_executable_extensions; do
13906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13907    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13909    break 2
13910  fi
13911done
13912  done
13913IFS=$as_save_IFS
13914
13915  ;;
13916esac
13917fi
13918DF=$ac_cv_path_DF
13919if test -n "$DF"; then
13920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13921$as_echo "$DF" >&6; }
13922else
13923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13924$as_echo "no" >&6; }
13925fi
13926
13927
13928  test -n "$DF" && break
13929done
13930
13931    else
13932      # If it succeeded, then it was overridden by the user. We will use it
13933      # for the tool.
13934
13935      # First remove it from the list of overridden variables, so we can test
13936      # for unknown variables in the end.
13937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13938
13939      # Check if we try to supply an empty value
13940      if test "x$DF" = x; then
13941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13942$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13944$as_echo_n "checking for DF... " >&6; }
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13946$as_echo "disabled" >&6; }
13947      else
13948        # Check if the provided tool contains a complete path.
13949        tool_specified="$DF"
13950        tool_basename="${tool_specified##*/}"
13951        if test "x$tool_basename" = "x$tool_specified"; then
13952          # A command without a complete path is provided, search $PATH.
13953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13954$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13955          # Extract the first word of "$tool_basename", so it can be a program name with args.
13956set dummy $tool_basename; ac_word=$2
13957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13958$as_echo_n "checking for $ac_word... " >&6; }
13959if ${ac_cv_path_DF+:} false; then :
13960  $as_echo_n "(cached) " >&6
13961else
13962  case $DF in
13963  [\\/]* | ?:[\\/]*)
13964  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13965  ;;
13966  *)
13967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13968for as_dir in $PATH
13969do
13970  IFS=$as_save_IFS
13971  test -z "$as_dir" && as_dir=.
13972    for ac_exec_ext in '' $ac_executable_extensions; do
13973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13974    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13976    break 2
13977  fi
13978done
13979  done
13980IFS=$as_save_IFS
13981
13982  ;;
13983esac
13984fi
13985DF=$ac_cv_path_DF
13986if test -n "$DF"; then
13987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13988$as_echo "$DF" >&6; }
13989else
13990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13991$as_echo "no" >&6; }
13992fi
13993
13994
13995          if test "x$DF" = x; then
13996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13997          fi
13998        else
13999          # Otherwise we believe it is a complete path. Use it as it is.
14000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14001$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14003$as_echo_n "checking for DF... " >&6; }
14004          if test ! -x "$tool_specified"; then
14005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14006$as_echo "not found" >&6; }
14007            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14008          fi
14009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14010$as_echo "$tool_specified" >&6; }
14011        fi
14012      fi
14013    fi
14014
14015  fi
14016
14017
14018
14019
14020  # Publish this variable in the help.
14021
14022
14023  if [ -z "${CPIO+x}" ]; then
14024    # The variable is not set by user, try to locate tool using the code snippet
14025    for ac_prog in cpio bsdcpio
14026do
14027  # Extract the first word of "$ac_prog", so it can be a program name with args.
14028set dummy $ac_prog; ac_word=$2
14029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14030$as_echo_n "checking for $ac_word... " >&6; }
14031if ${ac_cv_path_CPIO+:} false; then :
14032  $as_echo_n "(cached) " >&6
14033else
14034  case $CPIO in
14035  [\\/]* | ?:[\\/]*)
14036  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14037  ;;
14038  *)
14039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14040for as_dir in $PATH
14041do
14042  IFS=$as_save_IFS
14043  test -z "$as_dir" && as_dir=.
14044    for ac_exec_ext in '' $ac_executable_extensions; do
14045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14046    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14048    break 2
14049  fi
14050done
14051  done
14052IFS=$as_save_IFS
14053
14054  ;;
14055esac
14056fi
14057CPIO=$ac_cv_path_CPIO
14058if test -n "$CPIO"; then
14059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14060$as_echo "$CPIO" >&6; }
14061else
14062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14063$as_echo "no" >&6; }
14064fi
14065
14066
14067  test -n "$CPIO" && break
14068done
14069
14070  else
14071    # The variable is set, but is it from the command line or the environment?
14072
14073    # Try to remove the string !CPIO! from our list.
14074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14076      # If it failed, the variable was not from the command line. Ignore it,
14077      # but warn the user (except for BASH, which is always set by the calling BASH).
14078      if test "xCPIO" != xBASH; then
14079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14080$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14081      fi
14082      # Try to locate tool using the code snippet
14083      for ac_prog in cpio bsdcpio
14084do
14085  # Extract the first word of "$ac_prog", so it can be a program name with args.
14086set dummy $ac_prog; ac_word=$2
14087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14088$as_echo_n "checking for $ac_word... " >&6; }
14089if ${ac_cv_path_CPIO+:} false; then :
14090  $as_echo_n "(cached) " >&6
14091else
14092  case $CPIO in
14093  [\\/]* | ?:[\\/]*)
14094  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14095  ;;
14096  *)
14097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14098for as_dir in $PATH
14099do
14100  IFS=$as_save_IFS
14101  test -z "$as_dir" && as_dir=.
14102    for ac_exec_ext in '' $ac_executable_extensions; do
14103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14104    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14106    break 2
14107  fi
14108done
14109  done
14110IFS=$as_save_IFS
14111
14112  ;;
14113esac
14114fi
14115CPIO=$ac_cv_path_CPIO
14116if test -n "$CPIO"; then
14117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14118$as_echo "$CPIO" >&6; }
14119else
14120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14121$as_echo "no" >&6; }
14122fi
14123
14124
14125  test -n "$CPIO" && break
14126done
14127
14128    else
14129      # If it succeeded, then it was overridden by the user. We will use it
14130      # for the tool.
14131
14132      # First remove it from the list of overridden variables, so we can test
14133      # for unknown variables in the end.
14134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14135
14136      # Check if we try to supply an empty value
14137      if test "x$CPIO" = x; then
14138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14139$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14141$as_echo_n "checking for CPIO... " >&6; }
14142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14143$as_echo "disabled" >&6; }
14144      else
14145        # Check if the provided tool contains a complete path.
14146        tool_specified="$CPIO"
14147        tool_basename="${tool_specified##*/}"
14148        if test "x$tool_basename" = "x$tool_specified"; then
14149          # A command without a complete path is provided, search $PATH.
14150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14151$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14152          # Extract the first word of "$tool_basename", so it can be a program name with args.
14153set dummy $tool_basename; ac_word=$2
14154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14155$as_echo_n "checking for $ac_word... " >&6; }
14156if ${ac_cv_path_CPIO+:} false; then :
14157  $as_echo_n "(cached) " >&6
14158else
14159  case $CPIO in
14160  [\\/]* | ?:[\\/]*)
14161  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14162  ;;
14163  *)
14164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14165for as_dir in $PATH
14166do
14167  IFS=$as_save_IFS
14168  test -z "$as_dir" && as_dir=.
14169    for ac_exec_ext in '' $ac_executable_extensions; do
14170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14171    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14173    break 2
14174  fi
14175done
14176  done
14177IFS=$as_save_IFS
14178
14179  ;;
14180esac
14181fi
14182CPIO=$ac_cv_path_CPIO
14183if test -n "$CPIO"; then
14184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14185$as_echo "$CPIO" >&6; }
14186else
14187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14188$as_echo "no" >&6; }
14189fi
14190
14191
14192          if test "x$CPIO" = x; then
14193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14194          fi
14195        else
14196          # Otherwise we believe it is a complete path. Use it as it is.
14197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14198$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14200$as_echo_n "checking for CPIO... " >&6; }
14201          if test ! -x "$tool_specified"; then
14202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14203$as_echo "not found" >&6; }
14204            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14205          fi
14206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14207$as_echo "$tool_specified" >&6; }
14208        fi
14209      fi
14210    fi
14211
14212  fi
14213
14214
14215
14216
14217  # Publish this variable in the help.
14218
14219
14220  if [ -z "${NICE+x}" ]; then
14221    # The variable is not set by user, try to locate tool using the code snippet
14222    for ac_prog in nice
14223do
14224  # Extract the first word of "$ac_prog", so it can be a program name with args.
14225set dummy $ac_prog; ac_word=$2
14226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14227$as_echo_n "checking for $ac_word... " >&6; }
14228if ${ac_cv_path_NICE+:} false; then :
14229  $as_echo_n "(cached) " >&6
14230else
14231  case $NICE in
14232  [\\/]* | ?:[\\/]*)
14233  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14234  ;;
14235  *)
14236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14237for as_dir in $PATH
14238do
14239  IFS=$as_save_IFS
14240  test -z "$as_dir" && as_dir=.
14241    for ac_exec_ext in '' $ac_executable_extensions; do
14242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14243    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14245    break 2
14246  fi
14247done
14248  done
14249IFS=$as_save_IFS
14250
14251  ;;
14252esac
14253fi
14254NICE=$ac_cv_path_NICE
14255if test -n "$NICE"; then
14256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14257$as_echo "$NICE" >&6; }
14258else
14259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14260$as_echo "no" >&6; }
14261fi
14262
14263
14264  test -n "$NICE" && break
14265done
14266
14267  else
14268    # The variable is set, but is it from the command line or the environment?
14269
14270    # Try to remove the string !NICE! from our list.
14271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14273      # If it failed, the variable was not from the command line. Ignore it,
14274      # but warn the user (except for BASH, which is always set by the calling BASH).
14275      if test "xNICE" != xBASH; then
14276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14277$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14278      fi
14279      # Try to locate tool using the code snippet
14280      for ac_prog in nice
14281do
14282  # Extract the first word of "$ac_prog", so it can be a program name with args.
14283set dummy $ac_prog; ac_word=$2
14284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14285$as_echo_n "checking for $ac_word... " >&6; }
14286if ${ac_cv_path_NICE+:} false; then :
14287  $as_echo_n "(cached) " >&6
14288else
14289  case $NICE in
14290  [\\/]* | ?:[\\/]*)
14291  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14292  ;;
14293  *)
14294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14295for as_dir in $PATH
14296do
14297  IFS=$as_save_IFS
14298  test -z "$as_dir" && as_dir=.
14299    for ac_exec_ext in '' $ac_executable_extensions; do
14300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14301    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14303    break 2
14304  fi
14305done
14306  done
14307IFS=$as_save_IFS
14308
14309  ;;
14310esac
14311fi
14312NICE=$ac_cv_path_NICE
14313if test -n "$NICE"; then
14314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14315$as_echo "$NICE" >&6; }
14316else
14317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14318$as_echo "no" >&6; }
14319fi
14320
14321
14322  test -n "$NICE" && break
14323done
14324
14325    else
14326      # If it succeeded, then it was overridden by the user. We will use it
14327      # for the tool.
14328
14329      # First remove it from the list of overridden variables, so we can test
14330      # for unknown variables in the end.
14331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14332
14333      # Check if we try to supply an empty value
14334      if test "x$NICE" = x; then
14335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14336$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14338$as_echo_n "checking for NICE... " >&6; }
14339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14340$as_echo "disabled" >&6; }
14341      else
14342        # Check if the provided tool contains a complete path.
14343        tool_specified="$NICE"
14344        tool_basename="${tool_specified##*/}"
14345        if test "x$tool_basename" = "x$tool_specified"; then
14346          # A command without a complete path is provided, search $PATH.
14347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14348$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14349          # Extract the first word of "$tool_basename", so it can be a program name with args.
14350set dummy $tool_basename; ac_word=$2
14351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14352$as_echo_n "checking for $ac_word... " >&6; }
14353if ${ac_cv_path_NICE+:} false; then :
14354  $as_echo_n "(cached) " >&6
14355else
14356  case $NICE in
14357  [\\/]* | ?:[\\/]*)
14358  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14359  ;;
14360  *)
14361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14362for as_dir in $PATH
14363do
14364  IFS=$as_save_IFS
14365  test -z "$as_dir" && as_dir=.
14366    for ac_exec_ext in '' $ac_executable_extensions; do
14367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14368    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14370    break 2
14371  fi
14372done
14373  done
14374IFS=$as_save_IFS
14375
14376  ;;
14377esac
14378fi
14379NICE=$ac_cv_path_NICE
14380if test -n "$NICE"; then
14381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14382$as_echo "$NICE" >&6; }
14383else
14384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14385$as_echo "no" >&6; }
14386fi
14387
14388
14389          if test "x$NICE" = x; then
14390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14391          fi
14392        else
14393          # Otherwise we believe it is a complete path. Use it as it is.
14394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14395$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14397$as_echo_n "checking for NICE... " >&6; }
14398          if test ! -x "$tool_specified"; then
14399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14400$as_echo "not found" >&6; }
14401            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14402          fi
14403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14404$as_echo "$tool_specified" >&6; }
14405        fi
14406      fi
14407    fi
14408
14409  fi
14410
14411
14412
14413
14414# Now we can determine OpenJDK build and target platforms. This is required to
14415# have early on.
14416# Make sure we can run config.sub.
14417$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14418  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14419
14420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14421$as_echo_n "checking build system type... " >&6; }
14422if ${ac_cv_build+:} false; then :
14423  $as_echo_n "(cached) " >&6
14424else
14425  ac_build_alias=$build_alias
14426test "x$ac_build_alias" = x &&
14427  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14428test "x$ac_build_alias" = x &&
14429  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14430ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14431  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14432
14433fi
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14435$as_echo "$ac_cv_build" >&6; }
14436case $ac_cv_build in
14437*-*-*) ;;
14438*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14439esac
14440build=$ac_cv_build
14441ac_save_IFS=$IFS; IFS='-'
14442set x $ac_cv_build
14443shift
14444build_cpu=$1
14445build_vendor=$2
14446shift; shift
14447# Remember, the first character of IFS is used to create $*,
14448# except with old shells:
14449build_os=$*
14450IFS=$ac_save_IFS
14451case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14452
14453
14454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14455$as_echo_n "checking host system type... " >&6; }
14456if ${ac_cv_host+:} false; then :
14457  $as_echo_n "(cached) " >&6
14458else
14459  if test "x$host_alias" = x; then
14460  ac_cv_host=$ac_cv_build
14461else
14462  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14463    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14464fi
14465
14466fi
14467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14468$as_echo "$ac_cv_host" >&6; }
14469case $ac_cv_host in
14470*-*-*) ;;
14471*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14472esac
14473host=$ac_cv_host
14474ac_save_IFS=$IFS; IFS='-'
14475set x $ac_cv_host
14476shift
14477host_cpu=$1
14478host_vendor=$2
14479shift; shift
14480# Remember, the first character of IFS is used to create $*,
14481# except with old shells:
14482host_os=$*
14483IFS=$ac_save_IFS
14484case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14485
14486
14487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14488$as_echo_n "checking target system type... " >&6; }
14489if ${ac_cv_target+:} false; then :
14490  $as_echo_n "(cached) " >&6
14491else
14492  if test "x$target_alias" = x; then
14493  ac_cv_target=$ac_cv_host
14494else
14495  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14496    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14497fi
14498
14499fi
14500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14501$as_echo "$ac_cv_target" >&6; }
14502case $ac_cv_target in
14503*-*-*) ;;
14504*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14505esac
14506target=$ac_cv_target
14507ac_save_IFS=$IFS; IFS='-'
14508set x $ac_cv_target
14509shift
14510target_cpu=$1
14511target_vendor=$2
14512shift; shift
14513# Remember, the first character of IFS is used to create $*,
14514# except with old shells:
14515target_os=$*
14516IFS=$ac_save_IFS
14517case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14518
14519
14520# The aliases save the names the user supplied, while $host etc.
14521# will get canonicalized.
14522test -n "$target_alias" &&
14523  test "$program_prefix$program_suffix$program_transform_name" = \
14524    NONENONEs,x,x, &&
14525  program_prefix=${target_alias}-
14526
14527  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14528  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14529  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14530  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14531  # to use the configure naming style.
14532
14533
14534
14535
14536
14537  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14538  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14539  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14540  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14541  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14542  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14543
14544
14545
14546  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14547
14548  case "$build_os" in
14549    *linux*)
14550      VAR_OS=linux
14551      VAR_OS_TYPE=unix
14552      ;;
14553    *solaris*)
14554      VAR_OS=solaris
14555      VAR_OS_TYPE=unix
14556      ;;
14557    *darwin*)
14558      VAR_OS=macosx
14559      VAR_OS_TYPE=unix
14560      ;;
14561    *bsd*)
14562      VAR_OS=bsd
14563      VAR_OS_TYPE=unix
14564      ;;
14565    *cygwin*)
14566      VAR_OS=windows
14567      VAR_OS_ENV=windows.cygwin
14568      ;;
14569    *mingw*)
14570      VAR_OS=windows
14571      VAR_OS_ENV=windows.msys
14572      ;;
14573    *aix*)
14574      VAR_OS=aix
14575      VAR_OS_TYPE=unix
14576      ;;
14577    *)
14578      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14579      ;;
14580  esac
14581
14582
14583  # First argument is the cpu name from the trip/quad
14584  case "$build_cpu" in
14585    x86_64)
14586      VAR_CPU=x86_64
14587      VAR_CPU_ARCH=x86
14588      VAR_CPU_BITS=64
14589      VAR_CPU_ENDIAN=little
14590      ;;
14591    i?86)
14592      VAR_CPU=x86
14593      VAR_CPU_ARCH=x86
14594      VAR_CPU_BITS=32
14595      VAR_CPU_ENDIAN=little
14596      ;;
14597    arm*)
14598      VAR_CPU=arm
14599      VAR_CPU_ARCH=arm
14600      VAR_CPU_BITS=32
14601      VAR_CPU_ENDIAN=little
14602      ;;
14603    aarch64)
14604      VAR_CPU=aarch64
14605      VAR_CPU_ARCH=aarch64
14606      VAR_CPU_BITS=64
14607      VAR_CPU_ENDIAN=little
14608      ;;
14609    powerpc)
14610      VAR_CPU=ppc
14611      VAR_CPU_ARCH=ppc
14612      VAR_CPU_BITS=32
14613      VAR_CPU_ENDIAN=big
14614      ;;
14615    powerpc64)
14616      VAR_CPU=ppc64
14617      VAR_CPU_ARCH=ppc
14618      VAR_CPU_BITS=64
14619      VAR_CPU_ENDIAN=big
14620      ;;
14621    powerpc64le)
14622      VAR_CPU=ppc64
14623      VAR_CPU_ARCH=ppc
14624      VAR_CPU_BITS=64
14625      VAR_CPU_ENDIAN=little
14626      ;;
14627    s390)
14628      VAR_CPU=s390
14629      VAR_CPU_ARCH=s390
14630      VAR_CPU_BITS=32
14631      VAR_CPU_ENDIAN=big
14632      ;;
14633    s390x)
14634      VAR_CPU=s390x
14635      VAR_CPU_ARCH=s390
14636      VAR_CPU_BITS=64
14637      VAR_CPU_ENDIAN=big
14638      ;;
14639    sparc)
14640      VAR_CPU=sparc
14641      VAR_CPU_ARCH=sparc
14642      VAR_CPU_BITS=32
14643      VAR_CPU_ENDIAN=big
14644      ;;
14645    sparcv9|sparc64)
14646      VAR_CPU=sparcv9
14647      VAR_CPU_ARCH=sparc
14648      VAR_CPU_BITS=64
14649      VAR_CPU_ENDIAN=big
14650      ;;
14651    *)
14652      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14653      ;;
14654  esac
14655
14656  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14657  OPENJDK_BUILD_OS="$VAR_OS"
14658  if test "x$VAR_OS_TYPE" != x; then
14659    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14660  else
14661    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14662  fi
14663  if test "x$VAR_OS_ENV" != x; then
14664    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14665  else
14666    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14667  fi
14668  OPENJDK_BUILD_CPU="$VAR_CPU"
14669  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14670  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14671  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14672
14673
14674
14675
14676
14677
14678
14679
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14681$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14683$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14684
14685  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14686
14687  case "$host_os" in
14688    *linux*)
14689      VAR_OS=linux
14690      VAR_OS_TYPE=unix
14691      ;;
14692    *solaris*)
14693      VAR_OS=solaris
14694      VAR_OS_TYPE=unix
14695      ;;
14696    *darwin*)
14697      VAR_OS=macosx
14698      VAR_OS_TYPE=unix
14699      ;;
14700    *bsd*)
14701      VAR_OS=bsd
14702      VAR_OS_TYPE=unix
14703      ;;
14704    *cygwin*)
14705      VAR_OS=windows
14706      VAR_OS_ENV=windows.cygwin
14707      ;;
14708    *mingw*)
14709      VAR_OS=windows
14710      VAR_OS_ENV=windows.msys
14711      ;;
14712    *aix*)
14713      VAR_OS=aix
14714      VAR_OS_TYPE=unix
14715      ;;
14716    *)
14717      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14718      ;;
14719  esac
14720
14721
14722  # First argument is the cpu name from the trip/quad
14723  case "$host_cpu" in
14724    x86_64)
14725      VAR_CPU=x86_64
14726      VAR_CPU_ARCH=x86
14727      VAR_CPU_BITS=64
14728      VAR_CPU_ENDIAN=little
14729      ;;
14730    i?86)
14731      VAR_CPU=x86
14732      VAR_CPU_ARCH=x86
14733      VAR_CPU_BITS=32
14734      VAR_CPU_ENDIAN=little
14735      ;;
14736    arm*)
14737      VAR_CPU=arm
14738      VAR_CPU_ARCH=arm
14739      VAR_CPU_BITS=32
14740      VAR_CPU_ENDIAN=little
14741      ;;
14742    aarch64)
14743      VAR_CPU=aarch64
14744      VAR_CPU_ARCH=aarch64
14745      VAR_CPU_BITS=64
14746      VAR_CPU_ENDIAN=little
14747      ;;
14748    powerpc)
14749      VAR_CPU=ppc
14750      VAR_CPU_ARCH=ppc
14751      VAR_CPU_BITS=32
14752      VAR_CPU_ENDIAN=big
14753      ;;
14754    powerpc64)
14755      VAR_CPU=ppc64
14756      VAR_CPU_ARCH=ppc
14757      VAR_CPU_BITS=64
14758      VAR_CPU_ENDIAN=big
14759      ;;
14760    powerpc64le)
14761      VAR_CPU=ppc64
14762      VAR_CPU_ARCH=ppc
14763      VAR_CPU_BITS=64
14764      VAR_CPU_ENDIAN=little
14765      ;;
14766    s390)
14767      VAR_CPU=s390
14768      VAR_CPU_ARCH=s390
14769      VAR_CPU_BITS=32
14770      VAR_CPU_ENDIAN=big
14771      ;;
14772    s390x)
14773      VAR_CPU=s390x
14774      VAR_CPU_ARCH=s390
14775      VAR_CPU_BITS=64
14776      VAR_CPU_ENDIAN=big
14777      ;;
14778    sparc)
14779      VAR_CPU=sparc
14780      VAR_CPU_ARCH=sparc
14781      VAR_CPU_BITS=32
14782      VAR_CPU_ENDIAN=big
14783      ;;
14784    sparcv9|sparc64)
14785      VAR_CPU=sparcv9
14786      VAR_CPU_ARCH=sparc
14787      VAR_CPU_BITS=64
14788      VAR_CPU_ENDIAN=big
14789      ;;
14790    *)
14791      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14792      ;;
14793  esac
14794
14795  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14796  OPENJDK_TARGET_OS="$VAR_OS"
14797  if test "x$VAR_OS_TYPE" != x; then
14798    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14799  else
14800    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14801  fi
14802  if test "x$VAR_OS_ENV" != x; then
14803    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14804  else
14805    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14806  fi
14807  OPENJDK_TARGET_CPU="$VAR_CPU"
14808  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14809  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14810  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14811
14812
14813
14814
14815
14816
14817
14818
14819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14820$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14822$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14823
14824
14825
14826# Check whether --with-target-bits was given.
14827if test "${with_target_bits+set}" = set; then :
14828  withval=$with_target_bits;
14829fi
14830
14831
14832  # We have three types of compiles:
14833  # native  == normal compilation, target system == build system
14834  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14835  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14836  #
14837  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14838    # We're doing a proper cross-compilation
14839    COMPILE_TYPE="cross"
14840  else
14841    COMPILE_TYPE="native"
14842  fi
14843
14844  if test "x$with_target_bits" != x; then
14845    if test "x$COMPILE_TYPE" = "xcross"; then
14846      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14847    fi
14848
14849    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14850      # A reduced build is requested
14851      COMPILE_TYPE="reduced"
14852      OPENJDK_TARGET_CPU_BITS=32
14853      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14854        OPENJDK_TARGET_CPU=x86
14855      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14856        OPENJDK_TARGET_CPU=sparc
14857      else
14858        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14859      fi
14860    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14861      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
14862    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14863      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14864$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14865    else
14866      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14867    fi
14868  fi
14869
14870
14871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14872$as_echo_n "checking compilation type... " >&6; }
14873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14874$as_echo "$COMPILE_TYPE" >&6; }
14875
14876
14877  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14878    REQUIRED_OS_NAME=SunOS
14879    REQUIRED_OS_VERSION=5.10
14880  fi
14881  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14882    REQUIRED_OS_NAME=Linux
14883    REQUIRED_OS_VERSION=2.6
14884  fi
14885  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14886    REQUIRED_OS_NAME=Windows
14887    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14888      REQUIRED_OS_VERSION=5.2
14889    else
14890      REQUIRED_OS_VERSION=5.1
14891    fi
14892  fi
14893  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14894    REQUIRED_OS_NAME=Darwin
14895    REQUIRED_OS_VERSION=11.2
14896  fi
14897
14898
14899
14900
14901
14902  # Also store the legacy naming of the cpu.
14903  # Ie i586 and amd64 instead of x86 and x86_64
14904  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14905  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14906    OPENJDK_TARGET_CPU_LEGACY="i586"
14907  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14908    # On all platforms except MacOSX replace x86_64 with amd64.
14909    OPENJDK_TARGET_CPU_LEGACY="amd64"
14910  fi
14911
14912
14913  # And the second legacy naming of the cpu.
14914  # Ie i386 and amd64 instead of x86 and x86_64.
14915  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14916  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14917    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14918  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14919    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14920  fi
14921
14922
14923  # This is the name of the cpu (but using i386 and amd64 instead of
14924  # x86 and x86_64, respectively), preceeded by a /, to be used when
14925  # locating libraries. On macosx, it's empty, though.
14926  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14927  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14928    OPENJDK_TARGET_CPU_LIBDIR=""
14929  fi
14930
14931
14932  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14933  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14934  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14935  OPENJDK_TARGET_CPU_ISADIR=""
14936  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14937    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14938      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14939    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14940      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14941    fi
14942  fi
14943
14944
14945  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14946  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14947  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14948    # On linux only, we replace x86 with i386.
14949    OPENJDK_TARGET_CPU_OSARCH="i386"
14950  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14951    # On all platforms except macosx, we replace x86_64 with amd64.
14952    OPENJDK_TARGET_CPU_OSARCH="amd64"
14953  fi
14954
14955
14956  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14957  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14958    OPENJDK_TARGET_CPU_JLI="i386"
14959  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14960    # On all platforms except macosx, we replace x86_64 with amd64.
14961    OPENJDK_TARGET_CPU_JLI="amd64"
14962  fi
14963  # Now setup the -D flags for building libjli.
14964  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14965  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14966    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14967      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14968    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14969      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14970    fi
14971  fi
14972
14973
14974  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14975      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14976  else
14977      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14978  fi
14979
14980
14981  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14982    A_LP64="LP64:="
14983    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14984    # unpack200.exe
14985    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14986      ADD_LP64="-D_LP64=1"
14987    fi
14988  fi
14989  LP64=$A_LP64
14990
14991
14992  if test "x$COMPILE_TYPE" = "xcross"; then
14993    # FIXME: ... or should this include reduced builds..?
14994    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14995  else
14996    DEFINE_CROSS_COMPILE_ARCH=""
14997  fi
14998
14999
15000  # ZERO_ARCHDEF is used to enable architecture-specific code
15001  case "${OPENJDK_TARGET_CPU}" in
15002    ppc)     ZERO_ARCHDEF=PPC32 ;;
15003    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15004    s390*)   ZERO_ARCHDEF=S390  ;;
15005    sparc*)  ZERO_ARCHDEF=SPARC ;;
15006    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15007    x86)     ZERO_ARCHDEF=IA32  ;;
15008    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15009  esac
15010
15011
15012
15013
15014# Continue setting up basic stuff. Most remaining code require fundamental tools.
15015
15016  # Save the current directory this script was started from
15017  CURDIR="$PWD"
15018
15019  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15020  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15021  # was not available at that time.
15022  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15023  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15024    ORIGINAL_PATH="$REWRITTEN_PATH"
15025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15026$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15027  fi
15028
15029  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15030    PATH_SEP=";"
15031
15032  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15033  if test $SRC_ROOT_LENGTH -gt 100; then
15034    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15035  fi
15036
15037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15039$as_echo_n "checking cygwin release... " >&6; }
15040    CYGWIN_VERSION=`$UNAME -r`
15041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15042$as_echo "$CYGWIN_VERSION" >&6; }
15043    WINDOWS_ENV_VENDOR='cygwin'
15044    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15045
15046    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15047    if test "x$CYGWIN_VERSION_OLD" != x; then
15048      { $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
15049$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;}
15050      as_fn_error $? "Cannot continue" "$LINENO" 5
15051    fi
15052    if test "x$CYGPATH" = x; then
15053      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15054    fi
15055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15056$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15057    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15058    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15059    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15060    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15062$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15063    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15064    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15065    if test "x$test_cygdrive_prefix" = x; then
15066      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15067    fi
15068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15070$as_echo_n "checking msys release... " >&6; }
15071    MSYS_VERSION=`$UNAME -r`
15072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15073$as_echo "$MSYS_VERSION" >&6; }
15074
15075    WINDOWS_ENV_VENDOR='msys'
15076    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15077
15078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15079$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15080    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15081    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15082
15083  windows_path="$MSYS_ROOT_PATH"
15084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15085    unix_path=`$CYGPATH -u "$windows_path"`
15086    MSYS_ROOT_PATH="$unix_path"
15087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15089    MSYS_ROOT_PATH="$unix_path"
15090  fi
15091
15092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15093$as_echo "$MSYS_ROOT_PATH" >&6; }
15094    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15095  else
15096    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15097  fi
15098
15099  # Test if windows or unix (cygwin/msys) find is first in path.
15100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15101$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15102  FIND_BINARY_OUTPUT=`find --version 2>&1`
15103  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15105$as_echo "unix style" >&6; }
15106  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15108$as_echo "Windows" >&6; }
15109    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15110$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15111    { $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
15112$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15113    as_fn_error $? "Cannot continue" "$LINENO" 5
15114  else
15115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15116$as_echo "unknown" >&6; }
15117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15118$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15119  fi
15120
15121  else
15122    PATH_SEP=":"
15123  fi
15124
15125
15126  # We get the top-level directory from the supporting wrappers.
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15128$as_echo_n "checking for top-level directory... " >&6; }
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15130$as_echo "$TOPDIR" >&6; }
15131
15132
15133  # Save the original version of TOPDIR for string comparisons
15134  ORIGINAL_TOPDIR="$TOPDIR"
15135
15136
15137  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15138
15139  # Only process if variable expands to non-empty
15140
15141  if test "x$CURDIR" != x; then
15142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15143
15144  # Input might be given as Windows format, start by converting to
15145  # unix format.
15146  path="$CURDIR"
15147  new_path=`$CYGPATH -u "$path"`
15148
15149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15152  # "foo.exe" is OK but "foo" is an error.
15153  #
15154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15155  # It is also a way to make sure we got the proper file name for the real test later on.
15156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15157  if test "x$test_shortpath" = x; then
15158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15159$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15160    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15161  fi
15162
15163  # Call helper function which possibly converts this using DOS-style short mode.
15164  # If so, the updated path is stored in $new_path.
15165
15166  input_path="$new_path"
15167  # Check if we need to convert this using DOS-style short mode. If the path
15168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15169  # take no chances and rewrite it.
15170  # Note: m4 eats our [], so we need to use [ and ] instead.
15171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15172  if test "x$has_forbidden_chars" != x; then
15173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15177      # Going to short mode and back again did indeed matter. Since short mode is
15178      # case insensitive, let's make it lowercase to improve readability.
15179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15180      # Now convert it back to Unix-style (cygpath)
15181      input_path=`$CYGPATH -u "$shortmode_path"`
15182      new_path="$input_path"
15183    fi
15184  fi
15185
15186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15187  if test "x$test_cygdrive_prefix" = x; then
15188    # As a simple fix, exclude /usr/bin since it's not a real path.
15189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15191      # a path prefixed by /cygdrive for fixpath to work.
15192      new_path="$CYGWIN_ROOT_PATH$input_path"
15193    fi
15194  fi
15195
15196
15197  if test "x$path" != "x$new_path"; then
15198    CURDIR="$new_path"
15199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15200$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15201  fi
15202
15203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15204
15205  path="$CURDIR"
15206  has_colon=`$ECHO $path | $GREP ^.:`
15207  new_path="$path"
15208  if test "x$has_colon" = x; then
15209    # Not in mixed or Windows style, start by that.
15210    new_path=`cmd //c echo $path`
15211  fi
15212
15213
15214  input_path="$new_path"
15215  # Check if we need to convert this using DOS-style short mode. If the path
15216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15217  # take no chances and rewrite it.
15218  # Note: m4 eats our [], so we need to use [ and ] instead.
15219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15220  if test "x$has_forbidden_chars" != x; then
15221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15223  fi
15224
15225
15226  windows_path="$new_path"
15227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15228    unix_path=`$CYGPATH -u "$windows_path"`
15229    new_path="$unix_path"
15230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15232    new_path="$unix_path"
15233  fi
15234
15235  if test "x$path" != "x$new_path"; then
15236    CURDIR="$new_path"
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15238$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15239  fi
15240
15241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15243
15244    else
15245      # We're on a unix platform. Hooray! :)
15246      path="$CURDIR"
15247      has_space=`$ECHO "$path" | $GREP " "`
15248      if test "x$has_space" != x; then
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15250$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15252      fi
15253
15254      # Use eval to expand a potential ~
15255      eval path="$path"
15256      if test ! -f "$path" && test ! -d "$path"; then
15257        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15258      fi
15259
15260      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15261    fi
15262  fi
15263
15264
15265  # Only process if variable expands to non-empty
15266
15267  if test "x$TOPDIR" != x; then
15268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15269
15270  # Input might be given as Windows format, start by converting to
15271  # unix format.
15272  path="$TOPDIR"
15273  new_path=`$CYGPATH -u "$path"`
15274
15275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15278  # "foo.exe" is OK but "foo" is an error.
15279  #
15280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15281  # It is also a way to make sure we got the proper file name for the real test later on.
15282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15283  if test "x$test_shortpath" = x; then
15284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15285$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15286    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15287  fi
15288
15289  # Call helper function which possibly converts this using DOS-style short mode.
15290  # If so, the updated path is stored in $new_path.
15291
15292  input_path="$new_path"
15293  # Check if we need to convert this using DOS-style short mode. If the path
15294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15295  # take no chances and rewrite it.
15296  # Note: m4 eats our [], so we need to use [ and ] instead.
15297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15298  if test "x$has_forbidden_chars" != x; then
15299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15303      # Going to short mode and back again did indeed matter. Since short mode is
15304      # case insensitive, let's make it lowercase to improve readability.
15305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15306      # Now convert it back to Unix-style (cygpath)
15307      input_path=`$CYGPATH -u "$shortmode_path"`
15308      new_path="$input_path"
15309    fi
15310  fi
15311
15312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15313  if test "x$test_cygdrive_prefix" = x; then
15314    # As a simple fix, exclude /usr/bin since it's not a real path.
15315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15317      # a path prefixed by /cygdrive for fixpath to work.
15318      new_path="$CYGWIN_ROOT_PATH$input_path"
15319    fi
15320  fi
15321
15322
15323  if test "x$path" != "x$new_path"; then
15324    TOPDIR="$new_path"
15325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15326$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15327  fi
15328
15329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15330
15331  path="$TOPDIR"
15332  has_colon=`$ECHO $path | $GREP ^.:`
15333  new_path="$path"
15334  if test "x$has_colon" = x; then
15335    # Not in mixed or Windows style, start by that.
15336    new_path=`cmd //c echo $path`
15337  fi
15338
15339
15340  input_path="$new_path"
15341  # Check if we need to convert this using DOS-style short mode. If the path
15342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15343  # take no chances and rewrite it.
15344  # Note: m4 eats our [], so we need to use [ and ] instead.
15345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15346  if test "x$has_forbidden_chars" != x; then
15347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15349  fi
15350
15351
15352  windows_path="$new_path"
15353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15354    unix_path=`$CYGPATH -u "$windows_path"`
15355    new_path="$unix_path"
15356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15358    new_path="$unix_path"
15359  fi
15360
15361  if test "x$path" != "x$new_path"; then
15362    TOPDIR="$new_path"
15363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15364$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15365  fi
15366
15367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15369
15370    else
15371      # We're on a unix platform. Hooray! :)
15372      path="$TOPDIR"
15373      has_space=`$ECHO "$path" | $GREP " "`
15374      if test "x$has_space" != x; then
15375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15376$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15378      fi
15379
15380      # Use eval to expand a potential ~
15381      eval path="$path"
15382      if test ! -f "$path" && test ! -d "$path"; then
15383        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15384      fi
15385
15386      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15387    fi
15388  fi
15389
15390  # SRC_ROOT is a traditional alias for TOPDIR.
15391  SRC_ROOT=$TOPDIR
15392
15393  # Calculate a canonical version of TOPDIR for string comparisons
15394  CANONICAL_TOPDIR=$TOPDIR
15395
15396  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15397    # Follow a chain of symbolic links. Use readlink
15398    # where it exists, else fall back to horribly
15399    # complicated shell code.
15400    if test "x$READLINK_TESTED" != yes; then
15401      # On MacOSX there is a readlink tool with a different
15402      # purpose than the GNU readlink tool. Check the found readlink.
15403      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15404      if test "x$ISGNU" = x; then
15405        # A readlink that we do not know how to use.
15406        # Are there other non-GNU readlinks out there?
15407        READLINK_TESTED=yes
15408        READLINK=
15409      fi
15410    fi
15411
15412    if test "x$READLINK" != x; then
15413      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15414    else
15415      # Save the current directory for restoring afterwards
15416      STARTDIR=$PWD
15417      COUNTER=0
15418      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15419      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15420      cd $sym_link_dir
15421      # Use -P flag to resolve symlinks in directories.
15422      cd `$THEPWDCMD -P`
15423      sym_link_dir=`$THEPWDCMD -P`
15424      # Resolve file symlinks
15425      while test $COUNTER -lt 20; do
15426        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15427        if test "x$ISLINK" == x; then
15428          # This is not a symbolic link! We are done!
15429          break
15430        fi
15431        # Again resolve directory symlinks since the target of the just found
15432        # link could be in a different directory
15433        cd `$DIRNAME $ISLINK`
15434        sym_link_dir=`$THEPWDCMD -P`
15435        sym_link_file=`$BASENAME $ISLINK`
15436        let COUNTER=COUNTER+1
15437      done
15438      cd $STARTDIR
15439      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15440    fi
15441  fi
15442
15443
15444
15445  # Locate the directory of this script.
15446  AUTOCONF_DIR=$TOPDIR/common/autoconf
15447
15448
15449# Check if it's a pure open build or if custom sources are to be used.
15450
15451  # Check whether --enable-openjdk-only was given.
15452if test "${enable_openjdk_only+set}" = set; then :
15453  enableval=$enable_openjdk_only;
15454else
15455  enable_openjdk_only="no"
15456fi
15457
15458
15459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15460$as_echo_n "checking for presence of closed sources... " >&6; }
15461  if test -d "$SRC_ROOT/jdk/src/closed"; then
15462    CLOSED_SOURCE_PRESENT=yes
15463  else
15464    CLOSED_SOURCE_PRESENT=no
15465  fi
15466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15467$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15468
15469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15470$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15471  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15473$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15474
15475  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15476    OPENJDK=true
15477    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15478      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15479$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15480    fi
15481  else
15482    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15483      OPENJDK=true
15484    else
15485      OPENJDK=false
15486    fi
15487  fi
15488
15489  if test "x$OPENJDK" = "xtrue"; then
15490    SET_OPENJDK="OPENJDK=true"
15491  fi
15492
15493
15494
15495  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15496  # the IncludeCustomExtension macro.
15497
15498
15499# Check whether --with-custom-make-dir was given.
15500if test "${with_custom_make_dir+set}" = set; then :
15501  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
15502$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15503fi
15504
15505
15506
15507
15508# These are needed to be able to create a configuration name (and thus the output directory)
15509
15510  ###############################################################################
15511  #
15512  # Check which variant of the JDK that we want to build.
15513  # Currently we have:
15514  #    normal:   standard edition
15515  # but the custom make system may add other variants
15516  #
15517  # Effectively the JDK variant gives a name to a specific set of
15518  # modules to compile into the JDK. In the future, these modules
15519  # might even be Jigsaw modules.
15520  #
15521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15522$as_echo_n "checking which variant of the JDK to build... " >&6; }
15523
15524# Check whether --with-jdk-variant was given.
15525if test "${with_jdk_variant+set}" = set; then :
15526  withval=$with_jdk_variant;
15527fi
15528
15529
15530  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15531    JDK_VARIANT="normal"
15532  else
15533    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15534  fi
15535
15536
15537
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15539$as_echo "$JDK_VARIANT" >&6; }
15540
15541
15542###############################################################################
15543#
15544# Check which interpreter of the JVM we want to build.
15545# Currently we have:
15546#    template: Template interpreter (the default)
15547#    cpp     : C++ interpreter
15548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15549$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15550
15551# Check whether --with-jvm-interpreter was given.
15552if test "${with_jvm_interpreter+set}" = set; then :
15553  withval=$with_jvm_interpreter;
15554fi
15555
15556
15557if test "x$with_jvm_interpreter" = x; then
15558     with_jvm_interpreter="template"
15559fi
15560
15561JVM_INTERPRETER="$with_jvm_interpreter"
15562
15563if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15564   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15565fi
15566
15567
15568
15569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15570$as_echo "$with_jvm_interpreter" >&6; }
15571
15572
15573
15574  ###############################################################################
15575  #
15576  # Check which variants of the JVM that we want to build.
15577  # Currently we have:
15578  #    server: normal interpreter and a tiered C1/C2 compiler
15579  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15580  #    minimal1: reduced form of client with optional VM services and features stripped out
15581  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15582  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15583  #    zero: no machine code interpreter, no compiler
15584  #    zeroshark: zero interpreter and shark/llvm compiler backend
15585#    core: interpreter only, no compiler (only works on some platforms)
15586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15587$as_echo_n "checking which variants of the JVM to build... " >&6; }
15588
15589# Check whether --with-jvm-variants was given.
15590if test "${with_jvm_variants+set}" = set; then :
15591  withval=$with_jvm_variants;
15592fi
15593
15594
15595  if test "x$with_jvm_variants" = x; then
15596    with_jvm_variants="server"
15597  fi
15598
15599  JVM_VARIANTS=",$with_jvm_variants,"
15600  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,//'`
15601
15602  if test "x$TEST_VARIANTS" != "x,"; then
15603     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15604  fi
15605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15606$as_echo "$with_jvm_variants" >&6; }
15607
15608  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15609  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15610  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15611  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15612  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15613  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15614  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15615
15616  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15617    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15618      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15619    fi
15620  fi
15621  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15622    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15623      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15624    fi
15625  fi
15626  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15627    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15628      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15629    fi
15630  fi
15631
15632  # Replace the commas with AND for use in the build directory name.
15633  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15634  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/'`
15635  if test "x$COUNT_VARIANTS" != "x,1"; then
15636    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15637  else
15638    BUILDING_MULTIPLE_JVM_VARIANTS=no
15639  fi
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650  INCLUDE_SA=true
15651  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15652    INCLUDE_SA=false
15653  fi
15654  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15655    INCLUDE_SA=false
15656  fi
15657  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15658    INCLUDE_SA=false
15659  fi
15660  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15661    INCLUDE_SA=false
15662  fi
15663
15664
15665  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15666    MACOSX_UNIVERSAL="true"
15667  fi
15668
15669
15670
15671
15672  ###############################################################################
15673  #
15674  # Set the debug level
15675  #    release: no debug information, all optimizations, no asserts.
15676  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15677  #    fastdebug: debug information (-g), all optimizations, all asserts
15678  #    slowdebug: debug information (-g), no optimizations, all asserts
15679  #
15680  DEBUG_LEVEL="release"
15681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15682$as_echo_n "checking which debug level to use... " >&6; }
15683  # Check whether --enable-debug was given.
15684if test "${enable_debug+set}" = set; then :
15685  enableval=$enable_debug;
15686        ENABLE_DEBUG="${enableval}"
15687        DEBUG_LEVEL="fastdebug"
15688
15689else
15690  ENABLE_DEBUG="no"
15691fi
15692
15693
15694
15695# Check whether --with-debug-level was given.
15696if test "${with_debug_level+set}" = set; then :
15697  withval=$with_debug_level;
15698        DEBUG_LEVEL="${withval}"
15699        if test "x$ENABLE_DEBUG" = xyes; then
15700          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15701        fi
15702
15703fi
15704
15705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15706$as_echo "$DEBUG_LEVEL" >&6; }
15707
15708  if test "x$DEBUG_LEVEL" != xrelease && \
15709      test "x$DEBUG_LEVEL" != xoptimized && \
15710      test "x$DEBUG_LEVEL" != xfastdebug && \
15711      test "x$DEBUG_LEVEL" != xslowdebug; then
15712    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15713  fi
15714
15715
15716  ###############################################################################
15717  #
15718  # Setup legacy vars/targets and new vars to deal with different debug levels.
15719  #
15720
15721  case $DEBUG_LEVEL in
15722    release )
15723      VARIANT="OPT"
15724      FASTDEBUG="false"
15725      DEBUG_CLASSFILES="false"
15726      BUILD_VARIANT_RELEASE=""
15727      HOTSPOT_DEBUG_LEVEL="product"
15728      HOTSPOT_EXPORT="product"
15729      ;;
15730    fastdebug )
15731      VARIANT="DBG"
15732      FASTDEBUG="true"
15733      DEBUG_CLASSFILES="true"
15734      BUILD_VARIANT_RELEASE="-fastdebug"
15735      HOTSPOT_DEBUG_LEVEL="fastdebug"
15736      HOTSPOT_EXPORT="fastdebug"
15737      ;;
15738    slowdebug )
15739      VARIANT="DBG"
15740      FASTDEBUG="false"
15741      DEBUG_CLASSFILES="true"
15742      BUILD_VARIANT_RELEASE="-debug"
15743      HOTSPOT_DEBUG_LEVEL="debug"
15744      HOTSPOT_EXPORT="debug"
15745      ;;
15746    optimized )
15747      VARIANT="OPT"
15748      FASTDEBUG="false"
15749      DEBUG_CLASSFILES="false"
15750      BUILD_VARIANT_RELEASE="-optimized"
15751      HOTSPOT_DEBUG_LEVEL="optimized"
15752      HOTSPOT_EXPORT="optimized"
15753      ;;
15754  esac
15755
15756  # The debug level 'optimized' is a little special because it is currently only
15757  # applicable to the HotSpot build where it means to build a completely
15758  # optimized version of the VM without any debugging code (like for the
15759  # 'release' debug level which is called 'product' in the HotSpot build) but
15760  # with the exception that it can contain additional code which is otherwise
15761  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15762  # test new and/or experimental features which are not intended for customer
15763  # shipment. Because these new features need to be tested and benchmarked in
15764  # real world scenarios, we want to build the containing JDK at the 'release'
15765  # debug level.
15766  if test "x$DEBUG_LEVEL" = xoptimized; then
15767    DEBUG_LEVEL="release"
15768  fi
15769
15770  #####
15771  # Generate the legacy makefile targets for hotspot.
15772  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15773  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15774  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15775  # But until then ...
15776  HOTSPOT_TARGET=""
15777
15778  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15779    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15780  fi
15781
15782  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15783    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15784  fi
15785
15786  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15787    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15788  fi
15789
15790  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15791    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15792  fi
15793
15794  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15795    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15796  fi
15797
15798  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15799    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15800  fi
15801
15802  if test "x$JVM_VARIANT_CORE" = xtrue; then
15803    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15804  fi
15805
15806  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15807
15808  # On Macosx universal binaries are produced, but they only contain
15809  # 64 bit intel. This invalidates control of which jvms are built
15810  # from configure, but only server is valid anyway. Fix this
15811  # when hotspot makefiles are rewritten.
15812  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15813    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15814  fi
15815
15816  #####
15817
15818
15819
15820
15821
15822
15823
15824
15825# With basic setup done, call the custom early hook.
15826
15827
15828# Check if we have devkits, extra paths or sysroot set.
15829
15830
15831# Check whether --with-devkit was given.
15832if test "${with_devkit+set}" = set; then :
15833  withval=$with_devkit;
15834
15835  # Only process if variable expands to non-empty
15836
15837  if test "x$with_devkit" != x; then
15838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15839
15840  # Input might be given as Windows format, start by converting to
15841  # unix format.
15842  path="$with_devkit"
15843  new_path=`$CYGPATH -u "$path"`
15844
15845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15848  # "foo.exe" is OK but "foo" is an error.
15849  #
15850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15851  # It is also a way to make sure we got the proper file name for the real test later on.
15852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15853  if test "x$test_shortpath" = x; then
15854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15855$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15856    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15857  fi
15858
15859  # Call helper function which possibly converts this using DOS-style short mode.
15860  # If so, the updated path is stored in $new_path.
15861
15862  input_path="$new_path"
15863  # Check if we need to convert this using DOS-style short mode. If the path
15864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15865  # take no chances and rewrite it.
15866  # Note: m4 eats our [], so we need to use [ and ] instead.
15867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15868  if test "x$has_forbidden_chars" != x; then
15869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15873      # Going to short mode and back again did indeed matter. Since short mode is
15874      # case insensitive, let's make it lowercase to improve readability.
15875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15876      # Now convert it back to Unix-style (cygpath)
15877      input_path=`$CYGPATH -u "$shortmode_path"`
15878      new_path="$input_path"
15879    fi
15880  fi
15881
15882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15883  if test "x$test_cygdrive_prefix" = x; then
15884    # As a simple fix, exclude /usr/bin since it's not a real path.
15885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15887      # a path prefixed by /cygdrive for fixpath to work.
15888      new_path="$CYGWIN_ROOT_PATH$input_path"
15889    fi
15890  fi
15891
15892
15893  if test "x$path" != "x$new_path"; then
15894    with_devkit="$new_path"
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15896$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15897  fi
15898
15899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15900
15901  path="$with_devkit"
15902  has_colon=`$ECHO $path | $GREP ^.:`
15903  new_path="$path"
15904  if test "x$has_colon" = x; then
15905    # Not in mixed or Windows style, start by that.
15906    new_path=`cmd //c echo $path`
15907  fi
15908
15909
15910  input_path="$new_path"
15911  # Check if we need to convert this using DOS-style short mode. If the path
15912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15913  # take no chances and rewrite it.
15914  # Note: m4 eats our [], so we need to use [ and ] instead.
15915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15916  if test "x$has_forbidden_chars" != x; then
15917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15919  fi
15920
15921
15922  windows_path="$new_path"
15923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15924    unix_path=`$CYGPATH -u "$windows_path"`
15925    new_path="$unix_path"
15926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15928    new_path="$unix_path"
15929  fi
15930
15931  if test "x$path" != "x$new_path"; then
15932    with_devkit="$new_path"
15933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15934$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15935  fi
15936
15937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15939
15940    else
15941      # We're on a unix platform. Hooray! :)
15942      path="$with_devkit"
15943      has_space=`$ECHO "$path" | $GREP " "`
15944      if test "x$has_space" != x; then
15945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15946$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15948      fi
15949
15950      # Use eval to expand a potential ~
15951      eval path="$path"
15952      if test ! -f "$path" && test ! -d "$path"; then
15953        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15954      fi
15955
15956      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15957    fi
15958  fi
15959
15960        DEVKIT_ROOT="$with_devkit"
15961        # Check for a meta data info file in the root of the devkit
15962        if test -f "$DEVKIT_ROOT/devkit.info"; then
15963          . $DEVKIT_ROOT/devkit.info
15964          # This potentially sets the following:
15965          # A descriptive name of the devkit
15966
15967  if test "x$DEVKIT_NAME" = x; then
15968    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15969  fi
15970
15971          # Corresponds to --with-extra-path
15972
15973  if test "x$DEVKIT_EXTRA_PATH" = x; then
15974    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15975  fi
15976
15977          # Corresponds to --with-toolchain-path
15978
15979  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15980    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15981  fi
15982
15983          # Corresponds to --with-sysroot
15984
15985  if test "x$DEVKIT_SYSROOT" = x; then
15986    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15987  fi
15988
15989
15990          # Identifies the Visual Studio version in the devkit
15991
15992  if test "x$DEVKIT_VS_VERSION" = x; then
15993    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15994  fi
15995
15996          # The Visual Studio include environment variable
15997
15998  if test "x$DEVKIT_VS_INCLUDE" = x; then
15999    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16000  fi
16001
16002          # The Visual Studio lib environment variable
16003
16004  if test "x$DEVKIT_VS_LIB" = x; then
16005    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16006  fi
16007
16008          # Corresponds to --with-msvcr-dll
16009
16010  if test "x$DEVKIT_MSVCR_DLL" = x; then
16011    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16012  fi
16013
16014          # Corresponds to --with-msvcp-dll
16015
16016  if test "x$DEVKIT_MSVCP_DLL" = x; then
16017    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16018  fi
16019
16020        fi
16021
16022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16023$as_echo_n "checking for devkit... " >&6; }
16024        if test "x$DEVKIT_NAME" != x; then
16025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16026$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16027        else
16028          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16029$as_echo "$DEVKIT_ROOT" >&6; }
16030        fi
16031
16032
16033  if test "x$DEVKIT_EXTRA_PATH" != x; then
16034    if test "x$EXTRA_PATH" = x; then
16035      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16036    else
16037      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16038    fi
16039  fi
16040
16041
16042        # Fallback default of just /bin if DEVKIT_PATH is not defined
16043        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16044          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16045        fi
16046
16047  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16048    if test "x$TOOLCHAIN_PATH" = x; then
16049      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16050    else
16051      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16052    fi
16053  fi
16054
16055
16056        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16057        # places for backwards compatiblity.
16058        if test "x$DEVKIT_SYSROOT" != x; then
16059          SYSROOT="$DEVKIT_SYSROOT"
16060        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16061          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16062        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16063          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16064        fi
16065
16066
16067fi
16068
16069
16070  # You can force the sysroot if the sysroot encoded into the compiler tools
16071  # is not correct.
16072
16073# Check whether --with-sys-root was given.
16074if test "${with_sys_root+set}" = set; then :
16075  withval=$with_sys_root; SYSROOT=$with_sys_root
16076
16077fi
16078
16079
16080
16081# Check whether --with-sysroot was given.
16082if test "${with_sysroot+set}" = set; then :
16083  withval=$with_sysroot; SYSROOT=$with_sysroot
16084
16085fi
16086
16087
16088
16089# Check whether --with-tools-dir was given.
16090if test "${with_tools_dir+set}" = set; then :
16091  withval=$with_tools_dir;
16092  if test "x$with_tools_dir" != x; then
16093    if test "x$TOOLCHAIN_PATH" = x; then
16094      TOOLCHAIN_PATH="$with_tools_dir"
16095    else
16096      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16097    fi
16098  fi
16099
16100
16101fi
16102
16103
16104
16105# Check whether --with-toolchain-path was given.
16106if test "${with_toolchain_path+set}" = set; then :
16107  withval=$with_toolchain_path;
16108  if test "x$with_toolchain_path" != x; then
16109    if test "x$TOOLCHAIN_PATH" = x; then
16110      TOOLCHAIN_PATH="$with_toolchain_path"
16111    else
16112      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16113    fi
16114  fi
16115
16116
16117fi
16118
16119
16120
16121# Check whether --with-extra-path was given.
16122if test "${with_extra_path+set}" = set; then :
16123  withval=$with_extra_path;
16124  if test "x$with_extra_path" != x; then
16125    if test "x$EXTRA_PATH" = x; then
16126      EXTRA_PATH="$with_extra_path"
16127    else
16128      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16129    fi
16130  fi
16131
16132
16133fi
16134
16135
16136  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16137    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16138    # If not, detect if Xcode is installed by running xcodebuild -version
16139    # if no Xcode installed, xcodebuild exits with 1
16140    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16141    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16142      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16143      # fall back on the stub binary in /usr/bin/xcodebuild
16144      # Extract the first word of "xcodebuild", so it can be a program name with args.
16145set dummy xcodebuild; ac_word=$2
16146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16147$as_echo_n "checking for $ac_word... " >&6; }
16148if ${ac_cv_path_XCODEBUILD+:} false; then :
16149  $as_echo_n "(cached) " >&6
16150else
16151  case $XCODEBUILD in
16152  [\\/]* | ?:[\\/]*)
16153  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16154  ;;
16155  *)
16156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16157for as_dir in $TOOLCHAIN_PATH
16158do
16159  IFS=$as_save_IFS
16160  test -z "$as_dir" && as_dir=.
16161    for ac_exec_ext in '' $ac_executable_extensions; do
16162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16163    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16165    break 2
16166  fi
16167done
16168  done
16169IFS=$as_save_IFS
16170
16171  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16172  ;;
16173esac
16174fi
16175XCODEBUILD=$ac_cv_path_XCODEBUILD
16176if test -n "$XCODEBUILD"; then
16177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16178$as_echo "$XCODEBUILD" >&6; }
16179else
16180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16181$as_echo "no" >&6; }
16182fi
16183
16184
16185    else
16186      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16187      # when only the command line tools are installed there are no SDKs, so headers
16188      # are copied into the system frameworks
16189      XCODEBUILD=
16190
16191    fi
16192
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16194$as_echo_n "checking for sdk name... " >&6; }
16195
16196# Check whether --with-sdk-name was given.
16197if test "${with_sdk_name+set}" = set; then :
16198  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16199
16200fi
16201
16202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16203$as_echo "$SDKNAME" >&6; }
16204
16205    # if toolchain path is specified then don't rely on system headers, they may not compile
16206    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16207    test -z "$TOOLCHAIN_PATH" && \
16208      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16209
16210    if test -z "$SYSROOT"; then
16211      if test -n "$XCODEBUILD"; then
16212        # if we don't have system headers, use default SDK name (last resort)
16213        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16214          SDKNAME=${SDKNAME:-macosx}
16215        fi
16216
16217        if test -n "$SDKNAME"; then
16218          # Call xcodebuild to determine SYSROOT
16219          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16220        fi
16221      else
16222        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16223          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
16224        fi
16225      fi
16226    else
16227      # warn user if --with-sdk-name was also set
16228      if test -n "$with_sdk_name"; then
16229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16230$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16231      fi
16232    fi
16233
16234    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16235      # If no system framework headers, then SYSROOT must be set, or we won't build
16236      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
16237    fi
16238
16239    # Perform a basic sanity test
16240    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16241      if test -z "$SYSROOT"; then
16242        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
16243      else
16244        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16245      fi
16246    fi
16247
16248    # set SDKROOT too, Xcode tools will pick it up
16249    SDKROOT=$SYSROOT
16250
16251  fi
16252
16253  # Prepend the extra path to the global path
16254
16255  if test "x$EXTRA_PATH" != x; then
16256    if test "x$PATH" = x; then
16257      PATH="$EXTRA_PATH"
16258    else
16259      PATH="$EXTRA_PATH:$PATH"
16260    fi
16261  fi
16262
16263
16264  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16265    # Add extra search paths on solaris for utilities like ar and as etc...
16266    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16267  fi
16268
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16270$as_echo_n "checking for sysroot... " >&6; }
16271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16272$as_echo "$SYSROOT" >&6; }
16273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16274$as_echo_n "checking for toolchain path... " >&6; }
16275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16276$as_echo "$TOOLCHAIN_PATH" >&6; }
16277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16278$as_echo_n "checking for extra path... " >&6; }
16279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16280$as_echo "$EXTRA_PATH" >&6; }
16281
16282
16283# To properly create a configuration name, we need to have the OpenJDK target
16284# and options (variants and debug level) parsed.
16285
16286
16287
16288# Check whether --with-conf-name was given.
16289if test "${with_conf_name+set}" = set; then :
16290  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16291fi
16292
16293
16294  # Test from where we are running configure, in or outside of src root.
16295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16296$as_echo_n "checking where to store configuration... " >&6; }
16297  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16298      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16299      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16300    # We are running configure from the src root.
16301    # Create a default ./build/target-variant-debuglevel output root.
16302    if test "x${CONF_NAME}" = x; then
16303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16304$as_echo "in default location" >&6; }
16305      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16306    else
16307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16308$as_echo "in build directory with custom name" >&6; }
16309    fi
16310    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16311    $MKDIR -p "$OUTPUT_ROOT"
16312    if test ! -d "$OUTPUT_ROOT"; then
16313      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16314    fi
16315  else
16316    # We are running configure from outside of the src dir.
16317    # Then use the current directory as output dir!
16318    # If configuration is situated in normal build directory, just use the build
16319    # directory name as configuration name, otherwise use the complete path.
16320    if test "x${CONF_NAME}" = x; then
16321      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16322    fi
16323    OUTPUT_ROOT="$CURDIR"
16324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16325$as_echo "in current directory" >&6; }
16326
16327    # WARNING: This might be a bad thing to do. You need to be sure you want to
16328    # have a configuration in this directory. Do some sanity checks!
16329
16330    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16331      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16332      # other files
16333      files_present=`$LS $OUTPUT_ROOT`
16334      # Configure has already touched config.log and confdefs.h in the current dir when this check
16335      # is performed.
16336      filtered_files=`$ECHO "$files_present" \
16337          | $SED -e 's/config.log//g' \
16338              -e 's/configure.log//g' \
16339              -e 's/confdefs.h//g' \
16340              -e 's/ //g' \
16341          | $TR -d '\n'`
16342      if test "x$filtered_files" != x; then
16343        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16344$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16345        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16346$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16348$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16349        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16350$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16351        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16352$as_echo "$as_me: seriously mess up just about everything." >&6;}
16353        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16354$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16355        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16356$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16357        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16358      fi
16359    fi
16360  fi
16361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16362$as_echo_n "checking what configuration name to use... " >&6; }
16363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16364$as_echo "$CONF_NAME" >&6; }
16365
16366
16367  # Only process if variable expands to non-empty
16368
16369  if test "x$OUTPUT_ROOT" != x; then
16370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16371
16372  # Input might be given as Windows format, start by converting to
16373  # unix format.
16374  path="$OUTPUT_ROOT"
16375  new_path=`$CYGPATH -u "$path"`
16376
16377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16380  # "foo.exe" is OK but "foo" is an error.
16381  #
16382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16383  # It is also a way to make sure we got the proper file name for the real test later on.
16384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16385  if test "x$test_shortpath" = x; then
16386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16387$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16388    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16389  fi
16390
16391  # Call helper function which possibly converts this using DOS-style short mode.
16392  # If so, the updated path is stored in $new_path.
16393
16394  input_path="$new_path"
16395  # Check if we need to convert this using DOS-style short mode. If the path
16396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16397  # take no chances and rewrite it.
16398  # Note: m4 eats our [], so we need to use [ and ] instead.
16399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16400  if test "x$has_forbidden_chars" != x; then
16401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16405      # Going to short mode and back again did indeed matter. Since short mode is
16406      # case insensitive, let's make it lowercase to improve readability.
16407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16408      # Now convert it back to Unix-style (cygpath)
16409      input_path=`$CYGPATH -u "$shortmode_path"`
16410      new_path="$input_path"
16411    fi
16412  fi
16413
16414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16415  if test "x$test_cygdrive_prefix" = x; then
16416    # As a simple fix, exclude /usr/bin since it's not a real path.
16417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16419      # a path prefixed by /cygdrive for fixpath to work.
16420      new_path="$CYGWIN_ROOT_PATH$input_path"
16421    fi
16422  fi
16423
16424
16425  if test "x$path" != "x$new_path"; then
16426    OUTPUT_ROOT="$new_path"
16427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16428$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16429  fi
16430
16431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16432
16433  path="$OUTPUT_ROOT"
16434  has_colon=`$ECHO $path | $GREP ^.:`
16435  new_path="$path"
16436  if test "x$has_colon" = x; then
16437    # Not in mixed or Windows style, start by that.
16438    new_path=`cmd //c echo $path`
16439  fi
16440
16441
16442  input_path="$new_path"
16443  # Check if we need to convert this using DOS-style short mode. If the path
16444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16445  # take no chances and rewrite it.
16446  # Note: m4 eats our [], so we need to use [ and ] instead.
16447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16448  if test "x$has_forbidden_chars" != x; then
16449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16451  fi
16452
16453
16454  windows_path="$new_path"
16455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16456    unix_path=`$CYGPATH -u "$windows_path"`
16457    new_path="$unix_path"
16458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16460    new_path="$unix_path"
16461  fi
16462
16463  if test "x$path" != "x$new_path"; then
16464    OUTPUT_ROOT="$new_path"
16465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16466$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16467  fi
16468
16469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16471
16472    else
16473      # We're on a unix platform. Hooray! :)
16474      path="$OUTPUT_ROOT"
16475      has_space=`$ECHO "$path" | $GREP " "`
16476      if test "x$has_space" != x; then
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16478$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16480      fi
16481
16482      # Use eval to expand a potential ~
16483      eval path="$path"
16484      if test ! -f "$path" && test ! -d "$path"; then
16485        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16486      fi
16487
16488      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16489    fi
16490  fi
16491
16492
16493  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16494  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16495
16496  SPEC=$OUTPUT_ROOT/spec.gmk
16497
16498  CONF_NAME=$CONF_NAME
16499
16500  OUTPUT_ROOT=$OUTPUT_ROOT
16501
16502
16503
16504  # The spec.gmk file contains all variables for the make system.
16505  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16506
16507  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16508  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16509
16510  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16511  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16512
16513  # The compare.sh is used to compare the build output to other builds.
16514  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16515
16516  # The generated Makefile knows where the spec.gmk is and where the source is.
16517  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16518  # which will look for generated configurations
16519  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16520
16521
16522
16523# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16524
16525  for ac_prog in apt-get yum port pkgutil pkgadd
16526do
16527  # Extract the first word of "$ac_prog", so it can be a program name with args.
16528set dummy $ac_prog; ac_word=$2
16529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16530$as_echo_n "checking for $ac_word... " >&6; }
16531if ${ac_cv_prog_PKGHANDLER+:} false; then :
16532  $as_echo_n "(cached) " >&6
16533else
16534  if test -n "$PKGHANDLER"; then
16535  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16536else
16537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16538for as_dir in $PATH
16539do
16540  IFS=$as_save_IFS
16541  test -z "$as_dir" && as_dir=.
16542    for ac_exec_ext in '' $ac_executable_extensions; do
16543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16544    ac_cv_prog_PKGHANDLER="$ac_prog"
16545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16546    break 2
16547  fi
16548done
16549  done
16550IFS=$as_save_IFS
16551
16552fi
16553fi
16554PKGHANDLER=$ac_cv_prog_PKGHANDLER
16555if test -n "$PKGHANDLER"; then
16556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16557$as_echo "$PKGHANDLER" >&6; }
16558else
16559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16560$as_echo "no" >&6; }
16561fi
16562
16563
16564  test -n "$PKGHANDLER" && break
16565done
16566
16567
16568
16569# Setup tools that requires more complex handling, or that is not needed by the configure script.
16570
16571
16572
16573  # Publish this variable in the help.
16574
16575
16576  if [ -z "${MAKE+x}" ]; then
16577    # The variable is not set by user, try to locate tool using the code snippet
16578
16579    # Try our hardest to locate a correct version of GNU make
16580    for ac_prog in gmake
16581do
16582  # Extract the first word of "$ac_prog", so it can be a program name with args.
16583set dummy $ac_prog; ac_word=$2
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16585$as_echo_n "checking for $ac_word... " >&6; }
16586if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16587  $as_echo_n "(cached) " >&6
16588else
16589  case $CHECK_GMAKE in
16590  [\\/]* | ?:[\\/]*)
16591  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16592  ;;
16593  *)
16594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16595for as_dir in $PATH
16596do
16597  IFS=$as_save_IFS
16598  test -z "$as_dir" && as_dir=.
16599    for ac_exec_ext in '' $ac_executable_extensions; do
16600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16601    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16603    break 2
16604  fi
16605done
16606  done
16607IFS=$as_save_IFS
16608
16609  ;;
16610esac
16611fi
16612CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16613if test -n "$CHECK_GMAKE"; then
16614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16615$as_echo "$CHECK_GMAKE" >&6; }
16616else
16617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16618$as_echo "no" >&6; }
16619fi
16620
16621
16622  test -n "$CHECK_GMAKE" && break
16623done
16624
16625
16626  MAKE_CANDIDATE=""$CHECK_GMAKE""
16627  DESCRIPTION="gmake in PATH"
16628
16629  # On Cygwin, we require a newer version of make than on other platforms
16630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16631    MAKE_VERSION_EXPR="-e 4\."
16632    MAKE_REQUIRED_VERSION="4.0"
16633   else
16634    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16635    MAKE_REQUIRED_VERSION="3.81"
16636  fi
16637
16638  if test "x$MAKE_CANDIDATE" != x; then
16639    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16640$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16641    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16642    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16643    if test "x$IS_GNU_MAKE" = x; then
16644      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16645$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16646    else
16647      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16648      if test "x$IS_MODERN_MAKE" = x; then
16649        { $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
16650$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;}
16651      else
16652        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16653          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16654            MAKE_EXPECTED_ENV='cygwin'
16655          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16656            MAKE_EXPECTED_ENV='msys'
16657          else
16658            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16659          fi
16660          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16661          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16662        else
16663          # Not relevant for non-Windows
16664          IS_MAKE_CORRECT_ENV=true
16665        fi
16666        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16667          { $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
16668$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;}
16669        else
16670          FOUND_MAKE=$MAKE_CANDIDATE
16671
16672  # Only process if variable expands to non-empty
16673
16674  if test "x$FOUND_MAKE" != x; then
16675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16676
16677  # First separate the path from the arguments. This will split at the first
16678  # space.
16679  complete="$FOUND_MAKE"
16680  path="${complete%% *}"
16681  tmp="$complete EOL"
16682  arguments="${tmp#* }"
16683
16684  # Input might be given as Windows format, start by converting to
16685  # unix format.
16686  new_path=`$CYGPATH -u "$path"`
16687
16688  # Now try to locate executable using which
16689  new_path=`$WHICH "$new_path" 2> /dev/null`
16690  # bat and cmd files are not always considered executable in cygwin causing which
16691  # to not find them
16692  if test "x$new_path" = x \
16693      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16694      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16695    new_path=`$CYGPATH -u "$path"`
16696  fi
16697  if test "x$new_path" = x; then
16698    # Oops. Which didn't find the executable.
16699    # The splitting of arguments from the executable at a space might have been incorrect,
16700    # since paths with space are more likely in Windows. Give it another try with the whole
16701    # argument.
16702    path="$complete"
16703    arguments="EOL"
16704    new_path=`$CYGPATH -u "$path"`
16705    new_path=`$WHICH "$new_path" 2> /dev/null`
16706    # bat and cmd files are not always considered executable in cygwin causing which
16707    # to not find them
16708    if test "x$new_path" = x \
16709        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16710        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16711      new_path=`$CYGPATH -u "$path"`
16712    fi
16713    if test "x$new_path" = x; then
16714      # It's still not found. Now this is an unrecoverable error.
16715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16716$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16717      has_space=`$ECHO "$complete" | $GREP " "`
16718      if test "x$has_space" != x; then
16719        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16720$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16721      fi
16722      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16723    fi
16724  fi
16725
16726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16729  # "foo.exe" is OK but "foo" is an error.
16730  #
16731  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16732  # It is also a way to make sure we got the proper file name for the real test later on.
16733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16734  if test "x$test_shortpath" = x; then
16735    # Short path failed, file does not exist as specified.
16736    # Try adding .exe or .cmd
16737    if test -f "${new_path}.exe"; then
16738      input_to_shortpath="${new_path}.exe"
16739    elif test -f "${new_path}.cmd"; then
16740      input_to_shortpath="${new_path}.cmd"
16741    else
16742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16743$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16744      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16745$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16746      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16747    fi
16748  else
16749    input_to_shortpath="$new_path"
16750  fi
16751
16752  # Call helper function which possibly converts this using DOS-style short mode.
16753  # If so, the updated path is stored in $new_path.
16754  new_path="$input_to_shortpath"
16755
16756  input_path="$input_to_shortpath"
16757  # Check if we need to convert this using DOS-style short mode. If the path
16758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16759  # take no chances and rewrite it.
16760  # Note: m4 eats our [], so we need to use [ and ] instead.
16761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16762  if test "x$has_forbidden_chars" != x; then
16763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16767      # Going to short mode and back again did indeed matter. Since short mode is
16768      # case insensitive, let's make it lowercase to improve readability.
16769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16770      # Now convert it back to Unix-style (cygpath)
16771      input_path=`$CYGPATH -u "$shortmode_path"`
16772      new_path="$input_path"
16773    fi
16774  fi
16775
16776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16777  if test "x$test_cygdrive_prefix" = x; then
16778    # As a simple fix, exclude /usr/bin since it's not a real path.
16779    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16781      # a path prefixed by /cygdrive for fixpath to work.
16782      new_path="$CYGWIN_ROOT_PATH$input_path"
16783    fi
16784  fi
16785
16786  # remove trailing .exe if any
16787  new_path="${new_path/%.exe/}"
16788
16789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790
16791  # First separate the path from the arguments. This will split at the first
16792  # space.
16793  complete="$FOUND_MAKE"
16794  path="${complete%% *}"
16795  tmp="$complete EOL"
16796  arguments="${tmp#* }"
16797
16798  # Input might be given as Windows format, start by converting to
16799  # unix format.
16800  new_path="$path"
16801
16802  windows_path="$new_path"
16803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16804    unix_path=`$CYGPATH -u "$windows_path"`
16805    new_path="$unix_path"
16806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16808    new_path="$unix_path"
16809  fi
16810
16811
16812  # Now try to locate executable using which
16813  new_path=`$WHICH "$new_path" 2> /dev/null`
16814
16815  if test "x$new_path" = x; then
16816    # Oops. Which didn't find the executable.
16817    # The splitting of arguments from the executable at a space might have been incorrect,
16818    # since paths with space are more likely in Windows. Give it another try with the whole
16819    # argument.
16820    path="$complete"
16821    arguments="EOL"
16822    new_path="$path"
16823
16824  windows_path="$new_path"
16825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16826    unix_path=`$CYGPATH -u "$windows_path"`
16827    new_path="$unix_path"
16828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16830    new_path="$unix_path"
16831  fi
16832
16833
16834    new_path=`$WHICH "$new_path" 2> /dev/null`
16835    # bat and cmd files are not always considered executable in MSYS causing which
16836    # to not find them
16837    if test "x$new_path" = x \
16838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16840      new_path="$path"
16841
16842  windows_path="$new_path"
16843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16844    unix_path=`$CYGPATH -u "$windows_path"`
16845    new_path="$unix_path"
16846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16848    new_path="$unix_path"
16849  fi
16850
16851    fi
16852
16853    if test "x$new_path" = x; then
16854      # It's still not found. Now this is an unrecoverable error.
16855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16857      has_space=`$ECHO "$complete" | $GREP " "`
16858      if test "x$has_space" != x; then
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16861      fi
16862      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16863    fi
16864  fi
16865
16866  # Now new_path has a complete unix path to the binary
16867  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16868    # Keep paths in /bin as-is, but remove trailing .exe if any
16869    new_path="${new_path/%.exe/}"
16870    # Do not save /bin paths to all_fixpath_prefixes!
16871  else
16872    # Not in mixed or Windows style, start by that.
16873    new_path=`cmd //c echo $new_path`
16874
16875  input_path="$new_path"
16876  # Check if we need to convert this using DOS-style short mode. If the path
16877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16878  # take no chances and rewrite it.
16879  # Note: m4 eats our [], so we need to use [ and ] instead.
16880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16881  if test "x$has_forbidden_chars" != x; then
16882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16884  fi
16885
16886    # Output is in $new_path
16887
16888  windows_path="$new_path"
16889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16890    unix_path=`$CYGPATH -u "$windows_path"`
16891    new_path="$unix_path"
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16894    new_path="$unix_path"
16895  fi
16896
16897    # remove trailing .exe if any
16898    new_path="${new_path/%.exe/}"
16899
16900    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16901    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16902  fi
16903
16904    else
16905      # We're on a unix platform. Hooray! :)
16906      # First separate the path from the arguments. This will split at the first
16907      # space.
16908      complete="$FOUND_MAKE"
16909      path="${complete%% *}"
16910      tmp="$complete EOL"
16911      arguments="${tmp#* }"
16912
16913      # Cannot rely on the command "which" here since it doesn't always work.
16914      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16915      if test -z "$is_absolute_path"; then
16916        # Path to executable is not absolute. Find it.
16917        IFS_save="$IFS"
16918        IFS=:
16919        for p in $PATH; do
16920          if test -f "$p/$path" && test -x "$p/$path"; then
16921            new_path="$p/$path"
16922            break
16923          fi
16924        done
16925        IFS="$IFS_save"
16926      else
16927        # This is an absolute path, we can use it without further modifications.
16928        new_path="$path"
16929      fi
16930
16931      if test "x$new_path" = x; then
16932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16934        has_space=`$ECHO "$complete" | $GREP " "`
16935        if test "x$has_space" != x; then
16936          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16937$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16938        fi
16939        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16940      fi
16941    fi
16942
16943    # Now join together the path and the arguments once again
16944    if test "x$arguments" != xEOL; then
16945      new_complete="$new_path ${arguments% *}"
16946    else
16947      new_complete="$new_path"
16948    fi
16949
16950    if test "x$complete" != "x$new_complete"; then
16951      FOUND_MAKE="$new_complete"
16952      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16953$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16954    fi
16955  fi
16956
16957        fi
16958      fi
16959    fi
16960  fi
16961
16962
16963    if test "x$FOUND_MAKE" = x; then
16964      for ac_prog in make
16965do
16966  # Extract the first word of "$ac_prog", so it can be a program name with args.
16967set dummy $ac_prog; ac_word=$2
16968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16969$as_echo_n "checking for $ac_word... " >&6; }
16970if ${ac_cv_path_CHECK_MAKE+:} false; then :
16971  $as_echo_n "(cached) " >&6
16972else
16973  case $CHECK_MAKE in
16974  [\\/]* | ?:[\\/]*)
16975  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16976  ;;
16977  *)
16978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16979for as_dir in $PATH
16980do
16981  IFS=$as_save_IFS
16982  test -z "$as_dir" && as_dir=.
16983    for ac_exec_ext in '' $ac_executable_extensions; do
16984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16985    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16987    break 2
16988  fi
16989done
16990  done
16991IFS=$as_save_IFS
16992
16993  ;;
16994esac
16995fi
16996CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16997if test -n "$CHECK_MAKE"; then
16998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16999$as_echo "$CHECK_MAKE" >&6; }
17000else
17001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17002$as_echo "no" >&6; }
17003fi
17004
17005
17006  test -n "$CHECK_MAKE" && break
17007done
17008
17009
17010  MAKE_CANDIDATE=""$CHECK_MAKE""
17011  DESCRIPTION="make in PATH"
17012
17013  # On Cygwin, we require a newer version of make than on other platforms
17014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17015    MAKE_VERSION_EXPR="-e 4\."
17016    MAKE_REQUIRED_VERSION="4.0"
17017   else
17018    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17019    MAKE_REQUIRED_VERSION="3.81"
17020  fi
17021
17022  if test "x$MAKE_CANDIDATE" != x; then
17023    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17024$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17025    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17026    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17027    if test "x$IS_GNU_MAKE" = x; then
17028      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17029$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17030    else
17031      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17032      if test "x$IS_MODERN_MAKE" = x; then
17033        { $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
17034$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;}
17035      else
17036        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17037          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17038            MAKE_EXPECTED_ENV='cygwin'
17039          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17040            MAKE_EXPECTED_ENV='msys'
17041          else
17042            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17043          fi
17044          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17045          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17046        else
17047          # Not relevant for non-Windows
17048          IS_MAKE_CORRECT_ENV=true
17049        fi
17050        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17051          { $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
17052$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;}
17053        else
17054          FOUND_MAKE=$MAKE_CANDIDATE
17055
17056  # Only process if variable expands to non-empty
17057
17058  if test "x$FOUND_MAKE" != x; then
17059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17060
17061  # First separate the path from the arguments. This will split at the first
17062  # space.
17063  complete="$FOUND_MAKE"
17064  path="${complete%% *}"
17065  tmp="$complete EOL"
17066  arguments="${tmp#* }"
17067
17068  # Input might be given as Windows format, start by converting to
17069  # unix format.
17070  new_path=`$CYGPATH -u "$path"`
17071
17072  # Now try to locate executable using which
17073  new_path=`$WHICH "$new_path" 2> /dev/null`
17074  # bat and cmd files are not always considered executable in cygwin causing which
17075  # to not find them
17076  if test "x$new_path" = x \
17077      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17078      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17079    new_path=`$CYGPATH -u "$path"`
17080  fi
17081  if test "x$new_path" = x; then
17082    # Oops. Which didn't find the executable.
17083    # The splitting of arguments from the executable at a space might have been incorrect,
17084    # since paths with space are more likely in Windows. Give it another try with the whole
17085    # argument.
17086    path="$complete"
17087    arguments="EOL"
17088    new_path=`$CYGPATH -u "$path"`
17089    new_path=`$WHICH "$new_path" 2> /dev/null`
17090    # bat and cmd files are not always considered executable in cygwin causing which
17091    # to not find them
17092    if test "x$new_path" = x \
17093        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17094        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17095      new_path=`$CYGPATH -u "$path"`
17096    fi
17097    if test "x$new_path" = x; then
17098      # It's still not found. Now this is an unrecoverable error.
17099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17100$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17101      has_space=`$ECHO "$complete" | $GREP " "`
17102      if test "x$has_space" != x; then
17103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17105      fi
17106      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17107    fi
17108  fi
17109
17110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17113  # "foo.exe" is OK but "foo" is an error.
17114  #
17115  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17116  # It is also a way to make sure we got the proper file name for the real test later on.
17117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17118  if test "x$test_shortpath" = x; then
17119    # Short path failed, file does not exist as specified.
17120    # Try adding .exe or .cmd
17121    if test -f "${new_path}.exe"; then
17122      input_to_shortpath="${new_path}.exe"
17123    elif test -f "${new_path}.cmd"; then
17124      input_to_shortpath="${new_path}.cmd"
17125    else
17126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17127$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17128      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17129$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17130      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17131    fi
17132  else
17133    input_to_shortpath="$new_path"
17134  fi
17135
17136  # Call helper function which possibly converts this using DOS-style short mode.
17137  # If so, the updated path is stored in $new_path.
17138  new_path="$input_to_shortpath"
17139
17140  input_path="$input_to_shortpath"
17141  # Check if we need to convert this using DOS-style short mode. If the path
17142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17143  # take no chances and rewrite it.
17144  # Note: m4 eats our [], so we need to use [ and ] instead.
17145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17146  if test "x$has_forbidden_chars" != x; then
17147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17151      # Going to short mode and back again did indeed matter. Since short mode is
17152      # case insensitive, let's make it lowercase to improve readability.
17153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17154      # Now convert it back to Unix-style (cygpath)
17155      input_path=`$CYGPATH -u "$shortmode_path"`
17156      new_path="$input_path"
17157    fi
17158  fi
17159
17160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17161  if test "x$test_cygdrive_prefix" = x; then
17162    # As a simple fix, exclude /usr/bin since it's not a real path.
17163    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17165      # a path prefixed by /cygdrive for fixpath to work.
17166      new_path="$CYGWIN_ROOT_PATH$input_path"
17167    fi
17168  fi
17169
17170  # remove trailing .exe if any
17171  new_path="${new_path/%.exe/}"
17172
17173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17174
17175  # First separate the path from the arguments. This will split at the first
17176  # space.
17177  complete="$FOUND_MAKE"
17178  path="${complete%% *}"
17179  tmp="$complete EOL"
17180  arguments="${tmp#* }"
17181
17182  # Input might be given as Windows format, start by converting to
17183  # unix format.
17184  new_path="$path"
17185
17186  windows_path="$new_path"
17187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17188    unix_path=`$CYGPATH -u "$windows_path"`
17189    new_path="$unix_path"
17190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17192    new_path="$unix_path"
17193  fi
17194
17195
17196  # Now try to locate executable using which
17197  new_path=`$WHICH "$new_path" 2> /dev/null`
17198
17199  if test "x$new_path" = x; then
17200    # Oops. Which didn't find the executable.
17201    # The splitting of arguments from the executable at a space might have been incorrect,
17202    # since paths with space are more likely in Windows. Give it another try with the whole
17203    # argument.
17204    path="$complete"
17205    arguments="EOL"
17206    new_path="$path"
17207
17208  windows_path="$new_path"
17209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17210    unix_path=`$CYGPATH -u "$windows_path"`
17211    new_path="$unix_path"
17212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17214    new_path="$unix_path"
17215  fi
17216
17217
17218    new_path=`$WHICH "$new_path" 2> /dev/null`
17219    # bat and cmd files are not always considered executable in MSYS causing which
17220    # to not find them
17221    if test "x$new_path" = x \
17222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17224      new_path="$path"
17225
17226  windows_path="$new_path"
17227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17228    unix_path=`$CYGPATH -u "$windows_path"`
17229    new_path="$unix_path"
17230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17232    new_path="$unix_path"
17233  fi
17234
17235    fi
17236
17237    if test "x$new_path" = x; then
17238      # It's still not found. Now this is an unrecoverable error.
17239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17240$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17241      has_space=`$ECHO "$complete" | $GREP " "`
17242      if test "x$has_space" != x; then
17243        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17244$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17245      fi
17246      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17247    fi
17248  fi
17249
17250  # Now new_path has a complete unix path to the binary
17251  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17252    # Keep paths in /bin as-is, but remove trailing .exe if any
17253    new_path="${new_path/%.exe/}"
17254    # Do not save /bin paths to all_fixpath_prefixes!
17255  else
17256    # Not in mixed or Windows style, start by that.
17257    new_path=`cmd //c echo $new_path`
17258
17259  input_path="$new_path"
17260  # Check if we need to convert this using DOS-style short mode. If the path
17261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17262  # take no chances and rewrite it.
17263  # Note: m4 eats our [], so we need to use [ and ] instead.
17264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17265  if test "x$has_forbidden_chars" != x; then
17266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17268  fi
17269
17270    # Output is in $new_path
17271
17272  windows_path="$new_path"
17273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17274    unix_path=`$CYGPATH -u "$windows_path"`
17275    new_path="$unix_path"
17276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17278    new_path="$unix_path"
17279  fi
17280
17281    # remove trailing .exe if any
17282    new_path="${new_path/%.exe/}"
17283
17284    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17285    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17286  fi
17287
17288    else
17289      # We're on a unix platform. Hooray! :)
17290      # First separate the path from the arguments. This will split at the first
17291      # space.
17292      complete="$FOUND_MAKE"
17293      path="${complete%% *}"
17294      tmp="$complete EOL"
17295      arguments="${tmp#* }"
17296
17297      # Cannot rely on the command "which" here since it doesn't always work.
17298      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17299      if test -z "$is_absolute_path"; then
17300        # Path to executable is not absolute. Find it.
17301        IFS_save="$IFS"
17302        IFS=:
17303        for p in $PATH; do
17304          if test -f "$p/$path" && test -x "$p/$path"; then
17305            new_path="$p/$path"
17306            break
17307          fi
17308        done
17309        IFS="$IFS_save"
17310      else
17311        # This is an absolute path, we can use it without further modifications.
17312        new_path="$path"
17313      fi
17314
17315      if test "x$new_path" = x; then
17316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17317$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17318        has_space=`$ECHO "$complete" | $GREP " "`
17319        if test "x$has_space" != x; then
17320          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17321$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17322        fi
17323        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17324      fi
17325    fi
17326
17327    # Now join together the path and the arguments once again
17328    if test "x$arguments" != xEOL; then
17329      new_complete="$new_path ${arguments% *}"
17330    else
17331      new_complete="$new_path"
17332    fi
17333
17334    if test "x$complete" != "x$new_complete"; then
17335      FOUND_MAKE="$new_complete"
17336      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17337$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17338    fi
17339  fi
17340
17341        fi
17342      fi
17343    fi
17344  fi
17345
17346    fi
17347
17348    if test "x$FOUND_MAKE" = x; then
17349      if test "x$TOOLCHAIN_PATH" != x; then
17350        # We have a toolchain path, check that as well before giving up.
17351        OLD_PATH=$PATH
17352        PATH=$TOOLCHAIN_PATH:$PATH
17353        for ac_prog in gmake
17354do
17355  # Extract the first word of "$ac_prog", so it can be a program name with args.
17356set dummy $ac_prog; ac_word=$2
17357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17358$as_echo_n "checking for $ac_word... " >&6; }
17359if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17360  $as_echo_n "(cached) " >&6
17361else
17362  case $CHECK_TOOLSDIR_GMAKE in
17363  [\\/]* | ?:[\\/]*)
17364  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17365  ;;
17366  *)
17367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17368for as_dir in $PATH
17369do
17370  IFS=$as_save_IFS
17371  test -z "$as_dir" && as_dir=.
17372    for ac_exec_ext in '' $ac_executable_extensions; do
17373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17374    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17376    break 2
17377  fi
17378done
17379  done
17380IFS=$as_save_IFS
17381
17382  ;;
17383esac
17384fi
17385CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17386if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17388$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17389else
17390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17391$as_echo "no" >&6; }
17392fi
17393
17394
17395  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17396done
17397
17398
17399  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17400  DESCRIPTION="gmake in tools-dir"
17401
17402  # On Cygwin, we require a newer version of make than on other platforms
17403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17404    MAKE_VERSION_EXPR="-e 4\."
17405    MAKE_REQUIRED_VERSION="4.0"
17406   else
17407    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17408    MAKE_REQUIRED_VERSION="3.81"
17409  fi
17410
17411  if test "x$MAKE_CANDIDATE" != x; then
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17413$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17414    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17415    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17416    if test "x$IS_GNU_MAKE" = x; then
17417      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17418$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17419    else
17420      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17421      if test "x$IS_MODERN_MAKE" = x; then
17422        { $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
17423$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;}
17424      else
17425        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17426          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17427            MAKE_EXPECTED_ENV='cygwin'
17428          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17429            MAKE_EXPECTED_ENV='msys'
17430          else
17431            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17432          fi
17433          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17434          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17435        else
17436          # Not relevant for non-Windows
17437          IS_MAKE_CORRECT_ENV=true
17438        fi
17439        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17440          { $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
17441$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;}
17442        else
17443          FOUND_MAKE=$MAKE_CANDIDATE
17444
17445  # Only process if variable expands to non-empty
17446
17447  if test "x$FOUND_MAKE" != x; then
17448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17449
17450  # First separate the path from the arguments. This will split at the first
17451  # space.
17452  complete="$FOUND_MAKE"
17453  path="${complete%% *}"
17454  tmp="$complete EOL"
17455  arguments="${tmp#* }"
17456
17457  # Input might be given as Windows format, start by converting to
17458  # unix format.
17459  new_path=`$CYGPATH -u "$path"`
17460
17461  # Now try to locate executable using which
17462  new_path=`$WHICH "$new_path" 2> /dev/null`
17463  # bat and cmd files are not always considered executable in cygwin causing which
17464  # to not find them
17465  if test "x$new_path" = x \
17466      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17467      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17468    new_path=`$CYGPATH -u "$path"`
17469  fi
17470  if test "x$new_path" = x; then
17471    # Oops. Which didn't find the executable.
17472    # The splitting of arguments from the executable at a space might have been incorrect,
17473    # since paths with space are more likely in Windows. Give it another try with the whole
17474    # argument.
17475    path="$complete"
17476    arguments="EOL"
17477    new_path=`$CYGPATH -u "$path"`
17478    new_path=`$WHICH "$new_path" 2> /dev/null`
17479    # bat and cmd files are not always considered executable in cygwin causing which
17480    # to not find them
17481    if test "x$new_path" = x \
17482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17484      new_path=`$CYGPATH -u "$path"`
17485    fi
17486    if test "x$new_path" = x; then
17487      # It's still not found. Now this is an unrecoverable error.
17488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17490      has_space=`$ECHO "$complete" | $GREP " "`
17491      if test "x$has_space" != x; then
17492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17494      fi
17495      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17496    fi
17497  fi
17498
17499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17502  # "foo.exe" is OK but "foo" is an error.
17503  #
17504  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17505  # It is also a way to make sure we got the proper file name for the real test later on.
17506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17507  if test "x$test_shortpath" = x; then
17508    # Short path failed, file does not exist as specified.
17509    # Try adding .exe or .cmd
17510    if test -f "${new_path}.exe"; then
17511      input_to_shortpath="${new_path}.exe"
17512    elif test -f "${new_path}.cmd"; then
17513      input_to_shortpath="${new_path}.cmd"
17514    else
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17519      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17520    fi
17521  else
17522    input_to_shortpath="$new_path"
17523  fi
17524
17525  # Call helper function which possibly converts this using DOS-style short mode.
17526  # If so, the updated path is stored in $new_path.
17527  new_path="$input_to_shortpath"
17528
17529  input_path="$input_to_shortpath"
17530  # Check if we need to convert this using DOS-style short mode. If the path
17531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17532  # take no chances and rewrite it.
17533  # Note: m4 eats our [], so we need to use [ and ] instead.
17534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17535  if test "x$has_forbidden_chars" != x; then
17536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17540      # Going to short mode and back again did indeed matter. Since short mode is
17541      # case insensitive, let's make it lowercase to improve readability.
17542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17543      # Now convert it back to Unix-style (cygpath)
17544      input_path=`$CYGPATH -u "$shortmode_path"`
17545      new_path="$input_path"
17546    fi
17547  fi
17548
17549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17550  if test "x$test_cygdrive_prefix" = x; then
17551    # As a simple fix, exclude /usr/bin since it's not a real path.
17552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17554      # a path prefixed by /cygdrive for fixpath to work.
17555      new_path="$CYGWIN_ROOT_PATH$input_path"
17556    fi
17557  fi
17558
17559  # remove trailing .exe if any
17560  new_path="${new_path/%.exe/}"
17561
17562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17563
17564  # First separate the path from the arguments. This will split at the first
17565  # space.
17566  complete="$FOUND_MAKE"
17567  path="${complete%% *}"
17568  tmp="$complete EOL"
17569  arguments="${tmp#* }"
17570
17571  # Input might be given as Windows format, start by converting to
17572  # unix format.
17573  new_path="$path"
17574
17575  windows_path="$new_path"
17576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17577    unix_path=`$CYGPATH -u "$windows_path"`
17578    new_path="$unix_path"
17579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17581    new_path="$unix_path"
17582  fi
17583
17584
17585  # Now try to locate executable using which
17586  new_path=`$WHICH "$new_path" 2> /dev/null`
17587
17588  if test "x$new_path" = x; then
17589    # Oops. Which didn't find the executable.
17590    # The splitting of arguments from the executable at a space might have been incorrect,
17591    # since paths with space are more likely in Windows. Give it another try with the whole
17592    # argument.
17593    path="$complete"
17594    arguments="EOL"
17595    new_path="$path"
17596
17597  windows_path="$new_path"
17598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17599    unix_path=`$CYGPATH -u "$windows_path"`
17600    new_path="$unix_path"
17601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17603    new_path="$unix_path"
17604  fi
17605
17606
17607    new_path=`$WHICH "$new_path" 2> /dev/null`
17608    # bat and cmd files are not always considered executable in MSYS causing which
17609    # to not find them
17610    if test "x$new_path" = x \
17611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17613      new_path="$path"
17614
17615  windows_path="$new_path"
17616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17617    unix_path=`$CYGPATH -u "$windows_path"`
17618    new_path="$unix_path"
17619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17621    new_path="$unix_path"
17622  fi
17623
17624    fi
17625
17626    if test "x$new_path" = x; then
17627      # It's still not found. Now this is an unrecoverable error.
17628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17630      has_space=`$ECHO "$complete" | $GREP " "`
17631      if test "x$has_space" != x; then
17632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17634      fi
17635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17636    fi
17637  fi
17638
17639  # Now new_path has a complete unix path to the binary
17640  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17641    # Keep paths in /bin as-is, but remove trailing .exe if any
17642    new_path="${new_path/%.exe/}"
17643    # Do not save /bin paths to all_fixpath_prefixes!
17644  else
17645    # Not in mixed or Windows style, start by that.
17646    new_path=`cmd //c echo $new_path`
17647
17648  input_path="$new_path"
17649  # Check if we need to convert this using DOS-style short mode. If the path
17650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17651  # take no chances and rewrite it.
17652  # Note: m4 eats our [], so we need to use [ and ] instead.
17653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17654  if test "x$has_forbidden_chars" != x; then
17655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17657  fi
17658
17659    # Output is in $new_path
17660
17661  windows_path="$new_path"
17662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17663    unix_path=`$CYGPATH -u "$windows_path"`
17664    new_path="$unix_path"
17665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17667    new_path="$unix_path"
17668  fi
17669
17670    # remove trailing .exe if any
17671    new_path="${new_path/%.exe/}"
17672
17673    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17674    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17675  fi
17676
17677    else
17678      # We're on a unix platform. Hooray! :)
17679      # First separate the path from the arguments. This will split at the first
17680      # space.
17681      complete="$FOUND_MAKE"
17682      path="${complete%% *}"
17683      tmp="$complete EOL"
17684      arguments="${tmp#* }"
17685
17686      # Cannot rely on the command "which" here since it doesn't always work.
17687      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17688      if test -z "$is_absolute_path"; then
17689        # Path to executable is not absolute. Find it.
17690        IFS_save="$IFS"
17691        IFS=:
17692        for p in $PATH; do
17693          if test -f "$p/$path" && test -x "$p/$path"; then
17694            new_path="$p/$path"
17695            break
17696          fi
17697        done
17698        IFS="$IFS_save"
17699      else
17700        # This is an absolute path, we can use it without further modifications.
17701        new_path="$path"
17702      fi
17703
17704      if test "x$new_path" = x; then
17705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17706$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17707        has_space=`$ECHO "$complete" | $GREP " "`
17708        if test "x$has_space" != x; then
17709          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17710$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17711        fi
17712        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17713      fi
17714    fi
17715
17716    # Now join together the path and the arguments once again
17717    if test "x$arguments" != xEOL; then
17718      new_complete="$new_path ${arguments% *}"
17719    else
17720      new_complete="$new_path"
17721    fi
17722
17723    if test "x$complete" != "x$new_complete"; then
17724      FOUND_MAKE="$new_complete"
17725      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17726$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17727    fi
17728  fi
17729
17730        fi
17731      fi
17732    fi
17733  fi
17734
17735        if test "x$FOUND_MAKE" = x; then
17736          for ac_prog in make
17737do
17738  # Extract the first word of "$ac_prog", so it can be a program name with args.
17739set dummy $ac_prog; ac_word=$2
17740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17741$as_echo_n "checking for $ac_word... " >&6; }
17742if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17743  $as_echo_n "(cached) " >&6
17744else
17745  case $CHECK_TOOLSDIR_MAKE in
17746  [\\/]* | ?:[\\/]*)
17747  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17748  ;;
17749  *)
17750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17751for as_dir in $PATH
17752do
17753  IFS=$as_save_IFS
17754  test -z "$as_dir" && as_dir=.
17755    for ac_exec_ext in '' $ac_executable_extensions; do
17756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17757    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17759    break 2
17760  fi
17761done
17762  done
17763IFS=$as_save_IFS
17764
17765  ;;
17766esac
17767fi
17768CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17769if test -n "$CHECK_TOOLSDIR_MAKE"; then
17770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17771$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17772else
17773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17774$as_echo "no" >&6; }
17775fi
17776
17777
17778  test -n "$CHECK_TOOLSDIR_MAKE" && break
17779done
17780
17781
17782  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17783  DESCRIPTION="make in tools-dir"
17784
17785  # On Cygwin, we require a newer version of make than on other platforms
17786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17787    MAKE_VERSION_EXPR="-e 4\."
17788    MAKE_REQUIRED_VERSION="4.0"
17789   else
17790    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17791    MAKE_REQUIRED_VERSION="3.81"
17792  fi
17793
17794  if test "x$MAKE_CANDIDATE" != x; then
17795    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17796$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17797    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17798    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17799    if test "x$IS_GNU_MAKE" = x; then
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17801$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17802    else
17803      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17804      if test "x$IS_MODERN_MAKE" = x; then
17805        { $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
17806$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;}
17807      else
17808        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17809          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17810            MAKE_EXPECTED_ENV='cygwin'
17811          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17812            MAKE_EXPECTED_ENV='msys'
17813          else
17814            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17815          fi
17816          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17817          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17818        else
17819          # Not relevant for non-Windows
17820          IS_MAKE_CORRECT_ENV=true
17821        fi
17822        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17823          { $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
17824$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;}
17825        else
17826          FOUND_MAKE=$MAKE_CANDIDATE
17827
17828  # Only process if variable expands to non-empty
17829
17830  if test "x$FOUND_MAKE" != x; then
17831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17832
17833  # First separate the path from the arguments. This will split at the first
17834  # space.
17835  complete="$FOUND_MAKE"
17836  path="${complete%% *}"
17837  tmp="$complete EOL"
17838  arguments="${tmp#* }"
17839
17840  # Input might be given as Windows format, start by converting to
17841  # unix format.
17842  new_path=`$CYGPATH -u "$path"`
17843
17844  # Now try to locate executable using which
17845  new_path=`$WHICH "$new_path" 2> /dev/null`
17846  # bat and cmd files are not always considered executable in cygwin causing which
17847  # to not find them
17848  if test "x$new_path" = x \
17849      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17850      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17851    new_path=`$CYGPATH -u "$path"`
17852  fi
17853  if test "x$new_path" = x; then
17854    # Oops. Which didn't find the executable.
17855    # The splitting of arguments from the executable at a space might have been incorrect,
17856    # since paths with space are more likely in Windows. Give it another try with the whole
17857    # argument.
17858    path="$complete"
17859    arguments="EOL"
17860    new_path=`$CYGPATH -u "$path"`
17861    new_path=`$WHICH "$new_path" 2> /dev/null`
17862    # bat and cmd files are not always considered executable in cygwin causing which
17863    # to not find them
17864    if test "x$new_path" = x \
17865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17867      new_path=`$CYGPATH -u "$path"`
17868    fi
17869    if test "x$new_path" = x; then
17870      # It's still not found. Now this is an unrecoverable error.
17871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17872$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17873      has_space=`$ECHO "$complete" | $GREP " "`
17874      if test "x$has_space" != x; then
17875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17877      fi
17878      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17879    fi
17880  fi
17881
17882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17885  # "foo.exe" is OK but "foo" is an error.
17886  #
17887  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17888  # It is also a way to make sure we got the proper file name for the real test later on.
17889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17890  if test "x$test_shortpath" = x; then
17891    # Short path failed, file does not exist as specified.
17892    # Try adding .exe or .cmd
17893    if test -f "${new_path}.exe"; then
17894      input_to_shortpath="${new_path}.exe"
17895    elif test -f "${new_path}.cmd"; then
17896      input_to_shortpath="${new_path}.cmd"
17897    else
17898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17899$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17902      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17903    fi
17904  else
17905    input_to_shortpath="$new_path"
17906  fi
17907
17908  # Call helper function which possibly converts this using DOS-style short mode.
17909  # If so, the updated path is stored in $new_path.
17910  new_path="$input_to_shortpath"
17911
17912  input_path="$input_to_shortpath"
17913  # Check if we need to convert this using DOS-style short mode. If the path
17914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17915  # take no chances and rewrite it.
17916  # Note: m4 eats our [], so we need to use [ and ] instead.
17917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17918  if test "x$has_forbidden_chars" != x; then
17919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17923      # Going to short mode and back again did indeed matter. Since short mode is
17924      # case insensitive, let's make it lowercase to improve readability.
17925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17926      # Now convert it back to Unix-style (cygpath)
17927      input_path=`$CYGPATH -u "$shortmode_path"`
17928      new_path="$input_path"
17929    fi
17930  fi
17931
17932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17933  if test "x$test_cygdrive_prefix" = x; then
17934    # As a simple fix, exclude /usr/bin since it's not a real path.
17935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17937      # a path prefixed by /cygdrive for fixpath to work.
17938      new_path="$CYGWIN_ROOT_PATH$input_path"
17939    fi
17940  fi
17941
17942  # remove trailing .exe if any
17943  new_path="${new_path/%.exe/}"
17944
17945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17946
17947  # First separate the path from the arguments. This will split at the first
17948  # space.
17949  complete="$FOUND_MAKE"
17950  path="${complete%% *}"
17951  tmp="$complete EOL"
17952  arguments="${tmp#* }"
17953
17954  # Input might be given as Windows format, start by converting to
17955  # unix format.
17956  new_path="$path"
17957
17958  windows_path="$new_path"
17959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17960    unix_path=`$CYGPATH -u "$windows_path"`
17961    new_path="$unix_path"
17962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17964    new_path="$unix_path"
17965  fi
17966
17967
17968  # Now try to locate executable using which
17969  new_path=`$WHICH "$new_path" 2> /dev/null`
17970
17971  if test "x$new_path" = x; then
17972    # Oops. Which didn't find the executable.
17973    # The splitting of arguments from the executable at a space might have been incorrect,
17974    # since paths with space are more likely in Windows. Give it another try with the whole
17975    # argument.
17976    path="$complete"
17977    arguments="EOL"
17978    new_path="$path"
17979
17980  windows_path="$new_path"
17981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17982    unix_path=`$CYGPATH -u "$windows_path"`
17983    new_path="$unix_path"
17984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17986    new_path="$unix_path"
17987  fi
17988
17989
17990    new_path=`$WHICH "$new_path" 2> /dev/null`
17991    # bat and cmd files are not always considered executable in MSYS causing which
17992    # to not find them
17993    if test "x$new_path" = x \
17994        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17995        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17996      new_path="$path"
17997
17998  windows_path="$new_path"
17999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18000    unix_path=`$CYGPATH -u "$windows_path"`
18001    new_path="$unix_path"
18002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18004    new_path="$unix_path"
18005  fi
18006
18007    fi
18008
18009    if test "x$new_path" = x; then
18010      # It's still not found. Now this is an unrecoverable error.
18011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18012$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18013      has_space=`$ECHO "$complete" | $GREP " "`
18014      if test "x$has_space" != x; then
18015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18017      fi
18018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18019    fi
18020  fi
18021
18022  # Now new_path has a complete unix path to the binary
18023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18024    # Keep paths in /bin as-is, but remove trailing .exe if any
18025    new_path="${new_path/%.exe/}"
18026    # Do not save /bin paths to all_fixpath_prefixes!
18027  else
18028    # Not in mixed or Windows style, start by that.
18029    new_path=`cmd //c echo $new_path`
18030
18031  input_path="$new_path"
18032  # Check if we need to convert this using DOS-style short mode. If the path
18033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18034  # take no chances and rewrite it.
18035  # Note: m4 eats our [], so we need to use [ and ] instead.
18036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18037  if test "x$has_forbidden_chars" != x; then
18038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18040  fi
18041
18042    # Output is in $new_path
18043
18044  windows_path="$new_path"
18045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18046    unix_path=`$CYGPATH -u "$windows_path"`
18047    new_path="$unix_path"
18048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18050    new_path="$unix_path"
18051  fi
18052
18053    # remove trailing .exe if any
18054    new_path="${new_path/%.exe/}"
18055
18056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18058  fi
18059
18060    else
18061      # We're on a unix platform. Hooray! :)
18062      # First separate the path from the arguments. This will split at the first
18063      # space.
18064      complete="$FOUND_MAKE"
18065      path="${complete%% *}"
18066      tmp="$complete EOL"
18067      arguments="${tmp#* }"
18068
18069      # Cannot rely on the command "which" here since it doesn't always work.
18070      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18071      if test -z "$is_absolute_path"; then
18072        # Path to executable is not absolute. Find it.
18073        IFS_save="$IFS"
18074        IFS=:
18075        for p in $PATH; do
18076          if test -f "$p/$path" && test -x "$p/$path"; then
18077            new_path="$p/$path"
18078            break
18079          fi
18080        done
18081        IFS="$IFS_save"
18082      else
18083        # This is an absolute path, we can use it without further modifications.
18084        new_path="$path"
18085      fi
18086
18087      if test "x$new_path" = x; then
18088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18089$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18090        has_space=`$ECHO "$complete" | $GREP " "`
18091        if test "x$has_space" != x; then
18092          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18094        fi
18095        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18096      fi
18097    fi
18098
18099    # Now join together the path and the arguments once again
18100    if test "x$arguments" != xEOL; then
18101      new_complete="$new_path ${arguments% *}"
18102    else
18103      new_complete="$new_path"
18104    fi
18105
18106    if test "x$complete" != "x$new_complete"; then
18107      FOUND_MAKE="$new_complete"
18108      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18109$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18110    fi
18111  fi
18112
18113        fi
18114      fi
18115    fi
18116  fi
18117
18118        fi
18119        PATH=$OLD_PATH
18120      fi
18121    fi
18122
18123    if test "x$FOUND_MAKE" = x; then
18124      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
18125    fi
18126
18127  else
18128    # The variable is set, but is it from the command line or the environment?
18129
18130    # Try to remove the string !MAKE! from our list.
18131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18133      # If it failed, the variable was not from the command line. Ignore it,
18134      # but warn the user (except for BASH, which is always set by the calling BASH).
18135      if test "xMAKE" != xBASH; then
18136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18137$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18138      fi
18139      # Try to locate tool using the code snippet
18140
18141    # Try our hardest to locate a correct version of GNU make
18142    for ac_prog in gmake
18143do
18144  # Extract the first word of "$ac_prog", so it can be a program name with args.
18145set dummy $ac_prog; ac_word=$2
18146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18147$as_echo_n "checking for $ac_word... " >&6; }
18148if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18149  $as_echo_n "(cached) " >&6
18150else
18151  case $CHECK_GMAKE in
18152  [\\/]* | ?:[\\/]*)
18153  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18154  ;;
18155  *)
18156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18157for as_dir in $PATH
18158do
18159  IFS=$as_save_IFS
18160  test -z "$as_dir" && as_dir=.
18161    for ac_exec_ext in '' $ac_executable_extensions; do
18162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18163    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18165    break 2
18166  fi
18167done
18168  done
18169IFS=$as_save_IFS
18170
18171  ;;
18172esac
18173fi
18174CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18175if test -n "$CHECK_GMAKE"; then
18176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18177$as_echo "$CHECK_GMAKE" >&6; }
18178else
18179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18180$as_echo "no" >&6; }
18181fi
18182
18183
18184  test -n "$CHECK_GMAKE" && break
18185done
18186
18187
18188  MAKE_CANDIDATE=""$CHECK_GMAKE""
18189  DESCRIPTION="gmake in PATH"
18190
18191  # On Cygwin, we require a newer version of make than on other platforms
18192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18193    MAKE_VERSION_EXPR="-e 4\."
18194    MAKE_REQUIRED_VERSION="4.0"
18195   else
18196    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18197    MAKE_REQUIRED_VERSION="3.81"
18198  fi
18199
18200  if test "x$MAKE_CANDIDATE" != x; then
18201    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18202$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18203    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18204    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18205    if test "x$IS_GNU_MAKE" = x; then
18206      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18207$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18208    else
18209      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18210      if test "x$IS_MODERN_MAKE" = x; then
18211        { $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
18212$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;}
18213      else
18214        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18215          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18216            MAKE_EXPECTED_ENV='cygwin'
18217          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18218            MAKE_EXPECTED_ENV='msys'
18219          else
18220            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18221          fi
18222          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18223          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18224        else
18225          # Not relevant for non-Windows
18226          IS_MAKE_CORRECT_ENV=true
18227        fi
18228        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18229          { $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
18230$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;}
18231        else
18232          FOUND_MAKE=$MAKE_CANDIDATE
18233
18234  # Only process if variable expands to non-empty
18235
18236  if test "x$FOUND_MAKE" != x; then
18237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18238
18239  # First separate the path from the arguments. This will split at the first
18240  # space.
18241  complete="$FOUND_MAKE"
18242  path="${complete%% *}"
18243  tmp="$complete EOL"
18244  arguments="${tmp#* }"
18245
18246  # Input might be given as Windows format, start by converting to
18247  # unix format.
18248  new_path=`$CYGPATH -u "$path"`
18249
18250  # Now try to locate executable using which
18251  new_path=`$WHICH "$new_path" 2> /dev/null`
18252  # bat and cmd files are not always considered executable in cygwin causing which
18253  # to not find them
18254  if test "x$new_path" = x \
18255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18257    new_path=`$CYGPATH -u "$path"`
18258  fi
18259  if test "x$new_path" = x; then
18260    # Oops. Which didn't find the executable.
18261    # The splitting of arguments from the executable at a space might have been incorrect,
18262    # since paths with space are more likely in Windows. Give it another try with the whole
18263    # argument.
18264    path="$complete"
18265    arguments="EOL"
18266    new_path=`$CYGPATH -u "$path"`
18267    new_path=`$WHICH "$new_path" 2> /dev/null`
18268    # bat and cmd files are not always considered executable in cygwin causing which
18269    # to not find them
18270    if test "x$new_path" = x \
18271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18273      new_path=`$CYGPATH -u "$path"`
18274    fi
18275    if test "x$new_path" = x; then
18276      # It's still not found. Now this is an unrecoverable error.
18277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18279      has_space=`$ECHO "$complete" | $GREP " "`
18280      if test "x$has_space" != x; then
18281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18283      fi
18284      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18285    fi
18286  fi
18287
18288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18291  # "foo.exe" is OK but "foo" is an error.
18292  #
18293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18294  # It is also a way to make sure we got the proper file name for the real test later on.
18295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18296  if test "x$test_shortpath" = x; then
18297    # Short path failed, file does not exist as specified.
18298    # Try adding .exe or .cmd
18299    if test -f "${new_path}.exe"; then
18300      input_to_shortpath="${new_path}.exe"
18301    elif test -f "${new_path}.cmd"; then
18302      input_to_shortpath="${new_path}.cmd"
18303    else
18304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18305$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18308      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18309    fi
18310  else
18311    input_to_shortpath="$new_path"
18312  fi
18313
18314  # Call helper function which possibly converts this using DOS-style short mode.
18315  # If so, the updated path is stored in $new_path.
18316  new_path="$input_to_shortpath"
18317
18318  input_path="$input_to_shortpath"
18319  # Check if we need to convert this using DOS-style short mode. If the path
18320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18321  # take no chances and rewrite it.
18322  # Note: m4 eats our [], so we need to use [ and ] instead.
18323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18324  if test "x$has_forbidden_chars" != x; then
18325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18329      # Going to short mode and back again did indeed matter. Since short mode is
18330      # case insensitive, let's make it lowercase to improve readability.
18331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18332      # Now convert it back to Unix-style (cygpath)
18333      input_path=`$CYGPATH -u "$shortmode_path"`
18334      new_path="$input_path"
18335    fi
18336  fi
18337
18338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18339  if test "x$test_cygdrive_prefix" = x; then
18340    # As a simple fix, exclude /usr/bin since it's not a real path.
18341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18343      # a path prefixed by /cygdrive for fixpath to work.
18344      new_path="$CYGWIN_ROOT_PATH$input_path"
18345    fi
18346  fi
18347
18348  # remove trailing .exe if any
18349  new_path="${new_path/%.exe/}"
18350
18351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18352
18353  # First separate the path from the arguments. This will split at the first
18354  # space.
18355  complete="$FOUND_MAKE"
18356  path="${complete%% *}"
18357  tmp="$complete EOL"
18358  arguments="${tmp#* }"
18359
18360  # Input might be given as Windows format, start by converting to
18361  # unix format.
18362  new_path="$path"
18363
18364  windows_path="$new_path"
18365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18366    unix_path=`$CYGPATH -u "$windows_path"`
18367    new_path="$unix_path"
18368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18370    new_path="$unix_path"
18371  fi
18372
18373
18374  # Now try to locate executable using which
18375  new_path=`$WHICH "$new_path" 2> /dev/null`
18376
18377  if test "x$new_path" = x; then
18378    # Oops. Which didn't find the executable.
18379    # The splitting of arguments from the executable at a space might have been incorrect,
18380    # since paths with space are more likely in Windows. Give it another try with the whole
18381    # argument.
18382    path="$complete"
18383    arguments="EOL"
18384    new_path="$path"
18385
18386  windows_path="$new_path"
18387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18388    unix_path=`$CYGPATH -u "$windows_path"`
18389    new_path="$unix_path"
18390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18392    new_path="$unix_path"
18393  fi
18394
18395
18396    new_path=`$WHICH "$new_path" 2> /dev/null`
18397    # bat and cmd files are not always considered executable in MSYS causing which
18398    # to not find them
18399    if test "x$new_path" = x \
18400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18402      new_path="$path"
18403
18404  windows_path="$new_path"
18405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18406    unix_path=`$CYGPATH -u "$windows_path"`
18407    new_path="$unix_path"
18408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18410    new_path="$unix_path"
18411  fi
18412
18413    fi
18414
18415    if test "x$new_path" = x; then
18416      # It's still not found. Now this is an unrecoverable error.
18417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18419      has_space=`$ECHO "$complete" | $GREP " "`
18420      if test "x$has_space" != x; then
18421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18423      fi
18424      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18425    fi
18426  fi
18427
18428  # Now new_path has a complete unix path to the binary
18429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18430    # Keep paths in /bin as-is, but remove trailing .exe if any
18431    new_path="${new_path/%.exe/}"
18432    # Do not save /bin paths to all_fixpath_prefixes!
18433  else
18434    # Not in mixed or Windows style, start by that.
18435    new_path=`cmd //c echo $new_path`
18436
18437  input_path="$new_path"
18438  # Check if we need to convert this using DOS-style short mode. If the path
18439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18440  # take no chances and rewrite it.
18441  # Note: m4 eats our [], so we need to use [ and ] instead.
18442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18443  if test "x$has_forbidden_chars" != x; then
18444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18446  fi
18447
18448    # Output is in $new_path
18449
18450  windows_path="$new_path"
18451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18452    unix_path=`$CYGPATH -u "$windows_path"`
18453    new_path="$unix_path"
18454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18456    new_path="$unix_path"
18457  fi
18458
18459    # remove trailing .exe if any
18460    new_path="${new_path/%.exe/}"
18461
18462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18464  fi
18465
18466    else
18467      # We're on a unix platform. Hooray! :)
18468      # First separate the path from the arguments. This will split at the first
18469      # space.
18470      complete="$FOUND_MAKE"
18471      path="${complete%% *}"
18472      tmp="$complete EOL"
18473      arguments="${tmp#* }"
18474
18475      # Cannot rely on the command "which" here since it doesn't always work.
18476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18477      if test -z "$is_absolute_path"; then
18478        # Path to executable is not absolute. Find it.
18479        IFS_save="$IFS"
18480        IFS=:
18481        for p in $PATH; do
18482          if test -f "$p/$path" && test -x "$p/$path"; then
18483            new_path="$p/$path"
18484            break
18485          fi
18486        done
18487        IFS="$IFS_save"
18488      else
18489        # This is an absolute path, we can use it without further modifications.
18490        new_path="$path"
18491      fi
18492
18493      if test "x$new_path" = x; then
18494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18495$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18496        has_space=`$ECHO "$complete" | $GREP " "`
18497        if test "x$has_space" != x; then
18498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18500        fi
18501        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18502      fi
18503    fi
18504
18505    # Now join together the path and the arguments once again
18506    if test "x$arguments" != xEOL; then
18507      new_complete="$new_path ${arguments% *}"
18508    else
18509      new_complete="$new_path"
18510    fi
18511
18512    if test "x$complete" != "x$new_complete"; then
18513      FOUND_MAKE="$new_complete"
18514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18515$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18516    fi
18517  fi
18518
18519        fi
18520      fi
18521    fi
18522  fi
18523
18524
18525    if test "x$FOUND_MAKE" = x; then
18526      for ac_prog in make
18527do
18528  # Extract the first word of "$ac_prog", so it can be a program name with args.
18529set dummy $ac_prog; ac_word=$2
18530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18531$as_echo_n "checking for $ac_word... " >&6; }
18532if ${ac_cv_path_CHECK_MAKE+:} false; then :
18533  $as_echo_n "(cached) " >&6
18534else
18535  case $CHECK_MAKE in
18536  [\\/]* | ?:[\\/]*)
18537  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18538  ;;
18539  *)
18540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18541for as_dir in $PATH
18542do
18543  IFS=$as_save_IFS
18544  test -z "$as_dir" && as_dir=.
18545    for ac_exec_ext in '' $ac_executable_extensions; do
18546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18547    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18549    break 2
18550  fi
18551done
18552  done
18553IFS=$as_save_IFS
18554
18555  ;;
18556esac
18557fi
18558CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18559if test -n "$CHECK_MAKE"; then
18560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18561$as_echo "$CHECK_MAKE" >&6; }
18562else
18563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18564$as_echo "no" >&6; }
18565fi
18566
18567
18568  test -n "$CHECK_MAKE" && break
18569done
18570
18571
18572  MAKE_CANDIDATE=""$CHECK_MAKE""
18573  DESCRIPTION="make in PATH"
18574
18575  # On Cygwin, we require a newer version of make than on other platforms
18576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18577    MAKE_VERSION_EXPR="-e 4\."
18578    MAKE_REQUIRED_VERSION="4.0"
18579   else
18580    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18581    MAKE_REQUIRED_VERSION="3.81"
18582  fi
18583
18584  if test "x$MAKE_CANDIDATE" != x; then
18585    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18586$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18587    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18588    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18589    if test "x$IS_GNU_MAKE" = x; then
18590      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18591$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18592    else
18593      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18594      if test "x$IS_MODERN_MAKE" = x; then
18595        { $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
18596$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;}
18597      else
18598        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18599          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18600            MAKE_EXPECTED_ENV='cygwin'
18601          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18602            MAKE_EXPECTED_ENV='msys'
18603          else
18604            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18605          fi
18606          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18607          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18608        else
18609          # Not relevant for non-Windows
18610          IS_MAKE_CORRECT_ENV=true
18611        fi
18612        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18613          { $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
18614$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;}
18615        else
18616          FOUND_MAKE=$MAKE_CANDIDATE
18617
18618  # Only process if variable expands to non-empty
18619
18620  if test "x$FOUND_MAKE" != x; then
18621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622
18623  # First separate the path from the arguments. This will split at the first
18624  # space.
18625  complete="$FOUND_MAKE"
18626  path="${complete%% *}"
18627  tmp="$complete EOL"
18628  arguments="${tmp#* }"
18629
18630  # Input might be given as Windows format, start by converting to
18631  # unix format.
18632  new_path=`$CYGPATH -u "$path"`
18633
18634  # Now try to locate executable using which
18635  new_path=`$WHICH "$new_path" 2> /dev/null`
18636  # bat and cmd files are not always considered executable in cygwin causing which
18637  # to not find them
18638  if test "x$new_path" = x \
18639      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18640      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18641    new_path=`$CYGPATH -u "$path"`
18642  fi
18643  if test "x$new_path" = x; then
18644    # Oops. Which didn't find the executable.
18645    # The splitting of arguments from the executable at a space might have been incorrect,
18646    # since paths with space are more likely in Windows. Give it another try with the whole
18647    # argument.
18648    path="$complete"
18649    arguments="EOL"
18650    new_path=`$CYGPATH -u "$path"`
18651    new_path=`$WHICH "$new_path" 2> /dev/null`
18652    # bat and cmd files are not always considered executable in cygwin causing which
18653    # to not find them
18654    if test "x$new_path" = x \
18655        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18656        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18657      new_path=`$CYGPATH -u "$path"`
18658    fi
18659    if test "x$new_path" = x; then
18660      # It's still not found. Now this is an unrecoverable error.
18661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18662$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18663      has_space=`$ECHO "$complete" | $GREP " "`
18664      if test "x$has_space" != x; then
18665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18667      fi
18668      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18669    fi
18670  fi
18671
18672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18675  # "foo.exe" is OK but "foo" is an error.
18676  #
18677  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18678  # It is also a way to make sure we got the proper file name for the real test later on.
18679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18680  if test "x$test_shortpath" = x; then
18681    # Short path failed, file does not exist as specified.
18682    # Try adding .exe or .cmd
18683    if test -f "${new_path}.exe"; then
18684      input_to_shortpath="${new_path}.exe"
18685    elif test -f "${new_path}.cmd"; then
18686      input_to_shortpath="${new_path}.cmd"
18687    else
18688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18689$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18690      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18691$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18692      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18693    fi
18694  else
18695    input_to_shortpath="$new_path"
18696  fi
18697
18698  # Call helper function which possibly converts this using DOS-style short mode.
18699  # If so, the updated path is stored in $new_path.
18700  new_path="$input_to_shortpath"
18701
18702  input_path="$input_to_shortpath"
18703  # Check if we need to convert this using DOS-style short mode. If the path
18704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18705  # take no chances and rewrite it.
18706  # Note: m4 eats our [], so we need to use [ and ] instead.
18707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18708  if test "x$has_forbidden_chars" != x; then
18709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18710    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18711    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18712    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18713      # Going to short mode and back again did indeed matter. Since short mode is
18714      # case insensitive, let's make it lowercase to improve readability.
18715      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18716      # Now convert it back to Unix-style (cygpath)
18717      input_path=`$CYGPATH -u "$shortmode_path"`
18718      new_path="$input_path"
18719    fi
18720  fi
18721
18722  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18723  if test "x$test_cygdrive_prefix" = x; then
18724    # As a simple fix, exclude /usr/bin since it's not a real path.
18725    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18726      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18727      # a path prefixed by /cygdrive for fixpath to work.
18728      new_path="$CYGWIN_ROOT_PATH$input_path"
18729    fi
18730  fi
18731
18732  # remove trailing .exe if any
18733  new_path="${new_path/%.exe/}"
18734
18735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18736
18737  # First separate the path from the arguments. This will split at the first
18738  # space.
18739  complete="$FOUND_MAKE"
18740  path="${complete%% *}"
18741  tmp="$complete EOL"
18742  arguments="${tmp#* }"
18743
18744  # Input might be given as Windows format, start by converting to
18745  # unix format.
18746  new_path="$path"
18747
18748  windows_path="$new_path"
18749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18750    unix_path=`$CYGPATH -u "$windows_path"`
18751    new_path="$unix_path"
18752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18754    new_path="$unix_path"
18755  fi
18756
18757
18758  # Now try to locate executable using which
18759  new_path=`$WHICH "$new_path" 2> /dev/null`
18760
18761  if test "x$new_path" = x; then
18762    # Oops. Which didn't find the executable.
18763    # The splitting of arguments from the executable at a space might have been incorrect,
18764    # since paths with space are more likely in Windows. Give it another try with the whole
18765    # argument.
18766    path="$complete"
18767    arguments="EOL"
18768    new_path="$path"
18769
18770  windows_path="$new_path"
18771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772    unix_path=`$CYGPATH -u "$windows_path"`
18773    new_path="$unix_path"
18774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18776    new_path="$unix_path"
18777  fi
18778
18779
18780    new_path=`$WHICH "$new_path" 2> /dev/null`
18781    # bat and cmd files are not always considered executable in MSYS causing which
18782    # to not find them
18783    if test "x$new_path" = x \
18784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18786      new_path="$path"
18787
18788  windows_path="$new_path"
18789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18790    unix_path=`$CYGPATH -u "$windows_path"`
18791    new_path="$unix_path"
18792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18794    new_path="$unix_path"
18795  fi
18796
18797    fi
18798
18799    if test "x$new_path" = x; then
18800      # It's still not found. Now this is an unrecoverable error.
18801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18802$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18803      has_space=`$ECHO "$complete" | $GREP " "`
18804      if test "x$has_space" != x; then
18805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18807      fi
18808      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18809    fi
18810  fi
18811
18812  # Now new_path has a complete unix path to the binary
18813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18814    # Keep paths in /bin as-is, but remove trailing .exe if any
18815    new_path="${new_path/%.exe/}"
18816    # Do not save /bin paths to all_fixpath_prefixes!
18817  else
18818    # Not in mixed or Windows style, start by that.
18819    new_path=`cmd //c echo $new_path`
18820
18821  input_path="$new_path"
18822  # Check if we need to convert this using DOS-style short mode. If the path
18823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18824  # take no chances and rewrite it.
18825  # Note: m4 eats our [], so we need to use [ and ] instead.
18826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18827  if test "x$has_forbidden_chars" != x; then
18828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18830  fi
18831
18832    # Output is in $new_path
18833
18834  windows_path="$new_path"
18835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18836    unix_path=`$CYGPATH -u "$windows_path"`
18837    new_path="$unix_path"
18838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18840    new_path="$unix_path"
18841  fi
18842
18843    # remove trailing .exe if any
18844    new_path="${new_path/%.exe/}"
18845
18846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18848  fi
18849
18850    else
18851      # We're on a unix platform. Hooray! :)
18852      # First separate the path from the arguments. This will split at the first
18853      # space.
18854      complete="$FOUND_MAKE"
18855      path="${complete%% *}"
18856      tmp="$complete EOL"
18857      arguments="${tmp#* }"
18858
18859      # Cannot rely on the command "which" here since it doesn't always work.
18860      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18861      if test -z "$is_absolute_path"; then
18862        # Path to executable is not absolute. Find it.
18863        IFS_save="$IFS"
18864        IFS=:
18865        for p in $PATH; do
18866          if test -f "$p/$path" && test -x "$p/$path"; then
18867            new_path="$p/$path"
18868            break
18869          fi
18870        done
18871        IFS="$IFS_save"
18872      else
18873        # This is an absolute path, we can use it without further modifications.
18874        new_path="$path"
18875      fi
18876
18877      if test "x$new_path" = x; then
18878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18879$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18880        has_space=`$ECHO "$complete" | $GREP " "`
18881        if test "x$has_space" != x; then
18882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18884        fi
18885        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18886      fi
18887    fi
18888
18889    # Now join together the path and the arguments once again
18890    if test "x$arguments" != xEOL; then
18891      new_complete="$new_path ${arguments% *}"
18892    else
18893      new_complete="$new_path"
18894    fi
18895
18896    if test "x$complete" != "x$new_complete"; then
18897      FOUND_MAKE="$new_complete"
18898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18899$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18900    fi
18901  fi
18902
18903        fi
18904      fi
18905    fi
18906  fi
18907
18908    fi
18909
18910    if test "x$FOUND_MAKE" = x; then
18911      if test "x$TOOLCHAIN_PATH" != x; then
18912        # We have a toolchain path, check that as well before giving up.
18913        OLD_PATH=$PATH
18914        PATH=$TOOLCHAIN_PATH:$PATH
18915        for ac_prog in gmake
18916do
18917  # Extract the first word of "$ac_prog", so it can be a program name with args.
18918set dummy $ac_prog; ac_word=$2
18919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18920$as_echo_n "checking for $ac_word... " >&6; }
18921if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18922  $as_echo_n "(cached) " >&6
18923else
18924  case $CHECK_TOOLSDIR_GMAKE in
18925  [\\/]* | ?:[\\/]*)
18926  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18927  ;;
18928  *)
18929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18930for as_dir in $PATH
18931do
18932  IFS=$as_save_IFS
18933  test -z "$as_dir" && as_dir=.
18934    for ac_exec_ext in '' $ac_executable_extensions; do
18935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18936    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18938    break 2
18939  fi
18940done
18941  done
18942IFS=$as_save_IFS
18943
18944  ;;
18945esac
18946fi
18947CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18948if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18950$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18951else
18952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18953$as_echo "no" >&6; }
18954fi
18955
18956
18957  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18958done
18959
18960
18961  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18962  DESCRIPTION="gmake in tools-dir"
18963
18964  # On Cygwin, we require a newer version of make than on other platforms
18965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18966    MAKE_VERSION_EXPR="-e 4\."
18967    MAKE_REQUIRED_VERSION="4.0"
18968   else
18969    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18970    MAKE_REQUIRED_VERSION="3.81"
18971  fi
18972
18973  if test "x$MAKE_CANDIDATE" != x; then
18974    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18975$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18976    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18977    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18978    if test "x$IS_GNU_MAKE" = x; then
18979      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18980$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18981    else
18982      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18983      if test "x$IS_MODERN_MAKE" = x; then
18984        { $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
18985$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;}
18986      else
18987        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18988          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18989            MAKE_EXPECTED_ENV='cygwin'
18990          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18991            MAKE_EXPECTED_ENV='msys'
18992          else
18993            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18994          fi
18995          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18996          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18997        else
18998          # Not relevant for non-Windows
18999          IS_MAKE_CORRECT_ENV=true
19000        fi
19001        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19002          { $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
19003$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;}
19004        else
19005          FOUND_MAKE=$MAKE_CANDIDATE
19006
19007  # Only process if variable expands to non-empty
19008
19009  if test "x$FOUND_MAKE" != x; then
19010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19011
19012  # First separate the path from the arguments. This will split at the first
19013  # space.
19014  complete="$FOUND_MAKE"
19015  path="${complete%% *}"
19016  tmp="$complete EOL"
19017  arguments="${tmp#* }"
19018
19019  # Input might be given as Windows format, start by converting to
19020  # unix format.
19021  new_path=`$CYGPATH -u "$path"`
19022
19023  # Now try to locate executable using which
19024  new_path=`$WHICH "$new_path" 2> /dev/null`
19025  # bat and cmd files are not always considered executable in cygwin causing which
19026  # to not find them
19027  if test "x$new_path" = x \
19028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19030    new_path=`$CYGPATH -u "$path"`
19031  fi
19032  if test "x$new_path" = x; then
19033    # Oops. Which didn't find the executable.
19034    # The splitting of arguments from the executable at a space might have been incorrect,
19035    # since paths with space are more likely in Windows. Give it another try with the whole
19036    # argument.
19037    path="$complete"
19038    arguments="EOL"
19039    new_path=`$CYGPATH -u "$path"`
19040    new_path=`$WHICH "$new_path" 2> /dev/null`
19041    # bat and cmd files are not always considered executable in cygwin causing which
19042    # to not find them
19043    if test "x$new_path" = x \
19044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19046      new_path=`$CYGPATH -u "$path"`
19047    fi
19048    if test "x$new_path" = x; then
19049      # It's still not found. Now this is an unrecoverable error.
19050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19052      has_space=`$ECHO "$complete" | $GREP " "`
19053      if test "x$has_space" != x; then
19054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19056      fi
19057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19058    fi
19059  fi
19060
19061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19064  # "foo.exe" is OK but "foo" is an error.
19065  #
19066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19067  # It is also a way to make sure we got the proper file name for the real test later on.
19068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19069  if test "x$test_shortpath" = x; then
19070    # Short path failed, file does not exist as specified.
19071    # Try adding .exe or .cmd
19072    if test -f "${new_path}.exe"; then
19073      input_to_shortpath="${new_path}.exe"
19074    elif test -f "${new_path}.cmd"; then
19075      input_to_shortpath="${new_path}.cmd"
19076    else
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19082    fi
19083  else
19084    input_to_shortpath="$new_path"
19085  fi
19086
19087  # Call helper function which possibly converts this using DOS-style short mode.
19088  # If so, the updated path is stored in $new_path.
19089  new_path="$input_to_shortpath"
19090
19091  input_path="$input_to_shortpath"
19092  # Check if we need to convert this using DOS-style short mode. If the path
19093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19094  # take no chances and rewrite it.
19095  # Note: m4 eats our [], so we need to use [ and ] instead.
19096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19097  if test "x$has_forbidden_chars" != x; then
19098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19102      # Going to short mode and back again did indeed matter. Since short mode is
19103      # case insensitive, let's make it lowercase to improve readability.
19104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19105      # Now convert it back to Unix-style (cygpath)
19106      input_path=`$CYGPATH -u "$shortmode_path"`
19107      new_path="$input_path"
19108    fi
19109  fi
19110
19111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19112  if test "x$test_cygdrive_prefix" = x; then
19113    # As a simple fix, exclude /usr/bin since it's not a real path.
19114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19116      # a path prefixed by /cygdrive for fixpath to work.
19117      new_path="$CYGWIN_ROOT_PATH$input_path"
19118    fi
19119  fi
19120
19121  # remove trailing .exe if any
19122  new_path="${new_path/%.exe/}"
19123
19124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19125
19126  # First separate the path from the arguments. This will split at the first
19127  # space.
19128  complete="$FOUND_MAKE"
19129  path="${complete%% *}"
19130  tmp="$complete EOL"
19131  arguments="${tmp#* }"
19132
19133  # Input might be given as Windows format, start by converting to
19134  # unix format.
19135  new_path="$path"
19136
19137  windows_path="$new_path"
19138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19139    unix_path=`$CYGPATH -u "$windows_path"`
19140    new_path="$unix_path"
19141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19143    new_path="$unix_path"
19144  fi
19145
19146
19147  # Now try to locate executable using which
19148  new_path=`$WHICH "$new_path" 2> /dev/null`
19149
19150  if test "x$new_path" = x; then
19151    # Oops. Which didn't find the executable.
19152    # The splitting of arguments from the executable at a space might have been incorrect,
19153    # since paths with space are more likely in Windows. Give it another try with the whole
19154    # argument.
19155    path="$complete"
19156    arguments="EOL"
19157    new_path="$path"
19158
19159  windows_path="$new_path"
19160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19161    unix_path=`$CYGPATH -u "$windows_path"`
19162    new_path="$unix_path"
19163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19165    new_path="$unix_path"
19166  fi
19167
19168
19169    new_path=`$WHICH "$new_path" 2> /dev/null`
19170    # bat and cmd files are not always considered executable in MSYS causing which
19171    # to not find them
19172    if test "x$new_path" = x \
19173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19175      new_path="$path"
19176
19177  windows_path="$new_path"
19178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19179    unix_path=`$CYGPATH -u "$windows_path"`
19180    new_path="$unix_path"
19181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19183    new_path="$unix_path"
19184  fi
19185
19186    fi
19187
19188    if test "x$new_path" = x; then
19189      # It's still not found. Now this is an unrecoverable error.
19190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19192      has_space=`$ECHO "$complete" | $GREP " "`
19193      if test "x$has_space" != x; then
19194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19196      fi
19197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19198    fi
19199  fi
19200
19201  # Now new_path has a complete unix path to the binary
19202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19203    # Keep paths in /bin as-is, but remove trailing .exe if any
19204    new_path="${new_path/%.exe/}"
19205    # Do not save /bin paths to all_fixpath_prefixes!
19206  else
19207    # Not in mixed or Windows style, start by that.
19208    new_path=`cmd //c echo $new_path`
19209
19210  input_path="$new_path"
19211  # Check if we need to convert this using DOS-style short mode. If the path
19212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19213  # take no chances and rewrite it.
19214  # Note: m4 eats our [], so we need to use [ and ] instead.
19215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19216  if test "x$has_forbidden_chars" != x; then
19217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19219  fi
19220
19221    # Output is in $new_path
19222
19223  windows_path="$new_path"
19224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19225    unix_path=`$CYGPATH -u "$windows_path"`
19226    new_path="$unix_path"
19227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19229    new_path="$unix_path"
19230  fi
19231
19232    # remove trailing .exe if any
19233    new_path="${new_path/%.exe/}"
19234
19235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19237  fi
19238
19239    else
19240      # We're on a unix platform. Hooray! :)
19241      # First separate the path from the arguments. This will split at the first
19242      # space.
19243      complete="$FOUND_MAKE"
19244      path="${complete%% *}"
19245      tmp="$complete EOL"
19246      arguments="${tmp#* }"
19247
19248      # Cannot rely on the command "which" here since it doesn't always work.
19249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19250      if test -z "$is_absolute_path"; then
19251        # Path to executable is not absolute. Find it.
19252        IFS_save="$IFS"
19253        IFS=:
19254        for p in $PATH; do
19255          if test -f "$p/$path" && test -x "$p/$path"; then
19256            new_path="$p/$path"
19257            break
19258          fi
19259        done
19260        IFS="$IFS_save"
19261      else
19262        # This is an absolute path, we can use it without further modifications.
19263        new_path="$path"
19264      fi
19265
19266      if test "x$new_path" = x; then
19267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19269        has_space=`$ECHO "$complete" | $GREP " "`
19270        if test "x$has_space" != x; then
19271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19273        fi
19274        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19275      fi
19276    fi
19277
19278    # Now join together the path and the arguments once again
19279    if test "x$arguments" != xEOL; then
19280      new_complete="$new_path ${arguments% *}"
19281    else
19282      new_complete="$new_path"
19283    fi
19284
19285    if test "x$complete" != "x$new_complete"; then
19286      FOUND_MAKE="$new_complete"
19287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19288$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19289    fi
19290  fi
19291
19292        fi
19293      fi
19294    fi
19295  fi
19296
19297        if test "x$FOUND_MAKE" = x; then
19298          for ac_prog in make
19299do
19300  # Extract the first word of "$ac_prog", so it can be a program name with args.
19301set dummy $ac_prog; ac_word=$2
19302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19303$as_echo_n "checking for $ac_word... " >&6; }
19304if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19305  $as_echo_n "(cached) " >&6
19306else
19307  case $CHECK_TOOLSDIR_MAKE in
19308  [\\/]* | ?:[\\/]*)
19309  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19310  ;;
19311  *)
19312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19313for as_dir in $PATH
19314do
19315  IFS=$as_save_IFS
19316  test -z "$as_dir" && as_dir=.
19317    for ac_exec_ext in '' $ac_executable_extensions; do
19318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19319    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19321    break 2
19322  fi
19323done
19324  done
19325IFS=$as_save_IFS
19326
19327  ;;
19328esac
19329fi
19330CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19331if test -n "$CHECK_TOOLSDIR_MAKE"; then
19332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19333$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19334else
19335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19336$as_echo "no" >&6; }
19337fi
19338
19339
19340  test -n "$CHECK_TOOLSDIR_MAKE" && break
19341done
19342
19343
19344  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19345  DESCRIPTION="make in tools-dir"
19346
19347  # On Cygwin, we require a newer version of make than on other platforms
19348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19349    MAKE_VERSION_EXPR="-e 4\."
19350    MAKE_REQUIRED_VERSION="4.0"
19351   else
19352    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19353    MAKE_REQUIRED_VERSION="3.81"
19354  fi
19355
19356  if test "x$MAKE_CANDIDATE" != x; then
19357    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19358$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19359    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19360    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19361    if test "x$IS_GNU_MAKE" = x; then
19362      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19363$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19364    else
19365      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19366      if test "x$IS_MODERN_MAKE" = x; then
19367        { $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
19368$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;}
19369      else
19370        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19371          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19372            MAKE_EXPECTED_ENV='cygwin'
19373          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19374            MAKE_EXPECTED_ENV='msys'
19375          else
19376            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19377          fi
19378          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19379          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19380        else
19381          # Not relevant for non-Windows
19382          IS_MAKE_CORRECT_ENV=true
19383        fi
19384        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19385          { $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
19386$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;}
19387        else
19388          FOUND_MAKE=$MAKE_CANDIDATE
19389
19390  # Only process if variable expands to non-empty
19391
19392  if test "x$FOUND_MAKE" != x; then
19393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19394
19395  # First separate the path from the arguments. This will split at the first
19396  # space.
19397  complete="$FOUND_MAKE"
19398  path="${complete%% *}"
19399  tmp="$complete EOL"
19400  arguments="${tmp#* }"
19401
19402  # Input might be given as Windows format, start by converting to
19403  # unix format.
19404  new_path=`$CYGPATH -u "$path"`
19405
19406  # Now try to locate executable using which
19407  new_path=`$WHICH "$new_path" 2> /dev/null`
19408  # bat and cmd files are not always considered executable in cygwin causing which
19409  # to not find them
19410  if test "x$new_path" = x \
19411      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19412      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19413    new_path=`$CYGPATH -u "$path"`
19414  fi
19415  if test "x$new_path" = x; then
19416    # Oops. Which didn't find the executable.
19417    # The splitting of arguments from the executable at a space might have been incorrect,
19418    # since paths with space are more likely in Windows. Give it another try with the whole
19419    # argument.
19420    path="$complete"
19421    arguments="EOL"
19422    new_path=`$CYGPATH -u "$path"`
19423    new_path=`$WHICH "$new_path" 2> /dev/null`
19424    # bat and cmd files are not always considered executable in cygwin causing which
19425    # to not find them
19426    if test "x$new_path" = x \
19427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19429      new_path=`$CYGPATH -u "$path"`
19430    fi
19431    if test "x$new_path" = x; then
19432      # It's still not found. Now this is an unrecoverable error.
19433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19434$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19435      has_space=`$ECHO "$complete" | $GREP " "`
19436      if test "x$has_space" != x; then
19437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19439      fi
19440      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19441    fi
19442  fi
19443
19444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19447  # "foo.exe" is OK but "foo" is an error.
19448  #
19449  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19450  # It is also a way to make sure we got the proper file name for the real test later on.
19451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19452  if test "x$test_shortpath" = x; then
19453    # Short path failed, file does not exist as specified.
19454    # Try adding .exe or .cmd
19455    if test -f "${new_path}.exe"; then
19456      input_to_shortpath="${new_path}.exe"
19457    elif test -f "${new_path}.cmd"; then
19458      input_to_shortpath="${new_path}.cmd"
19459    else
19460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19461$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19462      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19463$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19464      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19465    fi
19466  else
19467    input_to_shortpath="$new_path"
19468  fi
19469
19470  # Call helper function which possibly converts this using DOS-style short mode.
19471  # If so, the updated path is stored in $new_path.
19472  new_path="$input_to_shortpath"
19473
19474  input_path="$input_to_shortpath"
19475  # Check if we need to convert this using DOS-style short mode. If the path
19476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19477  # take no chances and rewrite it.
19478  # Note: m4 eats our [], so we need to use [ and ] instead.
19479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19480  if test "x$has_forbidden_chars" != x; then
19481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19485      # Going to short mode and back again did indeed matter. Since short mode is
19486      # case insensitive, let's make it lowercase to improve readability.
19487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19488      # Now convert it back to Unix-style (cygpath)
19489      input_path=`$CYGPATH -u "$shortmode_path"`
19490      new_path="$input_path"
19491    fi
19492  fi
19493
19494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19495  if test "x$test_cygdrive_prefix" = x; then
19496    # As a simple fix, exclude /usr/bin since it's not a real path.
19497    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19499      # a path prefixed by /cygdrive for fixpath to work.
19500      new_path="$CYGWIN_ROOT_PATH$input_path"
19501    fi
19502  fi
19503
19504  # remove trailing .exe if any
19505  new_path="${new_path/%.exe/}"
19506
19507    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19508
19509  # First separate the path from the arguments. This will split at the first
19510  # space.
19511  complete="$FOUND_MAKE"
19512  path="${complete%% *}"
19513  tmp="$complete EOL"
19514  arguments="${tmp#* }"
19515
19516  # Input might be given as Windows format, start by converting to
19517  # unix format.
19518  new_path="$path"
19519
19520  windows_path="$new_path"
19521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19522    unix_path=`$CYGPATH -u "$windows_path"`
19523    new_path="$unix_path"
19524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19526    new_path="$unix_path"
19527  fi
19528
19529
19530  # Now try to locate executable using which
19531  new_path=`$WHICH "$new_path" 2> /dev/null`
19532
19533  if test "x$new_path" = x; then
19534    # Oops. Which didn't find the executable.
19535    # The splitting of arguments from the executable at a space might have been incorrect,
19536    # since paths with space are more likely in Windows. Give it another try with the whole
19537    # argument.
19538    path="$complete"
19539    arguments="EOL"
19540    new_path="$path"
19541
19542  windows_path="$new_path"
19543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19544    unix_path=`$CYGPATH -u "$windows_path"`
19545    new_path="$unix_path"
19546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19548    new_path="$unix_path"
19549  fi
19550
19551
19552    new_path=`$WHICH "$new_path" 2> /dev/null`
19553    # bat and cmd files are not always considered executable in MSYS causing which
19554    # to not find them
19555    if test "x$new_path" = x \
19556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19558      new_path="$path"
19559
19560  windows_path="$new_path"
19561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19562    unix_path=`$CYGPATH -u "$windows_path"`
19563    new_path="$unix_path"
19564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19566    new_path="$unix_path"
19567  fi
19568
19569    fi
19570
19571    if test "x$new_path" = x; then
19572      # It's still not found. Now this is an unrecoverable error.
19573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19575      has_space=`$ECHO "$complete" | $GREP " "`
19576      if test "x$has_space" != x; then
19577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19579      fi
19580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19581    fi
19582  fi
19583
19584  # Now new_path has a complete unix path to the binary
19585  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19586    # Keep paths in /bin as-is, but remove trailing .exe if any
19587    new_path="${new_path/%.exe/}"
19588    # Do not save /bin paths to all_fixpath_prefixes!
19589  else
19590    # Not in mixed or Windows style, start by that.
19591    new_path=`cmd //c echo $new_path`
19592
19593  input_path="$new_path"
19594  # Check if we need to convert this using DOS-style short mode. If the path
19595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19596  # take no chances and rewrite it.
19597  # Note: m4 eats our [], so we need to use [ and ] instead.
19598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19599  if test "x$has_forbidden_chars" != x; then
19600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19602  fi
19603
19604    # Output is in $new_path
19605
19606  windows_path="$new_path"
19607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19608    unix_path=`$CYGPATH -u "$windows_path"`
19609    new_path="$unix_path"
19610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19612    new_path="$unix_path"
19613  fi
19614
19615    # remove trailing .exe if any
19616    new_path="${new_path/%.exe/}"
19617
19618    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19619    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19620  fi
19621
19622    else
19623      # We're on a unix platform. Hooray! :)
19624      # First separate the path from the arguments. This will split at the first
19625      # space.
19626      complete="$FOUND_MAKE"
19627      path="${complete%% *}"
19628      tmp="$complete EOL"
19629      arguments="${tmp#* }"
19630
19631      # Cannot rely on the command "which" here since it doesn't always work.
19632      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19633      if test -z "$is_absolute_path"; then
19634        # Path to executable is not absolute. Find it.
19635        IFS_save="$IFS"
19636        IFS=:
19637        for p in $PATH; do
19638          if test -f "$p/$path" && test -x "$p/$path"; then
19639            new_path="$p/$path"
19640            break
19641          fi
19642        done
19643        IFS="$IFS_save"
19644      else
19645        # This is an absolute path, we can use it without further modifications.
19646        new_path="$path"
19647      fi
19648
19649      if test "x$new_path" = x; then
19650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19651$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19652        has_space=`$ECHO "$complete" | $GREP " "`
19653        if test "x$has_space" != x; then
19654          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19655$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19656        fi
19657        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19658      fi
19659    fi
19660
19661    # Now join together the path and the arguments once again
19662    if test "x$arguments" != xEOL; then
19663      new_complete="$new_path ${arguments% *}"
19664    else
19665      new_complete="$new_path"
19666    fi
19667
19668    if test "x$complete" != "x$new_complete"; then
19669      FOUND_MAKE="$new_complete"
19670      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19671$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19672    fi
19673  fi
19674
19675        fi
19676      fi
19677    fi
19678  fi
19679
19680        fi
19681        PATH=$OLD_PATH
19682      fi
19683    fi
19684
19685    if test "x$FOUND_MAKE" = x; then
19686      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
19687    fi
19688
19689    else
19690      # If it succeeded, then it was overridden by the user. We will use it
19691      # for the tool.
19692
19693      # First remove it from the list of overridden variables, so we can test
19694      # for unknown variables in the end.
19695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19696
19697      # Check if we try to supply an empty value
19698      if test "x$MAKE" = x; then
19699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19700$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19702$as_echo_n "checking for MAKE... " >&6; }
19703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19704$as_echo "disabled" >&6; }
19705      else
19706        # Check if the provided tool contains a complete path.
19707        tool_specified="$MAKE"
19708        tool_basename="${tool_specified##*/}"
19709        if test "x$tool_basename" = "x$tool_specified"; then
19710          # A command without a complete path is provided, search $PATH.
19711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19712$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19713          # Extract the first word of "$tool_basename", so it can be a program name with args.
19714set dummy $tool_basename; ac_word=$2
19715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19716$as_echo_n "checking for $ac_word... " >&6; }
19717if ${ac_cv_path_MAKE+:} false; then :
19718  $as_echo_n "(cached) " >&6
19719else
19720  case $MAKE in
19721  [\\/]* | ?:[\\/]*)
19722  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19723  ;;
19724  *)
19725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19726for as_dir in $PATH
19727do
19728  IFS=$as_save_IFS
19729  test -z "$as_dir" && as_dir=.
19730    for ac_exec_ext in '' $ac_executable_extensions; do
19731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19732    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19734    break 2
19735  fi
19736done
19737  done
19738IFS=$as_save_IFS
19739
19740  ;;
19741esac
19742fi
19743MAKE=$ac_cv_path_MAKE
19744if test -n "$MAKE"; then
19745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19746$as_echo "$MAKE" >&6; }
19747else
19748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19749$as_echo "no" >&6; }
19750fi
19751
19752
19753          if test "x$MAKE" = x; then
19754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19755          fi
19756        else
19757          # Otherwise we believe it is a complete path. Use it as it is.
19758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19759$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19761$as_echo_n "checking for MAKE... " >&6; }
19762          if test ! -x "$tool_specified"; then
19763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19764$as_echo "not found" >&6; }
19765            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19766          fi
19767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19768$as_echo "$tool_specified" >&6; }
19769        fi
19770      fi
19771    fi
19772
19773    # If MAKE was set by user, verify the version
19774
19775  MAKE_CANDIDATE=""$MAKE""
19776  DESCRIPTION="user supplied MAKE=$MAKE"
19777
19778  # On Cygwin, we require a newer version of make than on other platforms
19779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19780    MAKE_VERSION_EXPR="-e 4\."
19781    MAKE_REQUIRED_VERSION="4.0"
19782   else
19783    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19784    MAKE_REQUIRED_VERSION="3.81"
19785  fi
19786
19787  if test "x$MAKE_CANDIDATE" != x; then
19788    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19789$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19790    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19791    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19792    if test "x$IS_GNU_MAKE" = x; then
19793      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19794$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19795    else
19796      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19797      if test "x$IS_MODERN_MAKE" = x; then
19798        { $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
19799$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;}
19800      else
19801        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19802          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19803            MAKE_EXPECTED_ENV='cygwin'
19804          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19805            MAKE_EXPECTED_ENV='msys'
19806          else
19807            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19808          fi
19809          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19810          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19811        else
19812          # Not relevant for non-Windows
19813          IS_MAKE_CORRECT_ENV=true
19814        fi
19815        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19816          { $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
19817$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;}
19818        else
19819          FOUND_MAKE=$MAKE_CANDIDATE
19820
19821  # Only process if variable expands to non-empty
19822
19823  if test "x$FOUND_MAKE" != x; then
19824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19825
19826  # First separate the path from the arguments. This will split at the first
19827  # space.
19828  complete="$FOUND_MAKE"
19829  path="${complete%% *}"
19830  tmp="$complete EOL"
19831  arguments="${tmp#* }"
19832
19833  # Input might be given as Windows format, start by converting to
19834  # unix format.
19835  new_path=`$CYGPATH -u "$path"`
19836
19837  # Now try to locate executable using which
19838  new_path=`$WHICH "$new_path" 2> /dev/null`
19839  # bat and cmd files are not always considered executable in cygwin causing which
19840  # to not find them
19841  if test "x$new_path" = x \
19842      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19843      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19844    new_path=`$CYGPATH -u "$path"`
19845  fi
19846  if test "x$new_path" = x; then
19847    # Oops. Which didn't find the executable.
19848    # The splitting of arguments from the executable at a space might have been incorrect,
19849    # since paths with space are more likely in Windows. Give it another try with the whole
19850    # argument.
19851    path="$complete"
19852    arguments="EOL"
19853    new_path=`$CYGPATH -u "$path"`
19854    new_path=`$WHICH "$new_path" 2> /dev/null`
19855    # bat and cmd files are not always considered executable in cygwin causing which
19856    # to not find them
19857    if test "x$new_path" = x \
19858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19860      new_path=`$CYGPATH -u "$path"`
19861    fi
19862    if test "x$new_path" = x; then
19863      # It's still not found. Now this is an unrecoverable error.
19864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19866      has_space=`$ECHO "$complete" | $GREP " "`
19867      if test "x$has_space" != x; then
19868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19870      fi
19871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19872    fi
19873  fi
19874
19875  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19876  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19877  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19878  # "foo.exe" is OK but "foo" is an error.
19879  #
19880  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19881  # It is also a way to make sure we got the proper file name for the real test later on.
19882  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19883  if test "x$test_shortpath" = x; then
19884    # Short path failed, file does not exist as specified.
19885    # Try adding .exe or .cmd
19886    if test -f "${new_path}.exe"; then
19887      input_to_shortpath="${new_path}.exe"
19888    elif test -f "${new_path}.cmd"; then
19889      input_to_shortpath="${new_path}.cmd"
19890    else
19891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19893      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19894$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19895      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19896    fi
19897  else
19898    input_to_shortpath="$new_path"
19899  fi
19900
19901  # Call helper function which possibly converts this using DOS-style short mode.
19902  # If so, the updated path is stored in $new_path.
19903  new_path="$input_to_shortpath"
19904
19905  input_path="$input_to_shortpath"
19906  # Check if we need to convert this using DOS-style short mode. If the path
19907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19908  # take no chances and rewrite it.
19909  # Note: m4 eats our [], so we need to use [ and ] instead.
19910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19911  if test "x$has_forbidden_chars" != x; then
19912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19916      # Going to short mode and back again did indeed matter. Since short mode is
19917      # case insensitive, let's make it lowercase to improve readability.
19918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19919      # Now convert it back to Unix-style (cygpath)
19920      input_path=`$CYGPATH -u "$shortmode_path"`
19921      new_path="$input_path"
19922    fi
19923  fi
19924
19925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19926  if test "x$test_cygdrive_prefix" = x; then
19927    # As a simple fix, exclude /usr/bin since it's not a real path.
19928    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19930      # a path prefixed by /cygdrive for fixpath to work.
19931      new_path="$CYGWIN_ROOT_PATH$input_path"
19932    fi
19933  fi
19934
19935  # remove trailing .exe if any
19936  new_path="${new_path/%.exe/}"
19937
19938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19939
19940  # First separate the path from the arguments. This will split at the first
19941  # space.
19942  complete="$FOUND_MAKE"
19943  path="${complete%% *}"
19944  tmp="$complete EOL"
19945  arguments="${tmp#* }"
19946
19947  # Input might be given as Windows format, start by converting to
19948  # unix format.
19949  new_path="$path"
19950
19951  windows_path="$new_path"
19952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19953    unix_path=`$CYGPATH -u "$windows_path"`
19954    new_path="$unix_path"
19955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19957    new_path="$unix_path"
19958  fi
19959
19960
19961  # Now try to locate executable using which
19962  new_path=`$WHICH "$new_path" 2> /dev/null`
19963
19964  if test "x$new_path" = x; then
19965    # Oops. Which didn't find the executable.
19966    # The splitting of arguments from the executable at a space might have been incorrect,
19967    # since paths with space are more likely in Windows. Give it another try with the whole
19968    # argument.
19969    path="$complete"
19970    arguments="EOL"
19971    new_path="$path"
19972
19973  windows_path="$new_path"
19974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975    unix_path=`$CYGPATH -u "$windows_path"`
19976    new_path="$unix_path"
19977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19979    new_path="$unix_path"
19980  fi
19981
19982
19983    new_path=`$WHICH "$new_path" 2> /dev/null`
19984    # bat and cmd files are not always considered executable in MSYS causing which
19985    # to not find them
19986    if test "x$new_path" = x \
19987        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19988        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19989      new_path="$path"
19990
19991  windows_path="$new_path"
19992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19993    unix_path=`$CYGPATH -u "$windows_path"`
19994    new_path="$unix_path"
19995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19997    new_path="$unix_path"
19998  fi
19999
20000    fi
20001
20002    if test "x$new_path" = x; then
20003      # It's still not found. Now this is an unrecoverable error.
20004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20006      has_space=`$ECHO "$complete" | $GREP " "`
20007      if test "x$has_space" != x; then
20008        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20009$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20010      fi
20011      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20012    fi
20013  fi
20014
20015  # Now new_path has a complete unix path to the binary
20016  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20017    # Keep paths in /bin as-is, but remove trailing .exe if any
20018    new_path="${new_path/%.exe/}"
20019    # Do not save /bin paths to all_fixpath_prefixes!
20020  else
20021    # Not in mixed or Windows style, start by that.
20022    new_path=`cmd //c echo $new_path`
20023
20024  input_path="$new_path"
20025  # Check if we need to convert this using DOS-style short mode. If the path
20026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20027  # take no chances and rewrite it.
20028  # Note: m4 eats our [], so we need to use [ and ] instead.
20029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20030  if test "x$has_forbidden_chars" != x; then
20031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20033  fi
20034
20035    # Output is in $new_path
20036
20037  windows_path="$new_path"
20038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20039    unix_path=`$CYGPATH -u "$windows_path"`
20040    new_path="$unix_path"
20041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20043    new_path="$unix_path"
20044  fi
20045
20046    # remove trailing .exe if any
20047    new_path="${new_path/%.exe/}"
20048
20049    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20050    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20051  fi
20052
20053    else
20054      # We're on a unix platform. Hooray! :)
20055      # First separate the path from the arguments. This will split at the first
20056      # space.
20057      complete="$FOUND_MAKE"
20058      path="${complete%% *}"
20059      tmp="$complete EOL"
20060      arguments="${tmp#* }"
20061
20062      # Cannot rely on the command "which" here since it doesn't always work.
20063      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20064      if test -z "$is_absolute_path"; then
20065        # Path to executable is not absolute. Find it.
20066        IFS_save="$IFS"
20067        IFS=:
20068        for p in $PATH; do
20069          if test -f "$p/$path" && test -x "$p/$path"; then
20070            new_path="$p/$path"
20071            break
20072          fi
20073        done
20074        IFS="$IFS_save"
20075      else
20076        # This is an absolute path, we can use it without further modifications.
20077        new_path="$path"
20078      fi
20079
20080      if test "x$new_path" = x; then
20081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20083        has_space=`$ECHO "$complete" | $GREP " "`
20084        if test "x$has_space" != x; then
20085          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20086$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20087        fi
20088        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20089      fi
20090    fi
20091
20092    # Now join together the path and the arguments once again
20093    if test "x$arguments" != xEOL; then
20094      new_complete="$new_path ${arguments% *}"
20095    else
20096      new_complete="$new_path"
20097    fi
20098
20099    if test "x$complete" != "x$new_complete"; then
20100      FOUND_MAKE="$new_complete"
20101      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20102$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20103    fi
20104  fi
20105
20106        fi
20107      fi
20108    fi
20109  fi
20110
20111    if test "x$FOUND_MAKE" = x; then
20112      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20113    fi
20114
20115  fi
20116
20117
20118  MAKE=$FOUND_MAKE
20119
20120  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20121$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20122
20123
20124  # Check if make supports the output sync option and if so, setup using it.
20125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20126$as_echo_n "checking if make --output-sync is supported... " >&6; }
20127  if $MAKE --version -O > /dev/null 2>&1; then
20128    OUTPUT_SYNC_SUPPORTED=true
20129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20130$as_echo "yes" >&6; }
20131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20132$as_echo_n "checking for output-sync value... " >&6; }
20133
20134# Check whether --with-output-sync was given.
20135if test "${with_output_sync+set}" = set; then :
20136  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20137fi
20138
20139    if test "x$OUTPUT_SYNC" = "x"; then
20140      OUTPUT_SYNC=none
20141    fi
20142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20143$as_echo "$OUTPUT_SYNC" >&6; }
20144    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20145      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20146    fi
20147  else
20148    OUTPUT_SYNC_SUPPORTED=false
20149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20150$as_echo "no" >&6; }
20151  fi
20152
20153
20154
20155
20156
20157
20158  # Test if find supports -delete
20159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20160$as_echo_n "checking if find supports -delete... " >&6; }
20161  FIND_DELETE="-delete"
20162
20163  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20164
20165  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20166
20167  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20168  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20169    # No, it does not.
20170    rm $DELETEDIR/TestIfFindSupportsDelete
20171    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20172      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20173      FIND_DELETE="-print | xargs rm"
20174    else
20175      FIND_DELETE="-exec rm \{\} \+"
20176    fi
20177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20178$as_echo "no" >&6; }
20179  else
20180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20181$as_echo "yes" >&6; }
20182  fi
20183  rmdir $DELETEDIR
20184
20185
20186
20187  # These tools might not be installed by default,
20188  # need hint on how to install them.
20189
20190
20191
20192  # Publish this variable in the help.
20193
20194
20195  if [ -z "${UNZIP+x}" ]; then
20196    # The variable is not set by user, try to locate tool using the code snippet
20197    for ac_prog in unzip
20198do
20199  # Extract the first word of "$ac_prog", so it can be a program name with args.
20200set dummy $ac_prog; ac_word=$2
20201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20202$as_echo_n "checking for $ac_word... " >&6; }
20203if ${ac_cv_path_UNZIP+:} false; then :
20204  $as_echo_n "(cached) " >&6
20205else
20206  case $UNZIP in
20207  [\\/]* | ?:[\\/]*)
20208  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20209  ;;
20210  *)
20211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20212for as_dir in $PATH
20213do
20214  IFS=$as_save_IFS
20215  test -z "$as_dir" && as_dir=.
20216    for ac_exec_ext in '' $ac_executable_extensions; do
20217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20218    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20220    break 2
20221  fi
20222done
20223  done
20224IFS=$as_save_IFS
20225
20226  ;;
20227esac
20228fi
20229UNZIP=$ac_cv_path_UNZIP
20230if test -n "$UNZIP"; then
20231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20232$as_echo "$UNZIP" >&6; }
20233else
20234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20235$as_echo "no" >&6; }
20236fi
20237
20238
20239  test -n "$UNZIP" && break
20240done
20241
20242  else
20243    # The variable is set, but is it from the command line or the environment?
20244
20245    # Try to remove the string !UNZIP! from our list.
20246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20248      # If it failed, the variable was not from the command line. Ignore it,
20249      # but warn the user (except for BASH, which is always set by the calling BASH).
20250      if test "xUNZIP" != xBASH; then
20251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20252$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20253      fi
20254      # Try to locate tool using the code snippet
20255      for ac_prog in unzip
20256do
20257  # Extract the first word of "$ac_prog", so it can be a program name with args.
20258set dummy $ac_prog; ac_word=$2
20259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20260$as_echo_n "checking for $ac_word... " >&6; }
20261if ${ac_cv_path_UNZIP+:} false; then :
20262  $as_echo_n "(cached) " >&6
20263else
20264  case $UNZIP in
20265  [\\/]* | ?:[\\/]*)
20266  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20267  ;;
20268  *)
20269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20270for as_dir in $PATH
20271do
20272  IFS=$as_save_IFS
20273  test -z "$as_dir" && as_dir=.
20274    for ac_exec_ext in '' $ac_executable_extensions; do
20275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20276    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20278    break 2
20279  fi
20280done
20281  done
20282IFS=$as_save_IFS
20283
20284  ;;
20285esac
20286fi
20287UNZIP=$ac_cv_path_UNZIP
20288if test -n "$UNZIP"; then
20289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20290$as_echo "$UNZIP" >&6; }
20291else
20292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20293$as_echo "no" >&6; }
20294fi
20295
20296
20297  test -n "$UNZIP" && break
20298done
20299
20300    else
20301      # If it succeeded, then it was overridden by the user. We will use it
20302      # for the tool.
20303
20304      # First remove it from the list of overridden variables, so we can test
20305      # for unknown variables in the end.
20306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20307
20308      # Check if we try to supply an empty value
20309      if test "x$UNZIP" = x; then
20310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20311$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20313$as_echo_n "checking for UNZIP... " >&6; }
20314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20315$as_echo "disabled" >&6; }
20316      else
20317        # Check if the provided tool contains a complete path.
20318        tool_specified="$UNZIP"
20319        tool_basename="${tool_specified##*/}"
20320        if test "x$tool_basename" = "x$tool_specified"; then
20321          # A command without a complete path is provided, search $PATH.
20322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20323$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20324          # Extract the first word of "$tool_basename", so it can be a program name with args.
20325set dummy $tool_basename; ac_word=$2
20326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20327$as_echo_n "checking for $ac_word... " >&6; }
20328if ${ac_cv_path_UNZIP+:} false; then :
20329  $as_echo_n "(cached) " >&6
20330else
20331  case $UNZIP in
20332  [\\/]* | ?:[\\/]*)
20333  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20334  ;;
20335  *)
20336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20337for as_dir in $PATH
20338do
20339  IFS=$as_save_IFS
20340  test -z "$as_dir" && as_dir=.
20341    for ac_exec_ext in '' $ac_executable_extensions; do
20342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20343    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20345    break 2
20346  fi
20347done
20348  done
20349IFS=$as_save_IFS
20350
20351  ;;
20352esac
20353fi
20354UNZIP=$ac_cv_path_UNZIP
20355if test -n "$UNZIP"; then
20356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20357$as_echo "$UNZIP" >&6; }
20358else
20359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20360$as_echo "no" >&6; }
20361fi
20362
20363
20364          if test "x$UNZIP" = x; then
20365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20366          fi
20367        else
20368          # Otherwise we believe it is a complete path. Use it as it is.
20369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20370$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20372$as_echo_n "checking for UNZIP... " >&6; }
20373          if test ! -x "$tool_specified"; then
20374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20375$as_echo "not found" >&6; }
20376            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20377          fi
20378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20379$as_echo "$tool_specified" >&6; }
20380        fi
20381      fi
20382    fi
20383
20384  fi
20385
20386
20387
20388  if test "x$UNZIP" = x; then
20389    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20390  fi
20391
20392
20393
20394
20395
20396  # Publish this variable in the help.
20397
20398
20399  if [ -z "${ZIP+x}" ]; then
20400    # The variable is not set by user, try to locate tool using the code snippet
20401    for ac_prog in zip
20402do
20403  # Extract the first word of "$ac_prog", so it can be a program name with args.
20404set dummy $ac_prog; ac_word=$2
20405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20406$as_echo_n "checking for $ac_word... " >&6; }
20407if ${ac_cv_path_ZIP+:} false; then :
20408  $as_echo_n "(cached) " >&6
20409else
20410  case $ZIP in
20411  [\\/]* | ?:[\\/]*)
20412  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20413  ;;
20414  *)
20415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20416for as_dir in $PATH
20417do
20418  IFS=$as_save_IFS
20419  test -z "$as_dir" && as_dir=.
20420    for ac_exec_ext in '' $ac_executable_extensions; do
20421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20422    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20424    break 2
20425  fi
20426done
20427  done
20428IFS=$as_save_IFS
20429
20430  ;;
20431esac
20432fi
20433ZIP=$ac_cv_path_ZIP
20434if test -n "$ZIP"; then
20435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20436$as_echo "$ZIP" >&6; }
20437else
20438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20439$as_echo "no" >&6; }
20440fi
20441
20442
20443  test -n "$ZIP" && break
20444done
20445
20446  else
20447    # The variable is set, but is it from the command line or the environment?
20448
20449    # Try to remove the string !ZIP! from our list.
20450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20452      # If it failed, the variable was not from the command line. Ignore it,
20453      # but warn the user (except for BASH, which is always set by the calling BASH).
20454      if test "xZIP" != xBASH; then
20455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20456$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20457      fi
20458      # Try to locate tool using the code snippet
20459      for ac_prog in zip
20460do
20461  # Extract the first word of "$ac_prog", so it can be a program name with args.
20462set dummy $ac_prog; ac_word=$2
20463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20464$as_echo_n "checking for $ac_word... " >&6; }
20465if ${ac_cv_path_ZIP+:} false; then :
20466  $as_echo_n "(cached) " >&6
20467else
20468  case $ZIP in
20469  [\\/]* | ?:[\\/]*)
20470  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20471  ;;
20472  *)
20473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20474for as_dir in $PATH
20475do
20476  IFS=$as_save_IFS
20477  test -z "$as_dir" && as_dir=.
20478    for ac_exec_ext in '' $ac_executable_extensions; do
20479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20480    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20482    break 2
20483  fi
20484done
20485  done
20486IFS=$as_save_IFS
20487
20488  ;;
20489esac
20490fi
20491ZIP=$ac_cv_path_ZIP
20492if test -n "$ZIP"; then
20493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20494$as_echo "$ZIP" >&6; }
20495else
20496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20497$as_echo "no" >&6; }
20498fi
20499
20500
20501  test -n "$ZIP" && break
20502done
20503
20504    else
20505      # If it succeeded, then it was overridden by the user. We will use it
20506      # for the tool.
20507
20508      # First remove it from the list of overridden variables, so we can test
20509      # for unknown variables in the end.
20510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20511
20512      # Check if we try to supply an empty value
20513      if test "x$ZIP" = x; then
20514        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20515$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20517$as_echo_n "checking for ZIP... " >&6; }
20518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20519$as_echo "disabled" >&6; }
20520      else
20521        # Check if the provided tool contains a complete path.
20522        tool_specified="$ZIP"
20523        tool_basename="${tool_specified##*/}"
20524        if test "x$tool_basename" = "x$tool_specified"; then
20525          # A command without a complete path is provided, search $PATH.
20526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20527$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20528          # Extract the first word of "$tool_basename", so it can be a program name with args.
20529set dummy $tool_basename; ac_word=$2
20530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20531$as_echo_n "checking for $ac_word... " >&6; }
20532if ${ac_cv_path_ZIP+:} false; then :
20533  $as_echo_n "(cached) " >&6
20534else
20535  case $ZIP in
20536  [\\/]* | ?:[\\/]*)
20537  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20538  ;;
20539  *)
20540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20541for as_dir in $PATH
20542do
20543  IFS=$as_save_IFS
20544  test -z "$as_dir" && as_dir=.
20545    for ac_exec_ext in '' $ac_executable_extensions; do
20546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20547    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20549    break 2
20550  fi
20551done
20552  done
20553IFS=$as_save_IFS
20554
20555  ;;
20556esac
20557fi
20558ZIP=$ac_cv_path_ZIP
20559if test -n "$ZIP"; then
20560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20561$as_echo "$ZIP" >&6; }
20562else
20563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20564$as_echo "no" >&6; }
20565fi
20566
20567
20568          if test "x$ZIP" = x; then
20569            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20570          fi
20571        else
20572          # Otherwise we believe it is a complete path. Use it as it is.
20573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20574$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20575          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20576$as_echo_n "checking for ZIP... " >&6; }
20577          if test ! -x "$tool_specified"; then
20578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20579$as_echo "not found" >&6; }
20580            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20581          fi
20582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20583$as_echo "$tool_specified" >&6; }
20584        fi
20585      fi
20586    fi
20587
20588  fi
20589
20590
20591
20592  if test "x$ZIP" = x; then
20593    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20594  fi
20595
20596
20597
20598  # Non-required basic tools
20599
20600
20601
20602  # Publish this variable in the help.
20603
20604
20605  if [ -z "${LDD+x}" ]; then
20606    # The variable is not set by user, try to locate tool using the code snippet
20607    for ac_prog in ldd
20608do
20609  # Extract the first word of "$ac_prog", so it can be a program name with args.
20610set dummy $ac_prog; ac_word=$2
20611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20612$as_echo_n "checking for $ac_word... " >&6; }
20613if ${ac_cv_path_LDD+:} false; then :
20614  $as_echo_n "(cached) " >&6
20615else
20616  case $LDD in
20617  [\\/]* | ?:[\\/]*)
20618  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20619  ;;
20620  *)
20621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20622for as_dir in $PATH
20623do
20624  IFS=$as_save_IFS
20625  test -z "$as_dir" && as_dir=.
20626    for ac_exec_ext in '' $ac_executable_extensions; do
20627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20628    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20630    break 2
20631  fi
20632done
20633  done
20634IFS=$as_save_IFS
20635
20636  ;;
20637esac
20638fi
20639LDD=$ac_cv_path_LDD
20640if test -n "$LDD"; then
20641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20642$as_echo "$LDD" >&6; }
20643else
20644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20645$as_echo "no" >&6; }
20646fi
20647
20648
20649  test -n "$LDD" && break
20650done
20651
20652  else
20653    # The variable is set, but is it from the command line or the environment?
20654
20655    # Try to remove the string !LDD! from our list.
20656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20658      # If it failed, the variable was not from the command line. Ignore it,
20659      # but warn the user (except for BASH, which is always set by the calling BASH).
20660      if test "xLDD" != xBASH; then
20661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20662$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20663      fi
20664      # Try to locate tool using the code snippet
20665      for ac_prog in ldd
20666do
20667  # Extract the first word of "$ac_prog", so it can be a program name with args.
20668set dummy $ac_prog; ac_word=$2
20669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20670$as_echo_n "checking for $ac_word... " >&6; }
20671if ${ac_cv_path_LDD+:} false; then :
20672  $as_echo_n "(cached) " >&6
20673else
20674  case $LDD in
20675  [\\/]* | ?:[\\/]*)
20676  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20677  ;;
20678  *)
20679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20680for as_dir in $PATH
20681do
20682  IFS=$as_save_IFS
20683  test -z "$as_dir" && as_dir=.
20684    for ac_exec_ext in '' $ac_executable_extensions; do
20685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20686    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20688    break 2
20689  fi
20690done
20691  done
20692IFS=$as_save_IFS
20693
20694  ;;
20695esac
20696fi
20697LDD=$ac_cv_path_LDD
20698if test -n "$LDD"; then
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20700$as_echo "$LDD" >&6; }
20701else
20702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20703$as_echo "no" >&6; }
20704fi
20705
20706
20707  test -n "$LDD" && break
20708done
20709
20710    else
20711      # If it succeeded, then it was overridden by the user. We will use it
20712      # for the tool.
20713
20714      # First remove it from the list of overridden variables, so we can test
20715      # for unknown variables in the end.
20716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20717
20718      # Check if we try to supply an empty value
20719      if test "x$LDD" = x; then
20720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20721$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20723$as_echo_n "checking for LDD... " >&6; }
20724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20725$as_echo "disabled" >&6; }
20726      else
20727        # Check if the provided tool contains a complete path.
20728        tool_specified="$LDD"
20729        tool_basename="${tool_specified##*/}"
20730        if test "x$tool_basename" = "x$tool_specified"; then
20731          # A command without a complete path is provided, search $PATH.
20732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20733$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20734          # Extract the first word of "$tool_basename", so it can be a program name with args.
20735set dummy $tool_basename; ac_word=$2
20736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20737$as_echo_n "checking for $ac_word... " >&6; }
20738if ${ac_cv_path_LDD+:} false; then :
20739  $as_echo_n "(cached) " >&6
20740else
20741  case $LDD in
20742  [\\/]* | ?:[\\/]*)
20743  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20744  ;;
20745  *)
20746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20747for as_dir in $PATH
20748do
20749  IFS=$as_save_IFS
20750  test -z "$as_dir" && as_dir=.
20751    for ac_exec_ext in '' $ac_executable_extensions; do
20752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20753    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20755    break 2
20756  fi
20757done
20758  done
20759IFS=$as_save_IFS
20760
20761  ;;
20762esac
20763fi
20764LDD=$ac_cv_path_LDD
20765if test -n "$LDD"; then
20766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20767$as_echo "$LDD" >&6; }
20768else
20769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20770$as_echo "no" >&6; }
20771fi
20772
20773
20774          if test "x$LDD" = x; then
20775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20776          fi
20777        else
20778          # Otherwise we believe it is a complete path. Use it as it is.
20779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20780$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20782$as_echo_n "checking for LDD... " >&6; }
20783          if test ! -x "$tool_specified"; then
20784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20785$as_echo "not found" >&6; }
20786            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20787          fi
20788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20789$as_echo "$tool_specified" >&6; }
20790        fi
20791      fi
20792    fi
20793
20794  fi
20795
20796
20797  if test "x$LDD" = "x"; then
20798    # List shared lib dependencies is used for
20799    # debug output and checking for forbidden dependencies.
20800    # We can build without it.
20801    LDD="true"
20802  fi
20803
20804
20805  # Publish this variable in the help.
20806
20807
20808  if [ -z "${OTOOL+x}" ]; then
20809    # The variable is not set by user, try to locate tool using the code snippet
20810    for ac_prog in otool
20811do
20812  # Extract the first word of "$ac_prog", so it can be a program name with args.
20813set dummy $ac_prog; ac_word=$2
20814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20815$as_echo_n "checking for $ac_word... " >&6; }
20816if ${ac_cv_path_OTOOL+:} false; then :
20817  $as_echo_n "(cached) " >&6
20818else
20819  case $OTOOL in
20820  [\\/]* | ?:[\\/]*)
20821  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20822  ;;
20823  *)
20824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20825for as_dir in $PATH
20826do
20827  IFS=$as_save_IFS
20828  test -z "$as_dir" && as_dir=.
20829    for ac_exec_ext in '' $ac_executable_extensions; do
20830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20831    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20833    break 2
20834  fi
20835done
20836  done
20837IFS=$as_save_IFS
20838
20839  ;;
20840esac
20841fi
20842OTOOL=$ac_cv_path_OTOOL
20843if test -n "$OTOOL"; then
20844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20845$as_echo "$OTOOL" >&6; }
20846else
20847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20848$as_echo "no" >&6; }
20849fi
20850
20851
20852  test -n "$OTOOL" && break
20853done
20854
20855  else
20856    # The variable is set, but is it from the command line or the environment?
20857
20858    # Try to remove the string !OTOOL! from our list.
20859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20861      # If it failed, the variable was not from the command line. Ignore it,
20862      # but warn the user (except for BASH, which is always set by the calling BASH).
20863      if test "xOTOOL" != xBASH; then
20864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20865$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20866      fi
20867      # Try to locate tool using the code snippet
20868      for ac_prog in otool
20869do
20870  # Extract the first word of "$ac_prog", so it can be a program name with args.
20871set dummy $ac_prog; ac_word=$2
20872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20873$as_echo_n "checking for $ac_word... " >&6; }
20874if ${ac_cv_path_OTOOL+:} false; then :
20875  $as_echo_n "(cached) " >&6
20876else
20877  case $OTOOL in
20878  [\\/]* | ?:[\\/]*)
20879  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20880  ;;
20881  *)
20882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20883for as_dir in $PATH
20884do
20885  IFS=$as_save_IFS
20886  test -z "$as_dir" && as_dir=.
20887    for ac_exec_ext in '' $ac_executable_extensions; do
20888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20889    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20891    break 2
20892  fi
20893done
20894  done
20895IFS=$as_save_IFS
20896
20897  ;;
20898esac
20899fi
20900OTOOL=$ac_cv_path_OTOOL
20901if test -n "$OTOOL"; then
20902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20903$as_echo "$OTOOL" >&6; }
20904else
20905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20906$as_echo "no" >&6; }
20907fi
20908
20909
20910  test -n "$OTOOL" && break
20911done
20912
20913    else
20914      # If it succeeded, then it was overridden by the user. We will use it
20915      # for the tool.
20916
20917      # First remove it from the list of overridden variables, so we can test
20918      # for unknown variables in the end.
20919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20920
20921      # Check if we try to supply an empty value
20922      if test "x$OTOOL" = x; then
20923        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20924$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20925        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20926$as_echo_n "checking for OTOOL... " >&6; }
20927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20928$as_echo "disabled" >&6; }
20929      else
20930        # Check if the provided tool contains a complete path.
20931        tool_specified="$OTOOL"
20932        tool_basename="${tool_specified##*/}"
20933        if test "x$tool_basename" = "x$tool_specified"; then
20934          # A command without a complete path is provided, search $PATH.
20935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20936$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20937          # Extract the first word of "$tool_basename", so it can be a program name with args.
20938set dummy $tool_basename; ac_word=$2
20939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20940$as_echo_n "checking for $ac_word... " >&6; }
20941if ${ac_cv_path_OTOOL+:} false; then :
20942  $as_echo_n "(cached) " >&6
20943else
20944  case $OTOOL in
20945  [\\/]* | ?:[\\/]*)
20946  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20947  ;;
20948  *)
20949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20950for as_dir in $PATH
20951do
20952  IFS=$as_save_IFS
20953  test -z "$as_dir" && as_dir=.
20954    for ac_exec_ext in '' $ac_executable_extensions; do
20955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20956    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20958    break 2
20959  fi
20960done
20961  done
20962IFS=$as_save_IFS
20963
20964  ;;
20965esac
20966fi
20967OTOOL=$ac_cv_path_OTOOL
20968if test -n "$OTOOL"; then
20969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20970$as_echo "$OTOOL" >&6; }
20971else
20972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20973$as_echo "no" >&6; }
20974fi
20975
20976
20977          if test "x$OTOOL" = x; then
20978            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20979          fi
20980        else
20981          # Otherwise we believe it is a complete path. Use it as it is.
20982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20983$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20984          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20985$as_echo_n "checking for OTOOL... " >&6; }
20986          if test ! -x "$tool_specified"; then
20987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20988$as_echo "not found" >&6; }
20989            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20990          fi
20991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20992$as_echo "$tool_specified" >&6; }
20993        fi
20994      fi
20995    fi
20996
20997  fi
20998
20999
21000  if test "x$OTOOL" = "x"; then
21001    OTOOL="true"
21002  fi
21003
21004
21005  # Publish this variable in the help.
21006
21007
21008  if [ -z "${READELF+x}" ]; then
21009    # The variable is not set by user, try to locate tool using the code snippet
21010    for ac_prog in greadelf readelf
21011do
21012  # Extract the first word of "$ac_prog", so it can be a program name with args.
21013set dummy $ac_prog; ac_word=$2
21014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21015$as_echo_n "checking for $ac_word... " >&6; }
21016if ${ac_cv_path_READELF+:} false; then :
21017  $as_echo_n "(cached) " >&6
21018else
21019  case $READELF in
21020  [\\/]* | ?:[\\/]*)
21021  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21022  ;;
21023  *)
21024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21025for as_dir in $PATH
21026do
21027  IFS=$as_save_IFS
21028  test -z "$as_dir" && as_dir=.
21029    for ac_exec_ext in '' $ac_executable_extensions; do
21030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21031    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21033    break 2
21034  fi
21035done
21036  done
21037IFS=$as_save_IFS
21038
21039  ;;
21040esac
21041fi
21042READELF=$ac_cv_path_READELF
21043if test -n "$READELF"; then
21044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21045$as_echo "$READELF" >&6; }
21046else
21047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21048$as_echo "no" >&6; }
21049fi
21050
21051
21052  test -n "$READELF" && break
21053done
21054
21055  else
21056    # The variable is set, but is it from the command line or the environment?
21057
21058    # Try to remove the string !READELF! from our list.
21059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21061      # If it failed, the variable was not from the command line. Ignore it,
21062      # but warn the user (except for BASH, which is always set by the calling BASH).
21063      if test "xREADELF" != xBASH; then
21064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21065$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21066      fi
21067      # Try to locate tool using the code snippet
21068      for ac_prog in greadelf readelf
21069do
21070  # Extract the first word of "$ac_prog", so it can be a program name with args.
21071set dummy $ac_prog; ac_word=$2
21072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21073$as_echo_n "checking for $ac_word... " >&6; }
21074if ${ac_cv_path_READELF+:} false; then :
21075  $as_echo_n "(cached) " >&6
21076else
21077  case $READELF in
21078  [\\/]* | ?:[\\/]*)
21079  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21080  ;;
21081  *)
21082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21083for as_dir in $PATH
21084do
21085  IFS=$as_save_IFS
21086  test -z "$as_dir" && as_dir=.
21087    for ac_exec_ext in '' $ac_executable_extensions; do
21088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21089    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21091    break 2
21092  fi
21093done
21094  done
21095IFS=$as_save_IFS
21096
21097  ;;
21098esac
21099fi
21100READELF=$ac_cv_path_READELF
21101if test -n "$READELF"; then
21102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21103$as_echo "$READELF" >&6; }
21104else
21105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21106$as_echo "no" >&6; }
21107fi
21108
21109
21110  test -n "$READELF" && break
21111done
21112
21113    else
21114      # If it succeeded, then it was overridden by the user. We will use it
21115      # for the tool.
21116
21117      # First remove it from the list of overridden variables, so we can test
21118      # for unknown variables in the end.
21119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21120
21121      # Check if we try to supply an empty value
21122      if test "x$READELF" = x; then
21123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21124$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21126$as_echo_n "checking for READELF... " >&6; }
21127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21128$as_echo "disabled" >&6; }
21129      else
21130        # Check if the provided tool contains a complete path.
21131        tool_specified="$READELF"
21132        tool_basename="${tool_specified##*/}"
21133        if test "x$tool_basename" = "x$tool_specified"; then
21134          # A command without a complete path is provided, search $PATH.
21135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21136$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21137          # Extract the first word of "$tool_basename", so it can be a program name with args.
21138set dummy $tool_basename; ac_word=$2
21139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21140$as_echo_n "checking for $ac_word... " >&6; }
21141if ${ac_cv_path_READELF+:} false; then :
21142  $as_echo_n "(cached) " >&6
21143else
21144  case $READELF in
21145  [\\/]* | ?:[\\/]*)
21146  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21147  ;;
21148  *)
21149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21150for as_dir in $PATH
21151do
21152  IFS=$as_save_IFS
21153  test -z "$as_dir" && as_dir=.
21154    for ac_exec_ext in '' $ac_executable_extensions; do
21155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21156    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21158    break 2
21159  fi
21160done
21161  done
21162IFS=$as_save_IFS
21163
21164  ;;
21165esac
21166fi
21167READELF=$ac_cv_path_READELF
21168if test -n "$READELF"; then
21169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21170$as_echo "$READELF" >&6; }
21171else
21172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21173$as_echo "no" >&6; }
21174fi
21175
21176
21177          if test "x$READELF" = x; then
21178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21179          fi
21180        else
21181          # Otherwise we believe it is a complete path. Use it as it is.
21182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21183$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21185$as_echo_n "checking for READELF... " >&6; }
21186          if test ! -x "$tool_specified"; then
21187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21188$as_echo "not found" >&6; }
21189            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21190          fi
21191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21192$as_echo "$tool_specified" >&6; }
21193        fi
21194      fi
21195    fi
21196
21197  fi
21198
21199
21200
21201
21202  # Publish this variable in the help.
21203
21204
21205  if [ -z "${HG+x}" ]; then
21206    # The variable is not set by user, try to locate tool using the code snippet
21207    for ac_prog in hg
21208do
21209  # Extract the first word of "$ac_prog", so it can be a program name with args.
21210set dummy $ac_prog; ac_word=$2
21211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21212$as_echo_n "checking for $ac_word... " >&6; }
21213if ${ac_cv_path_HG+:} false; then :
21214  $as_echo_n "(cached) " >&6
21215else
21216  case $HG in
21217  [\\/]* | ?:[\\/]*)
21218  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21219  ;;
21220  *)
21221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21222for as_dir in $PATH
21223do
21224  IFS=$as_save_IFS
21225  test -z "$as_dir" && as_dir=.
21226    for ac_exec_ext in '' $ac_executable_extensions; do
21227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21228    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21230    break 2
21231  fi
21232done
21233  done
21234IFS=$as_save_IFS
21235
21236  ;;
21237esac
21238fi
21239HG=$ac_cv_path_HG
21240if test -n "$HG"; then
21241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21242$as_echo "$HG" >&6; }
21243else
21244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21245$as_echo "no" >&6; }
21246fi
21247
21248
21249  test -n "$HG" && break
21250done
21251
21252  else
21253    # The variable is set, but is it from the command line or the environment?
21254
21255    # Try to remove the string !HG! from our list.
21256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21258      # If it failed, the variable was not from the command line. Ignore it,
21259      # but warn the user (except for BASH, which is always set by the calling BASH).
21260      if test "xHG" != xBASH; then
21261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21262$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21263      fi
21264      # Try to locate tool using the code snippet
21265      for ac_prog in hg
21266do
21267  # Extract the first word of "$ac_prog", so it can be a program name with args.
21268set dummy $ac_prog; ac_word=$2
21269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21270$as_echo_n "checking for $ac_word... " >&6; }
21271if ${ac_cv_path_HG+:} false; then :
21272  $as_echo_n "(cached) " >&6
21273else
21274  case $HG in
21275  [\\/]* | ?:[\\/]*)
21276  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21277  ;;
21278  *)
21279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21280for as_dir in $PATH
21281do
21282  IFS=$as_save_IFS
21283  test -z "$as_dir" && as_dir=.
21284    for ac_exec_ext in '' $ac_executable_extensions; do
21285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21286    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21288    break 2
21289  fi
21290done
21291  done
21292IFS=$as_save_IFS
21293
21294  ;;
21295esac
21296fi
21297HG=$ac_cv_path_HG
21298if test -n "$HG"; then
21299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21300$as_echo "$HG" >&6; }
21301else
21302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21303$as_echo "no" >&6; }
21304fi
21305
21306
21307  test -n "$HG" && break
21308done
21309
21310    else
21311      # If it succeeded, then it was overridden by the user. We will use it
21312      # for the tool.
21313
21314      # First remove it from the list of overridden variables, so we can test
21315      # for unknown variables in the end.
21316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21317
21318      # Check if we try to supply an empty value
21319      if test "x$HG" = x; then
21320        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21321$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21323$as_echo_n "checking for HG... " >&6; }
21324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21325$as_echo "disabled" >&6; }
21326      else
21327        # Check if the provided tool contains a complete path.
21328        tool_specified="$HG"
21329        tool_basename="${tool_specified##*/}"
21330        if test "x$tool_basename" = "x$tool_specified"; then
21331          # A command without a complete path is provided, search $PATH.
21332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21333$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21334          # Extract the first word of "$tool_basename", so it can be a program name with args.
21335set dummy $tool_basename; ac_word=$2
21336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21337$as_echo_n "checking for $ac_word... " >&6; }
21338if ${ac_cv_path_HG+:} false; then :
21339  $as_echo_n "(cached) " >&6
21340else
21341  case $HG in
21342  [\\/]* | ?:[\\/]*)
21343  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21344  ;;
21345  *)
21346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21347for as_dir in $PATH
21348do
21349  IFS=$as_save_IFS
21350  test -z "$as_dir" && as_dir=.
21351    for ac_exec_ext in '' $ac_executable_extensions; do
21352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21353    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21355    break 2
21356  fi
21357done
21358  done
21359IFS=$as_save_IFS
21360
21361  ;;
21362esac
21363fi
21364HG=$ac_cv_path_HG
21365if test -n "$HG"; then
21366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21367$as_echo "$HG" >&6; }
21368else
21369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21370$as_echo "no" >&6; }
21371fi
21372
21373
21374          if test "x$HG" = x; then
21375            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21376          fi
21377        else
21378          # Otherwise we believe it is a complete path. Use it as it is.
21379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21380$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21381          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21382$as_echo_n "checking for HG... " >&6; }
21383          if test ! -x "$tool_specified"; then
21384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21385$as_echo "not found" >&6; }
21386            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21387          fi
21388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21389$as_echo "$tool_specified" >&6; }
21390        fi
21391      fi
21392    fi
21393
21394  fi
21395
21396
21397
21398
21399  # Publish this variable in the help.
21400
21401
21402  if [ -z "${STAT+x}" ]; then
21403    # The variable is not set by user, try to locate tool using the code snippet
21404    for ac_prog in stat
21405do
21406  # Extract the first word of "$ac_prog", so it can be a program name with args.
21407set dummy $ac_prog; ac_word=$2
21408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21409$as_echo_n "checking for $ac_word... " >&6; }
21410if ${ac_cv_path_STAT+:} false; then :
21411  $as_echo_n "(cached) " >&6
21412else
21413  case $STAT in
21414  [\\/]* | ?:[\\/]*)
21415  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21416  ;;
21417  *)
21418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21419for as_dir in $PATH
21420do
21421  IFS=$as_save_IFS
21422  test -z "$as_dir" && as_dir=.
21423    for ac_exec_ext in '' $ac_executable_extensions; do
21424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21425    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21427    break 2
21428  fi
21429done
21430  done
21431IFS=$as_save_IFS
21432
21433  ;;
21434esac
21435fi
21436STAT=$ac_cv_path_STAT
21437if test -n "$STAT"; then
21438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21439$as_echo "$STAT" >&6; }
21440else
21441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21442$as_echo "no" >&6; }
21443fi
21444
21445
21446  test -n "$STAT" && break
21447done
21448
21449  else
21450    # The variable is set, but is it from the command line or the environment?
21451
21452    # Try to remove the string !STAT! from our list.
21453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21455      # If it failed, the variable was not from the command line. Ignore it,
21456      # but warn the user (except for BASH, which is always set by the calling BASH).
21457      if test "xSTAT" != xBASH; then
21458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21459$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21460      fi
21461      # Try to locate tool using the code snippet
21462      for ac_prog in stat
21463do
21464  # Extract the first word of "$ac_prog", so it can be a program name with args.
21465set dummy $ac_prog; ac_word=$2
21466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21467$as_echo_n "checking for $ac_word... " >&6; }
21468if ${ac_cv_path_STAT+:} false; then :
21469  $as_echo_n "(cached) " >&6
21470else
21471  case $STAT in
21472  [\\/]* | ?:[\\/]*)
21473  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21474  ;;
21475  *)
21476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21477for as_dir in $PATH
21478do
21479  IFS=$as_save_IFS
21480  test -z "$as_dir" && as_dir=.
21481    for ac_exec_ext in '' $ac_executable_extensions; do
21482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21483    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21485    break 2
21486  fi
21487done
21488  done
21489IFS=$as_save_IFS
21490
21491  ;;
21492esac
21493fi
21494STAT=$ac_cv_path_STAT
21495if test -n "$STAT"; then
21496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21497$as_echo "$STAT" >&6; }
21498else
21499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21500$as_echo "no" >&6; }
21501fi
21502
21503
21504  test -n "$STAT" && break
21505done
21506
21507    else
21508      # If it succeeded, then it was overridden by the user. We will use it
21509      # for the tool.
21510
21511      # First remove it from the list of overridden variables, so we can test
21512      # for unknown variables in the end.
21513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21514
21515      # Check if we try to supply an empty value
21516      if test "x$STAT" = x; then
21517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21518$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21520$as_echo_n "checking for STAT... " >&6; }
21521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21522$as_echo "disabled" >&6; }
21523      else
21524        # Check if the provided tool contains a complete path.
21525        tool_specified="$STAT"
21526        tool_basename="${tool_specified##*/}"
21527        if test "x$tool_basename" = "x$tool_specified"; then
21528          # A command without a complete path is provided, search $PATH.
21529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21530$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21531          # Extract the first word of "$tool_basename", so it can be a program name with args.
21532set dummy $tool_basename; ac_word=$2
21533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21534$as_echo_n "checking for $ac_word... " >&6; }
21535if ${ac_cv_path_STAT+:} false; then :
21536  $as_echo_n "(cached) " >&6
21537else
21538  case $STAT in
21539  [\\/]* | ?:[\\/]*)
21540  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21541  ;;
21542  *)
21543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21544for as_dir in $PATH
21545do
21546  IFS=$as_save_IFS
21547  test -z "$as_dir" && as_dir=.
21548    for ac_exec_ext in '' $ac_executable_extensions; do
21549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21550    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21552    break 2
21553  fi
21554done
21555  done
21556IFS=$as_save_IFS
21557
21558  ;;
21559esac
21560fi
21561STAT=$ac_cv_path_STAT
21562if test -n "$STAT"; then
21563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21564$as_echo "$STAT" >&6; }
21565else
21566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21567$as_echo "no" >&6; }
21568fi
21569
21570
21571          if test "x$STAT" = x; then
21572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21573          fi
21574        else
21575          # Otherwise we believe it is a complete path. Use it as it is.
21576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21577$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21579$as_echo_n "checking for STAT... " >&6; }
21580          if test ! -x "$tool_specified"; then
21581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21582$as_echo "not found" >&6; }
21583            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21584          fi
21585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21586$as_echo "$tool_specified" >&6; }
21587        fi
21588      fi
21589    fi
21590
21591  fi
21592
21593
21594
21595
21596  # Publish this variable in the help.
21597
21598
21599  if [ -z "${TIME+x}" ]; then
21600    # The variable is not set by user, try to locate tool using the code snippet
21601    for ac_prog in time
21602do
21603  # Extract the first word of "$ac_prog", so it can be a program name with args.
21604set dummy $ac_prog; ac_word=$2
21605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21606$as_echo_n "checking for $ac_word... " >&6; }
21607if ${ac_cv_path_TIME+:} false; then :
21608  $as_echo_n "(cached) " >&6
21609else
21610  case $TIME in
21611  [\\/]* | ?:[\\/]*)
21612  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21613  ;;
21614  *)
21615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21616for as_dir in $PATH
21617do
21618  IFS=$as_save_IFS
21619  test -z "$as_dir" && as_dir=.
21620    for ac_exec_ext in '' $ac_executable_extensions; do
21621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21622    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21624    break 2
21625  fi
21626done
21627  done
21628IFS=$as_save_IFS
21629
21630  ;;
21631esac
21632fi
21633TIME=$ac_cv_path_TIME
21634if test -n "$TIME"; then
21635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21636$as_echo "$TIME" >&6; }
21637else
21638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21639$as_echo "no" >&6; }
21640fi
21641
21642
21643  test -n "$TIME" && break
21644done
21645
21646  else
21647    # The variable is set, but is it from the command line or the environment?
21648
21649    # Try to remove the string !TIME! from our list.
21650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21652      # If it failed, the variable was not from the command line. Ignore it,
21653      # but warn the user (except for BASH, which is always set by the calling BASH).
21654      if test "xTIME" != xBASH; then
21655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21656$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21657      fi
21658      # Try to locate tool using the code snippet
21659      for ac_prog in time
21660do
21661  # Extract the first word of "$ac_prog", so it can be a program name with args.
21662set dummy $ac_prog; ac_word=$2
21663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21664$as_echo_n "checking for $ac_word... " >&6; }
21665if ${ac_cv_path_TIME+:} false; then :
21666  $as_echo_n "(cached) " >&6
21667else
21668  case $TIME in
21669  [\\/]* | ?:[\\/]*)
21670  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21671  ;;
21672  *)
21673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21674for as_dir in $PATH
21675do
21676  IFS=$as_save_IFS
21677  test -z "$as_dir" && as_dir=.
21678    for ac_exec_ext in '' $ac_executable_extensions; do
21679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21680    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21682    break 2
21683  fi
21684done
21685  done
21686IFS=$as_save_IFS
21687
21688  ;;
21689esac
21690fi
21691TIME=$ac_cv_path_TIME
21692if test -n "$TIME"; then
21693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21694$as_echo "$TIME" >&6; }
21695else
21696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21697$as_echo "no" >&6; }
21698fi
21699
21700
21701  test -n "$TIME" && break
21702done
21703
21704    else
21705      # If it succeeded, then it was overridden by the user. We will use it
21706      # for the tool.
21707
21708      # First remove it from the list of overridden variables, so we can test
21709      # for unknown variables in the end.
21710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21711
21712      # Check if we try to supply an empty value
21713      if test "x$TIME" = x; then
21714        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21715$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21717$as_echo_n "checking for TIME... " >&6; }
21718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21719$as_echo "disabled" >&6; }
21720      else
21721        # Check if the provided tool contains a complete path.
21722        tool_specified="$TIME"
21723        tool_basename="${tool_specified##*/}"
21724        if test "x$tool_basename" = "x$tool_specified"; then
21725          # A command without a complete path is provided, search $PATH.
21726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21727$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21728          # Extract the first word of "$tool_basename", so it can be a program name with args.
21729set dummy $tool_basename; ac_word=$2
21730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21731$as_echo_n "checking for $ac_word... " >&6; }
21732if ${ac_cv_path_TIME+:} false; then :
21733  $as_echo_n "(cached) " >&6
21734else
21735  case $TIME in
21736  [\\/]* | ?:[\\/]*)
21737  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21738  ;;
21739  *)
21740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21741for as_dir in $PATH
21742do
21743  IFS=$as_save_IFS
21744  test -z "$as_dir" && as_dir=.
21745    for ac_exec_ext in '' $ac_executable_extensions; do
21746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21747    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21749    break 2
21750  fi
21751done
21752  done
21753IFS=$as_save_IFS
21754
21755  ;;
21756esac
21757fi
21758TIME=$ac_cv_path_TIME
21759if test -n "$TIME"; then
21760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21761$as_echo "$TIME" >&6; }
21762else
21763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21764$as_echo "no" >&6; }
21765fi
21766
21767
21768          if test "x$TIME" = x; then
21769            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21770          fi
21771        else
21772          # Otherwise we believe it is a complete path. Use it as it is.
21773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21774$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21775          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21776$as_echo_n "checking for TIME... " >&6; }
21777          if test ! -x "$tool_specified"; then
21778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21779$as_echo "not found" >&6; }
21780            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21781          fi
21782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21783$as_echo "$tool_specified" >&6; }
21784        fi
21785      fi
21786    fi
21787
21788  fi
21789
21790
21791
21792
21793  # Publish this variable in the help.
21794
21795
21796  if [ -z "${PATCH+x}" ]; then
21797    # The variable is not set by user, try to locate tool using the code snippet
21798    for ac_prog in gpatch patch
21799do
21800  # Extract the first word of "$ac_prog", so it can be a program name with args.
21801set dummy $ac_prog; ac_word=$2
21802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21803$as_echo_n "checking for $ac_word... " >&6; }
21804if ${ac_cv_path_PATCH+:} false; then :
21805  $as_echo_n "(cached) " >&6
21806else
21807  case $PATCH in
21808  [\\/]* | ?:[\\/]*)
21809  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21810  ;;
21811  *)
21812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21813for as_dir in $PATH
21814do
21815  IFS=$as_save_IFS
21816  test -z "$as_dir" && as_dir=.
21817    for ac_exec_ext in '' $ac_executable_extensions; do
21818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21819    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21821    break 2
21822  fi
21823done
21824  done
21825IFS=$as_save_IFS
21826
21827  ;;
21828esac
21829fi
21830PATCH=$ac_cv_path_PATCH
21831if test -n "$PATCH"; then
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21833$as_echo "$PATCH" >&6; }
21834else
21835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21836$as_echo "no" >&6; }
21837fi
21838
21839
21840  test -n "$PATCH" && break
21841done
21842
21843  else
21844    # The variable is set, but is it from the command line or the environment?
21845
21846    # Try to remove the string !PATCH! from our list.
21847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21849      # If it failed, the variable was not from the command line. Ignore it,
21850      # but warn the user (except for BASH, which is always set by the calling BASH).
21851      if test "xPATCH" != xBASH; then
21852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21853$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21854      fi
21855      # Try to locate tool using the code snippet
21856      for ac_prog in gpatch patch
21857do
21858  # Extract the first word of "$ac_prog", so it can be a program name with args.
21859set dummy $ac_prog; ac_word=$2
21860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21861$as_echo_n "checking for $ac_word... " >&6; }
21862if ${ac_cv_path_PATCH+:} false; then :
21863  $as_echo_n "(cached) " >&6
21864else
21865  case $PATCH in
21866  [\\/]* | ?:[\\/]*)
21867  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21868  ;;
21869  *)
21870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21871for as_dir in $PATH
21872do
21873  IFS=$as_save_IFS
21874  test -z "$as_dir" && as_dir=.
21875    for ac_exec_ext in '' $ac_executable_extensions; do
21876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21877    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21879    break 2
21880  fi
21881done
21882  done
21883IFS=$as_save_IFS
21884
21885  ;;
21886esac
21887fi
21888PATCH=$ac_cv_path_PATCH
21889if test -n "$PATCH"; then
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21891$as_echo "$PATCH" >&6; }
21892else
21893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21894$as_echo "no" >&6; }
21895fi
21896
21897
21898  test -n "$PATCH" && break
21899done
21900
21901    else
21902      # If it succeeded, then it was overridden by the user. We will use it
21903      # for the tool.
21904
21905      # First remove it from the list of overridden variables, so we can test
21906      # for unknown variables in the end.
21907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21908
21909      # Check if we try to supply an empty value
21910      if test "x$PATCH" = x; then
21911        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21912$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21913        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21914$as_echo_n "checking for PATCH... " >&6; }
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21916$as_echo "disabled" >&6; }
21917      else
21918        # Check if the provided tool contains a complete path.
21919        tool_specified="$PATCH"
21920        tool_basename="${tool_specified##*/}"
21921        if test "x$tool_basename" = "x$tool_specified"; then
21922          # A command without a complete path is provided, search $PATH.
21923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21924$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21925          # Extract the first word of "$tool_basename", so it can be a program name with args.
21926set dummy $tool_basename; ac_word=$2
21927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21928$as_echo_n "checking for $ac_word... " >&6; }
21929if ${ac_cv_path_PATCH+:} false; then :
21930  $as_echo_n "(cached) " >&6
21931else
21932  case $PATCH in
21933  [\\/]* | ?:[\\/]*)
21934  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21935  ;;
21936  *)
21937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21938for as_dir in $PATH
21939do
21940  IFS=$as_save_IFS
21941  test -z "$as_dir" && as_dir=.
21942    for ac_exec_ext in '' $ac_executable_extensions; do
21943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21944    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21946    break 2
21947  fi
21948done
21949  done
21950IFS=$as_save_IFS
21951
21952  ;;
21953esac
21954fi
21955PATCH=$ac_cv_path_PATCH
21956if test -n "$PATCH"; then
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21958$as_echo "$PATCH" >&6; }
21959else
21960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21961$as_echo "no" >&6; }
21962fi
21963
21964
21965          if test "x$PATCH" = x; then
21966            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21967          fi
21968        else
21969          # Otherwise we believe it is a complete path. Use it as it is.
21970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21971$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21972          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21973$as_echo_n "checking for PATCH... " >&6; }
21974          if test ! -x "$tool_specified"; then
21975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21976$as_echo "not found" >&6; }
21977            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21978          fi
21979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21980$as_echo "$tool_specified" >&6; }
21981        fi
21982      fi
21983    fi
21984
21985  fi
21986
21987
21988  # Check if it's GNU time
21989  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21990  if test "x$IS_GNU_TIME" != x; then
21991    IS_GNU_TIME=yes
21992  else
21993    IS_GNU_TIME=no
21994  fi
21995
21996
21997  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21998
21999
22000
22001  # Publish this variable in the help.
22002
22003
22004  if [ -z "${DSYMUTIL+x}" ]; then
22005    # The variable is not set by user, try to locate tool using the code snippet
22006    for ac_prog in dsymutil
22007do
22008  # Extract the first word of "$ac_prog", so it can be a program name with args.
22009set dummy $ac_prog; ac_word=$2
22010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22011$as_echo_n "checking for $ac_word... " >&6; }
22012if ${ac_cv_path_DSYMUTIL+:} false; then :
22013  $as_echo_n "(cached) " >&6
22014else
22015  case $DSYMUTIL in
22016  [\\/]* | ?:[\\/]*)
22017  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22018  ;;
22019  *)
22020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22021for as_dir in $PATH
22022do
22023  IFS=$as_save_IFS
22024  test -z "$as_dir" && as_dir=.
22025    for ac_exec_ext in '' $ac_executable_extensions; do
22026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22027    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22029    break 2
22030  fi
22031done
22032  done
22033IFS=$as_save_IFS
22034
22035  ;;
22036esac
22037fi
22038DSYMUTIL=$ac_cv_path_DSYMUTIL
22039if test -n "$DSYMUTIL"; then
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22041$as_echo "$DSYMUTIL" >&6; }
22042else
22043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22044$as_echo "no" >&6; }
22045fi
22046
22047
22048  test -n "$DSYMUTIL" && break
22049done
22050
22051  else
22052    # The variable is set, but is it from the command line or the environment?
22053
22054    # Try to remove the string !DSYMUTIL! from our list.
22055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22057      # If it failed, the variable was not from the command line. Ignore it,
22058      # but warn the user (except for BASH, which is always set by the calling BASH).
22059      if test "xDSYMUTIL" != xBASH; then
22060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22061$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22062      fi
22063      # Try to locate tool using the code snippet
22064      for ac_prog in dsymutil
22065do
22066  # Extract the first word of "$ac_prog", so it can be a program name with args.
22067set dummy $ac_prog; ac_word=$2
22068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22069$as_echo_n "checking for $ac_word... " >&6; }
22070if ${ac_cv_path_DSYMUTIL+:} false; then :
22071  $as_echo_n "(cached) " >&6
22072else
22073  case $DSYMUTIL in
22074  [\\/]* | ?:[\\/]*)
22075  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22076  ;;
22077  *)
22078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22079for as_dir in $PATH
22080do
22081  IFS=$as_save_IFS
22082  test -z "$as_dir" && as_dir=.
22083    for ac_exec_ext in '' $ac_executable_extensions; do
22084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22085    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22087    break 2
22088  fi
22089done
22090  done
22091IFS=$as_save_IFS
22092
22093  ;;
22094esac
22095fi
22096DSYMUTIL=$ac_cv_path_DSYMUTIL
22097if test -n "$DSYMUTIL"; then
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22099$as_echo "$DSYMUTIL" >&6; }
22100else
22101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22102$as_echo "no" >&6; }
22103fi
22104
22105
22106  test -n "$DSYMUTIL" && break
22107done
22108
22109    else
22110      # If it succeeded, then it was overridden by the user. We will use it
22111      # for the tool.
22112
22113      # First remove it from the list of overridden variables, so we can test
22114      # for unknown variables in the end.
22115      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22116
22117      # Check if we try to supply an empty value
22118      if test "x$DSYMUTIL" = x; then
22119        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22120$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22122$as_echo_n "checking for DSYMUTIL... " >&6; }
22123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22124$as_echo "disabled" >&6; }
22125      else
22126        # Check if the provided tool contains a complete path.
22127        tool_specified="$DSYMUTIL"
22128        tool_basename="${tool_specified##*/}"
22129        if test "x$tool_basename" = "x$tool_specified"; then
22130          # A command without a complete path is provided, search $PATH.
22131          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22132$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22133          # Extract the first word of "$tool_basename", so it can be a program name with args.
22134set dummy $tool_basename; ac_word=$2
22135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22136$as_echo_n "checking for $ac_word... " >&6; }
22137if ${ac_cv_path_DSYMUTIL+:} false; then :
22138  $as_echo_n "(cached) " >&6
22139else
22140  case $DSYMUTIL in
22141  [\\/]* | ?:[\\/]*)
22142  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22143  ;;
22144  *)
22145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22146for as_dir in $PATH
22147do
22148  IFS=$as_save_IFS
22149  test -z "$as_dir" && as_dir=.
22150    for ac_exec_ext in '' $ac_executable_extensions; do
22151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22152    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22154    break 2
22155  fi
22156done
22157  done
22158IFS=$as_save_IFS
22159
22160  ;;
22161esac
22162fi
22163DSYMUTIL=$ac_cv_path_DSYMUTIL
22164if test -n "$DSYMUTIL"; then
22165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22166$as_echo "$DSYMUTIL" >&6; }
22167else
22168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22169$as_echo "no" >&6; }
22170fi
22171
22172
22173          if test "x$DSYMUTIL" = x; then
22174            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22175          fi
22176        else
22177          # Otherwise we believe it is a complete path. Use it as it is.
22178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22179$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22180          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22181$as_echo_n "checking for DSYMUTIL... " >&6; }
22182          if test ! -x "$tool_specified"; then
22183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22184$as_echo "not found" >&6; }
22185            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22186          fi
22187          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22188$as_echo "$tool_specified" >&6; }
22189        fi
22190      fi
22191    fi
22192
22193  fi
22194
22195
22196
22197  if test "x$DSYMUTIL" = x; then
22198    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22199  fi
22200
22201
22202
22203
22204
22205  # Publish this variable in the help.
22206
22207
22208  if [ -z "${XATTR+x}" ]; then
22209    # The variable is not set by user, try to locate tool using the code snippet
22210    for ac_prog in xattr
22211do
22212  # Extract the first word of "$ac_prog", so it can be a program name with args.
22213set dummy $ac_prog; ac_word=$2
22214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22215$as_echo_n "checking for $ac_word... " >&6; }
22216if ${ac_cv_path_XATTR+:} false; then :
22217  $as_echo_n "(cached) " >&6
22218else
22219  case $XATTR in
22220  [\\/]* | ?:[\\/]*)
22221  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22222  ;;
22223  *)
22224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22225for as_dir in $PATH
22226do
22227  IFS=$as_save_IFS
22228  test -z "$as_dir" && as_dir=.
22229    for ac_exec_ext in '' $ac_executable_extensions; do
22230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22231    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22233    break 2
22234  fi
22235done
22236  done
22237IFS=$as_save_IFS
22238
22239  ;;
22240esac
22241fi
22242XATTR=$ac_cv_path_XATTR
22243if test -n "$XATTR"; then
22244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22245$as_echo "$XATTR" >&6; }
22246else
22247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22248$as_echo "no" >&6; }
22249fi
22250
22251
22252  test -n "$XATTR" && break
22253done
22254
22255  else
22256    # The variable is set, but is it from the command line or the environment?
22257
22258    # Try to remove the string !XATTR! from our list.
22259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22261      # If it failed, the variable was not from the command line. Ignore it,
22262      # but warn the user (except for BASH, which is always set by the calling BASH).
22263      if test "xXATTR" != xBASH; then
22264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22265$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22266      fi
22267      # Try to locate tool using the code snippet
22268      for ac_prog in xattr
22269do
22270  # Extract the first word of "$ac_prog", so it can be a program name with args.
22271set dummy $ac_prog; ac_word=$2
22272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22273$as_echo_n "checking for $ac_word... " >&6; }
22274if ${ac_cv_path_XATTR+:} false; then :
22275  $as_echo_n "(cached) " >&6
22276else
22277  case $XATTR in
22278  [\\/]* | ?:[\\/]*)
22279  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22280  ;;
22281  *)
22282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22283for as_dir in $PATH
22284do
22285  IFS=$as_save_IFS
22286  test -z "$as_dir" && as_dir=.
22287    for ac_exec_ext in '' $ac_executable_extensions; do
22288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22289    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22291    break 2
22292  fi
22293done
22294  done
22295IFS=$as_save_IFS
22296
22297  ;;
22298esac
22299fi
22300XATTR=$ac_cv_path_XATTR
22301if test -n "$XATTR"; then
22302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22303$as_echo "$XATTR" >&6; }
22304else
22305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22306$as_echo "no" >&6; }
22307fi
22308
22309
22310  test -n "$XATTR" && break
22311done
22312
22313    else
22314      # If it succeeded, then it was overridden by the user. We will use it
22315      # for the tool.
22316
22317      # First remove it from the list of overridden variables, so we can test
22318      # for unknown variables in the end.
22319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22320
22321      # Check if we try to supply an empty value
22322      if test "x$XATTR" = x; then
22323        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22324$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22326$as_echo_n "checking for XATTR... " >&6; }
22327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22328$as_echo "disabled" >&6; }
22329      else
22330        # Check if the provided tool contains a complete path.
22331        tool_specified="$XATTR"
22332        tool_basename="${tool_specified##*/}"
22333        if test "x$tool_basename" = "x$tool_specified"; then
22334          # A command without a complete path is provided, search $PATH.
22335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22336$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22337          # Extract the first word of "$tool_basename", so it can be a program name with args.
22338set dummy $tool_basename; ac_word=$2
22339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22340$as_echo_n "checking for $ac_word... " >&6; }
22341if ${ac_cv_path_XATTR+:} false; then :
22342  $as_echo_n "(cached) " >&6
22343else
22344  case $XATTR in
22345  [\\/]* | ?:[\\/]*)
22346  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22347  ;;
22348  *)
22349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22350for as_dir in $PATH
22351do
22352  IFS=$as_save_IFS
22353  test -z "$as_dir" && as_dir=.
22354    for ac_exec_ext in '' $ac_executable_extensions; do
22355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22356    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22358    break 2
22359  fi
22360done
22361  done
22362IFS=$as_save_IFS
22363
22364  ;;
22365esac
22366fi
22367XATTR=$ac_cv_path_XATTR
22368if test -n "$XATTR"; then
22369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22370$as_echo "$XATTR" >&6; }
22371else
22372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22373$as_echo "no" >&6; }
22374fi
22375
22376
22377          if test "x$XATTR" = x; then
22378            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22379          fi
22380        else
22381          # Otherwise we believe it is a complete path. Use it as it is.
22382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22383$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22384          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22385$as_echo_n "checking for XATTR... " >&6; }
22386          if test ! -x "$tool_specified"; then
22387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22388$as_echo "not found" >&6; }
22389            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22390          fi
22391          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22392$as_echo "$tool_specified" >&6; }
22393        fi
22394      fi
22395    fi
22396
22397  fi
22398
22399
22400
22401  if test "x$XATTR" = x; then
22402    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22403  fi
22404
22405
22406
22407
22408  # Publish this variable in the help.
22409
22410
22411  if [ -z "${CODESIGN+x}" ]; then
22412    # The variable is not set by user, try to locate tool using the code snippet
22413    for ac_prog in codesign
22414do
22415  # Extract the first word of "$ac_prog", so it can be a program name with args.
22416set dummy $ac_prog; ac_word=$2
22417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22418$as_echo_n "checking for $ac_word... " >&6; }
22419if ${ac_cv_path_CODESIGN+:} false; then :
22420  $as_echo_n "(cached) " >&6
22421else
22422  case $CODESIGN in
22423  [\\/]* | ?:[\\/]*)
22424  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22425  ;;
22426  *)
22427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22428for as_dir in $PATH
22429do
22430  IFS=$as_save_IFS
22431  test -z "$as_dir" && as_dir=.
22432    for ac_exec_ext in '' $ac_executable_extensions; do
22433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22434    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22436    break 2
22437  fi
22438done
22439  done
22440IFS=$as_save_IFS
22441
22442  ;;
22443esac
22444fi
22445CODESIGN=$ac_cv_path_CODESIGN
22446if test -n "$CODESIGN"; then
22447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22448$as_echo "$CODESIGN" >&6; }
22449else
22450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22451$as_echo "no" >&6; }
22452fi
22453
22454
22455  test -n "$CODESIGN" && break
22456done
22457
22458  else
22459    # The variable is set, but is it from the command line or the environment?
22460
22461    # Try to remove the string !CODESIGN! from our list.
22462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22464      # If it failed, the variable was not from the command line. Ignore it,
22465      # but warn the user (except for BASH, which is always set by the calling BASH).
22466      if test "xCODESIGN" != xBASH; then
22467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22468$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22469      fi
22470      # Try to locate tool using the code snippet
22471      for ac_prog in codesign
22472do
22473  # Extract the first word of "$ac_prog", so it can be a program name with args.
22474set dummy $ac_prog; ac_word=$2
22475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22476$as_echo_n "checking for $ac_word... " >&6; }
22477if ${ac_cv_path_CODESIGN+:} false; then :
22478  $as_echo_n "(cached) " >&6
22479else
22480  case $CODESIGN in
22481  [\\/]* | ?:[\\/]*)
22482  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22483  ;;
22484  *)
22485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486for as_dir in $PATH
22487do
22488  IFS=$as_save_IFS
22489  test -z "$as_dir" && as_dir=.
22490    for ac_exec_ext in '' $ac_executable_extensions; do
22491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22492    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22494    break 2
22495  fi
22496done
22497  done
22498IFS=$as_save_IFS
22499
22500  ;;
22501esac
22502fi
22503CODESIGN=$ac_cv_path_CODESIGN
22504if test -n "$CODESIGN"; then
22505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22506$as_echo "$CODESIGN" >&6; }
22507else
22508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22509$as_echo "no" >&6; }
22510fi
22511
22512
22513  test -n "$CODESIGN" && break
22514done
22515
22516    else
22517      # If it succeeded, then it was overridden by the user. We will use it
22518      # for the tool.
22519
22520      # First remove it from the list of overridden variables, so we can test
22521      # for unknown variables in the end.
22522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22523
22524      # Check if we try to supply an empty value
22525      if test "x$CODESIGN" = x; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22527$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22529$as_echo_n "checking for CODESIGN... " >&6; }
22530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22531$as_echo "disabled" >&6; }
22532      else
22533        # Check if the provided tool contains a complete path.
22534        tool_specified="$CODESIGN"
22535        tool_basename="${tool_specified##*/}"
22536        if test "x$tool_basename" = "x$tool_specified"; then
22537          # A command without a complete path is provided, search $PATH.
22538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22539$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22540          # Extract the first word of "$tool_basename", so it can be a program name with args.
22541set dummy $tool_basename; ac_word=$2
22542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22543$as_echo_n "checking for $ac_word... " >&6; }
22544if ${ac_cv_path_CODESIGN+:} false; then :
22545  $as_echo_n "(cached) " >&6
22546else
22547  case $CODESIGN in
22548  [\\/]* | ?:[\\/]*)
22549  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22550  ;;
22551  *)
22552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22553for as_dir in $PATH
22554do
22555  IFS=$as_save_IFS
22556  test -z "$as_dir" && as_dir=.
22557    for ac_exec_ext in '' $ac_executable_extensions; do
22558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22559    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22561    break 2
22562  fi
22563done
22564  done
22565IFS=$as_save_IFS
22566
22567  ;;
22568esac
22569fi
22570CODESIGN=$ac_cv_path_CODESIGN
22571if test -n "$CODESIGN"; then
22572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22573$as_echo "$CODESIGN" >&6; }
22574else
22575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22576$as_echo "no" >&6; }
22577fi
22578
22579
22580          if test "x$CODESIGN" = x; then
22581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22582          fi
22583        else
22584          # Otherwise we believe it is a complete path. Use it as it is.
22585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22586$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22588$as_echo_n "checking for CODESIGN... " >&6; }
22589          if test ! -x "$tool_specified"; then
22590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22591$as_echo "not found" >&6; }
22592            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22593          fi
22594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22595$as_echo "$tool_specified" >&6; }
22596        fi
22597      fi
22598    fi
22599
22600  fi
22601
22602
22603    if test "x$CODESIGN" != "x"; then
22604      # Verify that the openjdk_codesign certificate is present
22605      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22606$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22607      rm -f codesign-testfile
22608      touch codesign-testfile
22609      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22610      rm -f codesign-testfile
22611      if test "x$CODESIGN" = x; then
22612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22613$as_echo "no" >&6; }
22614      else
22615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22616$as_echo "yes" >&6; }
22617      fi
22618    fi
22619
22620
22621
22622  # Publish this variable in the help.
22623
22624
22625  if [ -z "${SETFILE+x}" ]; then
22626    # The variable is not set by user, try to locate tool using the code snippet
22627    for ac_prog in SetFile
22628do
22629  # Extract the first word of "$ac_prog", so it can be a program name with args.
22630set dummy $ac_prog; ac_word=$2
22631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22632$as_echo_n "checking for $ac_word... " >&6; }
22633if ${ac_cv_path_SETFILE+:} false; then :
22634  $as_echo_n "(cached) " >&6
22635else
22636  case $SETFILE in
22637  [\\/]* | ?:[\\/]*)
22638  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22639  ;;
22640  *)
22641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22642for as_dir in $PATH
22643do
22644  IFS=$as_save_IFS
22645  test -z "$as_dir" && as_dir=.
22646    for ac_exec_ext in '' $ac_executable_extensions; do
22647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22648    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22650    break 2
22651  fi
22652done
22653  done
22654IFS=$as_save_IFS
22655
22656  ;;
22657esac
22658fi
22659SETFILE=$ac_cv_path_SETFILE
22660if test -n "$SETFILE"; then
22661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22662$as_echo "$SETFILE" >&6; }
22663else
22664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22665$as_echo "no" >&6; }
22666fi
22667
22668
22669  test -n "$SETFILE" && break
22670done
22671
22672  else
22673    # The variable is set, but is it from the command line or the environment?
22674
22675    # Try to remove the string !SETFILE! from our list.
22676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22678      # If it failed, the variable was not from the command line. Ignore it,
22679      # but warn the user (except for BASH, which is always set by the calling BASH).
22680      if test "xSETFILE" != xBASH; then
22681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22682$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22683      fi
22684      # Try to locate tool using the code snippet
22685      for ac_prog in SetFile
22686do
22687  # Extract the first word of "$ac_prog", so it can be a program name with args.
22688set dummy $ac_prog; ac_word=$2
22689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22690$as_echo_n "checking for $ac_word... " >&6; }
22691if ${ac_cv_path_SETFILE+:} false; then :
22692  $as_echo_n "(cached) " >&6
22693else
22694  case $SETFILE in
22695  [\\/]* | ?:[\\/]*)
22696  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22697  ;;
22698  *)
22699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22700for as_dir in $PATH
22701do
22702  IFS=$as_save_IFS
22703  test -z "$as_dir" && as_dir=.
22704    for ac_exec_ext in '' $ac_executable_extensions; do
22705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22706    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22708    break 2
22709  fi
22710done
22711  done
22712IFS=$as_save_IFS
22713
22714  ;;
22715esac
22716fi
22717SETFILE=$ac_cv_path_SETFILE
22718if test -n "$SETFILE"; then
22719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22720$as_echo "$SETFILE" >&6; }
22721else
22722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22723$as_echo "no" >&6; }
22724fi
22725
22726
22727  test -n "$SETFILE" && break
22728done
22729
22730    else
22731      # If it succeeded, then it was overridden by the user. We will use it
22732      # for the tool.
22733
22734      # First remove it from the list of overridden variables, so we can test
22735      # for unknown variables in the end.
22736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22737
22738      # Check if we try to supply an empty value
22739      if test "x$SETFILE" = x; then
22740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22741$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22743$as_echo_n "checking for SETFILE... " >&6; }
22744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22745$as_echo "disabled" >&6; }
22746      else
22747        # Check if the provided tool contains a complete path.
22748        tool_specified="$SETFILE"
22749        tool_basename="${tool_specified##*/}"
22750        if test "x$tool_basename" = "x$tool_specified"; then
22751          # A command without a complete path is provided, search $PATH.
22752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22753$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22754          # Extract the first word of "$tool_basename", so it can be a program name with args.
22755set dummy $tool_basename; ac_word=$2
22756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22757$as_echo_n "checking for $ac_word... " >&6; }
22758if ${ac_cv_path_SETFILE+:} false; then :
22759  $as_echo_n "(cached) " >&6
22760else
22761  case $SETFILE in
22762  [\\/]* | ?:[\\/]*)
22763  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22764  ;;
22765  *)
22766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22767for as_dir in $PATH
22768do
22769  IFS=$as_save_IFS
22770  test -z "$as_dir" && as_dir=.
22771    for ac_exec_ext in '' $ac_executable_extensions; do
22772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22773    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22775    break 2
22776  fi
22777done
22778  done
22779IFS=$as_save_IFS
22780
22781  ;;
22782esac
22783fi
22784SETFILE=$ac_cv_path_SETFILE
22785if test -n "$SETFILE"; then
22786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22787$as_echo "$SETFILE" >&6; }
22788else
22789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22790$as_echo "no" >&6; }
22791fi
22792
22793
22794          if test "x$SETFILE" = x; then
22795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22796          fi
22797        else
22798          # Otherwise we believe it is a complete path. Use it as it is.
22799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22800$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22802$as_echo_n "checking for SETFILE... " >&6; }
22803          if test ! -x "$tool_specified"; then
22804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22805$as_echo "not found" >&6; }
22806            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22807          fi
22808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22809$as_echo "$tool_specified" >&6; }
22810        fi
22811      fi
22812    fi
22813
22814  fi
22815
22816
22817
22818  if test "x$SETFILE" = x; then
22819    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22820  fi
22821
22822
22823  fi
22824
22825
22826  # Test if bash supports pipefail.
22827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22828$as_echo_n "checking if bash supports pipefail... " >&6; }
22829  if ${BASH} -c 'set -o pipefail'; then
22830    BASH_ARGS="$BASH_ARGS -o pipefail"
22831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22832$as_echo "yes" >&6; }
22833  else
22834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22835$as_echo "no" >&6; }
22836  fi
22837
22838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22839$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22840  if ${BASH} -e -c 'true'; then
22841    BASH_ARGS="$BASH_ARGS -e"
22842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22843$as_echo "yes" >&6; }
22844  else
22845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22846$as_echo "no" >&6; }
22847  fi
22848
22849
22850
22851
22852# Check if pkg-config is available.
22853
22854
22855if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22856	if test -n "$ac_tool_prefix"; then
22857  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22858set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_path_PKG_CONFIG+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  case $PKG_CONFIG in
22865  [\\/]* | ?:[\\/]*)
22866  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22867  ;;
22868  *)
22869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22888if test -n "$PKG_CONFIG"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22890$as_echo "$PKG_CONFIG" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897fi
22898if test -z "$ac_cv_path_PKG_CONFIG"; then
22899  ac_pt_PKG_CONFIG=$PKG_CONFIG
22900  # Extract the first word of "pkg-config", so it can be a program name with args.
22901set dummy pkg-config; ac_word=$2
22902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22903$as_echo_n "checking for $ac_word... " >&6; }
22904if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22905  $as_echo_n "(cached) " >&6
22906else
22907  case $ac_pt_PKG_CONFIG in
22908  [\\/]* | ?:[\\/]*)
22909  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22910  ;;
22911  *)
22912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22913for as_dir in $PATH
22914do
22915  IFS=$as_save_IFS
22916  test -z "$as_dir" && as_dir=.
22917    for ac_exec_ext in '' $ac_executable_extensions; do
22918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22919    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22921    break 2
22922  fi
22923done
22924  done
22925IFS=$as_save_IFS
22926
22927  ;;
22928esac
22929fi
22930ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22931if test -n "$ac_pt_PKG_CONFIG"; then
22932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22933$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22934else
22935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22936$as_echo "no" >&6; }
22937fi
22938
22939  if test "x$ac_pt_PKG_CONFIG" = x; then
22940    PKG_CONFIG=""
22941  else
22942    case $cross_compiling:$ac_tool_warned in
22943yes:)
22944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22946ac_tool_warned=yes ;;
22947esac
22948    PKG_CONFIG=$ac_pt_PKG_CONFIG
22949  fi
22950else
22951  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22952fi
22953
22954fi
22955if test -n "$PKG_CONFIG"; then
22956	_pkg_min_version=0.9.0
22957	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22958$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22959	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22960		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22961$as_echo "yes" >&6; }
22962	else
22963		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22964$as_echo "no" >&6; }
22965		PKG_CONFIG=""
22966	fi
22967
22968fi
22969
22970# After basic tools have been setup, we can check build os specific details.
22971
22972  ###############################################################################
22973
22974  # Note that this is the build platform OS version!
22975
22976  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22977  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22978  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22979  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22980
22981
22982
22983
22984
22985###############################################################################
22986#
22987# Determine OpenJDK variants, options and version numbers.
22988#
22989###############################################################################
22990
22991# We need build & target for this.
22992
22993
22994  ###############################################################################
22995  #
22996  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22997  # We always build headless support.
22998  #
22999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23000$as_echo_n "checking headful support... " >&6; }
23001  # Check whether --enable-headful was given.
23002if test "${enable_headful+set}" = set; then :
23003  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23004else
23005  SUPPORT_HEADFUL=yes
23006fi
23007
23008
23009  SUPPORT_HEADLESS=yes
23010  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23011
23012  if test "x$SUPPORT_HEADFUL" = xyes; then
23013    # We are building both headful and headless.
23014    headful_msg="include support for both headful and headless"
23015  fi
23016
23017  if test "x$SUPPORT_HEADFUL" = xno; then
23018    # Thus we are building headless only.
23019    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23020    headful_msg="headless only"
23021  fi
23022
23023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23024$as_echo "$headful_msg" >&6; }
23025
23026
23027
23028
23029
23030  # Control wether Hotspot runs Queens test after build.
23031  # Check whether --enable-hotspot-test-in-build was given.
23032if test "${enable_hotspot_test_in_build+set}" = set; then :
23033  enableval=$enable_hotspot_test_in_build;
23034else
23035  enable_hotspot_test_in_build=no
23036fi
23037
23038  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23039    TEST_IN_BUILD=true
23040  else
23041    TEST_IN_BUILD=false
23042  fi
23043
23044
23045  ###############################################################################
23046  #
23047  # Choose cacerts source file
23048  #
23049
23050# Check whether --with-cacerts-file was given.
23051if test "${with_cacerts_file+set}" = set; then :
23052  withval=$with_cacerts_file;
23053fi
23054
23055  if test "x$with_cacerts_file" != x; then
23056    CACERTS_FILE=$with_cacerts_file
23057  fi
23058
23059
23060  ###############################################################################
23061  #
23062  # Enable or disable unlimited crypto
23063  #
23064  # Check whether --enable-unlimited-crypto was given.
23065if test "${enable_unlimited_crypto+set}" = set; then :
23066  enableval=$enable_unlimited_crypto;
23067else
23068  enable_unlimited_crypto=no
23069fi
23070
23071  if test "x$enable_unlimited_crypto" = "xyes"; then
23072    UNLIMITED_CRYPTO=true
23073  else
23074    UNLIMITED_CRYPTO=false
23075  fi
23076
23077
23078  ###############################################################################
23079  #
23080  # Enable or disable the elliptic curve crypto implementation
23081  #
23082
23083
23084  ###############################################################################
23085  #
23086  # Compress jars
23087  #
23088  COMPRESS_JARS=false
23089
23090
23091
23092
23093  # Source the version numbers
23094  . $AUTOCONF_DIR/version-numbers
23095
23096  # Get the settings from parameters
23097
23098# Check whether --with-milestone was given.
23099if test "${with_milestone+set}" = set; then :
23100  withval=$with_milestone;
23101fi
23102
23103  if test "x$with_milestone" = xyes; then
23104    as_fn_error $? "Milestone must have a value" "$LINENO" 5
23105  elif test "x$with_milestone" != x; then
23106    MILESTONE="$with_milestone"
23107  fi
23108  if test "x$MILESTONE" = x; then
23109    MILESTONE=internal
23110  fi
23111
23112
23113# Check whether --with-update-version was given.
23114if test "${with_update_version+set}" = set; then :
23115  withval=$with_update_version;
23116fi
23117
23118  if test "x$with_update_version" = xyes; then
23119    as_fn_error $? "Update version must have a value" "$LINENO" 5
23120  elif test "x$with_update_version" != x; then
23121    JDK_UPDATE_VERSION="$with_update_version"
23122    # On macosx 10.7, it's not possible to set --with-update-version=0X due
23123    # to a bug in expr (which reduces it to just X). To work around this, we
23124    # always add a 0 to one digit update versions.
23125    if test "${#JDK_UPDATE_VERSION}" = "1"; then
23126      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23127    fi
23128  fi
23129
23130
23131# Check whether --with-user-release-suffix was given.
23132if test "${with_user_release_suffix+set}" = set; then :
23133  withval=$with_user_release_suffix;
23134fi
23135
23136  if test "x$with_user_release_suffix" = xyes; then
23137    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23138  elif test "x$with_user_release_suffix" != x; then
23139    USER_RELEASE_SUFFIX="$with_user_release_suffix"
23140  fi
23141
23142
23143# Check whether --with-build-number was given.
23144if test "${with_build_number+set}" = set; then :
23145  withval=$with_build_number;
23146fi
23147
23148  if test "x$with_build_number" = xyes; then
23149    as_fn_error $? "Build number must have a value" "$LINENO" 5
23150  elif test "x$with_build_number" != x; then
23151    JDK_BUILD_NUMBER="$with_build_number"
23152  fi
23153  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23154  if test "x$JDK_BUILD_NUMBER" = x; then
23155    JDK_BUILD_NUMBER=b00
23156    if test "x$USER_RELEASE_SUFFIX" = x; then
23157      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23158      # Avoid [:alnum:] since it depends on the locale.
23159      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23160      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23161    fi
23162  fi
23163
23164  # Now set the JDK version, milestone, build number etc.
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181# Check whether --with-copyright-year was given.
23182if test "${with_copyright_year+set}" = set; then :
23183  withval=$with_copyright_year;
23184fi
23185
23186  if test "x$with_copyright_year" = xyes; then
23187    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23188  elif test "x$with_copyright_year" != x; then
23189    COPYRIGHT_YEAR="$with_copyright_year"
23190  else
23191    COPYRIGHT_YEAR=`date +'%Y'`
23192  fi
23193
23194
23195  if test "x$JDK_UPDATE_VERSION" != x; then
23196    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23197  else
23198    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23199  fi
23200
23201
23202  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23203
23204
23205
23206###############################################################################
23207#
23208# Setup BootJDK, used to bootstrap the build.
23209#
23210###############################################################################
23211
23212
23213  BOOT_JDK_FOUND=no
23214
23215# Check whether --with-boot-jdk was given.
23216if test "${with_boot_jdk+set}" = set; then :
23217  withval=$with_boot_jdk;
23218fi
23219
23220
23221  # We look for the Boot JDK through various means, going from more certain to
23222  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23223  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23224  # must check if this is indeed valid; otherwise we'll continue looking.
23225
23226  # Test: Is bootjdk explicitely set by command line arguments?
23227
23228  if test "x$BOOT_JDK_FOUND" = xno; then
23229    # Now execute the test
23230
23231  if test "x$with_boot_jdk" != x; then
23232    BOOT_JDK=$with_boot_jdk
23233    BOOT_JDK_FOUND=maybe
23234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23235$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23236  fi
23237
23238
23239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23241      # Do we have a bin/java?
23242      if test ! -x "$BOOT_JDK/bin/java"; then
23243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23245        BOOT_JDK_FOUND=no
23246      else
23247        # Do we have a bin/javac?
23248        if test ! -x "$BOOT_JDK/bin/javac"; then
23249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23253          BOOT_JDK_FOUND=no
23254        else
23255          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23256          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23257
23258          # Extra M4 quote needed to protect [] in grep expression.
23259          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23260          if test "x$FOUND_CORRECT_VERSION" = x; then
23261            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23263            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23264$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23265            BOOT_JDK_FOUND=no
23266          else
23267            # We're done! :-)
23268            BOOT_JDK_FOUND=yes
23269
23270  # Only process if variable expands to non-empty
23271
23272  if test "x$BOOT_JDK" != x; then
23273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23274
23275  # Input might be given as Windows format, start by converting to
23276  # unix format.
23277  path="$BOOT_JDK"
23278  new_path=`$CYGPATH -u "$path"`
23279
23280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23283  # "foo.exe" is OK but "foo" is an error.
23284  #
23285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23286  # It is also a way to make sure we got the proper file name for the real test later on.
23287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23288  if test "x$test_shortpath" = x; then
23289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23291    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23292  fi
23293
23294  # Call helper function which possibly converts this using DOS-style short mode.
23295  # If so, the updated path is stored in $new_path.
23296
23297  input_path="$new_path"
23298  # Check if we need to convert this using DOS-style short mode. If the path
23299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23300  # take no chances and rewrite it.
23301  # Note: m4 eats our [], so we need to use [ and ] instead.
23302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23303  if test "x$has_forbidden_chars" != x; then
23304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23308      # Going to short mode and back again did indeed matter. Since short mode is
23309      # case insensitive, let's make it lowercase to improve readability.
23310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23311      # Now convert it back to Unix-style (cygpath)
23312      input_path=`$CYGPATH -u "$shortmode_path"`
23313      new_path="$input_path"
23314    fi
23315  fi
23316
23317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23318  if test "x$test_cygdrive_prefix" = x; then
23319    # As a simple fix, exclude /usr/bin since it's not a real path.
23320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23322      # a path prefixed by /cygdrive for fixpath to work.
23323      new_path="$CYGWIN_ROOT_PATH$input_path"
23324    fi
23325  fi
23326
23327
23328  if test "x$path" != "x$new_path"; then
23329    BOOT_JDK="$new_path"
23330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23332  fi
23333
23334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23335
23336  path="$BOOT_JDK"
23337  has_colon=`$ECHO $path | $GREP ^.:`
23338  new_path="$path"
23339  if test "x$has_colon" = x; then
23340    # Not in mixed or Windows style, start by that.
23341    new_path=`cmd //c echo $path`
23342  fi
23343
23344
23345  input_path="$new_path"
23346  # Check if we need to convert this using DOS-style short mode. If the path
23347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23348  # take no chances and rewrite it.
23349  # Note: m4 eats our [], so we need to use [ and ] instead.
23350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23351  if test "x$has_forbidden_chars" != x; then
23352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23354  fi
23355
23356
23357  windows_path="$new_path"
23358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23359    unix_path=`$CYGPATH -u "$windows_path"`
23360    new_path="$unix_path"
23361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23363    new_path="$unix_path"
23364  fi
23365
23366  if test "x$path" != "x$new_path"; then
23367    BOOT_JDK="$new_path"
23368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23369$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23370  fi
23371
23372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23374
23375    else
23376      # We're on a unix platform. Hooray! :)
23377      path="$BOOT_JDK"
23378      has_space=`$ECHO "$path" | $GREP " "`
23379      if test "x$has_space" != x; then
23380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23383      fi
23384
23385      # Use eval to expand a potential ~
23386      eval path="$path"
23387      if test ! -f "$path" && test ! -d "$path"; then
23388        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23389      fi
23390
23391      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23392    fi
23393  fi
23394
23395            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23396$as_echo_n "checking for Boot JDK... " >&6; }
23397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23398$as_echo "$BOOT_JDK" >&6; }
23399            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23400$as_echo_n "checking Boot JDK version... " >&6; }
23401            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23403$as_echo "$BOOT_JDK_VERSION" >&6; }
23404          fi # end check jdk version
23405        fi # end check javac
23406      fi # end check java
23407    fi # end check boot jdk found
23408  fi
23409
23410  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23411    # Having specified an argument which is incorrect will produce an instant failure;
23412    # we should not go on looking
23413    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23414  fi
23415
23416  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23417
23418  if test "x$BOOT_JDK_FOUND" = xno; then
23419    # Now execute the test
23420
23421  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23422    # First check at user selected default
23423
23424  if test "x$BOOT_JDK_FOUND" = xno; then
23425    # Now execute the test
23426
23427  if test -x /usr/libexec/java_home; then
23428    BOOT_JDK=`/usr/libexec/java_home `
23429    BOOT_JDK_FOUND=maybe
23430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23431$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23432  fi
23433
23434
23435    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23436    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23437      # Do we have a bin/java?
23438      if test ! -x "$BOOT_JDK/bin/java"; then
23439        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23441        BOOT_JDK_FOUND=no
23442      else
23443        # Do we have a bin/javac?
23444        if test ! -x "$BOOT_JDK/bin/javac"; then
23445          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23448$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23449          BOOT_JDK_FOUND=no
23450        else
23451          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23452          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23453
23454          # Extra M4 quote needed to protect [] in grep expression.
23455          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23456          if test "x$FOUND_CORRECT_VERSION" = x; then
23457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23459            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23460$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23461            BOOT_JDK_FOUND=no
23462          else
23463            # We're done! :-)
23464            BOOT_JDK_FOUND=yes
23465
23466  # Only process if variable expands to non-empty
23467
23468  if test "x$BOOT_JDK" != x; then
23469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23470
23471  # Input might be given as Windows format, start by converting to
23472  # unix format.
23473  path="$BOOT_JDK"
23474  new_path=`$CYGPATH -u "$path"`
23475
23476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23479  # "foo.exe" is OK but "foo" is an error.
23480  #
23481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23482  # It is also a way to make sure we got the proper file name for the real test later on.
23483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23484  if test "x$test_shortpath" = x; then
23485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23488  fi
23489
23490  # Call helper function which possibly converts this using DOS-style short mode.
23491  # If so, the updated path is stored in $new_path.
23492
23493  input_path="$new_path"
23494  # Check if we need to convert this using DOS-style short mode. If the path
23495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23496  # take no chances and rewrite it.
23497  # Note: m4 eats our [], so we need to use [ and ] instead.
23498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23499  if test "x$has_forbidden_chars" != x; then
23500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23504      # Going to short mode and back again did indeed matter. Since short mode is
23505      # case insensitive, let's make it lowercase to improve readability.
23506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23507      # Now convert it back to Unix-style (cygpath)
23508      input_path=`$CYGPATH -u "$shortmode_path"`
23509      new_path="$input_path"
23510    fi
23511  fi
23512
23513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23514  if test "x$test_cygdrive_prefix" = x; then
23515    # As a simple fix, exclude /usr/bin since it's not a real path.
23516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23518      # a path prefixed by /cygdrive for fixpath to work.
23519      new_path="$CYGWIN_ROOT_PATH$input_path"
23520    fi
23521  fi
23522
23523
23524  if test "x$path" != "x$new_path"; then
23525    BOOT_JDK="$new_path"
23526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23528  fi
23529
23530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23531
23532  path="$BOOT_JDK"
23533  has_colon=`$ECHO $path | $GREP ^.:`
23534  new_path="$path"
23535  if test "x$has_colon" = x; then
23536    # Not in mixed or Windows style, start by that.
23537    new_path=`cmd //c echo $path`
23538  fi
23539
23540
23541  input_path="$new_path"
23542  # Check if we need to convert this using DOS-style short mode. If the path
23543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23544  # take no chances and rewrite it.
23545  # Note: m4 eats our [], so we need to use [ and ] instead.
23546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23547  if test "x$has_forbidden_chars" != x; then
23548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23550  fi
23551
23552
23553  windows_path="$new_path"
23554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23555    unix_path=`$CYGPATH -u "$windows_path"`
23556    new_path="$unix_path"
23557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23559    new_path="$unix_path"
23560  fi
23561
23562  if test "x$path" != "x$new_path"; then
23563    BOOT_JDK="$new_path"
23564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23566  fi
23567
23568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23570
23571    else
23572      # We're on a unix platform. Hooray! :)
23573      path="$BOOT_JDK"
23574      has_space=`$ECHO "$path" | $GREP " "`
23575      if test "x$has_space" != x; then
23576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23579      fi
23580
23581      # Use eval to expand a potential ~
23582      eval path="$path"
23583      if test ! -f "$path" && test ! -d "$path"; then
23584        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23585      fi
23586
23587      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23588    fi
23589  fi
23590
23591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23592$as_echo_n "checking for Boot JDK... " >&6; }
23593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23594$as_echo "$BOOT_JDK" >&6; }
23595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23596$as_echo_n "checking Boot JDK version... " >&6; }
23597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23599$as_echo "$BOOT_JDK_VERSION" >&6; }
23600          fi # end check jdk version
23601        fi # end check javac
23602      fi # end check java
23603    fi # end check boot jdk found
23604  fi
23605
23606    # If that did not work out (e.g. too old), try explicit versions instead
23607
23608  if test "x$BOOT_JDK_FOUND" = xno; then
23609    # Now execute the test
23610
23611  if test -x /usr/libexec/java_home; then
23612    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23613    BOOT_JDK_FOUND=maybe
23614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23615$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23616  fi
23617
23618
23619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23621      # Do we have a bin/java?
23622      if test ! -x "$BOOT_JDK/bin/java"; then
23623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23625        BOOT_JDK_FOUND=no
23626      else
23627        # Do we have a bin/javac?
23628        if test ! -x "$BOOT_JDK/bin/javac"; then
23629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23633          BOOT_JDK_FOUND=no
23634        else
23635          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23636          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23637
23638          # Extra M4 quote needed to protect [] in grep expression.
23639          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23640          if test "x$FOUND_CORRECT_VERSION" = x; then
23641            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23643            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23644$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23645            BOOT_JDK_FOUND=no
23646          else
23647            # We're done! :-)
23648            BOOT_JDK_FOUND=yes
23649
23650  # Only process if variable expands to non-empty
23651
23652  if test "x$BOOT_JDK" != x; then
23653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23654
23655  # Input might be given as Windows format, start by converting to
23656  # unix format.
23657  path="$BOOT_JDK"
23658  new_path=`$CYGPATH -u "$path"`
23659
23660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23663  # "foo.exe" is OK but "foo" is an error.
23664  #
23665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23666  # It is also a way to make sure we got the proper file name for the real test later on.
23667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23668  if test "x$test_shortpath" = x; then
23669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23672  fi
23673
23674  # Call helper function which possibly converts this using DOS-style short mode.
23675  # If so, the updated path is stored in $new_path.
23676
23677  input_path="$new_path"
23678  # Check if we need to convert this using DOS-style short mode. If the path
23679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23680  # take no chances and rewrite it.
23681  # Note: m4 eats our [], so we need to use [ and ] instead.
23682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23683  if test "x$has_forbidden_chars" != x; then
23684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23688      # Going to short mode and back again did indeed matter. Since short mode is
23689      # case insensitive, let's make it lowercase to improve readability.
23690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23691      # Now convert it back to Unix-style (cygpath)
23692      input_path=`$CYGPATH -u "$shortmode_path"`
23693      new_path="$input_path"
23694    fi
23695  fi
23696
23697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23698  if test "x$test_cygdrive_prefix" = x; then
23699    # As a simple fix, exclude /usr/bin since it's not a real path.
23700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23702      # a path prefixed by /cygdrive for fixpath to work.
23703      new_path="$CYGWIN_ROOT_PATH$input_path"
23704    fi
23705  fi
23706
23707
23708  if test "x$path" != "x$new_path"; then
23709    BOOT_JDK="$new_path"
23710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23712  fi
23713
23714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23715
23716  path="$BOOT_JDK"
23717  has_colon=`$ECHO $path | $GREP ^.:`
23718  new_path="$path"
23719  if test "x$has_colon" = x; then
23720    # Not in mixed or Windows style, start by that.
23721    new_path=`cmd //c echo $path`
23722  fi
23723
23724
23725  input_path="$new_path"
23726  # Check if we need to convert this using DOS-style short mode. If the path
23727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23728  # take no chances and rewrite it.
23729  # Note: m4 eats our [], so we need to use [ and ] instead.
23730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23731  if test "x$has_forbidden_chars" != x; then
23732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23734  fi
23735
23736
23737  windows_path="$new_path"
23738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23739    unix_path=`$CYGPATH -u "$windows_path"`
23740    new_path="$unix_path"
23741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23743    new_path="$unix_path"
23744  fi
23745
23746  if test "x$path" != "x$new_path"; then
23747    BOOT_JDK="$new_path"
23748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23750  fi
23751
23752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23754
23755    else
23756      # We're on a unix platform. Hooray! :)
23757      path="$BOOT_JDK"
23758      has_space=`$ECHO "$path" | $GREP " "`
23759      if test "x$has_space" != x; then
23760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23763      fi
23764
23765      # Use eval to expand a potential ~
23766      eval path="$path"
23767      if test ! -f "$path" && test ! -d "$path"; then
23768        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23769      fi
23770
23771      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23772    fi
23773  fi
23774
23775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23776$as_echo_n "checking for Boot JDK... " >&6; }
23777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23778$as_echo "$BOOT_JDK" >&6; }
23779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23780$as_echo_n "checking Boot JDK version... " >&6; }
23781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23783$as_echo "$BOOT_JDK_VERSION" >&6; }
23784          fi # end check jdk version
23785        fi # end check javac
23786      fi # end check java
23787    fi # end check boot jdk found
23788  fi
23789
23790
23791  if test "x$BOOT_JDK_FOUND" = xno; then
23792    # Now execute the test
23793
23794  if test -x /usr/libexec/java_home; then
23795    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23796    BOOT_JDK_FOUND=maybe
23797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23798$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23799  fi
23800
23801
23802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23804      # Do we have a bin/java?
23805      if test ! -x "$BOOT_JDK/bin/java"; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23808        BOOT_JDK_FOUND=no
23809      else
23810        # Do we have a bin/javac?
23811        if test ! -x "$BOOT_JDK/bin/javac"; then
23812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23816          BOOT_JDK_FOUND=no
23817        else
23818          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23819          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23820
23821          # Extra M4 quote needed to protect [] in grep expression.
23822          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23823          if test "x$FOUND_CORRECT_VERSION" = x; then
23824            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23826            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23827$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23828            BOOT_JDK_FOUND=no
23829          else
23830            # We're done! :-)
23831            BOOT_JDK_FOUND=yes
23832
23833  # Only process if variable expands to non-empty
23834
23835  if test "x$BOOT_JDK" != x; then
23836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23837
23838  # Input might be given as Windows format, start by converting to
23839  # unix format.
23840  path="$BOOT_JDK"
23841  new_path=`$CYGPATH -u "$path"`
23842
23843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23846  # "foo.exe" is OK but "foo" is an error.
23847  #
23848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23849  # It is also a way to make sure we got the proper file name for the real test later on.
23850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23851  if test "x$test_shortpath" = x; then
23852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23855  fi
23856
23857  # Call helper function which possibly converts this using DOS-style short mode.
23858  # If so, the updated path is stored in $new_path.
23859
23860  input_path="$new_path"
23861  # Check if we need to convert this using DOS-style short mode. If the path
23862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23863  # take no chances and rewrite it.
23864  # Note: m4 eats our [], so we need to use [ and ] instead.
23865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23866  if test "x$has_forbidden_chars" != x; then
23867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23871      # Going to short mode and back again did indeed matter. Since short mode is
23872      # case insensitive, let's make it lowercase to improve readability.
23873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23874      # Now convert it back to Unix-style (cygpath)
23875      input_path=`$CYGPATH -u "$shortmode_path"`
23876      new_path="$input_path"
23877    fi
23878  fi
23879
23880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23881  if test "x$test_cygdrive_prefix" = x; then
23882    # As a simple fix, exclude /usr/bin since it's not a real path.
23883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23885      # a path prefixed by /cygdrive for fixpath to work.
23886      new_path="$CYGWIN_ROOT_PATH$input_path"
23887    fi
23888  fi
23889
23890
23891  if test "x$path" != "x$new_path"; then
23892    BOOT_JDK="$new_path"
23893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23895  fi
23896
23897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23898
23899  path="$BOOT_JDK"
23900  has_colon=`$ECHO $path | $GREP ^.:`
23901  new_path="$path"
23902  if test "x$has_colon" = x; then
23903    # Not in mixed or Windows style, start by that.
23904    new_path=`cmd //c echo $path`
23905  fi
23906
23907
23908  input_path="$new_path"
23909  # Check if we need to convert this using DOS-style short mode. If the path
23910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23911  # take no chances and rewrite it.
23912  # Note: m4 eats our [], so we need to use [ and ] instead.
23913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23914  if test "x$has_forbidden_chars" != x; then
23915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23917  fi
23918
23919
23920  windows_path="$new_path"
23921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23922    unix_path=`$CYGPATH -u "$windows_path"`
23923    new_path="$unix_path"
23924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23926    new_path="$unix_path"
23927  fi
23928
23929  if test "x$path" != "x$new_path"; then
23930    BOOT_JDK="$new_path"
23931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23933  fi
23934
23935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23937
23938    else
23939      # We're on a unix platform. Hooray! :)
23940      path="$BOOT_JDK"
23941      has_space=`$ECHO "$path" | $GREP " "`
23942      if test "x$has_space" != x; then
23943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23946      fi
23947
23948      # Use eval to expand a potential ~
23949      eval path="$path"
23950      if test ! -f "$path" && test ! -d "$path"; then
23951        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23952      fi
23953
23954      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23955    fi
23956  fi
23957
23958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23959$as_echo_n "checking for Boot JDK... " >&6; }
23960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23961$as_echo "$BOOT_JDK" >&6; }
23962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23963$as_echo_n "checking Boot JDK version... " >&6; }
23964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23966$as_echo "$BOOT_JDK_VERSION" >&6; }
23967          fi # end check jdk version
23968        fi # end check javac
23969      fi # end check java
23970    fi # end check boot jdk found
23971  fi
23972
23973
23974  if test "x$BOOT_JDK_FOUND" = xno; then
23975    # Now execute the test
23976
23977  if test -x /usr/libexec/java_home; then
23978    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23979    BOOT_JDK_FOUND=maybe
23980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23981$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23982  fi
23983
23984
23985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23987      # Do we have a bin/java?
23988      if test ! -x "$BOOT_JDK/bin/java"; then
23989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23991        BOOT_JDK_FOUND=no
23992      else
23993        # Do we have a bin/javac?
23994        if test ! -x "$BOOT_JDK/bin/javac"; then
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23999          BOOT_JDK_FOUND=no
24000        else
24001          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24002          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24003
24004          # Extra M4 quote needed to protect [] in grep expression.
24005          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24006          if test "x$FOUND_CORRECT_VERSION" = x; then
24007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24009            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24010$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24011            BOOT_JDK_FOUND=no
24012          else
24013            # We're done! :-)
24014            BOOT_JDK_FOUND=yes
24015
24016  # Only process if variable expands to non-empty
24017
24018  if test "x$BOOT_JDK" != x; then
24019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24020
24021  # Input might be given as Windows format, start by converting to
24022  # unix format.
24023  path="$BOOT_JDK"
24024  new_path=`$CYGPATH -u "$path"`
24025
24026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24029  # "foo.exe" is OK but "foo" is an error.
24030  #
24031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24032  # It is also a way to make sure we got the proper file name for the real test later on.
24033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24034  if test "x$test_shortpath" = x; then
24035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24038  fi
24039
24040  # Call helper function which possibly converts this using DOS-style short mode.
24041  # If so, the updated path is stored in $new_path.
24042
24043  input_path="$new_path"
24044  # Check if we need to convert this using DOS-style short mode. If the path
24045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24046  # take no chances and rewrite it.
24047  # Note: m4 eats our [], so we need to use [ and ] instead.
24048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24049  if test "x$has_forbidden_chars" != x; then
24050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24054      # Going to short mode and back again did indeed matter. Since short mode is
24055      # case insensitive, let's make it lowercase to improve readability.
24056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24057      # Now convert it back to Unix-style (cygpath)
24058      input_path=`$CYGPATH -u "$shortmode_path"`
24059      new_path="$input_path"
24060    fi
24061  fi
24062
24063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24064  if test "x$test_cygdrive_prefix" = x; then
24065    # As a simple fix, exclude /usr/bin since it's not a real path.
24066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24068      # a path prefixed by /cygdrive for fixpath to work.
24069      new_path="$CYGWIN_ROOT_PATH$input_path"
24070    fi
24071  fi
24072
24073
24074  if test "x$path" != "x$new_path"; then
24075    BOOT_JDK="$new_path"
24076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24078  fi
24079
24080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24081
24082  path="$BOOT_JDK"
24083  has_colon=`$ECHO $path | $GREP ^.:`
24084  new_path="$path"
24085  if test "x$has_colon" = x; then
24086    # Not in mixed or Windows style, start by that.
24087    new_path=`cmd //c echo $path`
24088  fi
24089
24090
24091  input_path="$new_path"
24092  # Check if we need to convert this using DOS-style short mode. If the path
24093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24094  # take no chances and rewrite it.
24095  # Note: m4 eats our [], so we need to use [ and ] instead.
24096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24097  if test "x$has_forbidden_chars" != x; then
24098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24100  fi
24101
24102
24103  windows_path="$new_path"
24104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24105    unix_path=`$CYGPATH -u "$windows_path"`
24106    new_path="$unix_path"
24107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24109    new_path="$unix_path"
24110  fi
24111
24112  if test "x$path" != "x$new_path"; then
24113    BOOT_JDK="$new_path"
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24116  fi
24117
24118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24120
24121    else
24122      # We're on a unix platform. Hooray! :)
24123      path="$BOOT_JDK"
24124      has_space=`$ECHO "$path" | $GREP " "`
24125      if test "x$has_space" != x; then
24126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24129      fi
24130
24131      # Use eval to expand a potential ~
24132      eval path="$path"
24133      if test ! -f "$path" && test ! -d "$path"; then
24134        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24135      fi
24136
24137      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24138    fi
24139  fi
24140
24141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24142$as_echo_n "checking for Boot JDK... " >&6; }
24143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24144$as_echo "$BOOT_JDK" >&6; }
24145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24146$as_echo_n "checking Boot JDK version... " >&6; }
24147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24149$as_echo "$BOOT_JDK_VERSION" >&6; }
24150          fi # end check jdk version
24151        fi # end check javac
24152      fi # end check java
24153    fi # end check boot jdk found
24154  fi
24155
24156  fi
24157
24158
24159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24161      # Do we have a bin/java?
24162      if test ! -x "$BOOT_JDK/bin/java"; then
24163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24165        BOOT_JDK_FOUND=no
24166      else
24167        # Do we have a bin/javac?
24168        if test ! -x "$BOOT_JDK/bin/javac"; then
24169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24173          BOOT_JDK_FOUND=no
24174        else
24175          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24176          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24177
24178          # Extra M4 quote needed to protect [] in grep expression.
24179          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24180          if test "x$FOUND_CORRECT_VERSION" = x; then
24181            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24183            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24184$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24185            BOOT_JDK_FOUND=no
24186          else
24187            # We're done! :-)
24188            BOOT_JDK_FOUND=yes
24189
24190  # Only process if variable expands to non-empty
24191
24192  if test "x$BOOT_JDK" != x; then
24193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24194
24195  # Input might be given as Windows format, start by converting to
24196  # unix format.
24197  path="$BOOT_JDK"
24198  new_path=`$CYGPATH -u "$path"`
24199
24200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24203  # "foo.exe" is OK but "foo" is an error.
24204  #
24205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24206  # It is also a way to make sure we got the proper file name for the real test later on.
24207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24208  if test "x$test_shortpath" = x; then
24209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24211    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24212  fi
24213
24214  # Call helper function which possibly converts this using DOS-style short mode.
24215  # If so, the updated path is stored in $new_path.
24216
24217  input_path="$new_path"
24218  # Check if we need to convert this using DOS-style short mode. If the path
24219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24220  # take no chances and rewrite it.
24221  # Note: m4 eats our [], so we need to use [ and ] instead.
24222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24223  if test "x$has_forbidden_chars" != x; then
24224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24228      # Going to short mode and back again did indeed matter. Since short mode is
24229      # case insensitive, let's make it lowercase to improve readability.
24230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231      # Now convert it back to Unix-style (cygpath)
24232      input_path=`$CYGPATH -u "$shortmode_path"`
24233      new_path="$input_path"
24234    fi
24235  fi
24236
24237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24238  if test "x$test_cygdrive_prefix" = x; then
24239    # As a simple fix, exclude /usr/bin since it's not a real path.
24240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24242      # a path prefixed by /cygdrive for fixpath to work.
24243      new_path="$CYGWIN_ROOT_PATH$input_path"
24244    fi
24245  fi
24246
24247
24248  if test "x$path" != "x$new_path"; then
24249    BOOT_JDK="$new_path"
24250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24252  fi
24253
24254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24255
24256  path="$BOOT_JDK"
24257  has_colon=`$ECHO $path | $GREP ^.:`
24258  new_path="$path"
24259  if test "x$has_colon" = x; then
24260    # Not in mixed or Windows style, start by that.
24261    new_path=`cmd //c echo $path`
24262  fi
24263
24264
24265  input_path="$new_path"
24266  # Check if we need to convert this using DOS-style short mode. If the path
24267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24268  # take no chances and rewrite it.
24269  # Note: m4 eats our [], so we need to use [ and ] instead.
24270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24271  if test "x$has_forbidden_chars" != x; then
24272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24274  fi
24275
24276
24277  windows_path="$new_path"
24278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24279    unix_path=`$CYGPATH -u "$windows_path"`
24280    new_path="$unix_path"
24281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24283    new_path="$unix_path"
24284  fi
24285
24286  if test "x$path" != "x$new_path"; then
24287    BOOT_JDK="$new_path"
24288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24290  fi
24291
24292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24294
24295    else
24296      # We're on a unix platform. Hooray! :)
24297      path="$BOOT_JDK"
24298      has_space=`$ECHO "$path" | $GREP " "`
24299      if test "x$has_space" != x; then
24300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24302        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24303      fi
24304
24305      # Use eval to expand a potential ~
24306      eval path="$path"
24307      if test ! -f "$path" && test ! -d "$path"; then
24308        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24309      fi
24310
24311      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24312    fi
24313  fi
24314
24315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24316$as_echo_n "checking for Boot JDK... " >&6; }
24317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24318$as_echo "$BOOT_JDK" >&6; }
24319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24320$as_echo_n "checking Boot JDK version... " >&6; }
24321            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24323$as_echo "$BOOT_JDK_VERSION" >&6; }
24324          fi # end check jdk version
24325        fi # end check javac
24326      fi # end check java
24327    fi # end check boot jdk found
24328  fi
24329
24330
24331  # Test: Is $JAVA_HOME set?
24332
24333  if test "x$BOOT_JDK_FOUND" = xno; then
24334    # Now execute the test
24335
24336  if test "x$JAVA_HOME" != x; then
24337    JAVA_HOME_PROCESSED="$JAVA_HOME"
24338
24339  # Only process if variable expands to non-empty
24340
24341  if test "x$JAVA_HOME_PROCESSED" != x; then
24342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24343
24344  # Input might be given as Windows format, start by converting to
24345  # unix format.
24346  path="$JAVA_HOME_PROCESSED"
24347  new_path=`$CYGPATH -u "$path"`
24348
24349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24352  # "foo.exe" is OK but "foo" is an error.
24353  #
24354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24355  # It is also a way to make sure we got the proper file name for the real test later on.
24356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24357  if test "x$test_shortpath" = x; then
24358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24359$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24360    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24361  fi
24362
24363  # Call helper function which possibly converts this using DOS-style short mode.
24364  # If so, the updated path is stored in $new_path.
24365
24366  input_path="$new_path"
24367  # Check if we need to convert this using DOS-style short mode. If the path
24368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24369  # take no chances and rewrite it.
24370  # Note: m4 eats our [], so we need to use [ and ] instead.
24371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24372  if test "x$has_forbidden_chars" != x; then
24373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24377      # Going to short mode and back again did indeed matter. Since short mode is
24378      # case insensitive, let's make it lowercase to improve readability.
24379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24380      # Now convert it back to Unix-style (cygpath)
24381      input_path=`$CYGPATH -u "$shortmode_path"`
24382      new_path="$input_path"
24383    fi
24384  fi
24385
24386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24387  if test "x$test_cygdrive_prefix" = x; then
24388    # As a simple fix, exclude /usr/bin since it's not a real path.
24389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24391      # a path prefixed by /cygdrive for fixpath to work.
24392      new_path="$CYGWIN_ROOT_PATH$input_path"
24393    fi
24394  fi
24395
24396
24397  if test "x$path" != "x$new_path"; then
24398    JAVA_HOME_PROCESSED="$new_path"
24399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24400$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24401  fi
24402
24403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24404
24405  path="$JAVA_HOME_PROCESSED"
24406  has_colon=`$ECHO $path | $GREP ^.:`
24407  new_path="$path"
24408  if test "x$has_colon" = x; then
24409    # Not in mixed or Windows style, start by that.
24410    new_path=`cmd //c echo $path`
24411  fi
24412
24413
24414  input_path="$new_path"
24415  # Check if we need to convert this using DOS-style short mode. If the path
24416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24417  # take no chances and rewrite it.
24418  # Note: m4 eats our [], so we need to use [ and ] instead.
24419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24420  if test "x$has_forbidden_chars" != x; then
24421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24423  fi
24424
24425
24426  windows_path="$new_path"
24427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24428    unix_path=`$CYGPATH -u "$windows_path"`
24429    new_path="$unix_path"
24430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24432    new_path="$unix_path"
24433  fi
24434
24435  if test "x$path" != "x$new_path"; then
24436    JAVA_HOME_PROCESSED="$new_path"
24437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24438$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24439  fi
24440
24441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24443
24444    else
24445      # We're on a unix platform. Hooray! :)
24446      path="$JAVA_HOME_PROCESSED"
24447      has_space=`$ECHO "$path" | $GREP " "`
24448      if test "x$has_space" != x; then
24449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24450$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24452      fi
24453
24454      # Use eval to expand a potential ~
24455      eval path="$path"
24456      if test ! -f "$path" && test ! -d "$path"; then
24457        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24458      fi
24459
24460      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24461    fi
24462  fi
24463
24464    if test ! -d "$JAVA_HOME_PROCESSED"; then
24465      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24466$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24467    else
24468      # Aha, the user has set a JAVA_HOME
24469      # let us use that as the Boot JDK.
24470      BOOT_JDK="$JAVA_HOME_PROCESSED"
24471      BOOT_JDK_FOUND=maybe
24472      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24473$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24474    fi
24475  fi
24476
24477
24478    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24479    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24480      # Do we have a bin/java?
24481      if test ! -x "$BOOT_JDK/bin/java"; then
24482        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24484        BOOT_JDK_FOUND=no
24485      else
24486        # Do we have a bin/javac?
24487        if test ! -x "$BOOT_JDK/bin/javac"; then
24488          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24490          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24491$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24492          BOOT_JDK_FOUND=no
24493        else
24494          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24495          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24496
24497          # Extra M4 quote needed to protect [] in grep expression.
24498          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24499          if test "x$FOUND_CORRECT_VERSION" = x; then
24500            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24502            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24503$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24504            BOOT_JDK_FOUND=no
24505          else
24506            # We're done! :-)
24507            BOOT_JDK_FOUND=yes
24508
24509  # Only process if variable expands to non-empty
24510
24511  if test "x$BOOT_JDK" != x; then
24512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24513
24514  # Input might be given as Windows format, start by converting to
24515  # unix format.
24516  path="$BOOT_JDK"
24517  new_path=`$CYGPATH -u "$path"`
24518
24519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24522  # "foo.exe" is OK but "foo" is an error.
24523  #
24524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24525  # It is also a way to make sure we got the proper file name for the real test later on.
24526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24527  if test "x$test_shortpath" = x; then
24528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24529$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24530    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24531  fi
24532
24533  # Call helper function which possibly converts this using DOS-style short mode.
24534  # If so, the updated path is stored in $new_path.
24535
24536  input_path="$new_path"
24537  # Check if we need to convert this using DOS-style short mode. If the path
24538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24539  # take no chances and rewrite it.
24540  # Note: m4 eats our [], so we need to use [ and ] instead.
24541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24542  if test "x$has_forbidden_chars" != x; then
24543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24547      # Going to short mode and back again did indeed matter. Since short mode is
24548      # case insensitive, let's make it lowercase to improve readability.
24549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24550      # Now convert it back to Unix-style (cygpath)
24551      input_path=`$CYGPATH -u "$shortmode_path"`
24552      new_path="$input_path"
24553    fi
24554  fi
24555
24556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24557  if test "x$test_cygdrive_prefix" = x; then
24558    # As a simple fix, exclude /usr/bin since it's not a real path.
24559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24561      # a path prefixed by /cygdrive for fixpath to work.
24562      new_path="$CYGWIN_ROOT_PATH$input_path"
24563    fi
24564  fi
24565
24566
24567  if test "x$path" != "x$new_path"; then
24568    BOOT_JDK="$new_path"
24569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24570$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24571  fi
24572
24573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24574
24575  path="$BOOT_JDK"
24576  has_colon=`$ECHO $path | $GREP ^.:`
24577  new_path="$path"
24578  if test "x$has_colon" = x; then
24579    # Not in mixed or Windows style, start by that.
24580    new_path=`cmd //c echo $path`
24581  fi
24582
24583
24584  input_path="$new_path"
24585  # Check if we need to convert this using DOS-style short mode. If the path
24586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24587  # take no chances and rewrite it.
24588  # Note: m4 eats our [], so we need to use [ and ] instead.
24589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24590  if test "x$has_forbidden_chars" != x; then
24591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24593  fi
24594
24595
24596  windows_path="$new_path"
24597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24598    unix_path=`$CYGPATH -u "$windows_path"`
24599    new_path="$unix_path"
24600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24602    new_path="$unix_path"
24603  fi
24604
24605  if test "x$path" != "x$new_path"; then
24606    BOOT_JDK="$new_path"
24607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24609  fi
24610
24611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24613
24614    else
24615      # We're on a unix platform. Hooray! :)
24616      path="$BOOT_JDK"
24617      has_space=`$ECHO "$path" | $GREP " "`
24618      if test "x$has_space" != x; then
24619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24622      fi
24623
24624      # Use eval to expand a potential ~
24625      eval path="$path"
24626      if test ! -f "$path" && test ! -d "$path"; then
24627        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24628      fi
24629
24630      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24631    fi
24632  fi
24633
24634            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24635$as_echo_n "checking for Boot JDK... " >&6; }
24636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24637$as_echo "$BOOT_JDK" >&6; }
24638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24639$as_echo_n "checking Boot JDK version... " >&6; }
24640            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24642$as_echo "$BOOT_JDK_VERSION" >&6; }
24643          fi # end check jdk version
24644        fi # end check javac
24645      fi # end check java
24646    fi # end check boot jdk found
24647  fi
24648
24649
24650  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24651
24652  if test "x$BOOT_JDK_FOUND" = xno; then
24653    # Now execute the test
24654
24655  # Extract the first word of "javac", so it can be a program name with args.
24656set dummy javac; ac_word=$2
24657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24658$as_echo_n "checking for $ac_word... " >&6; }
24659if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24660  $as_echo_n "(cached) " >&6
24661else
24662  case $JAVAC_CHECK in
24663  [\\/]* | ?:[\\/]*)
24664  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24665  ;;
24666  *)
24667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24668for as_dir in $PATH
24669do
24670  IFS=$as_save_IFS
24671  test -z "$as_dir" && as_dir=.
24672    for ac_exec_ext in '' $ac_executable_extensions; do
24673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24674    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24676    break 2
24677  fi
24678done
24679  done
24680IFS=$as_save_IFS
24681
24682  ;;
24683esac
24684fi
24685JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24686if test -n "$JAVAC_CHECK"; then
24687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24688$as_echo "$JAVAC_CHECK" >&6; }
24689else
24690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24691$as_echo "no" >&6; }
24692fi
24693
24694
24695  # Extract the first word of "java", so it can be a program name with args.
24696set dummy java; ac_word=$2
24697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24698$as_echo_n "checking for $ac_word... " >&6; }
24699if ${ac_cv_path_JAVA_CHECK+:} false; then :
24700  $as_echo_n "(cached) " >&6
24701else
24702  case $JAVA_CHECK in
24703  [\\/]* | ?:[\\/]*)
24704  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24705  ;;
24706  *)
24707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24708for as_dir in $PATH
24709do
24710  IFS=$as_save_IFS
24711  test -z "$as_dir" && as_dir=.
24712    for ac_exec_ext in '' $ac_executable_extensions; do
24713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24714    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24716    break 2
24717  fi
24718done
24719  done
24720IFS=$as_save_IFS
24721
24722  ;;
24723esac
24724fi
24725JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24726if test -n "$JAVA_CHECK"; then
24727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24728$as_echo "$JAVA_CHECK" >&6; }
24729else
24730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24731$as_echo "no" >&6; }
24732fi
24733
24734
24735  BINARY="$JAVAC_CHECK"
24736  if test "x$JAVAC_CHECK" = x; then
24737    BINARY="$JAVA_CHECK"
24738  fi
24739  if test "x$BINARY" != x; then
24740    # So there is a java(c) binary, it might be part of a JDK.
24741    # Lets find the JDK/JRE directory by following symbolic links.
24742    # Linux/GNU systems often have links from /usr/bin/java to
24743    # /etc/alternatives/java to the real JDK binary.
24744
24745  if test "x$OPENJDK_BUILD_OS" != xwindows; then
24746    # Follow a chain of symbolic links. Use readlink
24747    # where it exists, else fall back to horribly
24748    # complicated shell code.
24749    if test "x$READLINK_TESTED" != yes; then
24750      # On MacOSX there is a readlink tool with a different
24751      # purpose than the GNU readlink tool. Check the found readlink.
24752      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24753      if test "x$ISGNU" = x; then
24754        # A readlink that we do not know how to use.
24755        # Are there other non-GNU readlinks out there?
24756        READLINK_TESTED=yes
24757        READLINK=
24758      fi
24759    fi
24760
24761    if test "x$READLINK" != x; then
24762      BINARY=`$READLINK -f $BINARY`
24763    else
24764      # Save the current directory for restoring afterwards
24765      STARTDIR=$PWD
24766      COUNTER=0
24767      sym_link_dir=`$DIRNAME $BINARY`
24768      sym_link_file=`$BASENAME $BINARY`
24769      cd $sym_link_dir
24770      # Use -P flag to resolve symlinks in directories.
24771      cd `$THEPWDCMD -P`
24772      sym_link_dir=`$THEPWDCMD -P`
24773      # Resolve file symlinks
24774      while test $COUNTER -lt 20; do
24775        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24776        if test "x$ISLINK" == x; then
24777          # This is not a symbolic link! We are done!
24778          break
24779        fi
24780        # Again resolve directory symlinks since the target of the just found
24781        # link could be in a different directory
24782        cd `$DIRNAME $ISLINK`
24783        sym_link_dir=`$THEPWDCMD -P`
24784        sym_link_file=`$BASENAME $ISLINK`
24785        let COUNTER=COUNTER+1
24786      done
24787      cd $STARTDIR
24788      BINARY=$sym_link_dir/$sym_link_file
24789    fi
24790  fi
24791
24792    BOOT_JDK=`dirname "$BINARY"`
24793    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24794    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24795      # Looks like we found ourselves an JDK
24796      BOOT_JDK_FOUND=maybe
24797      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24798$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24799    fi
24800  fi
24801
24802
24803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24805      # Do we have a bin/java?
24806      if test ! -x "$BOOT_JDK/bin/java"; then
24807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24809        BOOT_JDK_FOUND=no
24810      else
24811        # Do we have a bin/javac?
24812        if test ! -x "$BOOT_JDK/bin/javac"; then
24813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24817          BOOT_JDK_FOUND=no
24818        else
24819          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24820          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24821
24822          # Extra M4 quote needed to protect [] in grep expression.
24823          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24824          if test "x$FOUND_CORRECT_VERSION" = x; then
24825            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24827            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24828$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24829            BOOT_JDK_FOUND=no
24830          else
24831            # We're done! :-)
24832            BOOT_JDK_FOUND=yes
24833
24834  # Only process if variable expands to non-empty
24835
24836  if test "x$BOOT_JDK" != x; then
24837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24838
24839  # Input might be given as Windows format, start by converting to
24840  # unix format.
24841  path="$BOOT_JDK"
24842  new_path=`$CYGPATH -u "$path"`
24843
24844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24847  # "foo.exe" is OK but "foo" is an error.
24848  #
24849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24850  # It is also a way to make sure we got the proper file name for the real test later on.
24851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24852  if test "x$test_shortpath" = x; then
24853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24856  fi
24857
24858  # Call helper function which possibly converts this using DOS-style short mode.
24859  # If so, the updated path is stored in $new_path.
24860
24861  input_path="$new_path"
24862  # Check if we need to convert this using DOS-style short mode. If the path
24863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24864  # take no chances and rewrite it.
24865  # Note: m4 eats our [], so we need to use [ and ] instead.
24866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24867  if test "x$has_forbidden_chars" != x; then
24868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24872      # Going to short mode and back again did indeed matter. Since short mode is
24873      # case insensitive, let's make it lowercase to improve readability.
24874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24875      # Now convert it back to Unix-style (cygpath)
24876      input_path=`$CYGPATH -u "$shortmode_path"`
24877      new_path="$input_path"
24878    fi
24879  fi
24880
24881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24882  if test "x$test_cygdrive_prefix" = x; then
24883    # As a simple fix, exclude /usr/bin since it's not a real path.
24884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24886      # a path prefixed by /cygdrive for fixpath to work.
24887      new_path="$CYGWIN_ROOT_PATH$input_path"
24888    fi
24889  fi
24890
24891
24892  if test "x$path" != "x$new_path"; then
24893    BOOT_JDK="$new_path"
24894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24896  fi
24897
24898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24899
24900  path="$BOOT_JDK"
24901  has_colon=`$ECHO $path | $GREP ^.:`
24902  new_path="$path"
24903  if test "x$has_colon" = x; then
24904    # Not in mixed or Windows style, start by that.
24905    new_path=`cmd //c echo $path`
24906  fi
24907
24908
24909  input_path="$new_path"
24910  # Check if we need to convert this using DOS-style short mode. If the path
24911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24912  # take no chances and rewrite it.
24913  # Note: m4 eats our [], so we need to use [ and ] instead.
24914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24915  if test "x$has_forbidden_chars" != x; then
24916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24918  fi
24919
24920
24921  windows_path="$new_path"
24922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24923    unix_path=`$CYGPATH -u "$windows_path"`
24924    new_path="$unix_path"
24925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24927    new_path="$unix_path"
24928  fi
24929
24930  if test "x$path" != "x$new_path"; then
24931    BOOT_JDK="$new_path"
24932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24934  fi
24935
24936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24938
24939    else
24940      # We're on a unix platform. Hooray! :)
24941      path="$BOOT_JDK"
24942      has_space=`$ECHO "$path" | $GREP " "`
24943      if test "x$has_space" != x; then
24944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24946        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24947      fi
24948
24949      # Use eval to expand a potential ~
24950      eval path="$path"
24951      if test ! -f "$path" && test ! -d "$path"; then
24952        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24953      fi
24954
24955      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24956    fi
24957  fi
24958
24959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24960$as_echo_n "checking for Boot JDK... " >&6; }
24961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24962$as_echo "$BOOT_JDK" >&6; }
24963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24964$as_echo_n "checking Boot JDK version... " >&6; }
24965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24967$as_echo "$BOOT_JDK_VERSION" >&6; }
24968          fi # end check jdk version
24969        fi # end check javac
24970      fi # end check java
24971    fi # end check boot jdk found
24972  fi
24973
24974
24975  # Test: Is there a JDK installed in default, well-known locations?
24976
24977  if test "x$BOOT_JDK_FOUND" = xno; then
24978    # Now execute the test
24979
24980  if test "x$OPENJDK_TARGET_OS" = xwindows; then
24981
24982  if test "x$BOOT_JDK_FOUND" = xno; then
24983    # Now execute the test
24984
24985  if test "x$ProgramW6432" != x; then
24986    VIRTUAL_DIR="$ProgramW6432/Java"
24987
24988  windows_path="$VIRTUAL_DIR"
24989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24990    unix_path=`$CYGPATH -u "$windows_path"`
24991    VIRTUAL_DIR="$unix_path"
24992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24994    VIRTUAL_DIR="$unix_path"
24995  fi
24996
24997
24998  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
24999  BOOT_JDK_SUFFIX=""
25000  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25001  if test "x$ALL_JDKS_FOUND" != x; then
25002    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25003
25004  if test "x$BOOT_JDK_FOUND" = xno; then
25005    # Now execute the test
25006
25007        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25008        if test -d "$BOOT_JDK"; then
25009          BOOT_JDK_FOUND=maybe
25010          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25011$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25012        fi
25013
25014
25015    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25016    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25017      # Do we have a bin/java?
25018      if test ! -x "$BOOT_JDK/bin/java"; then
25019        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25021        BOOT_JDK_FOUND=no
25022      else
25023        # Do we have a bin/javac?
25024        if test ! -x "$BOOT_JDK/bin/javac"; then
25025          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25027          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25028$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25029          BOOT_JDK_FOUND=no
25030        else
25031          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25032          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25033
25034          # Extra M4 quote needed to protect [] in grep expression.
25035          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25036          if test "x$FOUND_CORRECT_VERSION" = x; then
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25039            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25040$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25041            BOOT_JDK_FOUND=no
25042          else
25043            # We're done! :-)
25044            BOOT_JDK_FOUND=yes
25045
25046  # Only process if variable expands to non-empty
25047
25048  if test "x$BOOT_JDK" != x; then
25049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25050
25051  # Input might be given as Windows format, start by converting to
25052  # unix format.
25053  path="$BOOT_JDK"
25054  new_path=`$CYGPATH -u "$path"`
25055
25056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25059  # "foo.exe" is OK but "foo" is an error.
25060  #
25061  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25062  # It is also a way to make sure we got the proper file name for the real test later on.
25063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25064  if test "x$test_shortpath" = x; then
25065    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25066$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25067    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25068  fi
25069
25070  # Call helper function which possibly converts this using DOS-style short mode.
25071  # If so, the updated path is stored in $new_path.
25072
25073  input_path="$new_path"
25074  # Check if we need to convert this using DOS-style short mode. If the path
25075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25076  # take no chances and rewrite it.
25077  # Note: m4 eats our [], so we need to use [ and ] instead.
25078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25079  if test "x$has_forbidden_chars" != x; then
25080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25084      # Going to short mode and back again did indeed matter. Since short mode is
25085      # case insensitive, let's make it lowercase to improve readability.
25086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25087      # Now convert it back to Unix-style (cygpath)
25088      input_path=`$CYGPATH -u "$shortmode_path"`
25089      new_path="$input_path"
25090    fi
25091  fi
25092
25093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25094  if test "x$test_cygdrive_prefix" = x; then
25095    # As a simple fix, exclude /usr/bin since it's not a real path.
25096    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25098      # a path prefixed by /cygdrive for fixpath to work.
25099      new_path="$CYGWIN_ROOT_PATH$input_path"
25100    fi
25101  fi
25102
25103
25104  if test "x$path" != "x$new_path"; then
25105    BOOT_JDK="$new_path"
25106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25108  fi
25109
25110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25111
25112  path="$BOOT_JDK"
25113  has_colon=`$ECHO $path | $GREP ^.:`
25114  new_path="$path"
25115  if test "x$has_colon" = x; then
25116    # Not in mixed or Windows style, start by that.
25117    new_path=`cmd //c echo $path`
25118  fi
25119
25120
25121  input_path="$new_path"
25122  # Check if we need to convert this using DOS-style short mode. If the path
25123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25124  # take no chances and rewrite it.
25125  # Note: m4 eats our [], so we need to use [ and ] instead.
25126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25127  if test "x$has_forbidden_chars" != x; then
25128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25130  fi
25131
25132
25133  windows_path="$new_path"
25134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25135    unix_path=`$CYGPATH -u "$windows_path"`
25136    new_path="$unix_path"
25137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25139    new_path="$unix_path"
25140  fi
25141
25142  if test "x$path" != "x$new_path"; then
25143    BOOT_JDK="$new_path"
25144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25146  fi
25147
25148  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25149  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25150
25151    else
25152      # We're on a unix platform. Hooray! :)
25153      path="$BOOT_JDK"
25154      has_space=`$ECHO "$path" | $GREP " "`
25155      if test "x$has_space" != x; then
25156        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25158        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25159      fi
25160
25161      # Use eval to expand a potential ~
25162      eval path="$path"
25163      if test ! -f "$path" && test ! -d "$path"; then
25164        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25165      fi
25166
25167      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25168    fi
25169  fi
25170
25171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25172$as_echo_n "checking for Boot JDK... " >&6; }
25173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25174$as_echo "$BOOT_JDK" >&6; }
25175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25176$as_echo_n "checking Boot JDK version... " >&6; }
25177            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25179$as_echo "$BOOT_JDK_VERSION" >&6; }
25180          fi # end check jdk version
25181        fi # end check javac
25182      fi # end check java
25183    fi # end check boot jdk found
25184  fi
25185
25186    done
25187  fi
25188
25189  fi
25190
25191
25192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25194      # Do we have a bin/java?
25195      if test ! -x "$BOOT_JDK/bin/java"; then
25196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25198        BOOT_JDK_FOUND=no
25199      else
25200        # Do we have a bin/javac?
25201        if test ! -x "$BOOT_JDK/bin/javac"; then
25202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25206          BOOT_JDK_FOUND=no
25207        else
25208          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25209          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25210
25211          # Extra M4 quote needed to protect [] in grep expression.
25212          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25213          if test "x$FOUND_CORRECT_VERSION" = x; then
25214            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25216            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25217$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25218            BOOT_JDK_FOUND=no
25219          else
25220            # We're done! :-)
25221            BOOT_JDK_FOUND=yes
25222
25223  # Only process if variable expands to non-empty
25224
25225  if test "x$BOOT_JDK" != x; then
25226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25227
25228  # Input might be given as Windows format, start by converting to
25229  # unix format.
25230  path="$BOOT_JDK"
25231  new_path=`$CYGPATH -u "$path"`
25232
25233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25236  # "foo.exe" is OK but "foo" is an error.
25237  #
25238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25239  # It is also a way to make sure we got the proper file name for the real test later on.
25240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25241  if test "x$test_shortpath" = x; then
25242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25245  fi
25246
25247  # Call helper function which possibly converts this using DOS-style short mode.
25248  # If so, the updated path is stored in $new_path.
25249
25250  input_path="$new_path"
25251  # Check if we need to convert this using DOS-style short mode. If the path
25252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25253  # take no chances and rewrite it.
25254  # Note: m4 eats our [], so we need to use [ and ] instead.
25255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25256  if test "x$has_forbidden_chars" != x; then
25257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25261      # Going to short mode and back again did indeed matter. Since short mode is
25262      # case insensitive, let's make it lowercase to improve readability.
25263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25264      # Now convert it back to Unix-style (cygpath)
25265      input_path=`$CYGPATH -u "$shortmode_path"`
25266      new_path="$input_path"
25267    fi
25268  fi
25269
25270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25271  if test "x$test_cygdrive_prefix" = x; then
25272    # As a simple fix, exclude /usr/bin since it's not a real path.
25273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25275      # a path prefixed by /cygdrive for fixpath to work.
25276      new_path="$CYGWIN_ROOT_PATH$input_path"
25277    fi
25278  fi
25279
25280
25281  if test "x$path" != "x$new_path"; then
25282    BOOT_JDK="$new_path"
25283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25285  fi
25286
25287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25288
25289  path="$BOOT_JDK"
25290  has_colon=`$ECHO $path | $GREP ^.:`
25291  new_path="$path"
25292  if test "x$has_colon" = x; then
25293    # Not in mixed or Windows style, start by that.
25294    new_path=`cmd //c echo $path`
25295  fi
25296
25297
25298  input_path="$new_path"
25299  # Check if we need to convert this using DOS-style short mode. If the path
25300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25301  # take no chances and rewrite it.
25302  # Note: m4 eats our [], so we need to use [ and ] instead.
25303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25304  if test "x$has_forbidden_chars" != x; then
25305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25307  fi
25308
25309
25310  windows_path="$new_path"
25311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25312    unix_path=`$CYGPATH -u "$windows_path"`
25313    new_path="$unix_path"
25314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25316    new_path="$unix_path"
25317  fi
25318
25319  if test "x$path" != "x$new_path"; then
25320    BOOT_JDK="$new_path"
25321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25323  fi
25324
25325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25327
25328    else
25329      # We're on a unix platform. Hooray! :)
25330      path="$BOOT_JDK"
25331      has_space=`$ECHO "$path" | $GREP " "`
25332      if test "x$has_space" != x; then
25333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25336      fi
25337
25338      # Use eval to expand a potential ~
25339      eval path="$path"
25340      if test ! -f "$path" && test ! -d "$path"; then
25341        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25342      fi
25343
25344      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25345    fi
25346  fi
25347
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25349$as_echo_n "checking for Boot JDK... " >&6; }
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25351$as_echo "$BOOT_JDK" >&6; }
25352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25353$as_echo_n "checking Boot JDK version... " >&6; }
25354            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25356$as_echo "$BOOT_JDK_VERSION" >&6; }
25357          fi # end check jdk version
25358        fi # end check javac
25359      fi # end check java
25360    fi # end check boot jdk found
25361  fi
25362
25363
25364  if test "x$BOOT_JDK_FOUND" = xno; then
25365    # Now execute the test
25366
25367  if test "x$PROGRAMW6432" != x; then
25368    VIRTUAL_DIR="$PROGRAMW6432/Java"
25369
25370  windows_path="$VIRTUAL_DIR"
25371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25372    unix_path=`$CYGPATH -u "$windows_path"`
25373    VIRTUAL_DIR="$unix_path"
25374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25376    VIRTUAL_DIR="$unix_path"
25377  fi
25378
25379
25380  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25381  BOOT_JDK_SUFFIX=""
25382  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25383  if test "x$ALL_JDKS_FOUND" != x; then
25384    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25385
25386  if test "x$BOOT_JDK_FOUND" = xno; then
25387    # Now execute the test
25388
25389        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25390        if test -d "$BOOT_JDK"; then
25391          BOOT_JDK_FOUND=maybe
25392          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25393$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25394        fi
25395
25396
25397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25399      # Do we have a bin/java?
25400      if test ! -x "$BOOT_JDK/bin/java"; then
25401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25403        BOOT_JDK_FOUND=no
25404      else
25405        # Do we have a bin/javac?
25406        if test ! -x "$BOOT_JDK/bin/javac"; then
25407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25411          BOOT_JDK_FOUND=no
25412        else
25413          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25414          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25415
25416          # Extra M4 quote needed to protect [] in grep expression.
25417          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25418          if test "x$FOUND_CORRECT_VERSION" = x; then
25419            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25421            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25422$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25423            BOOT_JDK_FOUND=no
25424          else
25425            # We're done! :-)
25426            BOOT_JDK_FOUND=yes
25427
25428  # Only process if variable expands to non-empty
25429
25430  if test "x$BOOT_JDK" != x; then
25431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25432
25433  # Input might be given as Windows format, start by converting to
25434  # unix format.
25435  path="$BOOT_JDK"
25436  new_path=`$CYGPATH -u "$path"`
25437
25438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25441  # "foo.exe" is OK but "foo" is an error.
25442  #
25443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25444  # It is also a way to make sure we got the proper file name for the real test later on.
25445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25446  if test "x$test_shortpath" = x; then
25447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25450  fi
25451
25452  # Call helper function which possibly converts this using DOS-style short mode.
25453  # If so, the updated path is stored in $new_path.
25454
25455  input_path="$new_path"
25456  # Check if we need to convert this using DOS-style short mode. If the path
25457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25458  # take no chances and rewrite it.
25459  # Note: m4 eats our [], so we need to use [ and ] instead.
25460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25461  if test "x$has_forbidden_chars" != x; then
25462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25466      # Going to short mode and back again did indeed matter. Since short mode is
25467      # case insensitive, let's make it lowercase to improve readability.
25468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25469      # Now convert it back to Unix-style (cygpath)
25470      input_path=`$CYGPATH -u "$shortmode_path"`
25471      new_path="$input_path"
25472    fi
25473  fi
25474
25475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25476  if test "x$test_cygdrive_prefix" = x; then
25477    # As a simple fix, exclude /usr/bin since it's not a real path.
25478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25480      # a path prefixed by /cygdrive for fixpath to work.
25481      new_path="$CYGWIN_ROOT_PATH$input_path"
25482    fi
25483  fi
25484
25485
25486  if test "x$path" != "x$new_path"; then
25487    BOOT_JDK="$new_path"
25488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25490  fi
25491
25492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25493
25494  path="$BOOT_JDK"
25495  has_colon=`$ECHO $path | $GREP ^.:`
25496  new_path="$path"
25497  if test "x$has_colon" = x; then
25498    # Not in mixed or Windows style, start by that.
25499    new_path=`cmd //c echo $path`
25500  fi
25501
25502
25503  input_path="$new_path"
25504  # Check if we need to convert this using DOS-style short mode. If the path
25505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25506  # take no chances and rewrite it.
25507  # Note: m4 eats our [], so we need to use [ and ] instead.
25508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25509  if test "x$has_forbidden_chars" != x; then
25510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25512  fi
25513
25514
25515  windows_path="$new_path"
25516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25517    unix_path=`$CYGPATH -u "$windows_path"`
25518    new_path="$unix_path"
25519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25521    new_path="$unix_path"
25522  fi
25523
25524  if test "x$path" != "x$new_path"; then
25525    BOOT_JDK="$new_path"
25526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25528  fi
25529
25530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25532
25533    else
25534      # We're on a unix platform. Hooray! :)
25535      path="$BOOT_JDK"
25536      has_space=`$ECHO "$path" | $GREP " "`
25537      if test "x$has_space" != x; then
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25541      fi
25542
25543      # Use eval to expand a potential ~
25544      eval path="$path"
25545      if test ! -f "$path" && test ! -d "$path"; then
25546        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25547      fi
25548
25549      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25550    fi
25551  fi
25552
25553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25554$as_echo_n "checking for Boot JDK... " >&6; }
25555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25556$as_echo "$BOOT_JDK" >&6; }
25557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25558$as_echo_n "checking Boot JDK version... " >&6; }
25559            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25561$as_echo "$BOOT_JDK_VERSION" >&6; }
25562          fi # end check jdk version
25563        fi # end check javac
25564      fi # end check java
25565    fi # end check boot jdk found
25566  fi
25567
25568    done
25569  fi
25570
25571  fi
25572
25573
25574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25576      # Do we have a bin/java?
25577      if test ! -x "$BOOT_JDK/bin/java"; then
25578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25580        BOOT_JDK_FOUND=no
25581      else
25582        # Do we have a bin/javac?
25583        if test ! -x "$BOOT_JDK/bin/javac"; then
25584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25588          BOOT_JDK_FOUND=no
25589        else
25590          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25591          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25592
25593          # Extra M4 quote needed to protect [] in grep expression.
25594          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25595          if test "x$FOUND_CORRECT_VERSION" = x; then
25596            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25598            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25599$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25600            BOOT_JDK_FOUND=no
25601          else
25602            # We're done! :-)
25603            BOOT_JDK_FOUND=yes
25604
25605  # Only process if variable expands to non-empty
25606
25607  if test "x$BOOT_JDK" != x; then
25608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25609
25610  # Input might be given as Windows format, start by converting to
25611  # unix format.
25612  path="$BOOT_JDK"
25613  new_path=`$CYGPATH -u "$path"`
25614
25615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25618  # "foo.exe" is OK but "foo" is an error.
25619  #
25620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25621  # It is also a way to make sure we got the proper file name for the real test later on.
25622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25623  if test "x$test_shortpath" = x; then
25624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25626    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25627  fi
25628
25629  # Call helper function which possibly converts this using DOS-style short mode.
25630  # If so, the updated path is stored in $new_path.
25631
25632  input_path="$new_path"
25633  # Check if we need to convert this using DOS-style short mode. If the path
25634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25635  # take no chances and rewrite it.
25636  # Note: m4 eats our [], so we need to use [ and ] instead.
25637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25638  if test "x$has_forbidden_chars" != x; then
25639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25643      # Going to short mode and back again did indeed matter. Since short mode is
25644      # case insensitive, let's make it lowercase to improve readability.
25645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25646      # Now convert it back to Unix-style (cygpath)
25647      input_path=`$CYGPATH -u "$shortmode_path"`
25648      new_path="$input_path"
25649    fi
25650  fi
25651
25652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25653  if test "x$test_cygdrive_prefix" = x; then
25654    # As a simple fix, exclude /usr/bin since it's not a real path.
25655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25657      # a path prefixed by /cygdrive for fixpath to work.
25658      new_path="$CYGWIN_ROOT_PATH$input_path"
25659    fi
25660  fi
25661
25662
25663  if test "x$path" != "x$new_path"; then
25664    BOOT_JDK="$new_path"
25665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25667  fi
25668
25669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25670
25671  path="$BOOT_JDK"
25672  has_colon=`$ECHO $path | $GREP ^.:`
25673  new_path="$path"
25674  if test "x$has_colon" = x; then
25675    # Not in mixed or Windows style, start by that.
25676    new_path=`cmd //c echo $path`
25677  fi
25678
25679
25680  input_path="$new_path"
25681  # Check if we need to convert this using DOS-style short mode. If the path
25682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25683  # take no chances and rewrite it.
25684  # Note: m4 eats our [], so we need to use [ and ] instead.
25685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25686  if test "x$has_forbidden_chars" != x; then
25687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25689  fi
25690
25691
25692  windows_path="$new_path"
25693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25694    unix_path=`$CYGPATH -u "$windows_path"`
25695    new_path="$unix_path"
25696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25698    new_path="$unix_path"
25699  fi
25700
25701  if test "x$path" != "x$new_path"; then
25702    BOOT_JDK="$new_path"
25703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25705  fi
25706
25707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25709
25710    else
25711      # We're on a unix platform. Hooray! :)
25712      path="$BOOT_JDK"
25713      has_space=`$ECHO "$path" | $GREP " "`
25714      if test "x$has_space" != x; then
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25718      fi
25719
25720      # Use eval to expand a potential ~
25721      eval path="$path"
25722      if test ! -f "$path" && test ! -d "$path"; then
25723        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25724      fi
25725
25726      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25727    fi
25728  fi
25729
25730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25731$as_echo_n "checking for Boot JDK... " >&6; }
25732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25733$as_echo "$BOOT_JDK" >&6; }
25734            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25735$as_echo_n "checking Boot JDK version... " >&6; }
25736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25738$as_echo "$BOOT_JDK_VERSION" >&6; }
25739          fi # end check jdk version
25740        fi # end check javac
25741      fi # end check java
25742    fi # end check boot jdk found
25743  fi
25744
25745
25746  if test "x$BOOT_JDK_FOUND" = xno; then
25747    # Now execute the test
25748
25749  if test "x$PROGRAMFILES" != x; then
25750    VIRTUAL_DIR="$PROGRAMFILES/Java"
25751
25752  windows_path="$VIRTUAL_DIR"
25753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25754    unix_path=`$CYGPATH -u "$windows_path"`
25755    VIRTUAL_DIR="$unix_path"
25756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25758    VIRTUAL_DIR="$unix_path"
25759  fi
25760
25761
25762  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25763  BOOT_JDK_SUFFIX=""
25764  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25765  if test "x$ALL_JDKS_FOUND" != x; then
25766    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25767
25768  if test "x$BOOT_JDK_FOUND" = xno; then
25769    # Now execute the test
25770
25771        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25772        if test -d "$BOOT_JDK"; then
25773          BOOT_JDK_FOUND=maybe
25774          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25775$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25776        fi
25777
25778
25779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25781      # Do we have a bin/java?
25782      if test ! -x "$BOOT_JDK/bin/java"; then
25783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25785        BOOT_JDK_FOUND=no
25786      else
25787        # Do we have a bin/javac?
25788        if test ! -x "$BOOT_JDK/bin/javac"; then
25789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25793          BOOT_JDK_FOUND=no
25794        else
25795          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25796          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25797
25798          # Extra M4 quote needed to protect [] in grep expression.
25799          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25800          if test "x$FOUND_CORRECT_VERSION" = x; then
25801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25803            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25804$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25805            BOOT_JDK_FOUND=no
25806          else
25807            # We're done! :-)
25808            BOOT_JDK_FOUND=yes
25809
25810  # Only process if variable expands to non-empty
25811
25812  if test "x$BOOT_JDK" != x; then
25813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25814
25815  # Input might be given as Windows format, start by converting to
25816  # unix format.
25817  path="$BOOT_JDK"
25818  new_path=`$CYGPATH -u "$path"`
25819
25820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25823  # "foo.exe" is OK but "foo" is an error.
25824  #
25825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25826  # It is also a way to make sure we got the proper file name for the real test later on.
25827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25828  if test "x$test_shortpath" = x; then
25829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25832  fi
25833
25834  # Call helper function which possibly converts this using DOS-style short mode.
25835  # If so, the updated path is stored in $new_path.
25836
25837  input_path="$new_path"
25838  # Check if we need to convert this using DOS-style short mode. If the path
25839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25840  # take no chances and rewrite it.
25841  # Note: m4 eats our [], so we need to use [ and ] instead.
25842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25843  if test "x$has_forbidden_chars" != x; then
25844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25848      # Going to short mode and back again did indeed matter. Since short mode is
25849      # case insensitive, let's make it lowercase to improve readability.
25850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25851      # Now convert it back to Unix-style (cygpath)
25852      input_path=`$CYGPATH -u "$shortmode_path"`
25853      new_path="$input_path"
25854    fi
25855  fi
25856
25857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25858  if test "x$test_cygdrive_prefix" = x; then
25859    # As a simple fix, exclude /usr/bin since it's not a real path.
25860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25862      # a path prefixed by /cygdrive for fixpath to work.
25863      new_path="$CYGWIN_ROOT_PATH$input_path"
25864    fi
25865  fi
25866
25867
25868  if test "x$path" != "x$new_path"; then
25869    BOOT_JDK="$new_path"
25870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25872  fi
25873
25874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25875
25876  path="$BOOT_JDK"
25877  has_colon=`$ECHO $path | $GREP ^.:`
25878  new_path="$path"
25879  if test "x$has_colon" = x; then
25880    # Not in mixed or Windows style, start by that.
25881    new_path=`cmd //c echo $path`
25882  fi
25883
25884
25885  input_path="$new_path"
25886  # Check if we need to convert this using DOS-style short mode. If the path
25887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25888  # take no chances and rewrite it.
25889  # Note: m4 eats our [], so we need to use [ and ] instead.
25890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25891  if test "x$has_forbidden_chars" != x; then
25892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25894  fi
25895
25896
25897  windows_path="$new_path"
25898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25899    unix_path=`$CYGPATH -u "$windows_path"`
25900    new_path="$unix_path"
25901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25903    new_path="$unix_path"
25904  fi
25905
25906  if test "x$path" != "x$new_path"; then
25907    BOOT_JDK="$new_path"
25908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25910  fi
25911
25912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25914
25915    else
25916      # We're on a unix platform. Hooray! :)
25917      path="$BOOT_JDK"
25918      has_space=`$ECHO "$path" | $GREP " "`
25919      if test "x$has_space" != x; then
25920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25923      fi
25924
25925      # Use eval to expand a potential ~
25926      eval path="$path"
25927      if test ! -f "$path" && test ! -d "$path"; then
25928        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25929      fi
25930
25931      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25932    fi
25933  fi
25934
25935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25936$as_echo_n "checking for Boot JDK... " >&6; }
25937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25938$as_echo "$BOOT_JDK" >&6; }
25939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25940$as_echo_n "checking Boot JDK version... " >&6; }
25941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25943$as_echo "$BOOT_JDK_VERSION" >&6; }
25944          fi # end check jdk version
25945        fi # end check javac
25946      fi # end check java
25947    fi # end check boot jdk found
25948  fi
25949
25950    done
25951  fi
25952
25953  fi
25954
25955
25956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25958      # Do we have a bin/java?
25959      if test ! -x "$BOOT_JDK/bin/java"; then
25960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25962        BOOT_JDK_FOUND=no
25963      else
25964        # Do we have a bin/javac?
25965        if test ! -x "$BOOT_JDK/bin/javac"; then
25966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25970          BOOT_JDK_FOUND=no
25971        else
25972          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25973          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25974
25975          # Extra M4 quote needed to protect [] in grep expression.
25976          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25977          if test "x$FOUND_CORRECT_VERSION" = x; then
25978            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25980            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25981$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25982            BOOT_JDK_FOUND=no
25983          else
25984            # We're done! :-)
25985            BOOT_JDK_FOUND=yes
25986
25987  # Only process if variable expands to non-empty
25988
25989  if test "x$BOOT_JDK" != x; then
25990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25991
25992  # Input might be given as Windows format, start by converting to
25993  # unix format.
25994  path="$BOOT_JDK"
25995  new_path=`$CYGPATH -u "$path"`
25996
25997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26000  # "foo.exe" is OK but "foo" is an error.
26001  #
26002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26003  # It is also a way to make sure we got the proper file name for the real test later on.
26004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26005  if test "x$test_shortpath" = x; then
26006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26007$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26008    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26009  fi
26010
26011  # Call helper function which possibly converts this using DOS-style short mode.
26012  # If so, the updated path is stored in $new_path.
26013
26014  input_path="$new_path"
26015  # Check if we need to convert this using DOS-style short mode. If the path
26016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26017  # take no chances and rewrite it.
26018  # Note: m4 eats our [], so we need to use [ and ] instead.
26019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26020  if test "x$has_forbidden_chars" != x; then
26021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26025      # Going to short mode and back again did indeed matter. Since short mode is
26026      # case insensitive, let's make it lowercase to improve readability.
26027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26028      # Now convert it back to Unix-style (cygpath)
26029      input_path=`$CYGPATH -u "$shortmode_path"`
26030      new_path="$input_path"
26031    fi
26032  fi
26033
26034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26035  if test "x$test_cygdrive_prefix" = x; then
26036    # As a simple fix, exclude /usr/bin since it's not a real path.
26037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26039      # a path prefixed by /cygdrive for fixpath to work.
26040      new_path="$CYGWIN_ROOT_PATH$input_path"
26041    fi
26042  fi
26043
26044
26045  if test "x$path" != "x$new_path"; then
26046    BOOT_JDK="$new_path"
26047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26048$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26049  fi
26050
26051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26052
26053  path="$BOOT_JDK"
26054  has_colon=`$ECHO $path | $GREP ^.:`
26055  new_path="$path"
26056  if test "x$has_colon" = x; then
26057    # Not in mixed or Windows style, start by that.
26058    new_path=`cmd //c echo $path`
26059  fi
26060
26061
26062  input_path="$new_path"
26063  # Check if we need to convert this using DOS-style short mode. If the path
26064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26065  # take no chances and rewrite it.
26066  # Note: m4 eats our [], so we need to use [ and ] instead.
26067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26068  if test "x$has_forbidden_chars" != x; then
26069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26071  fi
26072
26073
26074  windows_path="$new_path"
26075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26076    unix_path=`$CYGPATH -u "$windows_path"`
26077    new_path="$unix_path"
26078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26080    new_path="$unix_path"
26081  fi
26082
26083  if test "x$path" != "x$new_path"; then
26084    BOOT_JDK="$new_path"
26085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26086$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26087  fi
26088
26089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26091
26092    else
26093      # We're on a unix platform. Hooray! :)
26094      path="$BOOT_JDK"
26095      has_space=`$ECHO "$path" | $GREP " "`
26096      if test "x$has_space" != x; then
26097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26100      fi
26101
26102      # Use eval to expand a potential ~
26103      eval path="$path"
26104      if test ! -f "$path" && test ! -d "$path"; then
26105        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26106      fi
26107
26108      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26109    fi
26110  fi
26111
26112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26113$as_echo_n "checking for Boot JDK... " >&6; }
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26115$as_echo "$BOOT_JDK" >&6; }
26116            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26117$as_echo_n "checking Boot JDK version... " >&6; }
26118            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26119            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26120$as_echo "$BOOT_JDK_VERSION" >&6; }
26121          fi # end check jdk version
26122        fi # end check javac
26123      fi # end check java
26124    fi # end check boot jdk found
26125  fi
26126
26127
26128  if test "x$BOOT_JDK_FOUND" = xno; then
26129    # Now execute the test
26130
26131  if test "x$ProgramFiles" != x; then
26132    VIRTUAL_DIR="$ProgramFiles/Java"
26133
26134  windows_path="$VIRTUAL_DIR"
26135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26136    unix_path=`$CYGPATH -u "$windows_path"`
26137    VIRTUAL_DIR="$unix_path"
26138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26140    VIRTUAL_DIR="$unix_path"
26141  fi
26142
26143
26144  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26145  BOOT_JDK_SUFFIX=""
26146  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26147  if test "x$ALL_JDKS_FOUND" != x; then
26148    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26149
26150  if test "x$BOOT_JDK_FOUND" = xno; then
26151    # Now execute the test
26152
26153        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26154        if test -d "$BOOT_JDK"; then
26155          BOOT_JDK_FOUND=maybe
26156          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26157$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26158        fi
26159
26160
26161    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26162    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26163      # Do we have a bin/java?
26164      if test ! -x "$BOOT_JDK/bin/java"; then
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26167        BOOT_JDK_FOUND=no
26168      else
26169        # Do we have a bin/javac?
26170        if test ! -x "$BOOT_JDK/bin/javac"; then
26171          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26173          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26174$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26175          BOOT_JDK_FOUND=no
26176        else
26177          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26178          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26179
26180          # Extra M4 quote needed to protect [] in grep expression.
26181          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26182          if test "x$FOUND_CORRECT_VERSION" = x; then
26183            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26185            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26186$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26187            BOOT_JDK_FOUND=no
26188          else
26189            # We're done! :-)
26190            BOOT_JDK_FOUND=yes
26191
26192  # Only process if variable expands to non-empty
26193
26194  if test "x$BOOT_JDK" != x; then
26195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26196
26197  # Input might be given as Windows format, start by converting to
26198  # unix format.
26199  path="$BOOT_JDK"
26200  new_path=`$CYGPATH -u "$path"`
26201
26202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26205  # "foo.exe" is OK but "foo" is an error.
26206  #
26207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26208  # It is also a way to make sure we got the proper file name for the real test later on.
26209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26210  if test "x$test_shortpath" = x; then
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26214  fi
26215
26216  # Call helper function which possibly converts this using DOS-style short mode.
26217  # If so, the updated path is stored in $new_path.
26218
26219  input_path="$new_path"
26220  # Check if we need to convert this using DOS-style short mode. If the path
26221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26222  # take no chances and rewrite it.
26223  # Note: m4 eats our [], so we need to use [ and ] instead.
26224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26225  if test "x$has_forbidden_chars" != x; then
26226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26230      # Going to short mode and back again did indeed matter. Since short mode is
26231      # case insensitive, let's make it lowercase to improve readability.
26232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233      # Now convert it back to Unix-style (cygpath)
26234      input_path=`$CYGPATH -u "$shortmode_path"`
26235      new_path="$input_path"
26236    fi
26237  fi
26238
26239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26240  if test "x$test_cygdrive_prefix" = x; then
26241    # As a simple fix, exclude /usr/bin since it's not a real path.
26242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26244      # a path prefixed by /cygdrive for fixpath to work.
26245      new_path="$CYGWIN_ROOT_PATH$input_path"
26246    fi
26247  fi
26248
26249
26250  if test "x$path" != "x$new_path"; then
26251    BOOT_JDK="$new_path"
26252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26254  fi
26255
26256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26257
26258  path="$BOOT_JDK"
26259  has_colon=`$ECHO $path | $GREP ^.:`
26260  new_path="$path"
26261  if test "x$has_colon" = x; then
26262    # Not in mixed or Windows style, start by that.
26263    new_path=`cmd //c echo $path`
26264  fi
26265
26266
26267  input_path="$new_path"
26268  # Check if we need to convert this using DOS-style short mode. If the path
26269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26270  # take no chances and rewrite it.
26271  # Note: m4 eats our [], so we need to use [ and ] instead.
26272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26273  if test "x$has_forbidden_chars" != x; then
26274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26276  fi
26277
26278
26279  windows_path="$new_path"
26280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26281    unix_path=`$CYGPATH -u "$windows_path"`
26282    new_path="$unix_path"
26283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26285    new_path="$unix_path"
26286  fi
26287
26288  if test "x$path" != "x$new_path"; then
26289    BOOT_JDK="$new_path"
26290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26292  fi
26293
26294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26296
26297    else
26298      # We're on a unix platform. Hooray! :)
26299      path="$BOOT_JDK"
26300      has_space=`$ECHO "$path" | $GREP " "`
26301      if test "x$has_space" != x; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26303$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26305      fi
26306
26307      # Use eval to expand a potential ~
26308      eval path="$path"
26309      if test ! -f "$path" && test ! -d "$path"; then
26310        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26311      fi
26312
26313      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26314    fi
26315  fi
26316
26317            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26318$as_echo_n "checking for Boot JDK... " >&6; }
26319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26320$as_echo "$BOOT_JDK" >&6; }
26321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26322$as_echo_n "checking Boot JDK version... " >&6; }
26323            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26325$as_echo "$BOOT_JDK_VERSION" >&6; }
26326          fi # end check jdk version
26327        fi # end check javac
26328      fi # end check java
26329    fi # end check boot jdk found
26330  fi
26331
26332    done
26333  fi
26334
26335  fi
26336
26337
26338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26340      # Do we have a bin/java?
26341      if test ! -x "$BOOT_JDK/bin/java"; then
26342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26344        BOOT_JDK_FOUND=no
26345      else
26346        # Do we have a bin/javac?
26347        if test ! -x "$BOOT_JDK/bin/javac"; then
26348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26352          BOOT_JDK_FOUND=no
26353        else
26354          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26355          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26356
26357          # Extra M4 quote needed to protect [] in grep expression.
26358          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26359          if test "x$FOUND_CORRECT_VERSION" = x; then
26360            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26362            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26363$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26364            BOOT_JDK_FOUND=no
26365          else
26366            # We're done! :-)
26367            BOOT_JDK_FOUND=yes
26368
26369  # Only process if variable expands to non-empty
26370
26371  if test "x$BOOT_JDK" != x; then
26372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26373
26374  # Input might be given as Windows format, start by converting to
26375  # unix format.
26376  path="$BOOT_JDK"
26377  new_path=`$CYGPATH -u "$path"`
26378
26379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26382  # "foo.exe" is OK but "foo" is an error.
26383  #
26384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26385  # It is also a way to make sure we got the proper file name for the real test later on.
26386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26387  if test "x$test_shortpath" = x; then
26388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26390    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26391  fi
26392
26393  # Call helper function which possibly converts this using DOS-style short mode.
26394  # If so, the updated path is stored in $new_path.
26395
26396  input_path="$new_path"
26397  # Check if we need to convert this using DOS-style short mode. If the path
26398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26399  # take no chances and rewrite it.
26400  # Note: m4 eats our [], so we need to use [ and ] instead.
26401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26402  if test "x$has_forbidden_chars" != x; then
26403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26407      # Going to short mode and back again did indeed matter. Since short mode is
26408      # case insensitive, let's make it lowercase to improve readability.
26409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26410      # Now convert it back to Unix-style (cygpath)
26411      input_path=`$CYGPATH -u "$shortmode_path"`
26412      new_path="$input_path"
26413    fi
26414  fi
26415
26416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26417  if test "x$test_cygdrive_prefix" = x; then
26418    # As a simple fix, exclude /usr/bin since it's not a real path.
26419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26421      # a path prefixed by /cygdrive for fixpath to work.
26422      new_path="$CYGWIN_ROOT_PATH$input_path"
26423    fi
26424  fi
26425
26426
26427  if test "x$path" != "x$new_path"; then
26428    BOOT_JDK="$new_path"
26429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26431  fi
26432
26433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26434
26435  path="$BOOT_JDK"
26436  has_colon=`$ECHO $path | $GREP ^.:`
26437  new_path="$path"
26438  if test "x$has_colon" = x; then
26439    # Not in mixed or Windows style, start by that.
26440    new_path=`cmd //c echo $path`
26441  fi
26442
26443
26444  input_path="$new_path"
26445  # Check if we need to convert this using DOS-style short mode. If the path
26446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26447  # take no chances and rewrite it.
26448  # Note: m4 eats our [], so we need to use [ and ] instead.
26449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26450  if test "x$has_forbidden_chars" != x; then
26451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26453  fi
26454
26455
26456  windows_path="$new_path"
26457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26458    unix_path=`$CYGPATH -u "$windows_path"`
26459    new_path="$unix_path"
26460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26462    new_path="$unix_path"
26463  fi
26464
26465  if test "x$path" != "x$new_path"; then
26466    BOOT_JDK="$new_path"
26467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26469  fi
26470
26471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26473
26474    else
26475      # We're on a unix platform. Hooray! :)
26476      path="$BOOT_JDK"
26477      has_space=`$ECHO "$path" | $GREP " "`
26478      if test "x$has_space" != x; then
26479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26482      fi
26483
26484      # Use eval to expand a potential ~
26485      eval path="$path"
26486      if test ! -f "$path" && test ! -d "$path"; then
26487        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26488      fi
26489
26490      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26491    fi
26492  fi
26493
26494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26495$as_echo_n "checking for Boot JDK... " >&6; }
26496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26497$as_echo "$BOOT_JDK" >&6; }
26498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26499$as_echo_n "checking Boot JDK version... " >&6; }
26500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26502$as_echo "$BOOT_JDK_VERSION" >&6; }
26503          fi # end check jdk version
26504        fi # end check javac
26505      fi # end check java
26506    fi # end check boot jdk found
26507  fi
26508
26509
26510  if test "x$BOOT_JDK_FOUND" = xno; then
26511    # Now execute the test
26512
26513  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26514  BOOT_JDK_SUFFIX=""
26515  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26516  if test "x$ALL_JDKS_FOUND" != x; then
26517    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26518
26519  if test "x$BOOT_JDK_FOUND" = xno; then
26520    # Now execute the test
26521
26522        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26523        if test -d "$BOOT_JDK"; then
26524          BOOT_JDK_FOUND=maybe
26525          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26526$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26527        fi
26528
26529
26530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26532      # Do we have a bin/java?
26533      if test ! -x "$BOOT_JDK/bin/java"; then
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26536        BOOT_JDK_FOUND=no
26537      else
26538        # Do we have a bin/javac?
26539        if test ! -x "$BOOT_JDK/bin/javac"; then
26540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26544          BOOT_JDK_FOUND=no
26545        else
26546          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26547          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26548
26549          # Extra M4 quote needed to protect [] in grep expression.
26550          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26551          if test "x$FOUND_CORRECT_VERSION" = x; then
26552            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26554            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26555$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26556            BOOT_JDK_FOUND=no
26557          else
26558            # We're done! :-)
26559            BOOT_JDK_FOUND=yes
26560
26561  # Only process if variable expands to non-empty
26562
26563  if test "x$BOOT_JDK" != x; then
26564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26565
26566  # Input might be given as Windows format, start by converting to
26567  # unix format.
26568  path="$BOOT_JDK"
26569  new_path=`$CYGPATH -u "$path"`
26570
26571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26574  # "foo.exe" is OK but "foo" is an error.
26575  #
26576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26577  # It is also a way to make sure we got the proper file name for the real test later on.
26578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26579  if test "x$test_shortpath" = x; then
26580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26581$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26582    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26583  fi
26584
26585  # Call helper function which possibly converts this using DOS-style short mode.
26586  # If so, the updated path is stored in $new_path.
26587
26588  input_path="$new_path"
26589  # Check if we need to convert this using DOS-style short mode. If the path
26590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26591  # take no chances and rewrite it.
26592  # Note: m4 eats our [], so we need to use [ and ] instead.
26593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26594  if test "x$has_forbidden_chars" != x; then
26595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26599      # Going to short mode and back again did indeed matter. Since short mode is
26600      # case insensitive, let's make it lowercase to improve readability.
26601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26602      # Now convert it back to Unix-style (cygpath)
26603      input_path=`$CYGPATH -u "$shortmode_path"`
26604      new_path="$input_path"
26605    fi
26606  fi
26607
26608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26609  if test "x$test_cygdrive_prefix" = x; then
26610    # As a simple fix, exclude /usr/bin since it's not a real path.
26611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26613      # a path prefixed by /cygdrive for fixpath to work.
26614      new_path="$CYGWIN_ROOT_PATH$input_path"
26615    fi
26616  fi
26617
26618
26619  if test "x$path" != "x$new_path"; then
26620    BOOT_JDK="$new_path"
26621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26622$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26623  fi
26624
26625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26626
26627  path="$BOOT_JDK"
26628  has_colon=`$ECHO $path | $GREP ^.:`
26629  new_path="$path"
26630  if test "x$has_colon" = x; then
26631    # Not in mixed or Windows style, start by that.
26632    new_path=`cmd //c echo $path`
26633  fi
26634
26635
26636  input_path="$new_path"
26637  # Check if we need to convert this using DOS-style short mode. If the path
26638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26639  # take no chances and rewrite it.
26640  # Note: m4 eats our [], so we need to use [ and ] instead.
26641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26642  if test "x$has_forbidden_chars" != x; then
26643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26645  fi
26646
26647
26648  windows_path="$new_path"
26649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26650    unix_path=`$CYGPATH -u "$windows_path"`
26651    new_path="$unix_path"
26652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26654    new_path="$unix_path"
26655  fi
26656
26657  if test "x$path" != "x$new_path"; then
26658    BOOT_JDK="$new_path"
26659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26660$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26661  fi
26662
26663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26665
26666    else
26667      # We're on a unix platform. Hooray! :)
26668      path="$BOOT_JDK"
26669      has_space=`$ECHO "$path" | $GREP " "`
26670      if test "x$has_space" != x; then
26671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26674      fi
26675
26676      # Use eval to expand a potential ~
26677      eval path="$path"
26678      if test ! -f "$path" && test ! -d "$path"; then
26679        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26680      fi
26681
26682      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26683    fi
26684  fi
26685
26686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26687$as_echo_n "checking for Boot JDK... " >&6; }
26688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26689$as_echo "$BOOT_JDK" >&6; }
26690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26691$as_echo_n "checking Boot JDK version... " >&6; }
26692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26694$as_echo "$BOOT_JDK_VERSION" >&6; }
26695          fi # end check jdk version
26696        fi # end check javac
26697      fi # end check java
26698    fi # end check boot jdk found
26699  fi
26700
26701    done
26702  fi
26703
26704
26705    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26706    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26707      # Do we have a bin/java?
26708      if test ! -x "$BOOT_JDK/bin/java"; then
26709        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26711        BOOT_JDK_FOUND=no
26712      else
26713        # Do we have a bin/javac?
26714        if test ! -x "$BOOT_JDK/bin/javac"; then
26715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26717          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26718$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26719          BOOT_JDK_FOUND=no
26720        else
26721          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26722          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26723
26724          # Extra M4 quote needed to protect [] in grep expression.
26725          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26726          if test "x$FOUND_CORRECT_VERSION" = x; then
26727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26729            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26730$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26731            BOOT_JDK_FOUND=no
26732          else
26733            # We're done! :-)
26734            BOOT_JDK_FOUND=yes
26735
26736  # Only process if variable expands to non-empty
26737
26738  if test "x$BOOT_JDK" != x; then
26739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740
26741  # Input might be given as Windows format, start by converting to
26742  # unix format.
26743  path="$BOOT_JDK"
26744  new_path=`$CYGPATH -u "$path"`
26745
26746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26749  # "foo.exe" is OK but "foo" is an error.
26750  #
26751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26752  # It is also a way to make sure we got the proper file name for the real test later on.
26753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26754  if test "x$test_shortpath" = x; then
26755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26757    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26758  fi
26759
26760  # Call helper function which possibly converts this using DOS-style short mode.
26761  # If so, the updated path is stored in $new_path.
26762
26763  input_path="$new_path"
26764  # Check if we need to convert this using DOS-style short mode. If the path
26765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26766  # take no chances and rewrite it.
26767  # Note: m4 eats our [], so we need to use [ and ] instead.
26768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26769  if test "x$has_forbidden_chars" != x; then
26770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26774      # Going to short mode and back again did indeed matter. Since short mode is
26775      # case insensitive, let's make it lowercase to improve readability.
26776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26777      # Now convert it back to Unix-style (cygpath)
26778      input_path=`$CYGPATH -u "$shortmode_path"`
26779      new_path="$input_path"
26780    fi
26781  fi
26782
26783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26784  if test "x$test_cygdrive_prefix" = x; then
26785    # As a simple fix, exclude /usr/bin since it's not a real path.
26786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26788      # a path prefixed by /cygdrive for fixpath to work.
26789      new_path="$CYGWIN_ROOT_PATH$input_path"
26790    fi
26791  fi
26792
26793
26794  if test "x$path" != "x$new_path"; then
26795    BOOT_JDK="$new_path"
26796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26798  fi
26799
26800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26801
26802  path="$BOOT_JDK"
26803  has_colon=`$ECHO $path | $GREP ^.:`
26804  new_path="$path"
26805  if test "x$has_colon" = x; then
26806    # Not in mixed or Windows style, start by that.
26807    new_path=`cmd //c echo $path`
26808  fi
26809
26810
26811  input_path="$new_path"
26812  # Check if we need to convert this using DOS-style short mode. If the path
26813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26814  # take no chances and rewrite it.
26815  # Note: m4 eats our [], so we need to use [ and ] instead.
26816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26817  if test "x$has_forbidden_chars" != x; then
26818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26820  fi
26821
26822
26823  windows_path="$new_path"
26824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26825    unix_path=`$CYGPATH -u "$windows_path"`
26826    new_path="$unix_path"
26827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26829    new_path="$unix_path"
26830  fi
26831
26832  if test "x$path" != "x$new_path"; then
26833    BOOT_JDK="$new_path"
26834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26836  fi
26837
26838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26840
26841    else
26842      # We're on a unix platform. Hooray! :)
26843      path="$BOOT_JDK"
26844      has_space=`$ECHO "$path" | $GREP " "`
26845      if test "x$has_space" != x; then
26846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26849      fi
26850
26851      # Use eval to expand a potential ~
26852      eval path="$path"
26853      if test ! -f "$path" && test ! -d "$path"; then
26854        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26855      fi
26856
26857      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26858    fi
26859  fi
26860
26861            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26862$as_echo_n "checking for Boot JDK... " >&6; }
26863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26864$as_echo "$BOOT_JDK" >&6; }
26865            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26866$as_echo_n "checking Boot JDK version... " >&6; }
26867            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26869$as_echo "$BOOT_JDK_VERSION" >&6; }
26870          fi # end check jdk version
26871        fi # end check javac
26872      fi # end check java
26873    fi # end check boot jdk found
26874  fi
26875
26876  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26877
26878  if test "x$BOOT_JDK_FOUND" = xno; then
26879    # Now execute the test
26880
26881  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26882  BOOT_JDK_SUFFIX="/Contents/Home"
26883  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26884  if test "x$ALL_JDKS_FOUND" != x; then
26885    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26886
26887  if test "x$BOOT_JDK_FOUND" = xno; then
26888    # Now execute the test
26889
26890        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26891        if test -d "$BOOT_JDK"; then
26892          BOOT_JDK_FOUND=maybe
26893          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26894$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26895        fi
26896
26897
26898    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26899    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26900      # Do we have a bin/java?
26901      if test ! -x "$BOOT_JDK/bin/java"; then
26902        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26904        BOOT_JDK_FOUND=no
26905      else
26906        # Do we have a bin/javac?
26907        if test ! -x "$BOOT_JDK/bin/javac"; then
26908          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26910          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26911$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26912          BOOT_JDK_FOUND=no
26913        else
26914          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26915          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26916
26917          # Extra M4 quote needed to protect [] in grep expression.
26918          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26919          if test "x$FOUND_CORRECT_VERSION" = x; then
26920            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26922            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26923$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26924            BOOT_JDK_FOUND=no
26925          else
26926            # We're done! :-)
26927            BOOT_JDK_FOUND=yes
26928
26929  # Only process if variable expands to non-empty
26930
26931  if test "x$BOOT_JDK" != x; then
26932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26933
26934  # Input might be given as Windows format, start by converting to
26935  # unix format.
26936  path="$BOOT_JDK"
26937  new_path=`$CYGPATH -u "$path"`
26938
26939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26942  # "foo.exe" is OK but "foo" is an error.
26943  #
26944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26945  # It is also a way to make sure we got the proper file name for the real test later on.
26946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26947  if test "x$test_shortpath" = x; then
26948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26949$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26950    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26951  fi
26952
26953  # Call helper function which possibly converts this using DOS-style short mode.
26954  # If so, the updated path is stored in $new_path.
26955
26956  input_path="$new_path"
26957  # Check if we need to convert this using DOS-style short mode. If the path
26958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26959  # take no chances and rewrite it.
26960  # Note: m4 eats our [], so we need to use [ and ] instead.
26961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26962  if test "x$has_forbidden_chars" != x; then
26963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26967      # Going to short mode and back again did indeed matter. Since short mode is
26968      # case insensitive, let's make it lowercase to improve readability.
26969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26970      # Now convert it back to Unix-style (cygpath)
26971      input_path=`$CYGPATH -u "$shortmode_path"`
26972      new_path="$input_path"
26973    fi
26974  fi
26975
26976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26977  if test "x$test_cygdrive_prefix" = x; then
26978    # As a simple fix, exclude /usr/bin since it's not a real path.
26979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26981      # a path prefixed by /cygdrive for fixpath to work.
26982      new_path="$CYGWIN_ROOT_PATH$input_path"
26983    fi
26984  fi
26985
26986
26987  if test "x$path" != "x$new_path"; then
26988    BOOT_JDK="$new_path"
26989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26990$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26991  fi
26992
26993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26994
26995  path="$BOOT_JDK"
26996  has_colon=`$ECHO $path | $GREP ^.:`
26997  new_path="$path"
26998  if test "x$has_colon" = x; then
26999    # Not in mixed or Windows style, start by that.
27000    new_path=`cmd //c echo $path`
27001  fi
27002
27003
27004  input_path="$new_path"
27005  # Check if we need to convert this using DOS-style short mode. If the path
27006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27007  # take no chances and rewrite it.
27008  # Note: m4 eats our [], so we need to use [ and ] instead.
27009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27010  if test "x$has_forbidden_chars" != x; then
27011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27013  fi
27014
27015
27016  windows_path="$new_path"
27017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27018    unix_path=`$CYGPATH -u "$windows_path"`
27019    new_path="$unix_path"
27020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27022    new_path="$unix_path"
27023  fi
27024
27025  if test "x$path" != "x$new_path"; then
27026    BOOT_JDK="$new_path"
27027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27029  fi
27030
27031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27033
27034    else
27035      # We're on a unix platform. Hooray! :)
27036      path="$BOOT_JDK"
27037      has_space=`$ECHO "$path" | $GREP " "`
27038      if test "x$has_space" != x; then
27039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27042      fi
27043
27044      # Use eval to expand a potential ~
27045      eval path="$path"
27046      if test ! -f "$path" && test ! -d "$path"; then
27047        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27048      fi
27049
27050      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27051    fi
27052  fi
27053
27054            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27055$as_echo_n "checking for Boot JDK... " >&6; }
27056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27057$as_echo "$BOOT_JDK" >&6; }
27058            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27059$as_echo_n "checking Boot JDK version... " >&6; }
27060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27062$as_echo "$BOOT_JDK_VERSION" >&6; }
27063          fi # end check jdk version
27064        fi # end check javac
27065      fi # end check java
27066    fi # end check boot jdk found
27067  fi
27068
27069    done
27070  fi
27071
27072
27073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27075      # Do we have a bin/java?
27076      if test ! -x "$BOOT_JDK/bin/java"; then
27077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27079        BOOT_JDK_FOUND=no
27080      else
27081        # Do we have a bin/javac?
27082        if test ! -x "$BOOT_JDK/bin/javac"; then
27083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27087          BOOT_JDK_FOUND=no
27088        else
27089          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27090          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27091
27092          # Extra M4 quote needed to protect [] in grep expression.
27093          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27094          if test "x$FOUND_CORRECT_VERSION" = x; then
27095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27097            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27098$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27099            BOOT_JDK_FOUND=no
27100          else
27101            # We're done! :-)
27102            BOOT_JDK_FOUND=yes
27103
27104  # Only process if variable expands to non-empty
27105
27106  if test "x$BOOT_JDK" != x; then
27107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27108
27109  # Input might be given as Windows format, start by converting to
27110  # unix format.
27111  path="$BOOT_JDK"
27112  new_path=`$CYGPATH -u "$path"`
27113
27114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27117  # "foo.exe" is OK but "foo" is an error.
27118  #
27119  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27120  # It is also a way to make sure we got the proper file name for the real test later on.
27121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27122  if test "x$test_shortpath" = x; then
27123    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27125    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27126  fi
27127
27128  # Call helper function which possibly converts this using DOS-style short mode.
27129  # If so, the updated path is stored in $new_path.
27130
27131  input_path="$new_path"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27140    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27141    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27142      # Going to short mode and back again did indeed matter. Since short mode is
27143      # case insensitive, let's make it lowercase to improve readability.
27144      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27145      # Now convert it back to Unix-style (cygpath)
27146      input_path=`$CYGPATH -u "$shortmode_path"`
27147      new_path="$input_path"
27148    fi
27149  fi
27150
27151  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27152  if test "x$test_cygdrive_prefix" = x; then
27153    # As a simple fix, exclude /usr/bin since it's not a real path.
27154    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27155      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27156      # a path prefixed by /cygdrive for fixpath to work.
27157      new_path="$CYGWIN_ROOT_PATH$input_path"
27158    fi
27159  fi
27160
27161
27162  if test "x$path" != "x$new_path"; then
27163    BOOT_JDK="$new_path"
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27166  fi
27167
27168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27169
27170  path="$BOOT_JDK"
27171  has_colon=`$ECHO $path | $GREP ^.:`
27172  new_path="$path"
27173  if test "x$has_colon" = x; then
27174    # Not in mixed or Windows style, start by that.
27175    new_path=`cmd //c echo $path`
27176  fi
27177
27178
27179  input_path="$new_path"
27180  # Check if we need to convert this using DOS-style short mode. If the path
27181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27182  # take no chances and rewrite it.
27183  # Note: m4 eats our [], so we need to use [ and ] instead.
27184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27185  if test "x$has_forbidden_chars" != x; then
27186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27188  fi
27189
27190
27191  windows_path="$new_path"
27192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27193    unix_path=`$CYGPATH -u "$windows_path"`
27194    new_path="$unix_path"
27195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27197    new_path="$unix_path"
27198  fi
27199
27200  if test "x$path" != "x$new_path"; then
27201    BOOT_JDK="$new_path"
27202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27204  fi
27205
27206  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27207  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27208
27209    else
27210      # We're on a unix platform. Hooray! :)
27211      path="$BOOT_JDK"
27212      has_space=`$ECHO "$path" | $GREP " "`
27213      if test "x$has_space" != x; then
27214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27215$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27216        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27217      fi
27218
27219      # Use eval to expand a potential ~
27220      eval path="$path"
27221      if test ! -f "$path" && test ! -d "$path"; then
27222        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27223      fi
27224
27225      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27226    fi
27227  fi
27228
27229            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27230$as_echo_n "checking for Boot JDK... " >&6; }
27231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27232$as_echo "$BOOT_JDK" >&6; }
27233            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27234$as_echo_n "checking Boot JDK version... " >&6; }
27235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27237$as_echo "$BOOT_JDK_VERSION" >&6; }
27238          fi # end check jdk version
27239        fi # end check javac
27240      fi # end check java
27241    fi # end check boot jdk found
27242  fi
27243
27244
27245  if test "x$BOOT_JDK_FOUND" = xno; then
27246    # Now execute the test
27247
27248  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27249  BOOT_JDK_SUFFIX="/Contents/Home"
27250  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27251  if test "x$ALL_JDKS_FOUND" != x; then
27252    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27253
27254  if test "x$BOOT_JDK_FOUND" = xno; then
27255    # Now execute the test
27256
27257        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27258        if test -d "$BOOT_JDK"; then
27259          BOOT_JDK_FOUND=maybe
27260          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27261$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27262        fi
27263
27264
27265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27267      # Do we have a bin/java?
27268      if test ! -x "$BOOT_JDK/bin/java"; then
27269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27271        BOOT_JDK_FOUND=no
27272      else
27273        # Do we have a bin/javac?
27274        if test ! -x "$BOOT_JDK/bin/javac"; then
27275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27279          BOOT_JDK_FOUND=no
27280        else
27281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27283
27284          # Extra M4 quote needed to protect [] in grep expression.
27285          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27286          if test "x$FOUND_CORRECT_VERSION" = x; then
27287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27291            BOOT_JDK_FOUND=no
27292          else
27293            # We're done! :-)
27294            BOOT_JDK_FOUND=yes
27295
27296  # Only process if variable expands to non-empty
27297
27298  if test "x$BOOT_JDK" != x; then
27299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27300
27301  # Input might be given as Windows format, start by converting to
27302  # unix format.
27303  path="$BOOT_JDK"
27304  new_path=`$CYGPATH -u "$path"`
27305
27306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27309  # "foo.exe" is OK but "foo" is an error.
27310  #
27311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27312  # It is also a way to make sure we got the proper file name for the real test later on.
27313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27314  if test "x$test_shortpath" = x; then
27315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27317    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27318  fi
27319
27320  # Call helper function which possibly converts this using DOS-style short mode.
27321  # If so, the updated path is stored in $new_path.
27322
27323  input_path="$new_path"
27324  # Check if we need to convert this using DOS-style short mode. If the path
27325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27326  # take no chances and rewrite it.
27327  # Note: m4 eats our [], so we need to use [ and ] instead.
27328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27329  if test "x$has_forbidden_chars" != x; then
27330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27334      # Going to short mode and back again did indeed matter. Since short mode is
27335      # case insensitive, let's make it lowercase to improve readability.
27336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27337      # Now convert it back to Unix-style (cygpath)
27338      input_path=`$CYGPATH -u "$shortmode_path"`
27339      new_path="$input_path"
27340    fi
27341  fi
27342
27343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27344  if test "x$test_cygdrive_prefix" = x; then
27345    # As a simple fix, exclude /usr/bin since it's not a real path.
27346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27348      # a path prefixed by /cygdrive for fixpath to work.
27349      new_path="$CYGWIN_ROOT_PATH$input_path"
27350    fi
27351  fi
27352
27353
27354  if test "x$path" != "x$new_path"; then
27355    BOOT_JDK="$new_path"
27356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27358  fi
27359
27360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27361
27362  path="$BOOT_JDK"
27363  has_colon=`$ECHO $path | $GREP ^.:`
27364  new_path="$path"
27365  if test "x$has_colon" = x; then
27366    # Not in mixed or Windows style, start by that.
27367    new_path=`cmd //c echo $path`
27368  fi
27369
27370
27371  input_path="$new_path"
27372  # Check if we need to convert this using DOS-style short mode. If the path
27373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27374  # take no chances and rewrite it.
27375  # Note: m4 eats our [], so we need to use [ and ] instead.
27376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27377  if test "x$has_forbidden_chars" != x; then
27378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27380  fi
27381
27382
27383  windows_path="$new_path"
27384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27385    unix_path=`$CYGPATH -u "$windows_path"`
27386    new_path="$unix_path"
27387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27389    new_path="$unix_path"
27390  fi
27391
27392  if test "x$path" != "x$new_path"; then
27393    BOOT_JDK="$new_path"
27394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27396  fi
27397
27398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27400
27401    else
27402      # We're on a unix platform. Hooray! :)
27403      path="$BOOT_JDK"
27404      has_space=`$ECHO "$path" | $GREP " "`
27405      if test "x$has_space" != x; then
27406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27409      fi
27410
27411      # Use eval to expand a potential ~
27412      eval path="$path"
27413      if test ! -f "$path" && test ! -d "$path"; then
27414        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27415      fi
27416
27417      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27418    fi
27419  fi
27420
27421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27422$as_echo_n "checking for Boot JDK... " >&6; }
27423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27424$as_echo "$BOOT_JDK" >&6; }
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27426$as_echo_n "checking Boot JDK version... " >&6; }
27427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27429$as_echo "$BOOT_JDK_VERSION" >&6; }
27430          fi # end check jdk version
27431        fi # end check javac
27432      fi # end check java
27433    fi # end check boot jdk found
27434  fi
27435
27436    done
27437  fi
27438
27439
27440    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27441    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27442      # Do we have a bin/java?
27443      if test ! -x "$BOOT_JDK/bin/java"; then
27444        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27446        BOOT_JDK_FOUND=no
27447      else
27448        # Do we have a bin/javac?
27449        if test ! -x "$BOOT_JDK/bin/javac"; then
27450          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27452          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27453$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27454          BOOT_JDK_FOUND=no
27455        else
27456          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27457          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27458
27459          # Extra M4 quote needed to protect [] in grep expression.
27460          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27461          if test "x$FOUND_CORRECT_VERSION" = x; then
27462            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27464            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27465$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27466            BOOT_JDK_FOUND=no
27467          else
27468            # We're done! :-)
27469            BOOT_JDK_FOUND=yes
27470
27471  # Only process if variable expands to non-empty
27472
27473  if test "x$BOOT_JDK" != x; then
27474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27475
27476  # Input might be given as Windows format, start by converting to
27477  # unix format.
27478  path="$BOOT_JDK"
27479  new_path=`$CYGPATH -u "$path"`
27480
27481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27484  # "foo.exe" is OK but "foo" is an error.
27485  #
27486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27487  # It is also a way to make sure we got the proper file name for the real test later on.
27488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27489  if test "x$test_shortpath" = x; then
27490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27492    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27493  fi
27494
27495  # Call helper function which possibly converts this using DOS-style short mode.
27496  # If so, the updated path is stored in $new_path.
27497
27498  input_path="$new_path"
27499  # Check if we need to convert this using DOS-style short mode. If the path
27500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27501  # take no chances and rewrite it.
27502  # Note: m4 eats our [], so we need to use [ and ] instead.
27503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27504  if test "x$has_forbidden_chars" != x; then
27505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27509      # Going to short mode and back again did indeed matter. Since short mode is
27510      # case insensitive, let's make it lowercase to improve readability.
27511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27512      # Now convert it back to Unix-style (cygpath)
27513      input_path=`$CYGPATH -u "$shortmode_path"`
27514      new_path="$input_path"
27515    fi
27516  fi
27517
27518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27519  if test "x$test_cygdrive_prefix" = x; then
27520    # As a simple fix, exclude /usr/bin since it's not a real path.
27521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27523      # a path prefixed by /cygdrive for fixpath to work.
27524      new_path="$CYGWIN_ROOT_PATH$input_path"
27525    fi
27526  fi
27527
27528
27529  if test "x$path" != "x$new_path"; then
27530    BOOT_JDK="$new_path"
27531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27533  fi
27534
27535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27536
27537  path="$BOOT_JDK"
27538  has_colon=`$ECHO $path | $GREP ^.:`
27539  new_path="$path"
27540  if test "x$has_colon" = x; then
27541    # Not in mixed or Windows style, start by that.
27542    new_path=`cmd //c echo $path`
27543  fi
27544
27545
27546  input_path="$new_path"
27547  # Check if we need to convert this using DOS-style short mode. If the path
27548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27549  # take no chances and rewrite it.
27550  # Note: m4 eats our [], so we need to use [ and ] instead.
27551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27552  if test "x$has_forbidden_chars" != x; then
27553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27555  fi
27556
27557
27558  windows_path="$new_path"
27559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27560    unix_path=`$CYGPATH -u "$windows_path"`
27561    new_path="$unix_path"
27562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27564    new_path="$unix_path"
27565  fi
27566
27567  if test "x$path" != "x$new_path"; then
27568    BOOT_JDK="$new_path"
27569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27570$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27571  fi
27572
27573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27575
27576    else
27577      # We're on a unix platform. Hooray! :)
27578      path="$BOOT_JDK"
27579      has_space=`$ECHO "$path" | $GREP " "`
27580      if test "x$has_space" != x; then
27581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27584      fi
27585
27586      # Use eval to expand a potential ~
27587      eval path="$path"
27588      if test ! -f "$path" && test ! -d "$path"; then
27589        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27590      fi
27591
27592      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27593    fi
27594  fi
27595
27596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27597$as_echo_n "checking for Boot JDK... " >&6; }
27598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27599$as_echo "$BOOT_JDK" >&6; }
27600            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27601$as_echo_n "checking Boot JDK version... " >&6; }
27602            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27604$as_echo "$BOOT_JDK_VERSION" >&6; }
27605          fi # end check jdk version
27606        fi # end check javac
27607      fi # end check java
27608    fi # end check boot jdk found
27609  fi
27610
27611  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27612
27613  if test "x$BOOT_JDK_FOUND" = xno; then
27614    # Now execute the test
27615
27616  BOOT_JDK_PREFIX="/usr/lib/jvm"
27617  BOOT_JDK_SUFFIX=""
27618  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27619  if test "x$ALL_JDKS_FOUND" != x; then
27620    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27621
27622  if test "x$BOOT_JDK_FOUND" = xno; then
27623    # Now execute the test
27624
27625        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27626        if test -d "$BOOT_JDK"; then
27627          BOOT_JDK_FOUND=maybe
27628          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27629$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27630        fi
27631
27632
27633    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27634    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27635      # Do we have a bin/java?
27636      if test ! -x "$BOOT_JDK/bin/java"; then
27637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27639        BOOT_JDK_FOUND=no
27640      else
27641        # Do we have a bin/javac?
27642        if test ! -x "$BOOT_JDK/bin/javac"; then
27643          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27645          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27646$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27647          BOOT_JDK_FOUND=no
27648        else
27649          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27650          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27651
27652          # Extra M4 quote needed to protect [] in grep expression.
27653          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27654          if test "x$FOUND_CORRECT_VERSION" = x; then
27655            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27657            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27658$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27659            BOOT_JDK_FOUND=no
27660          else
27661            # We're done! :-)
27662            BOOT_JDK_FOUND=yes
27663
27664  # Only process if variable expands to non-empty
27665
27666  if test "x$BOOT_JDK" != x; then
27667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27668
27669  # Input might be given as Windows format, start by converting to
27670  # unix format.
27671  path="$BOOT_JDK"
27672  new_path=`$CYGPATH -u "$path"`
27673
27674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27677  # "foo.exe" is OK but "foo" is an error.
27678  #
27679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27680  # It is also a way to make sure we got the proper file name for the real test later on.
27681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27682  if test "x$test_shortpath" = x; then
27683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27684$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27685    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27686  fi
27687
27688  # Call helper function which possibly converts this using DOS-style short mode.
27689  # If so, the updated path is stored in $new_path.
27690
27691  input_path="$new_path"
27692  # Check if we need to convert this using DOS-style short mode. If the path
27693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27694  # take no chances and rewrite it.
27695  # Note: m4 eats our [], so we need to use [ and ] instead.
27696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27697  if test "x$has_forbidden_chars" != x; then
27698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27702      # Going to short mode and back again did indeed matter. Since short mode is
27703      # case insensitive, let's make it lowercase to improve readability.
27704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27705      # Now convert it back to Unix-style (cygpath)
27706      input_path=`$CYGPATH -u "$shortmode_path"`
27707      new_path="$input_path"
27708    fi
27709  fi
27710
27711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27712  if test "x$test_cygdrive_prefix" = x; then
27713    # As a simple fix, exclude /usr/bin since it's not a real path.
27714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27716      # a path prefixed by /cygdrive for fixpath to work.
27717      new_path="$CYGWIN_ROOT_PATH$input_path"
27718    fi
27719  fi
27720
27721
27722  if test "x$path" != "x$new_path"; then
27723    BOOT_JDK="$new_path"
27724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27726  fi
27727
27728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27729
27730  path="$BOOT_JDK"
27731  has_colon=`$ECHO $path | $GREP ^.:`
27732  new_path="$path"
27733  if test "x$has_colon" = x; then
27734    # Not in mixed or Windows style, start by that.
27735    new_path=`cmd //c echo $path`
27736  fi
27737
27738
27739  input_path="$new_path"
27740  # Check if we need to convert this using DOS-style short mode. If the path
27741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27742  # take no chances and rewrite it.
27743  # Note: m4 eats our [], so we need to use [ and ] instead.
27744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27745  if test "x$has_forbidden_chars" != x; then
27746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27748  fi
27749
27750
27751  windows_path="$new_path"
27752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753    unix_path=`$CYGPATH -u "$windows_path"`
27754    new_path="$unix_path"
27755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27757    new_path="$unix_path"
27758  fi
27759
27760  if test "x$path" != "x$new_path"; then
27761    BOOT_JDK="$new_path"
27762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27763$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27764  fi
27765
27766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27768
27769    else
27770      # We're on a unix platform. Hooray! :)
27771      path="$BOOT_JDK"
27772      has_space=`$ECHO "$path" | $GREP " "`
27773      if test "x$has_space" != x; then
27774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27777      fi
27778
27779      # Use eval to expand a potential ~
27780      eval path="$path"
27781      if test ! -f "$path" && test ! -d "$path"; then
27782        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27783      fi
27784
27785      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27786    fi
27787  fi
27788
27789            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27790$as_echo_n "checking for Boot JDK... " >&6; }
27791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27792$as_echo "$BOOT_JDK" >&6; }
27793            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27794$as_echo_n "checking Boot JDK version... " >&6; }
27795            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27797$as_echo "$BOOT_JDK_VERSION" >&6; }
27798          fi # end check jdk version
27799        fi # end check javac
27800      fi # end check java
27801    fi # end check boot jdk found
27802  fi
27803
27804    done
27805  fi
27806
27807
27808    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27809    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27810      # Do we have a bin/java?
27811      if test ! -x "$BOOT_JDK/bin/java"; then
27812        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27814        BOOT_JDK_FOUND=no
27815      else
27816        # Do we have a bin/javac?
27817        if test ! -x "$BOOT_JDK/bin/javac"; then
27818          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27820          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27821$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27822          BOOT_JDK_FOUND=no
27823        else
27824          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27825          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27826
27827          # Extra M4 quote needed to protect [] in grep expression.
27828          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27829          if test "x$FOUND_CORRECT_VERSION" = x; then
27830            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27832            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27833$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27834            BOOT_JDK_FOUND=no
27835          else
27836            # We're done! :-)
27837            BOOT_JDK_FOUND=yes
27838
27839  # Only process if variable expands to non-empty
27840
27841  if test "x$BOOT_JDK" != x; then
27842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27843
27844  # Input might be given as Windows format, start by converting to
27845  # unix format.
27846  path="$BOOT_JDK"
27847  new_path=`$CYGPATH -u "$path"`
27848
27849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27852  # "foo.exe" is OK but "foo" is an error.
27853  #
27854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27855  # It is also a way to make sure we got the proper file name for the real test later on.
27856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27857  if test "x$test_shortpath" = x; then
27858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27861  fi
27862
27863  # Call helper function which possibly converts this using DOS-style short mode.
27864  # If so, the updated path is stored in $new_path.
27865
27866  input_path="$new_path"
27867  # Check if we need to convert this using DOS-style short mode. If the path
27868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27869  # take no chances and rewrite it.
27870  # Note: m4 eats our [], so we need to use [ and ] instead.
27871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27872  if test "x$has_forbidden_chars" != x; then
27873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27877      # Going to short mode and back again did indeed matter. Since short mode is
27878      # case insensitive, let's make it lowercase to improve readability.
27879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27880      # Now convert it back to Unix-style (cygpath)
27881      input_path=`$CYGPATH -u "$shortmode_path"`
27882      new_path="$input_path"
27883    fi
27884  fi
27885
27886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27887  if test "x$test_cygdrive_prefix" = x; then
27888    # As a simple fix, exclude /usr/bin since it's not a real path.
27889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27891      # a path prefixed by /cygdrive for fixpath to work.
27892      new_path="$CYGWIN_ROOT_PATH$input_path"
27893    fi
27894  fi
27895
27896
27897  if test "x$path" != "x$new_path"; then
27898    BOOT_JDK="$new_path"
27899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27901  fi
27902
27903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27904
27905  path="$BOOT_JDK"
27906  has_colon=`$ECHO $path | $GREP ^.:`
27907  new_path="$path"
27908  if test "x$has_colon" = x; then
27909    # Not in mixed or Windows style, start by that.
27910    new_path=`cmd //c echo $path`
27911  fi
27912
27913
27914  input_path="$new_path"
27915  # Check if we need to convert this using DOS-style short mode. If the path
27916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27917  # take no chances and rewrite it.
27918  # Note: m4 eats our [], so we need to use [ and ] instead.
27919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27920  if test "x$has_forbidden_chars" != x; then
27921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27923  fi
27924
27925
27926  windows_path="$new_path"
27927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928    unix_path=`$CYGPATH -u "$windows_path"`
27929    new_path="$unix_path"
27930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27932    new_path="$unix_path"
27933  fi
27934
27935  if test "x$path" != "x$new_path"; then
27936    BOOT_JDK="$new_path"
27937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27939  fi
27940
27941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27943
27944    else
27945      # We're on a unix platform. Hooray! :)
27946      path="$BOOT_JDK"
27947      has_space=`$ECHO "$path" | $GREP " "`
27948      if test "x$has_space" != x; then
27949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27952      fi
27953
27954      # Use eval to expand a potential ~
27955      eval path="$path"
27956      if test ! -f "$path" && test ! -d "$path"; then
27957        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27958      fi
27959
27960      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27961    fi
27962  fi
27963
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27965$as_echo_n "checking for Boot JDK... " >&6; }
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27967$as_echo "$BOOT_JDK" >&6; }
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27969$as_echo_n "checking Boot JDK version... " >&6; }
27970            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27972$as_echo "$BOOT_JDK_VERSION" >&6; }
27973          fi # end check jdk version
27974        fi # end check javac
27975      fi # end check java
27976    fi # end check boot jdk found
27977  fi
27978
27979  fi
27980
27981
27982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27984      # Do we have a bin/java?
27985      if test ! -x "$BOOT_JDK/bin/java"; then
27986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27988        BOOT_JDK_FOUND=no
27989      else
27990        # Do we have a bin/javac?
27991        if test ! -x "$BOOT_JDK/bin/javac"; then
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27996          BOOT_JDK_FOUND=no
27997        else
27998          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27999          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28000
28001          # Extra M4 quote needed to protect [] in grep expression.
28002          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
28003          if test "x$FOUND_CORRECT_VERSION" = x; then
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28007$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28008            BOOT_JDK_FOUND=no
28009          else
28010            # We're done! :-)
28011            BOOT_JDK_FOUND=yes
28012
28013  # Only process if variable expands to non-empty
28014
28015  if test "x$BOOT_JDK" != x; then
28016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28017
28018  # Input might be given as Windows format, start by converting to
28019  # unix format.
28020  path="$BOOT_JDK"
28021  new_path=`$CYGPATH -u "$path"`
28022
28023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28026  # "foo.exe" is OK but "foo" is an error.
28027  #
28028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28029  # It is also a way to make sure we got the proper file name for the real test later on.
28030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28031  if test "x$test_shortpath" = x; then
28032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28035  fi
28036
28037  # Call helper function which possibly converts this using DOS-style short mode.
28038  # If so, the updated path is stored in $new_path.
28039
28040  input_path="$new_path"
28041  # Check if we need to convert this using DOS-style short mode. If the path
28042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28043  # take no chances and rewrite it.
28044  # Note: m4 eats our [], so we need to use [ and ] instead.
28045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28046  if test "x$has_forbidden_chars" != x; then
28047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28051      # Going to short mode and back again did indeed matter. Since short mode is
28052      # case insensitive, let's make it lowercase to improve readability.
28053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28054      # Now convert it back to Unix-style (cygpath)
28055      input_path=`$CYGPATH -u "$shortmode_path"`
28056      new_path="$input_path"
28057    fi
28058  fi
28059
28060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28061  if test "x$test_cygdrive_prefix" = x; then
28062    # As a simple fix, exclude /usr/bin since it's not a real path.
28063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28065      # a path prefixed by /cygdrive for fixpath to work.
28066      new_path="$CYGWIN_ROOT_PATH$input_path"
28067    fi
28068  fi
28069
28070
28071  if test "x$path" != "x$new_path"; then
28072    BOOT_JDK="$new_path"
28073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28075  fi
28076
28077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28078
28079  path="$BOOT_JDK"
28080  has_colon=`$ECHO $path | $GREP ^.:`
28081  new_path="$path"
28082  if test "x$has_colon" = x; then
28083    # Not in mixed or Windows style, start by that.
28084    new_path=`cmd //c echo $path`
28085  fi
28086
28087
28088  input_path="$new_path"
28089  # Check if we need to convert this using DOS-style short mode. If the path
28090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28091  # take no chances and rewrite it.
28092  # Note: m4 eats our [], so we need to use [ and ] instead.
28093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28094  if test "x$has_forbidden_chars" != x; then
28095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28097  fi
28098
28099
28100  windows_path="$new_path"
28101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28102    unix_path=`$CYGPATH -u "$windows_path"`
28103    new_path="$unix_path"
28104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28106    new_path="$unix_path"
28107  fi
28108
28109  if test "x$path" != "x$new_path"; then
28110    BOOT_JDK="$new_path"
28111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28113  fi
28114
28115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28117
28118    else
28119      # We're on a unix platform. Hooray! :)
28120      path="$BOOT_JDK"
28121      has_space=`$ECHO "$path" | $GREP " "`
28122      if test "x$has_space" != x; then
28123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28126      fi
28127
28128      # Use eval to expand a potential ~
28129      eval path="$path"
28130      if test ! -f "$path" && test ! -d "$path"; then
28131        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28132      fi
28133
28134      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28135    fi
28136  fi
28137
28138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28139$as_echo_n "checking for Boot JDK... " >&6; }
28140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28141$as_echo "$BOOT_JDK" >&6; }
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28143$as_echo_n "checking Boot JDK version... " >&6; }
28144            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28145            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28146$as_echo "$BOOT_JDK_VERSION" >&6; }
28147          fi # end check jdk version
28148        fi # end check javac
28149      fi # end check java
28150    fi # end check boot jdk found
28151  fi
28152
28153
28154  # If we haven't found anything yet, we've truly lost. Give up.
28155  if test "x$BOOT_JDK_FOUND" = xno; then
28156
28157  # Print a helpful message on how to acquire the necessary build dependency.
28158  # openjdk is the help tag: freetype, cups, alsa etc
28159  MISSING_DEPENDENCY=openjdk
28160
28161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28162    cygwin_help $MISSING_DEPENDENCY
28163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28164    msys_help $MISSING_DEPENDENCY
28165  else
28166    PKGHANDLER_COMMAND=
28167
28168    case $PKGHANDLER in
28169      apt-get)
28170        apt_help     $MISSING_DEPENDENCY ;;
28171      yum)
28172        yum_help     $MISSING_DEPENDENCY ;;
28173      port)
28174        port_help    $MISSING_DEPENDENCY ;;
28175      pkgutil)
28176        pkgutil_help $MISSING_DEPENDENCY ;;
28177      pkgadd)
28178        pkgadd_help  $MISSING_DEPENDENCY ;;
28179    esac
28180
28181    if test "x$PKGHANDLER_COMMAND" != x; then
28182      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28183    fi
28184  fi
28185
28186    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28187$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28188    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28189$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28190    as_fn_error $? "Cannot continue" "$LINENO" 5
28191  fi
28192
28193
28194
28195  # Setup tools from the Boot JDK.
28196
28197  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28198
28199  # Publish this variable in the help.
28200
28201
28202  if [ -z "${JAVA+x}" ]; then
28203    # The variable is not set by user, try to locate tool using the code snippet
28204
28205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28206$as_echo_n "checking for java in Boot JDK... " >&6; }
28207      JAVA=$BOOT_JDK/bin/java
28208      if test ! -x $JAVA; then
28209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28210$as_echo "not found" >&6; }
28211        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28212$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28213        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28214      fi
28215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28216$as_echo "ok" >&6; }
28217
28218
28219  else
28220    # The variable is set, but is it from the command line or the environment?
28221
28222    # Try to remove the string !JAVA! from our list.
28223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28225      # If it failed, the variable was not from the command line. Ignore it,
28226      # but warn the user (except for BASH, which is always set by the calling BASH).
28227      if test "xJAVA" != xBASH; then
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28229$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28230      fi
28231      # Try to locate tool using the code snippet
28232
28233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28234$as_echo_n "checking for java in Boot JDK... " >&6; }
28235      JAVA=$BOOT_JDK/bin/java
28236      if test ! -x $JAVA; then
28237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28238$as_echo "not found" >&6; }
28239        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28240$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28241        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28242      fi
28243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28244$as_echo "ok" >&6; }
28245
28246
28247    else
28248      # If it succeeded, then it was overridden by the user. We will use it
28249      # for the tool.
28250
28251      # First remove it from the list of overridden variables, so we can test
28252      # for unknown variables in the end.
28253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28254
28255      # Check if we try to supply an empty value
28256      if test "x$JAVA" = x; then
28257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28258$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28260$as_echo_n "checking for JAVA... " >&6; }
28261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28262$as_echo "disabled" >&6; }
28263      else
28264        # Check if the provided tool contains a complete path.
28265        tool_specified="$JAVA"
28266        tool_basename="${tool_specified##*/}"
28267        if test "x$tool_basename" = "x$tool_specified"; then
28268          # A command without a complete path is provided, search $PATH.
28269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28270$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28271          # Extract the first word of "$tool_basename", so it can be a program name with args.
28272set dummy $tool_basename; ac_word=$2
28273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28274$as_echo_n "checking for $ac_word... " >&6; }
28275if ${ac_cv_path_JAVA+:} false; then :
28276  $as_echo_n "(cached) " >&6
28277else
28278  case $JAVA in
28279  [\\/]* | ?:[\\/]*)
28280  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28281  ;;
28282  *)
28283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28284for as_dir in $PATH
28285do
28286  IFS=$as_save_IFS
28287  test -z "$as_dir" && as_dir=.
28288    for ac_exec_ext in '' $ac_executable_extensions; do
28289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28290    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28292    break 2
28293  fi
28294done
28295  done
28296IFS=$as_save_IFS
28297
28298  ;;
28299esac
28300fi
28301JAVA=$ac_cv_path_JAVA
28302if test -n "$JAVA"; then
28303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28304$as_echo "$JAVA" >&6; }
28305else
28306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28307$as_echo "no" >&6; }
28308fi
28309
28310
28311          if test "x$JAVA" = x; then
28312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28313          fi
28314        else
28315          # Otherwise we believe it is a complete path. Use it as it is.
28316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28317$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28319$as_echo_n "checking for JAVA... " >&6; }
28320          if test ! -x "$tool_specified"; then
28321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28322$as_echo "not found" >&6; }
28323            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28324          fi
28325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28326$as_echo "$tool_specified" >&6; }
28327        fi
28328      fi
28329    fi
28330
28331  fi
28332
28333
28334
28335  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28336
28337  # Publish this variable in the help.
28338
28339
28340  if [ -z "${JAVAC+x}" ]; then
28341    # The variable is not set by user, try to locate tool using the code snippet
28342
28343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28344$as_echo_n "checking for javac in Boot JDK... " >&6; }
28345      JAVAC=$BOOT_JDK/bin/javac
28346      if test ! -x $JAVAC; then
28347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28348$as_echo "not found" >&6; }
28349        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28350$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28351        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28352      fi
28353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28354$as_echo "ok" >&6; }
28355
28356
28357  else
28358    # The variable is set, but is it from the command line or the environment?
28359
28360    # Try to remove the string !JAVAC! from our list.
28361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28363      # If it failed, the variable was not from the command line. Ignore it,
28364      # but warn the user (except for BASH, which is always set by the calling BASH).
28365      if test "xJAVAC" != xBASH; then
28366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28367$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28368      fi
28369      # Try to locate tool using the code snippet
28370
28371      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28372$as_echo_n "checking for javac in Boot JDK... " >&6; }
28373      JAVAC=$BOOT_JDK/bin/javac
28374      if test ! -x $JAVAC; then
28375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28376$as_echo "not found" >&6; }
28377        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28378$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28379        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28380      fi
28381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28382$as_echo "ok" >&6; }
28383
28384
28385    else
28386      # If it succeeded, then it was overridden by the user. We will use it
28387      # for the tool.
28388
28389      # First remove it from the list of overridden variables, so we can test
28390      # for unknown variables in the end.
28391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28392
28393      # Check if we try to supply an empty value
28394      if test "x$JAVAC" = x; then
28395        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28396$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28398$as_echo_n "checking for JAVAC... " >&6; }
28399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28400$as_echo "disabled" >&6; }
28401      else
28402        # Check if the provided tool contains a complete path.
28403        tool_specified="$JAVAC"
28404        tool_basename="${tool_specified##*/}"
28405        if test "x$tool_basename" = "x$tool_specified"; then
28406          # A command without a complete path is provided, search $PATH.
28407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28408$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28409          # Extract the first word of "$tool_basename", so it can be a program name with args.
28410set dummy $tool_basename; ac_word=$2
28411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28412$as_echo_n "checking for $ac_word... " >&6; }
28413if ${ac_cv_path_JAVAC+:} false; then :
28414  $as_echo_n "(cached) " >&6
28415else
28416  case $JAVAC in
28417  [\\/]* | ?:[\\/]*)
28418  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28419  ;;
28420  *)
28421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28422for as_dir in $PATH
28423do
28424  IFS=$as_save_IFS
28425  test -z "$as_dir" && as_dir=.
28426    for ac_exec_ext in '' $ac_executable_extensions; do
28427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28428    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28430    break 2
28431  fi
28432done
28433  done
28434IFS=$as_save_IFS
28435
28436  ;;
28437esac
28438fi
28439JAVAC=$ac_cv_path_JAVAC
28440if test -n "$JAVAC"; then
28441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28442$as_echo "$JAVAC" >&6; }
28443else
28444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28445$as_echo "no" >&6; }
28446fi
28447
28448
28449          if test "x$JAVAC" = x; then
28450            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28451          fi
28452        else
28453          # Otherwise we believe it is a complete path. Use it as it is.
28454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28455$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28456          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28457$as_echo_n "checking for JAVAC... " >&6; }
28458          if test ! -x "$tool_specified"; then
28459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28460$as_echo "not found" >&6; }
28461            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28462          fi
28463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28464$as_echo "$tool_specified" >&6; }
28465        fi
28466      fi
28467    fi
28468
28469  fi
28470
28471
28472
28473  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28474
28475  # Publish this variable in the help.
28476
28477
28478  if [ -z "${JAVAH+x}" ]; then
28479    # The variable is not set by user, try to locate tool using the code snippet
28480
28481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28482$as_echo_n "checking for javah in Boot JDK... " >&6; }
28483      JAVAH=$BOOT_JDK/bin/javah
28484      if test ! -x $JAVAH; then
28485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28486$as_echo "not found" >&6; }
28487        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28488$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28489        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28490      fi
28491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28492$as_echo "ok" >&6; }
28493
28494
28495  else
28496    # The variable is set, but is it from the command line or the environment?
28497
28498    # Try to remove the string !JAVAH! from our list.
28499    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28500    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28501      # If it failed, the variable was not from the command line. Ignore it,
28502      # but warn the user (except for BASH, which is always set by the calling BASH).
28503      if test "xJAVAH" != xBASH; then
28504        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28505$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28506      fi
28507      # Try to locate tool using the code snippet
28508
28509      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28510$as_echo_n "checking for javah in Boot JDK... " >&6; }
28511      JAVAH=$BOOT_JDK/bin/javah
28512      if test ! -x $JAVAH; then
28513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28514$as_echo "not found" >&6; }
28515        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28516$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28517        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28518      fi
28519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28520$as_echo "ok" >&6; }
28521
28522
28523    else
28524      # If it succeeded, then it was overridden by the user. We will use it
28525      # for the tool.
28526
28527      # First remove it from the list of overridden variables, so we can test
28528      # for unknown variables in the end.
28529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28530
28531      # Check if we try to supply an empty value
28532      if test "x$JAVAH" = x; then
28533        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28534$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28536$as_echo_n "checking for JAVAH... " >&6; }
28537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28538$as_echo "disabled" >&6; }
28539      else
28540        # Check if the provided tool contains a complete path.
28541        tool_specified="$JAVAH"
28542        tool_basename="${tool_specified##*/}"
28543        if test "x$tool_basename" = "x$tool_specified"; then
28544          # A command without a complete path is provided, search $PATH.
28545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28546$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28547          # Extract the first word of "$tool_basename", so it can be a program name with args.
28548set dummy $tool_basename; ac_word=$2
28549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28550$as_echo_n "checking for $ac_word... " >&6; }
28551if ${ac_cv_path_JAVAH+:} false; then :
28552  $as_echo_n "(cached) " >&6
28553else
28554  case $JAVAH in
28555  [\\/]* | ?:[\\/]*)
28556  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28557  ;;
28558  *)
28559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28560for as_dir in $PATH
28561do
28562  IFS=$as_save_IFS
28563  test -z "$as_dir" && as_dir=.
28564    for ac_exec_ext in '' $ac_executable_extensions; do
28565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28566    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28568    break 2
28569  fi
28570done
28571  done
28572IFS=$as_save_IFS
28573
28574  ;;
28575esac
28576fi
28577JAVAH=$ac_cv_path_JAVAH
28578if test -n "$JAVAH"; then
28579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28580$as_echo "$JAVAH" >&6; }
28581else
28582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28583$as_echo "no" >&6; }
28584fi
28585
28586
28587          if test "x$JAVAH" = x; then
28588            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28589          fi
28590        else
28591          # Otherwise we believe it is a complete path. Use it as it is.
28592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28593$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28594          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28595$as_echo_n "checking for JAVAH... " >&6; }
28596          if test ! -x "$tool_specified"; then
28597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28598$as_echo "not found" >&6; }
28599            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28600          fi
28601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28602$as_echo "$tool_specified" >&6; }
28603        fi
28604      fi
28605    fi
28606
28607  fi
28608
28609
28610
28611  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28612
28613  # Publish this variable in the help.
28614
28615
28616  if [ -z "${JAR+x}" ]; then
28617    # The variable is not set by user, try to locate tool using the code snippet
28618
28619      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28620$as_echo_n "checking for jar in Boot JDK... " >&6; }
28621      JAR=$BOOT_JDK/bin/jar
28622      if test ! -x $JAR; then
28623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28624$as_echo "not found" >&6; }
28625        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28626$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28627        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28628      fi
28629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28630$as_echo "ok" >&6; }
28631
28632
28633  else
28634    # The variable is set, but is it from the command line or the environment?
28635
28636    # Try to remove the string !JAR! from our list.
28637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28639      # If it failed, the variable was not from the command line. Ignore it,
28640      # but warn the user (except for BASH, which is always set by the calling BASH).
28641      if test "xJAR" != xBASH; then
28642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28643$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28644      fi
28645      # Try to locate tool using the code snippet
28646
28647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28648$as_echo_n "checking for jar in Boot JDK... " >&6; }
28649      JAR=$BOOT_JDK/bin/jar
28650      if test ! -x $JAR; then
28651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28652$as_echo "not found" >&6; }
28653        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28654$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28655        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28656      fi
28657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28658$as_echo "ok" >&6; }
28659
28660
28661    else
28662      # If it succeeded, then it was overridden by the user. We will use it
28663      # for the tool.
28664
28665      # First remove it from the list of overridden variables, so we can test
28666      # for unknown variables in the end.
28667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28668
28669      # Check if we try to supply an empty value
28670      if test "x$JAR" = x; then
28671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28672$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28674$as_echo_n "checking for JAR... " >&6; }
28675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28676$as_echo "disabled" >&6; }
28677      else
28678        # Check if the provided tool contains a complete path.
28679        tool_specified="$JAR"
28680        tool_basename="${tool_specified##*/}"
28681        if test "x$tool_basename" = "x$tool_specified"; then
28682          # A command without a complete path is provided, search $PATH.
28683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28684$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28685          # Extract the first word of "$tool_basename", so it can be a program name with args.
28686set dummy $tool_basename; ac_word=$2
28687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28688$as_echo_n "checking for $ac_word... " >&6; }
28689if ${ac_cv_path_JAR+:} false; then :
28690  $as_echo_n "(cached) " >&6
28691else
28692  case $JAR in
28693  [\\/]* | ?:[\\/]*)
28694  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28695  ;;
28696  *)
28697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28698for as_dir in $PATH
28699do
28700  IFS=$as_save_IFS
28701  test -z "$as_dir" && as_dir=.
28702    for ac_exec_ext in '' $ac_executable_extensions; do
28703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28704    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28706    break 2
28707  fi
28708done
28709  done
28710IFS=$as_save_IFS
28711
28712  ;;
28713esac
28714fi
28715JAR=$ac_cv_path_JAR
28716if test -n "$JAR"; then
28717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28718$as_echo "$JAR" >&6; }
28719else
28720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28721$as_echo "no" >&6; }
28722fi
28723
28724
28725          if test "x$JAR" = x; then
28726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28727          fi
28728        else
28729          # Otherwise we believe it is a complete path. Use it as it is.
28730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28731$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28733$as_echo_n "checking for JAR... " >&6; }
28734          if test ! -x "$tool_specified"; then
28735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28736$as_echo "not found" >&6; }
28737            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28738          fi
28739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28740$as_echo "$tool_specified" >&6; }
28741        fi
28742      fi
28743    fi
28744
28745  fi
28746
28747
28748
28749  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28750
28751  # Publish this variable in the help.
28752
28753
28754  if [ -z "${JARSIGNER+x}" ]; then
28755    # The variable is not set by user, try to locate tool using the code snippet
28756
28757      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28758$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28759      JARSIGNER=$BOOT_JDK/bin/jarsigner
28760      if test ! -x $JARSIGNER; then
28761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28762$as_echo "not found" >&6; }
28763        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28764$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28765        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28766      fi
28767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28768$as_echo "ok" >&6; }
28769
28770
28771  else
28772    # The variable is set, but is it from the command line or the environment?
28773
28774    # Try to remove the string !JARSIGNER! from our list.
28775    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28776    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28777      # If it failed, the variable was not from the command line. Ignore it,
28778      # but warn the user (except for BASH, which is always set by the calling BASH).
28779      if test "xJARSIGNER" != xBASH; then
28780        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28781$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28782      fi
28783      # Try to locate tool using the code snippet
28784
28785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28786$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28787      JARSIGNER=$BOOT_JDK/bin/jarsigner
28788      if test ! -x $JARSIGNER; then
28789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28790$as_echo "not found" >&6; }
28791        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28792$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28793        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28794      fi
28795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28796$as_echo "ok" >&6; }
28797
28798
28799    else
28800      # If it succeeded, then it was overridden by the user. We will use it
28801      # for the tool.
28802
28803      # First remove it from the list of overridden variables, so we can test
28804      # for unknown variables in the end.
28805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28806
28807      # Check if we try to supply an empty value
28808      if test "x$JARSIGNER" = x; then
28809        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28810$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28812$as_echo_n "checking for JARSIGNER... " >&6; }
28813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28814$as_echo "disabled" >&6; }
28815      else
28816        # Check if the provided tool contains a complete path.
28817        tool_specified="$JARSIGNER"
28818        tool_basename="${tool_specified##*/}"
28819        if test "x$tool_basename" = "x$tool_specified"; then
28820          # A command without a complete path is provided, search $PATH.
28821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28822$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28823          # Extract the first word of "$tool_basename", so it can be a program name with args.
28824set dummy $tool_basename; ac_word=$2
28825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28826$as_echo_n "checking for $ac_word... " >&6; }
28827if ${ac_cv_path_JARSIGNER+:} false; then :
28828  $as_echo_n "(cached) " >&6
28829else
28830  case $JARSIGNER in
28831  [\\/]* | ?:[\\/]*)
28832  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28833  ;;
28834  *)
28835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28836for as_dir in $PATH
28837do
28838  IFS=$as_save_IFS
28839  test -z "$as_dir" && as_dir=.
28840    for ac_exec_ext in '' $ac_executable_extensions; do
28841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28842    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28844    break 2
28845  fi
28846done
28847  done
28848IFS=$as_save_IFS
28849
28850  ;;
28851esac
28852fi
28853JARSIGNER=$ac_cv_path_JARSIGNER
28854if test -n "$JARSIGNER"; then
28855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28856$as_echo "$JARSIGNER" >&6; }
28857else
28858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28859$as_echo "no" >&6; }
28860fi
28861
28862
28863          if test "x$JARSIGNER" = x; then
28864            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28865          fi
28866        else
28867          # Otherwise we believe it is a complete path. Use it as it is.
28868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28869$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28871$as_echo_n "checking for JARSIGNER... " >&6; }
28872          if test ! -x "$tool_specified"; then
28873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28874$as_echo "not found" >&6; }
28875            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28876          fi
28877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28878$as_echo "$tool_specified" >&6; }
28879        fi
28880      fi
28881    fi
28882
28883  fi
28884
28885
28886
28887  # Finally, set some other options...
28888
28889  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28890  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28891
28892
28893
28894  # Check if the boot jdk is 32 or 64 bit
28895  if "$JAVA" -d64 -version > /dev/null 2>&1; then
28896    BOOT_JDK_BITS="64"
28897  else
28898    BOOT_JDK_BITS="32"
28899  fi
28900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28901$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28903$as_echo "$BOOT_JDK_BITS" >&6; }
28904
28905
28906
28907###############################################################################
28908#
28909# Configure the sources to use. We can add or override individual directories.
28910#
28911###############################################################################
28912
28913
28914  # Where are the sources.
28915  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28916  CORBA_TOPDIR="$SRC_ROOT/corba"
28917  JAXP_TOPDIR="$SRC_ROOT/jaxp"
28918  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28919  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28920  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28921  JDK_TOPDIR="$SRC_ROOT/jdk"
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931  # This feature is no longer supported.
28932
28933
28934
28935# Check whether --with-add-source-root was given.
28936if test "${with_add_source_root+set}" = set; then :
28937  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
28938$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28939fi
28940
28941
28942
28943
28944# Check whether --with-override-source-root was given.
28945if test "${with_override_source_root+set}" = set; then :
28946  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
28947$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28948fi
28949
28950
28951
28952
28953# Check whether --with-adds-and-overrides was given.
28954if test "${with_adds_and_overrides+set}" = set; then :
28955  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
28956$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28957fi
28958
28959
28960
28961
28962# Check whether --with-override-langtools was given.
28963if test "${with_override_langtools+set}" = set; then :
28964  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28965$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28966fi
28967
28968
28969
28970
28971# Check whether --with-override-corba was given.
28972if test "${with_override_corba+set}" = set; then :
28973  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28974$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28975fi
28976
28977
28978
28979
28980# Check whether --with-override-jaxp was given.
28981if test "${with_override_jaxp+set}" = set; then :
28982  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28983$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28984fi
28985
28986
28987
28988
28989# Check whether --with-override-jaxws was given.
28990if test "${with_override_jaxws+set}" = set; then :
28991  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
28992$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
28993fi
28994
28995
28996
28997
28998# Check whether --with-override-hotspot was given.
28999if test "${with_override_hotspot+set}" = set; then :
29000  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29001$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29002fi
29003
29004
29005
29006
29007# Check whether --with-override-nashorn was given.
29008if test "${with_override_nashorn+set}" = set; then :
29009  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29010$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29011fi
29012
29013
29014
29015
29016# Check whether --with-override-jdk was given.
29017if test "${with_override_jdk+set}" = set; then :
29018  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29019$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29020fi
29021
29022
29023
29024
29025  BUILD_OUTPUT="$OUTPUT_ROOT"
29026
29027
29028  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29029  BUILD_HOTSPOT=true
29030
29031
29032
29033# Check whether --with-import-hotspot was given.
29034if test "${with_import_hotspot+set}" = set; then :
29035  withval=$with_import_hotspot;
29036fi
29037
29038  if test "x$with_import_hotspot" != x; then
29039    CURDIR="$PWD"
29040    cd "$with_import_hotspot"
29041    HOTSPOT_DIST="`pwd`"
29042    cd "$CURDIR"
29043    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29044      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29045    fi
29046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29047$as_echo_n "checking if hotspot should be imported... " >&6; }
29048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29049$as_echo "yes from $HOTSPOT_DIST" >&6; }
29050    BUILD_HOTSPOT=false
29051  fi
29052
29053  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29054
29055
29056###############################################################################
29057#
29058# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29059# native code.
29060#
29061###############################################################################
29062
29063# See if we are doing a complete static build or not
29064
29065  # Check whether --enable-static-build was given.
29066if test "${enable_static_build+set}" = set; then :
29067  enableval=$enable_static_build;
29068fi
29069
29070  STATIC_BUILD=false
29071  if test "x$enable_static_build" = "xyes"; then
29072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29073$as_echo_n "checking if static build is enabled... " >&6; }
29074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29075$as_echo "yes" >&6; }
29076    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29077      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29078    fi
29079    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29080    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29081    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29082    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29083    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29084    STATIC_BUILD=true
29085  elif test "x$enable_static_build" = "xno"; then
29086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29087$as_echo_n "checking if static build is enabled... " >&6; }
29088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29089$as_echo "no" >&6; }
29090  elif test "x$enable_static_build" != "x"; then
29091    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29092  fi
29093
29094
29095
29096
29097# First determine the toolchain type (compiler family)
29098
29099
29100# Check whether --with-toolchain-type was given.
29101if test "${with_toolchain_type+set}" = set; then :
29102  withval=$with_toolchain_type;
29103fi
29104
29105
29106  # Use indirect variable referencing
29107  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29108  VALID_TOOLCHAINS=${!toolchain_var_name}
29109
29110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29111    if test -n "$XCODEBUILD"; then
29112      # On Mac OS X, default toolchain to clang after Xcode 5
29113      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29114      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29115      if test $? -ne 0; then
29116        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29117      fi
29118      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29119          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29120          $CUT -f 1 -d .`
29121      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29122$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29123      if test $XCODE_MAJOR_VERSION -ge 5; then
29124          DEFAULT_TOOLCHAIN="clang"
29125      else
29126          DEFAULT_TOOLCHAIN="gcc"
29127      fi
29128    else
29129      # If Xcode is not installed, but the command line tools are
29130      # then we can't run xcodebuild. On these systems we should
29131      # default to clang
29132      DEFAULT_TOOLCHAIN="clang"
29133    fi
29134  else
29135    # First toolchain type in the list is the default
29136    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29137  fi
29138
29139  if test "x$with_toolchain_type" = xlist; then
29140    # List all toolchains
29141    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29142$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29143    for toolchain in $VALID_TOOLCHAINS; do
29144      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29145      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29146      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29147    done
29148
29149    exit 0
29150  elif test "x$with_toolchain_type" != x; then
29151    # User override; check that it is valid
29152    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29153      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29154$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29155      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29156$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29157      as_fn_error $? "Cannot continue." "$LINENO" 5
29158    fi
29159    TOOLCHAIN_TYPE=$with_toolchain_type
29160  else
29161    # No flag given, use default
29162    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29163  fi
29164
29165
29166  TOOLCHAIN_CC_BINARY_clang="clang"
29167  TOOLCHAIN_CC_BINARY_gcc="gcc"
29168  TOOLCHAIN_CC_BINARY_microsoft="cl"
29169  TOOLCHAIN_CC_BINARY_solstudio="cc"
29170  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29171
29172  TOOLCHAIN_CXX_BINARY_clang="clang++"
29173  TOOLCHAIN_CXX_BINARY_gcc="g++"
29174  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29175  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29176  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29177
29178  # Use indirect variable referencing
29179  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29180  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29181  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29182  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29183  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29184  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29185
29186
29187  # Define filename patterns
29188  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29189    LIBRARY_PREFIX=
29190    SHARED_LIBRARY_SUFFIX='.dll'
29191    STATIC_LIBRARY_SUFFIX='.lib'
29192    SHARED_LIBRARY='$1.dll'
29193    STATIC_LIBRARY='$1.lib'
29194    OBJ_SUFFIX='.obj'
29195    EXE_SUFFIX='.exe'
29196  else
29197    LIBRARY_PREFIX=lib
29198    SHARED_LIBRARY_SUFFIX='.so'
29199    STATIC_LIBRARY_SUFFIX='.a'
29200    SHARED_LIBRARY='lib$1.so'
29201    STATIC_LIBRARY='lib$1.a'
29202    OBJ_SUFFIX='.o'
29203    EXE_SUFFIX=''
29204    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29205      # For full static builds, we're overloading the SHARED_LIBRARY
29206      # variables in order to limit the amount of changes required.
29207      # It would be better to remove SHARED and just use LIBRARY and
29208      # LIBRARY_SUFFIX for libraries that can be built either
29209      # shared or static and use STATIC_* for libraries that are
29210      # always built statically.
29211      if test "x$STATIC_BUILD" = xtrue; then
29212        SHARED_LIBRARY='lib$1.a'
29213        SHARED_LIBRARY_SUFFIX='.a'
29214      else
29215        SHARED_LIBRARY='lib$1.dylib'
29216        SHARED_LIBRARY_SUFFIX='.dylib'
29217      fi
29218    fi
29219  fi
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29231    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29232$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29233  else
29234    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29235$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29236  fi
29237
29238
29239# User supplied flags should be used when configure detects compilers
29240
29241  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29242    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29243$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29244  fi
29245
29246  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29247    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29248$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29249  fi
29250
29251  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29252    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29253$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29254  fi
29255
29256
29257# Check whether --with-extra-cflags was given.
29258if test "${with_extra_cflags+set}" = set; then :
29259  withval=$with_extra_cflags;
29260fi
29261
29262
29263
29264# Check whether --with-extra-cxxflags was given.
29265if test "${with_extra_cxxflags+set}" = set; then :
29266  withval=$with_extra_cxxflags;
29267fi
29268
29269
29270
29271# Check whether --with-extra-ldflags was given.
29272if test "${with_extra_ldflags+set}" = set; then :
29273  withval=$with_extra_ldflags;
29274fi
29275
29276
29277  EXTRA_CFLAGS="$with_extra_cflags"
29278  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29279  EXTRA_LDFLAGS="$with_extra_ldflags"
29280
29281  # Hotspot needs these set in their legacy form
29282  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29283  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29284  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29285
29286
29287
29288
29289
29290  # The global CFLAGS and LDLAGS variables are used by configure tests and
29291  # should include the extra parameters
29292  CFLAGS="$EXTRA_CFLAGS"
29293  CXXFLAGS="$EXTRA_CXXFLAGS"
29294  LDFLAGS="$EXTRA_LDFLAGS"
29295  CPPFLAGS=""
29296
29297# The sysroot cflags are needed for configure to be able to run the compilers
29298
29299  if test "x$SYSROOT" != "x"; then
29300    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29301      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29302        # Solaris Studio does not have a concept of sysroot. Instead we must
29303        # make sure the default include and lib dirs are appended to each
29304        # compile and link command line.
29305        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29306        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29307            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29308            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29309      fi
29310    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29311      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29312      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29313    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29314      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29315      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29316    fi
29317    # Propagate the sysroot args to hotspot
29318    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29319    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29320    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29321    # The global CFLAGS and LDFLAGS variables need these for configure to function
29322    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29323    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29324    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29325    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29326  fi
29327
29328  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29329    # We also need -iframework<path>/System/Library/Frameworks
29330    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29331    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29332    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29333    # set this here so it doesn't have to be peppered throughout the forest
29334    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29335    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29336  fi
29337
29338
29339
29340
29341
29342# Then detect the actual binaries needed
29343
29344  # FIXME: Is this needed?
29345  ac_ext=cpp
29346ac_cpp='$CXXCPP $CPPFLAGS'
29347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29350
29351
29352  # Store the CFLAGS etc passed to the configure script.
29353  ORG_CFLAGS="$CFLAGS"
29354  ORG_CXXFLAGS="$CXXFLAGS"
29355
29356  # autoconf magic only relies on PATH, so update it if tools dir is specified
29357  OLD_PATH="$PATH"
29358
29359  # On Windows, we need to detect the visual studio installation first.
29360  # This will change the PATH, but we need to keep that new PATH even
29361  # after toolchain detection is done, since the compiler (on x86) uses
29362  # it for DLL resolution in runtime.
29363  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29364      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29365
29366  # Store path to cygwin link.exe to help excluding it when searching for
29367  # VS linker. This must be done before changing the PATH when looking for VS.
29368  # Extract the first word of "link", so it can be a program name with args.
29369set dummy link; ac_word=$2
29370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29371$as_echo_n "checking for $ac_word... " >&6; }
29372if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29373  $as_echo_n "(cached) " >&6
29374else
29375  case $CYGWIN_LINK in
29376  [\\/]* | ?:[\\/]*)
29377  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29378  ;;
29379  *)
29380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29381for as_dir in $PATH
29382do
29383  IFS=$as_save_IFS
29384  test -z "$as_dir" && as_dir=.
29385    for ac_exec_ext in '' $ac_executable_extensions; do
29386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29387    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29389    break 2
29390  fi
29391done
29392  done
29393IFS=$as_save_IFS
29394
29395  ;;
29396esac
29397fi
29398CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29399if test -n "$CYGWIN_LINK"; then
29400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29401$as_echo "$CYGWIN_LINK" >&6; }
29402else
29403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29404$as_echo "no" >&6; }
29405fi
29406
29407
29408  if test "x$CYGWIN_LINK" != x; then
29409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29410$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29411    "$CYGWIN_LINK" --version > /dev/null
29412    if test $? -eq 0 ; then
29413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29414$as_echo "yes" >&6; }
29415    else
29416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29417$as_echo "no" >&6; }
29418      # This might be the VS linker. Don't exclude it later on.
29419      CYGWIN_LINK=""
29420    fi
29421  fi
29422
29423  # First-hand choice is to locate and run the vsvars bat file.
29424
29425
29426# Check whether --with-toolchain-version was given.
29427if test "${with_toolchain_version+set}" = set; then :
29428  withval=$with_toolchain_version;
29429fi
29430
29431
29432  if test "x$with_toolchain_version" = xlist; then
29433    # List all toolchains
29434    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29435$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29436    for version in $VALID_VS_VERSIONS; do
29437      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29438      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29439    done
29440
29441    exit 0
29442  elif test "x$DEVKIT_VS_VERSION" != x; then
29443    VS_VERSION=$DEVKIT_VS_VERSION
29444    TOOLCHAIN_VERSION=$VS_VERSION
29445    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29446    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29447    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29448    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29449    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29450    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29451
29452    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29453    # can still be exported as INCLUDE for compiler invocations without
29454    # SYSROOT_CFLAGS
29455    OLDIFS="$IFS"
29456    IFS=";"
29457    for i in $DEVKIT_VS_INCLUDE; do
29458      ipath=$i
29459
29460  unix_path="$ipath"
29461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29462    windows_path=`$CYGPATH -m "$unix_path"`
29463    ipath="$windows_path"
29464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29465    windows_path=`cmd //c echo $unix_path`
29466    ipath="$windows_path"
29467  fi
29468
29469      VS_INCLUDE="$VS_INCLUDE;$ipath"
29470    done
29471    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29472    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29473    for i in $DEVKIT_VS_LIB; do
29474      libpath=$i
29475
29476  unix_path="$libpath"
29477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29478    windows_path=`$CYGPATH -m "$unix_path"`
29479    libpath="$windows_path"
29480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29481    windows_path=`cmd //c echo $unix_path`
29482    libpath="$windows_path"
29483  fi
29484
29485      VS_LIB="$VS_LIB;$libpath"
29486    done
29487    IFS="$OLDIFS"
29488
29489    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29490$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29491
29492  elif test "x$with_toolchain_version" != x; then
29493    # User override; check that it is valid
29494    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29495      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29496$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29497      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29498$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29499      as_fn_error $? "Cannot continue." "$LINENO" 5
29500    fi
29501    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29502  else
29503    # No flag given, use default
29504    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29505  fi
29506
29507  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29508
29509  VS_VERSION="$VS_VERSION"
29510  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29511  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29512  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29513  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29514
29515  # When using --with-tools-dir, assume it points to the correct and default
29516  # version of Visual Studio or that --with-toolchain-version was also set.
29517  if test "x$with_tools_dir" != x; then
29518
29519  if test "x$VS_ENV_CMD" = x; then
29520    VS_VERSION="${VS_VERSION}"
29521    VS_BASE="$with_tools_dir/../.."
29522    METHOD="--with-tools-dir"
29523
29524    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29525      VCVARSFILE="vc/bin/vcvars32.bat"
29526    else
29527      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29528    fi
29529
29530
29531  windows_path="$VS_BASE"
29532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29533    unix_path=`$CYGPATH -u "$windows_path"`
29534    VS_BASE="$unix_path"
29535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29537    VS_BASE="$unix_path"
29538  fi
29539
29540    if test -d "$VS_BASE"; then
29541      if test -f "$VS_BASE/$VCVARSFILE"; then
29542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29543$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29544        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29545        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29546        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29547        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29548      else
29549        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29550$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29551        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29552$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29553      fi
29554    fi
29555  fi
29556
29557
29558  if test "x$VS_ENV_CMD" = x; then
29559    VS_VERSION="${VS_VERSION}"
29560    VS_BASE="$with_tools_dir/../../.."
29561    METHOD="--with-tools-dir"
29562
29563    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29564      VCVARSFILE="vc/bin/vcvars32.bat"
29565    else
29566      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29567    fi
29568
29569
29570  windows_path="$VS_BASE"
29571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29572    unix_path=`$CYGPATH -u "$windows_path"`
29573    VS_BASE="$unix_path"
29574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29576    VS_BASE="$unix_path"
29577  fi
29578
29579    if test -d "$VS_BASE"; then
29580      if test -f "$VS_BASE/$VCVARSFILE"; then
29581        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29582$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29583        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29584        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29585        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29586        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29587      else
29588        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29589$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29590        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29591$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29592      fi
29593    fi
29594  fi
29595
29596    if test "x$VS_ENV_CMD" = x; then
29597      # Having specified an argument which is incorrect will produce an instant failure;
29598      # we should not go on looking
29599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29600$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29601      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29602$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29603      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29604$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29605      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29606    fi
29607  fi
29608
29609  VS_ENV_CMD=""
29610  VS_ENV_ARGS=""
29611
29612  if test "x$VS_COMNTOOLS" != x; then
29613
29614  if test "x$VS_ENV_CMD" = x; then
29615    VS_VERSION="${VS_VERSION}"
29616    VS_BASE="$VS_COMNTOOLS/../.."
29617    METHOD="$VS_COMNTOOLS_VAR variable"
29618
29619    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29620      VCVARSFILE="vc/bin/vcvars32.bat"
29621    else
29622      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29623    fi
29624
29625
29626  windows_path="$VS_BASE"
29627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29628    unix_path=`$CYGPATH -u "$windows_path"`
29629    VS_BASE="$unix_path"
29630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29632    VS_BASE="$unix_path"
29633  fi
29634
29635    if test -d "$VS_BASE"; then
29636      if test -f "$VS_BASE/$VCVARSFILE"; then
29637        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29638$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29639        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29640        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29641        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29642        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29643      else
29644        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29645$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29646        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29647$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29648      fi
29649    fi
29650  fi
29651
29652  fi
29653  if test "x$PROGRAMFILES" != x; then
29654
29655  if test "x$VS_ENV_CMD" = x; then
29656    VS_VERSION="${VS_VERSION}"
29657    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29658    METHOD="well-known name"
29659
29660    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29661      VCVARSFILE="vc/bin/vcvars32.bat"
29662    else
29663      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29664    fi
29665
29666
29667  windows_path="$VS_BASE"
29668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29669    unix_path=`$CYGPATH -u "$windows_path"`
29670    VS_BASE="$unix_path"
29671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29673    VS_BASE="$unix_path"
29674  fi
29675
29676    if test -d "$VS_BASE"; then
29677      if test -f "$VS_BASE/$VCVARSFILE"; then
29678        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29679$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29680        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29681        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29682        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29683        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29684      else
29685        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29686$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29687        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29688$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29689      fi
29690    fi
29691  fi
29692
29693  fi
29694  # Work around the insanely named ProgramFiles(x86) env variable
29695  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29696  if test "x$PROGRAMFILES_X86" != x; then
29697
29698  if test "x$VS_ENV_CMD" = x; then
29699    VS_VERSION="${VS_VERSION}"
29700    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29701    METHOD="well-known name"
29702
29703    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29704      VCVARSFILE="vc/bin/vcvars32.bat"
29705    else
29706      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29707    fi
29708
29709
29710  windows_path="$VS_BASE"
29711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29712    unix_path=`$CYGPATH -u "$windows_path"`
29713    VS_BASE="$unix_path"
29714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29716    VS_BASE="$unix_path"
29717  fi
29718
29719    if test -d "$VS_BASE"; then
29720      if test -f "$VS_BASE/$VCVARSFILE"; then
29721        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29722$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29723        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29724        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29725        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29726        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29727      else
29728        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29729$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29730        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29731$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29732      fi
29733    fi
29734  fi
29735
29736  fi
29737
29738  if test "x$VS_ENV_CMD" = x; then
29739    VS_VERSION="${VS_VERSION}"
29740    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29741    METHOD="well-known name"
29742
29743    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29744      VCVARSFILE="vc/bin/vcvars32.bat"
29745    else
29746      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29747    fi
29748
29749
29750  windows_path="$VS_BASE"
29751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29752    unix_path=`$CYGPATH -u "$windows_path"`
29753    VS_BASE="$unix_path"
29754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29756    VS_BASE="$unix_path"
29757  fi
29758
29759    if test -d "$VS_BASE"; then
29760      if test -f "$VS_BASE/$VCVARSFILE"; then
29761        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29762$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29763        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29764        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29765        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29766        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29767      else
29768        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29769$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29770        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29771$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29772      fi
29773    fi
29774  fi
29775
29776
29777  if test "x$VS_ENV_CMD" = x; then
29778    VS_VERSION="${VS_VERSION}"
29779    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29780    METHOD="well-known name"
29781
29782    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29783      VCVARSFILE="vc/bin/vcvars32.bat"
29784    else
29785      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29786    fi
29787
29788
29789  windows_path="$VS_BASE"
29790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29791    unix_path=`$CYGPATH -u "$windows_path"`
29792    VS_BASE="$unix_path"
29793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29795    VS_BASE="$unix_path"
29796  fi
29797
29798    if test -d "$VS_BASE"; then
29799      if test -f "$VS_BASE/$VCVARSFILE"; then
29800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29801$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29802        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29803        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29804        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29805        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29806      else
29807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29808$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29811      fi
29812    fi
29813  fi
29814
29815
29816  if test "x$SDK_INSTALL_DIR" != x; then
29817    if test "x$ProgramW6432" != x; then
29818
29819  if test "x$VS_ENV_CMD" = x; then
29820    VS_VERSION="${VS_VERSION}"
29821    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29822    METHOD="well-known name"
29823
29824  windows_path="$WIN_SDK_BASE"
29825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29826    unix_path=`$CYGPATH -u "$windows_path"`
29827    WIN_SDK_BASE="$unix_path"
29828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29830    WIN_SDK_BASE="$unix_path"
29831  fi
29832
29833    if test -d "$WIN_SDK_BASE"; then
29834      # There have been cases of partial or broken SDK installations. A missing
29835      # lib dir is not going to work.
29836      if test ! -d "$WIN_SDK_BASE/lib"; then
29837        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29838$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29839        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29840$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29841      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29843$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29844        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29845        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29846          VS_ENV_ARGS="/x86"
29847        else
29848          VS_ENV_ARGS="/x64"
29849        fi
29850        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29851        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29852        # TODO: improve detection for other versions of SDK
29853        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29854      else
29855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29856$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29857        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29858$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29859      fi
29860    fi
29861  fi
29862
29863    fi
29864    if test "x$PROGRAMW6432" != x; then
29865
29866  if test "x$VS_ENV_CMD" = x; then
29867    VS_VERSION="${VS_VERSION}"
29868    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29869    METHOD="well-known name"
29870
29871  windows_path="$WIN_SDK_BASE"
29872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29873    unix_path=`$CYGPATH -u "$windows_path"`
29874    WIN_SDK_BASE="$unix_path"
29875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29877    WIN_SDK_BASE="$unix_path"
29878  fi
29879
29880    if test -d "$WIN_SDK_BASE"; then
29881      # There have been cases of partial or broken SDK installations. A missing
29882      # lib dir is not going to work.
29883      if test ! -d "$WIN_SDK_BASE/lib"; then
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29885$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29886        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29887$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29888      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29891        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29892        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29893          VS_ENV_ARGS="/x86"
29894        else
29895          VS_ENV_ARGS="/x64"
29896        fi
29897        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29898        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29899        # TODO: improve detection for other versions of SDK
29900        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29901      else
29902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29903$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29905$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29906      fi
29907    fi
29908  fi
29909
29910    fi
29911    if test "x$PROGRAMFILES" != x; then
29912
29913  if test "x$VS_ENV_CMD" = x; then
29914    VS_VERSION="${VS_VERSION}"
29915    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29916    METHOD="well-known name"
29917
29918  windows_path="$WIN_SDK_BASE"
29919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29920    unix_path=`$CYGPATH -u "$windows_path"`
29921    WIN_SDK_BASE="$unix_path"
29922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29924    WIN_SDK_BASE="$unix_path"
29925  fi
29926
29927    if test -d "$WIN_SDK_BASE"; then
29928      # There have been cases of partial or broken SDK installations. A missing
29929      # lib dir is not going to work.
29930      if test ! -d "$WIN_SDK_BASE/lib"; then
29931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29932$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29933        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29934$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29935      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29937$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29938        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29939        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29940          VS_ENV_ARGS="/x86"
29941        else
29942          VS_ENV_ARGS="/x64"
29943        fi
29944        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29945        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29946        # TODO: improve detection for other versions of SDK
29947        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29948      else
29949        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29950$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29951        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29952$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29953      fi
29954    fi
29955  fi
29956
29957    fi
29958
29959  if test "x$VS_ENV_CMD" = x; then
29960    VS_VERSION="${VS_VERSION}"
29961    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29962    METHOD="well-known name"
29963
29964  windows_path="$WIN_SDK_BASE"
29965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29966    unix_path=`$CYGPATH -u "$windows_path"`
29967    WIN_SDK_BASE="$unix_path"
29968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29970    WIN_SDK_BASE="$unix_path"
29971  fi
29972
29973    if test -d "$WIN_SDK_BASE"; then
29974      # There have been cases of partial or broken SDK installations. A missing
29975      # lib dir is not going to work.
29976      if test ! -d "$WIN_SDK_BASE/lib"; then
29977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29978$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29979        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29980$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29981      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29982        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29983$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29984        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29985        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29986          VS_ENV_ARGS="/x86"
29987        else
29988          VS_ENV_ARGS="/x64"
29989        fi
29990        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29991        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29992        # TODO: improve detection for other versions of SDK
29993        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29994      else
29995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29996$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29997        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29998$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29999      fi
30000    fi
30001  fi
30002
30003
30004  if test "x$VS_ENV_CMD" = x; then
30005    VS_VERSION="${VS_VERSION}"
30006    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30007    METHOD="well-known name"
30008
30009  windows_path="$WIN_SDK_BASE"
30010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30011    unix_path=`$CYGPATH -u "$windows_path"`
30012    WIN_SDK_BASE="$unix_path"
30013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30015    WIN_SDK_BASE="$unix_path"
30016  fi
30017
30018    if test -d "$WIN_SDK_BASE"; then
30019      # There have been cases of partial or broken SDK installations. A missing
30020      # lib dir is not going to work.
30021      if test ! -d "$WIN_SDK_BASE/lib"; then
30022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30025$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30026      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30029        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30030        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30031          VS_ENV_ARGS="/x86"
30032        else
30033          VS_ENV_ARGS="/x64"
30034        fi
30035        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30036        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30037        # TODO: improve detection for other versions of SDK
30038        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30039      else
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30041$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30042        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30043$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30044      fi
30045    fi
30046  fi
30047
30048  fi
30049
30050    if test "x$VS_ENV_CMD" != x; then
30051      TOOLCHAIN_VERSION=$VS_VERSION
30052      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30053      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30054      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30055      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30056      # The rest of the variables are already evaled while probing
30057      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30058$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30059      break
30060    fi
30061  done
30062
30063
30064  # If we have a devkit, skip all of the below.
30065  if test "x$DEVKIT_VS_VERSION" = x; then
30066    if test "x$VS_ENV_CMD" != x; then
30067      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30068
30069  # Only process if variable expands to non-empty
30070
30071  if test "x$VS_ENV_CMD" != x; then
30072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30073
30074  # First separate the path from the arguments. This will split at the first
30075  # space.
30076  complete="$VS_ENV_CMD"
30077  path="${complete%% *}"
30078  tmp="$complete EOL"
30079  arguments="${tmp#* }"
30080
30081  # Input might be given as Windows format, start by converting to
30082  # unix format.
30083  new_path=`$CYGPATH -u "$path"`
30084
30085  # Now try to locate executable using which
30086  new_path=`$WHICH "$new_path" 2> /dev/null`
30087  # bat and cmd files are not always considered executable in cygwin causing which
30088  # to not find them
30089  if test "x$new_path" = x \
30090      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30091      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30092    new_path=`$CYGPATH -u "$path"`
30093  fi
30094  if test "x$new_path" = x; then
30095    # Oops. Which didn't find the executable.
30096    # The splitting of arguments from the executable at a space might have been incorrect,
30097    # since paths with space are more likely in Windows. Give it another try with the whole
30098    # argument.
30099    path="$complete"
30100    arguments="EOL"
30101    new_path=`$CYGPATH -u "$path"`
30102    new_path=`$WHICH "$new_path" 2> /dev/null`
30103    # bat and cmd files are not always considered executable in cygwin causing which
30104    # to not find them
30105    if test "x$new_path" = x \
30106        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30107        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30108      new_path=`$CYGPATH -u "$path"`
30109    fi
30110    if test "x$new_path" = x; then
30111      # It's still not found. Now this is an unrecoverable error.
30112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30113$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30114      has_space=`$ECHO "$complete" | $GREP " "`
30115      if test "x$has_space" != x; then
30116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30118      fi
30119      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30120    fi
30121  fi
30122
30123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30126  # "foo.exe" is OK but "foo" is an error.
30127  #
30128  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30129  # It is also a way to make sure we got the proper file name for the real test later on.
30130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30131  if test "x$test_shortpath" = x; then
30132    # Short path failed, file does not exist as specified.
30133    # Try adding .exe or .cmd
30134    if test -f "${new_path}.exe"; then
30135      input_to_shortpath="${new_path}.exe"
30136    elif test -f "${new_path}.cmd"; then
30137      input_to_shortpath="${new_path}.cmd"
30138    else
30139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30140$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30141      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30142$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30143      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30144    fi
30145  else
30146    input_to_shortpath="$new_path"
30147  fi
30148
30149  # Call helper function which possibly converts this using DOS-style short mode.
30150  # If so, the updated path is stored in $new_path.
30151  new_path="$input_to_shortpath"
30152
30153  input_path="$input_to_shortpath"
30154  # Check if we need to convert this using DOS-style short mode. If the path
30155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30156  # take no chances and rewrite it.
30157  # Note: m4 eats our [], so we need to use [ and ] instead.
30158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30159  if test "x$has_forbidden_chars" != x; then
30160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30164      # Going to short mode and back again did indeed matter. Since short mode is
30165      # case insensitive, let's make it lowercase to improve readability.
30166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30167      # Now convert it back to Unix-style (cygpath)
30168      input_path=`$CYGPATH -u "$shortmode_path"`
30169      new_path="$input_path"
30170    fi
30171  fi
30172
30173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30174  if test "x$test_cygdrive_prefix" = x; then
30175    # As a simple fix, exclude /usr/bin since it's not a real path.
30176    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30178      # a path prefixed by /cygdrive for fixpath to work.
30179      new_path="$CYGWIN_ROOT_PATH$input_path"
30180    fi
30181  fi
30182
30183  # remove trailing .exe if any
30184  new_path="${new_path/%.exe/}"
30185
30186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30187
30188  # First separate the path from the arguments. This will split at the first
30189  # space.
30190  complete="$VS_ENV_CMD"
30191  path="${complete%% *}"
30192  tmp="$complete EOL"
30193  arguments="${tmp#* }"
30194
30195  # Input might be given as Windows format, start by converting to
30196  # unix format.
30197  new_path="$path"
30198
30199  windows_path="$new_path"
30200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30201    unix_path=`$CYGPATH -u "$windows_path"`
30202    new_path="$unix_path"
30203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30205    new_path="$unix_path"
30206  fi
30207
30208
30209  # Now try to locate executable using which
30210  new_path=`$WHICH "$new_path" 2> /dev/null`
30211
30212  if test "x$new_path" = x; then
30213    # Oops. Which didn't find the executable.
30214    # The splitting of arguments from the executable at a space might have been incorrect,
30215    # since paths with space are more likely in Windows. Give it another try with the whole
30216    # argument.
30217    path="$complete"
30218    arguments="EOL"
30219    new_path="$path"
30220
30221  windows_path="$new_path"
30222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30223    unix_path=`$CYGPATH -u "$windows_path"`
30224    new_path="$unix_path"
30225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30227    new_path="$unix_path"
30228  fi
30229
30230
30231    new_path=`$WHICH "$new_path" 2> /dev/null`
30232    # bat and cmd files are not always considered executable in MSYS causing which
30233    # to not find them
30234    if test "x$new_path" = x \
30235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30237      new_path="$path"
30238
30239  windows_path="$new_path"
30240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30241    unix_path=`$CYGPATH -u "$windows_path"`
30242    new_path="$unix_path"
30243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30245    new_path="$unix_path"
30246  fi
30247
30248    fi
30249
30250    if test "x$new_path" = x; then
30251      # It's still not found. Now this is an unrecoverable error.
30252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30253$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30254      has_space=`$ECHO "$complete" | $GREP " "`
30255      if test "x$has_space" != x; then
30256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30258      fi
30259      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30260    fi
30261  fi
30262
30263  # Now new_path has a complete unix path to the binary
30264  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30265    # Keep paths in /bin as-is, but remove trailing .exe if any
30266    new_path="${new_path/%.exe/}"
30267    # Do not save /bin paths to all_fixpath_prefixes!
30268  else
30269    # Not in mixed or Windows style, start by that.
30270    new_path=`cmd //c echo $new_path`
30271
30272  input_path="$new_path"
30273  # Check if we need to convert this using DOS-style short mode. If the path
30274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30275  # take no chances and rewrite it.
30276  # Note: m4 eats our [], so we need to use [ and ] instead.
30277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30278  if test "x$has_forbidden_chars" != x; then
30279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30281  fi
30282
30283    # Output is in $new_path
30284
30285  windows_path="$new_path"
30286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30287    unix_path=`$CYGPATH -u "$windows_path"`
30288    new_path="$unix_path"
30289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30291    new_path="$unix_path"
30292  fi
30293
30294    # remove trailing .exe if any
30295    new_path="${new_path/%.exe/}"
30296
30297    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30298    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30299  fi
30300
30301    else
30302      # We're on a unix platform. Hooray! :)
30303      # First separate the path from the arguments. This will split at the first
30304      # space.
30305      complete="$VS_ENV_CMD"
30306      path="${complete%% *}"
30307      tmp="$complete EOL"
30308      arguments="${tmp#* }"
30309
30310      # Cannot rely on the command "which" here since it doesn't always work.
30311      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30312      if test -z "$is_absolute_path"; then
30313        # Path to executable is not absolute. Find it.
30314        IFS_save="$IFS"
30315        IFS=:
30316        for p in $PATH; do
30317          if test -f "$p/$path" && test -x "$p/$path"; then
30318            new_path="$p/$path"
30319            break
30320          fi
30321        done
30322        IFS="$IFS_save"
30323      else
30324        # This is an absolute path, we can use it without further modifications.
30325        new_path="$path"
30326      fi
30327
30328      if test "x$new_path" = x; then
30329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30330$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30331        has_space=`$ECHO "$complete" | $GREP " "`
30332        if test "x$has_space" != x; then
30333          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30334$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30335        fi
30336        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30337      fi
30338    fi
30339
30340    # Now join together the path and the arguments once again
30341    if test "x$arguments" != xEOL; then
30342      new_complete="$new_path ${arguments% *}"
30343    else
30344      new_complete="$new_path"
30345    fi
30346
30347    if test "x$complete" != "x$new_complete"; then
30348      VS_ENV_CMD="$new_complete"
30349      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30350$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30351    fi
30352  fi
30353
30354
30355      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30356      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30357$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30358
30359      # We need to create a couple of temporary files.
30360      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30361      $MKDIR -p $VS_ENV_TMP_DIR
30362
30363      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30364      # Instead create a shell script which will set the relevant variables when run.
30365      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30366
30367  unix_path="$WINPATH_VS_ENV_CMD"
30368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30369    windows_path=`$CYGPATH -m "$unix_path"`
30370    WINPATH_VS_ENV_CMD="$windows_path"
30371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30372    windows_path=`cmd //c echo $unix_path`
30373    WINPATH_VS_ENV_CMD="$windows_path"
30374  fi
30375
30376      WINPATH_BASH="$BASH"
30377
30378  unix_path="$WINPATH_BASH"
30379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30380    windows_path=`$CYGPATH -m "$unix_path"`
30381    WINPATH_BASH="$windows_path"
30382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30383    windows_path=`cmd //c echo $unix_path`
30384    WINPATH_BASH="$windows_path"
30385  fi
30386
30387
30388      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30389      # script (executable by bash) that will setup the important variables.
30390      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30391      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30392      # This will end up something like:
30393      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30394      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30395      # These will end up something like:
30396      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30397      # The trailing space for everyone except PATH is no typo, but is needed due
30398      # to trailing \ in the Windows paths. These will be stripped later.
30399      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30400          >> $EXTRACT_VC_ENV_BAT_FILE
30401      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30402          >> $EXTRACT_VC_ENV_BAT_FILE
30403      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30404          >> $EXTRACT_VC_ENV_BAT_FILE
30405      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30406          >> $EXTRACT_VC_ENV_BAT_FILE
30407      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30408          >> $EXTRACT_VC_ENV_BAT_FILE
30409      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30410          >> $EXTRACT_VC_ENV_BAT_FILE
30411
30412      # Now execute the newly created bat file.
30413      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30414      # Change directory so we don't need to mess with Windows paths in redirects.
30415      cd $VS_ENV_TMP_DIR
30416      cmd /c extract-vs-env.bat | $CAT
30417      cd $CURDIR
30418
30419      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30420        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30421$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30422        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30423$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30424        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30425$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30426        as_fn_error $? "Cannot continue" "$LINENO" 5
30427      fi
30428
30429      # Now set all paths and other env variables. This will allow the rest of
30430      # the configure script to find and run the compiler in the proper way.
30431      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30432$as_echo "$as_me: Setting extracted environment variables" >&6;}
30433      . $VS_ENV_TMP_DIR/set-vs-env.sh
30434      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30435      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30436    else
30437      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30438      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30439$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30440    fi
30441  fi
30442
30443  # At this point, we should have correct variables in the environment, or we can't continue.
30444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30445$as_echo_n "checking for Visual Studio variables... " >&6; }
30446
30447  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30448      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30449    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30451$as_echo "present but broken" >&6; }
30452      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30453    else
30454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30455$as_echo "ok" >&6; }
30456      # Remove any trailing "\" ";" and " " from the variables.
30457      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30458      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30459      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30460      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30461      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30462      # Remove any paths containing # (typically F#) as that messes up make. This
30463      # is needed if visual studio was installed with F# support.
30464      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30465
30466
30467
30468
30469
30470      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30471      OLDIFS="$IFS"
30472      IFS=";"
30473      for i in $VS_INCLUDE; do
30474        ipath=$i
30475        # Only process non-empty elements
30476        if test "x$ipath" != x; then
30477          IFS="$OLDIFS"
30478          # Check that directory exists before calling fixup_path
30479          testpath=$ipath
30480
30481  windows_path="$testpath"
30482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30483    unix_path=`$CYGPATH -u "$windows_path"`
30484    testpath="$unix_path"
30485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30487    testpath="$unix_path"
30488  fi
30489
30490          if test -d "$testpath"; then
30491
30492  # Only process if variable expands to non-empty
30493
30494  if test "x$ipath" != x; then
30495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30496
30497  # Input might be given as Windows format, start by converting to
30498  # unix format.
30499  path="$ipath"
30500  new_path=`$CYGPATH -u "$path"`
30501
30502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30505  # "foo.exe" is OK but "foo" is an error.
30506  #
30507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30508  # It is also a way to make sure we got the proper file name for the real test later on.
30509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30510  if test "x$test_shortpath" = x; then
30511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30512$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30513    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30514  fi
30515
30516  # Call helper function which possibly converts this using DOS-style short mode.
30517  # If so, the updated path is stored in $new_path.
30518
30519  input_path="$new_path"
30520  # Check if we need to convert this using DOS-style short mode. If the path
30521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30522  # take no chances and rewrite it.
30523  # Note: m4 eats our [], so we need to use [ and ] instead.
30524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30525  if test "x$has_forbidden_chars" != x; then
30526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30530      # Going to short mode and back again did indeed matter. Since short mode is
30531      # case insensitive, let's make it lowercase to improve readability.
30532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30533      # Now convert it back to Unix-style (cygpath)
30534      input_path=`$CYGPATH -u "$shortmode_path"`
30535      new_path="$input_path"
30536    fi
30537  fi
30538
30539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30540  if test "x$test_cygdrive_prefix" = x; then
30541    # As a simple fix, exclude /usr/bin since it's not a real path.
30542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30544      # a path prefixed by /cygdrive for fixpath to work.
30545      new_path="$CYGWIN_ROOT_PATH$input_path"
30546    fi
30547  fi
30548
30549
30550  if test "x$path" != "x$new_path"; then
30551    ipath="$new_path"
30552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30553$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30554  fi
30555
30556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30557
30558  path="$ipath"
30559  has_colon=`$ECHO $path | $GREP ^.:`
30560  new_path="$path"
30561  if test "x$has_colon" = x; then
30562    # Not in mixed or Windows style, start by that.
30563    new_path=`cmd //c echo $path`
30564  fi
30565
30566
30567  input_path="$new_path"
30568  # Check if we need to convert this using DOS-style short mode. If the path
30569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30570  # take no chances and rewrite it.
30571  # Note: m4 eats our [], so we need to use [ and ] instead.
30572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30573  if test "x$has_forbidden_chars" != x; then
30574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30576  fi
30577
30578
30579  windows_path="$new_path"
30580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30581    unix_path=`$CYGPATH -u "$windows_path"`
30582    new_path="$unix_path"
30583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30585    new_path="$unix_path"
30586  fi
30587
30588  if test "x$path" != "x$new_path"; then
30589    ipath="$new_path"
30590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30591$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30592  fi
30593
30594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30596
30597    else
30598      # We're on a unix platform. Hooray! :)
30599      path="$ipath"
30600      has_space=`$ECHO "$path" | $GREP " "`
30601      if test "x$has_space" != x; then
30602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30603$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30605      fi
30606
30607      # Use eval to expand a potential ~
30608      eval path="$path"
30609      if test ! -f "$path" && test ! -d "$path"; then
30610        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30611      fi
30612
30613      ipath="`cd "$path"; $THEPWDCMD -L`"
30614    fi
30615  fi
30616
30617            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30618          fi
30619          IFS=";"
30620        fi
30621      done
30622      # Convert VS_LIB into SYSROOT_LDFLAGS
30623      for i in $VS_LIB; do
30624        libpath=$i
30625        # Only process non-empty elements
30626        if test "x$libpath" != x; then
30627          IFS="$OLDIFS"
30628          # Check that directory exists before calling fixup_path
30629          testpath=$libpath
30630
30631  windows_path="$testpath"
30632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30633    unix_path=`$CYGPATH -u "$windows_path"`
30634    testpath="$unix_path"
30635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30637    testpath="$unix_path"
30638  fi
30639
30640          if test -d "$testpath"; then
30641
30642  # Only process if variable expands to non-empty
30643
30644  if test "x$libpath" != x; then
30645    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30646
30647  # Input might be given as Windows format, start by converting to
30648  # unix format.
30649  path="$libpath"
30650  new_path=`$CYGPATH -u "$path"`
30651
30652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30655  # "foo.exe" is OK but "foo" is an error.
30656  #
30657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30658  # It is also a way to make sure we got the proper file name for the real test later on.
30659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30660  if test "x$test_shortpath" = x; then
30661    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30662$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30663    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30664  fi
30665
30666  # Call helper function which possibly converts this using DOS-style short mode.
30667  # If so, the updated path is stored in $new_path.
30668
30669  input_path="$new_path"
30670  # Check if we need to convert this using DOS-style short mode. If the path
30671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30672  # take no chances and rewrite it.
30673  # Note: m4 eats our [], so we need to use [ and ] instead.
30674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30675  if test "x$has_forbidden_chars" != x; then
30676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30680      # Going to short mode and back again did indeed matter. Since short mode is
30681      # case insensitive, let's make it lowercase to improve readability.
30682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30683      # Now convert it back to Unix-style (cygpath)
30684      input_path=`$CYGPATH -u "$shortmode_path"`
30685      new_path="$input_path"
30686    fi
30687  fi
30688
30689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30690  if test "x$test_cygdrive_prefix" = x; then
30691    # As a simple fix, exclude /usr/bin since it's not a real path.
30692    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30694      # a path prefixed by /cygdrive for fixpath to work.
30695      new_path="$CYGWIN_ROOT_PATH$input_path"
30696    fi
30697  fi
30698
30699
30700  if test "x$path" != "x$new_path"; then
30701    libpath="$new_path"
30702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30703$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30704  fi
30705
30706    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30707
30708  path="$libpath"
30709  has_colon=`$ECHO $path | $GREP ^.:`
30710  new_path="$path"
30711  if test "x$has_colon" = x; then
30712    # Not in mixed or Windows style, start by that.
30713    new_path=`cmd //c echo $path`
30714  fi
30715
30716
30717  input_path="$new_path"
30718  # Check if we need to convert this using DOS-style short mode. If the path
30719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30720  # take no chances and rewrite it.
30721  # Note: m4 eats our [], so we need to use [ and ] instead.
30722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30723  if test "x$has_forbidden_chars" != x; then
30724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30726  fi
30727
30728
30729  windows_path="$new_path"
30730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30731    unix_path=`$CYGPATH -u "$windows_path"`
30732    new_path="$unix_path"
30733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30735    new_path="$unix_path"
30736  fi
30737
30738  if test "x$path" != "x$new_path"; then
30739    libpath="$new_path"
30740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30741$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30742  fi
30743
30744  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30745  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30746
30747    else
30748      # We're on a unix platform. Hooray! :)
30749      path="$libpath"
30750      has_space=`$ECHO "$path" | $GREP " "`
30751      if test "x$has_space" != x; then
30752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30753$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30754        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30755      fi
30756
30757      # Use eval to expand a potential ~
30758      eval path="$path"
30759      if test ! -f "$path" && test ! -d "$path"; then
30760        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30761      fi
30762
30763      libpath="`cd "$path"; $THEPWDCMD -L`"
30764    fi
30765  fi
30766
30767            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30768          fi
30769          IFS=";"
30770        fi
30771      done
30772      IFS="$OLDIFS"
30773    fi
30774  else
30775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30776$as_echo "not found" >&6; }
30777
30778    if test "x$VS_ENV_CMD" = x; then
30779      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30780$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30781      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30782$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30783    else
30784      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30785$as_echo "$as_me: Running the extraction script failed." >&6;}
30786    fi
30787    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30788$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30789    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30790$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30791    as_fn_error $? "Cannot continue" "$LINENO" 5
30792  fi
30793
30794    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30795    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30796    PATH="$VS_PATH"
30797    # The microsoft toolchain also requires INCLUDE and LIB to be set.
30798    export INCLUDE="$VS_INCLUDE"
30799    export LIB="$VS_LIB"
30800  fi
30801
30802  # For solaris we really need solaris tools, and not the GNU equivalent.
30803  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30804  # so add that to path before starting to probe.
30805  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30806  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30807    PATH="/usr/ccs/bin:$PATH"
30808  fi
30809
30810  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30811  # override all other locations.
30812  if test "x$TOOLCHAIN_PATH" != x; then
30813    PATH=$TOOLCHAIN_PATH:$PATH
30814  fi
30815
30816
30817  #
30818  # Setup the compilers (CC and CXX)
30819  #
30820
30821  COMPILER_NAME=C
30822  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30823
30824  if test "x$CC" != x; then
30825    # User has supplied compiler name already, always let that override.
30826    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30827$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30828    if test "x`basename $CC`" = "x$CC"; then
30829      # A command without a complete path is provided, search $PATH.
30830
30831      for ac_prog in $CC
30832do
30833  # Extract the first word of "$ac_prog", so it can be a program name with args.
30834set dummy $ac_prog; ac_word=$2
30835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30836$as_echo_n "checking for $ac_word... " >&6; }
30837if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30838  $as_echo_n "(cached) " >&6
30839else
30840  case $POTENTIAL_CC in
30841  [\\/]* | ?:[\\/]*)
30842  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30843  ;;
30844  *)
30845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30846for as_dir in $PATH
30847do
30848  IFS=$as_save_IFS
30849  test -z "$as_dir" && as_dir=.
30850    for ac_exec_ext in '' $ac_executable_extensions; do
30851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30852    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30854    break 2
30855  fi
30856done
30857  done
30858IFS=$as_save_IFS
30859
30860  ;;
30861esac
30862fi
30863POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30864if test -n "$POTENTIAL_CC"; then
30865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30866$as_echo "$POTENTIAL_CC" >&6; }
30867else
30868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30869$as_echo "no" >&6; }
30870fi
30871
30872
30873  test -n "$POTENTIAL_CC" && break
30874done
30875
30876      if test "x$POTENTIAL_CC" != x; then
30877        CC=$POTENTIAL_CC
30878      else
30879        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30880      fi
30881    else
30882      # Otherwise it might already be a complete path
30883      if test ! -x "$CC"; then
30884        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30885      fi
30886    fi
30887  else
30888    # No user supplied value. Locate compiler ourselves.
30889
30890    # If we are cross compiling, assume cross compilation tools follows the
30891    # cross compilation standard where they are prefixed with the autoconf
30892    # standard name for the target. For example the binary
30893    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30894    # If we are not cross compiling, then the default compiler name will be
30895    # used.
30896
30897    CC=
30898    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30899    # before checking the rest of the PATH.
30900    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30901    # step, this should not be necessary.
30902    if test -n "$TOOLCHAIN_PATH"; then
30903      PATH_save="$PATH"
30904      PATH="$TOOLCHAIN_PATH"
30905      for ac_prog in $SEARCH_LIST
30906do
30907  # Extract the first word of "$ac_prog", so it can be a program name with args.
30908set dummy $ac_prog; ac_word=$2
30909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30910$as_echo_n "checking for $ac_word... " >&6; }
30911if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30912  $as_echo_n "(cached) " >&6
30913else
30914  case $TOOLCHAIN_PATH_CC in
30915  [\\/]* | ?:[\\/]*)
30916  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30917  ;;
30918  *)
30919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30920for as_dir in $PATH
30921do
30922  IFS=$as_save_IFS
30923  test -z "$as_dir" && as_dir=.
30924    for ac_exec_ext in '' $ac_executable_extensions; do
30925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30926    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30928    break 2
30929  fi
30930done
30931  done
30932IFS=$as_save_IFS
30933
30934  ;;
30935esac
30936fi
30937TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30938if test -n "$TOOLCHAIN_PATH_CC"; then
30939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30940$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30941else
30942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30943$as_echo "no" >&6; }
30944fi
30945
30946
30947  test -n "$TOOLCHAIN_PATH_CC" && break
30948done
30949
30950      CC=$TOOLCHAIN_PATH_CC
30951      PATH="$PATH_save"
30952    fi
30953
30954    # AC_PATH_PROGS can't be run multiple times with the same variable,
30955    # so create a new name for this run.
30956    if test "x$CC" = x; then
30957      for ac_prog in $SEARCH_LIST
30958do
30959  # Extract the first word of "$ac_prog", so it can be a program name with args.
30960set dummy $ac_prog; ac_word=$2
30961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30962$as_echo_n "checking for $ac_word... " >&6; }
30963if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30964  $as_echo_n "(cached) " >&6
30965else
30966  case $POTENTIAL_CC in
30967  [\\/]* | ?:[\\/]*)
30968  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30969  ;;
30970  *)
30971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30972for as_dir in $PATH
30973do
30974  IFS=$as_save_IFS
30975  test -z "$as_dir" && as_dir=.
30976    for ac_exec_ext in '' $ac_executable_extensions; do
30977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30978    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30980    break 2
30981  fi
30982done
30983  done
30984IFS=$as_save_IFS
30985
30986  ;;
30987esac
30988fi
30989POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30990if test -n "$POTENTIAL_CC"; then
30991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30992$as_echo "$POTENTIAL_CC" >&6; }
30993else
30994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30995$as_echo "no" >&6; }
30996fi
30997
30998
30999  test -n "$POTENTIAL_CC" && break
31000done
31001
31002      CC=$POTENTIAL_CC
31003    fi
31004
31005    if test "x$CC" = x; then
31006
31007  # Print a helpful message on how to acquire the necessary build dependency.
31008  # devkit is the help tag: freetype, cups, alsa etc
31009  MISSING_DEPENDENCY=devkit
31010
31011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31012    cygwin_help $MISSING_DEPENDENCY
31013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31014    msys_help $MISSING_DEPENDENCY
31015  else
31016    PKGHANDLER_COMMAND=
31017
31018    case $PKGHANDLER in
31019      apt-get)
31020        apt_help     $MISSING_DEPENDENCY ;;
31021      yum)
31022        yum_help     $MISSING_DEPENDENCY ;;
31023      port)
31024        port_help    $MISSING_DEPENDENCY ;;
31025      pkgutil)
31026        pkgutil_help $MISSING_DEPENDENCY ;;
31027      pkgadd)
31028        pkgadd_help  $MISSING_DEPENDENCY ;;
31029    esac
31030
31031    if test "x$PKGHANDLER_COMMAND" != x; then
31032      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31033    fi
31034  fi
31035
31036      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31037    fi
31038  fi
31039
31040  # Now we have a compiler binary in CC. Make sure it's okay.
31041
31042  # Only process if variable expands to non-empty
31043
31044  if test "x$CC" != x; then
31045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31046
31047  # First separate the path from the arguments. This will split at the first
31048  # space.
31049  complete="$CC"
31050  path="${complete%% *}"
31051  tmp="$complete EOL"
31052  arguments="${tmp#* }"
31053
31054  # Input might be given as Windows format, start by converting to
31055  # unix format.
31056  new_path=`$CYGPATH -u "$path"`
31057
31058  # Now try to locate executable using which
31059  new_path=`$WHICH "$new_path" 2> /dev/null`
31060  # bat and cmd files are not always considered executable in cygwin causing which
31061  # to not find them
31062  if test "x$new_path" = x \
31063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31065    new_path=`$CYGPATH -u "$path"`
31066  fi
31067  if test "x$new_path" = x; then
31068    # Oops. Which didn't find the executable.
31069    # The splitting of arguments from the executable at a space might have been incorrect,
31070    # since paths with space are more likely in Windows. Give it another try with the whole
31071    # argument.
31072    path="$complete"
31073    arguments="EOL"
31074    new_path=`$CYGPATH -u "$path"`
31075    new_path=`$WHICH "$new_path" 2> /dev/null`
31076    # bat and cmd files are not always considered executable in cygwin causing which
31077    # to not find them
31078    if test "x$new_path" = x \
31079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31081      new_path=`$CYGPATH -u "$path"`
31082    fi
31083    if test "x$new_path" = x; then
31084      # It's still not found. Now this is an unrecoverable error.
31085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31086$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31087      has_space=`$ECHO "$complete" | $GREP " "`
31088      if test "x$has_space" != x; then
31089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31091      fi
31092      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31093    fi
31094  fi
31095
31096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31099  # "foo.exe" is OK but "foo" is an error.
31100  #
31101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31102  # It is also a way to make sure we got the proper file name for the real test later on.
31103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31104  if test "x$test_shortpath" = x; then
31105    # Short path failed, file does not exist as specified.
31106    # Try adding .exe or .cmd
31107    if test -f "${new_path}.exe"; then
31108      input_to_shortpath="${new_path}.exe"
31109    elif test -f "${new_path}.cmd"; then
31110      input_to_shortpath="${new_path}.cmd"
31111    else
31112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31113$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31116      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31117    fi
31118  else
31119    input_to_shortpath="$new_path"
31120  fi
31121
31122  # Call helper function which possibly converts this using DOS-style short mode.
31123  # If so, the updated path is stored in $new_path.
31124  new_path="$input_to_shortpath"
31125
31126  input_path="$input_to_shortpath"
31127  # Check if we need to convert this using DOS-style short mode. If the path
31128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31129  # take no chances and rewrite it.
31130  # Note: m4 eats our [], so we need to use [ and ] instead.
31131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31132  if test "x$has_forbidden_chars" != x; then
31133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31137      # Going to short mode and back again did indeed matter. Since short mode is
31138      # case insensitive, let's make it lowercase to improve readability.
31139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31140      # Now convert it back to Unix-style (cygpath)
31141      input_path=`$CYGPATH -u "$shortmode_path"`
31142      new_path="$input_path"
31143    fi
31144  fi
31145
31146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31147  if test "x$test_cygdrive_prefix" = x; then
31148    # As a simple fix, exclude /usr/bin since it's not a real path.
31149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31151      # a path prefixed by /cygdrive for fixpath to work.
31152      new_path="$CYGWIN_ROOT_PATH$input_path"
31153    fi
31154  fi
31155
31156  # remove trailing .exe if any
31157  new_path="${new_path/%.exe/}"
31158
31159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31160
31161  # First separate the path from the arguments. This will split at the first
31162  # space.
31163  complete="$CC"
31164  path="${complete%% *}"
31165  tmp="$complete EOL"
31166  arguments="${tmp#* }"
31167
31168  # Input might be given as Windows format, start by converting to
31169  # unix format.
31170  new_path="$path"
31171
31172  windows_path="$new_path"
31173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31174    unix_path=`$CYGPATH -u "$windows_path"`
31175    new_path="$unix_path"
31176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31178    new_path="$unix_path"
31179  fi
31180
31181
31182  # Now try to locate executable using which
31183  new_path=`$WHICH "$new_path" 2> /dev/null`
31184
31185  if test "x$new_path" = x; then
31186    # Oops. Which didn't find the executable.
31187    # The splitting of arguments from the executable at a space might have been incorrect,
31188    # since paths with space are more likely in Windows. Give it another try with the whole
31189    # argument.
31190    path="$complete"
31191    arguments="EOL"
31192    new_path="$path"
31193
31194  windows_path="$new_path"
31195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31196    unix_path=`$CYGPATH -u "$windows_path"`
31197    new_path="$unix_path"
31198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31200    new_path="$unix_path"
31201  fi
31202
31203
31204    new_path=`$WHICH "$new_path" 2> /dev/null`
31205    # bat and cmd files are not always considered executable in MSYS causing which
31206    # to not find them
31207    if test "x$new_path" = x \
31208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31210      new_path="$path"
31211
31212  windows_path="$new_path"
31213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31214    unix_path=`$CYGPATH -u "$windows_path"`
31215    new_path="$unix_path"
31216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31218    new_path="$unix_path"
31219  fi
31220
31221    fi
31222
31223    if test "x$new_path" = x; then
31224      # It's still not found. Now this is an unrecoverable error.
31225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31226$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31227      has_space=`$ECHO "$complete" | $GREP " "`
31228      if test "x$has_space" != x; then
31229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31231      fi
31232      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31233    fi
31234  fi
31235
31236  # Now new_path has a complete unix path to the binary
31237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31238    # Keep paths in /bin as-is, but remove trailing .exe if any
31239    new_path="${new_path/%.exe/}"
31240    # Do not save /bin paths to all_fixpath_prefixes!
31241  else
31242    # Not in mixed or Windows style, start by that.
31243    new_path=`cmd //c echo $new_path`
31244
31245  input_path="$new_path"
31246  # Check if we need to convert this using DOS-style short mode. If the path
31247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31248  # take no chances and rewrite it.
31249  # Note: m4 eats our [], so we need to use [ and ] instead.
31250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31251  if test "x$has_forbidden_chars" != x; then
31252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31254  fi
31255
31256    # Output is in $new_path
31257
31258  windows_path="$new_path"
31259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31260    unix_path=`$CYGPATH -u "$windows_path"`
31261    new_path="$unix_path"
31262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31264    new_path="$unix_path"
31265  fi
31266
31267    # remove trailing .exe if any
31268    new_path="${new_path/%.exe/}"
31269
31270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31272  fi
31273
31274    else
31275      # We're on a unix platform. Hooray! :)
31276      # First separate the path from the arguments. This will split at the first
31277      # space.
31278      complete="$CC"
31279      path="${complete%% *}"
31280      tmp="$complete EOL"
31281      arguments="${tmp#* }"
31282
31283      # Cannot rely on the command "which" here since it doesn't always work.
31284      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31285      if test -z "$is_absolute_path"; then
31286        # Path to executable is not absolute. Find it.
31287        IFS_save="$IFS"
31288        IFS=:
31289        for p in $PATH; do
31290          if test -f "$p/$path" && test -x "$p/$path"; then
31291            new_path="$p/$path"
31292            break
31293          fi
31294        done
31295        IFS="$IFS_save"
31296      else
31297        # This is an absolute path, we can use it without further modifications.
31298        new_path="$path"
31299      fi
31300
31301      if test "x$new_path" = x; then
31302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31303$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31304        has_space=`$ECHO "$complete" | $GREP " "`
31305        if test "x$has_space" != x; then
31306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31308        fi
31309        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31310      fi
31311    fi
31312
31313    # Now join together the path and the arguments once again
31314    if test "x$arguments" != xEOL; then
31315      new_complete="$new_path ${arguments% *}"
31316    else
31317      new_complete="$new_path"
31318    fi
31319
31320    if test "x$complete" != "x$new_complete"; then
31321      CC="$new_complete"
31322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31323$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31324    fi
31325  fi
31326
31327  TEST_COMPILER="$CC"
31328  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31329  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31330  if test "x$OPENJDK_BUILD_OS" != xaix; then
31331    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31333$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31334
31335  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31336    # Follow a chain of symbolic links. Use readlink
31337    # where it exists, else fall back to horribly
31338    # complicated shell code.
31339    if test "x$READLINK_TESTED" != yes; then
31340      # On MacOSX there is a readlink tool with a different
31341      # purpose than the GNU readlink tool. Check the found readlink.
31342      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31343      if test "x$ISGNU" = x; then
31344        # A readlink that we do not know how to use.
31345        # Are there other non-GNU readlinks out there?
31346        READLINK_TESTED=yes
31347        READLINK=
31348      fi
31349    fi
31350
31351    if test "x$READLINK" != x; then
31352      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31353    else
31354      # Save the current directory for restoring afterwards
31355      STARTDIR=$PWD
31356      COUNTER=0
31357      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31358      sym_link_file=`$BASENAME $TEST_COMPILER`
31359      cd $sym_link_dir
31360      # Use -P flag to resolve symlinks in directories.
31361      cd `$THEPWDCMD -P`
31362      sym_link_dir=`$THEPWDCMD -P`
31363      # Resolve file symlinks
31364      while test $COUNTER -lt 20; do
31365        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31366        if test "x$ISLINK" == x; then
31367          # This is not a symbolic link! We are done!
31368          break
31369        fi
31370        # Again resolve directory symlinks since the target of the just found
31371        # link could be in a different directory
31372        cd `$DIRNAME $ISLINK`
31373        sym_link_dir=`$THEPWDCMD -P`
31374        sym_link_file=`$BASENAME $ISLINK`
31375        let COUNTER=COUNTER+1
31376      done
31377      cd $STARTDIR
31378      TEST_COMPILER=$sym_link_dir/$sym_link_file
31379    fi
31380  fi
31381
31382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31383$as_echo "$TEST_COMPILER" >&6; }
31384  fi
31385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31386$as_echo_n "checking if CC is disguised ccache... " >&6; }
31387
31388  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31389  if test "x$COMPILER_BASENAME" = "xccache"; then
31390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31391$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31392    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31393    # We want to control ccache invocation ourselves, so ignore this cc and try
31394    # searching again.
31395
31396    # Remove the path to the fake ccache cc from the PATH
31397    RETRY_COMPILER_SAVED_PATH="$PATH"
31398    COMPILER_DIRNAME=`$DIRNAME $CC`
31399    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31400
31401    # Try again looking for our compiler
31402    if test -n "$ac_tool_prefix"; then
31403  for ac_prog in $TOOLCHAIN_CC_BINARY
31404  do
31405    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31406set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31408$as_echo_n "checking for $ac_word... " >&6; }
31409if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31410  $as_echo_n "(cached) " >&6
31411else
31412  if test -n "$PROPER_COMPILER_CC"; then
31413  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31414else
31415as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31416for as_dir in $PATH
31417do
31418  IFS=$as_save_IFS
31419  test -z "$as_dir" && as_dir=.
31420    for ac_exec_ext in '' $ac_executable_extensions; do
31421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31422    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31424    break 2
31425  fi
31426done
31427  done
31428IFS=$as_save_IFS
31429
31430fi
31431fi
31432PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31433if test -n "$PROPER_COMPILER_CC"; then
31434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31435$as_echo "$PROPER_COMPILER_CC" >&6; }
31436else
31437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31438$as_echo "no" >&6; }
31439fi
31440
31441
31442    test -n "$PROPER_COMPILER_CC" && break
31443  done
31444fi
31445if test -z "$PROPER_COMPILER_CC"; then
31446  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31447  for ac_prog in $TOOLCHAIN_CC_BINARY
31448do
31449  # Extract the first word of "$ac_prog", so it can be a program name with args.
31450set dummy $ac_prog; ac_word=$2
31451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31452$as_echo_n "checking for $ac_word... " >&6; }
31453if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31454  $as_echo_n "(cached) " >&6
31455else
31456  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31457  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31458else
31459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31460for as_dir in $PATH
31461do
31462  IFS=$as_save_IFS
31463  test -z "$as_dir" && as_dir=.
31464    for ac_exec_ext in '' $ac_executable_extensions; do
31465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31466    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31468    break 2
31469  fi
31470done
31471  done
31472IFS=$as_save_IFS
31473
31474fi
31475fi
31476ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31477if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31479$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31480else
31481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31482$as_echo "no" >&6; }
31483fi
31484
31485
31486  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31487done
31488
31489  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31490    PROPER_COMPILER_CC=""
31491  else
31492    case $cross_compiling:$ac_tool_warned in
31493yes:)
31494{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31495$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31496ac_tool_warned=yes ;;
31497esac
31498    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31499  fi
31500fi
31501
31502
31503  # Only process if variable expands to non-empty
31504
31505  if test "x$PROPER_COMPILER_CC" != x; then
31506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31507
31508  # First separate the path from the arguments. This will split at the first
31509  # space.
31510  complete="$PROPER_COMPILER_CC"
31511  path="${complete%% *}"
31512  tmp="$complete EOL"
31513  arguments="${tmp#* }"
31514
31515  # Input might be given as Windows format, start by converting to
31516  # unix format.
31517  new_path=`$CYGPATH -u "$path"`
31518
31519  # Now try to locate executable using which
31520  new_path=`$WHICH "$new_path" 2> /dev/null`
31521  # bat and cmd files are not always considered executable in cygwin causing which
31522  # to not find them
31523  if test "x$new_path" = x \
31524      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31525      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31526    new_path=`$CYGPATH -u "$path"`
31527  fi
31528  if test "x$new_path" = x; then
31529    # Oops. Which didn't find the executable.
31530    # The splitting of arguments from the executable at a space might have been incorrect,
31531    # since paths with space are more likely in Windows. Give it another try with the whole
31532    # argument.
31533    path="$complete"
31534    arguments="EOL"
31535    new_path=`$CYGPATH -u "$path"`
31536    new_path=`$WHICH "$new_path" 2> /dev/null`
31537    # bat and cmd files are not always considered executable in cygwin causing which
31538    # to not find them
31539    if test "x$new_path" = x \
31540        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31541        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31542      new_path=`$CYGPATH -u "$path"`
31543    fi
31544    if test "x$new_path" = x; then
31545      # It's still not found. Now this is an unrecoverable error.
31546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31547$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31548      has_space=`$ECHO "$complete" | $GREP " "`
31549      if test "x$has_space" != x; then
31550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31552      fi
31553      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31554    fi
31555  fi
31556
31557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31560  # "foo.exe" is OK but "foo" is an error.
31561  #
31562  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31563  # It is also a way to make sure we got the proper file name for the real test later on.
31564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31565  if test "x$test_shortpath" = x; then
31566    # Short path failed, file does not exist as specified.
31567    # Try adding .exe or .cmd
31568    if test -f "${new_path}.exe"; then
31569      input_to_shortpath="${new_path}.exe"
31570    elif test -f "${new_path}.cmd"; then
31571      input_to_shortpath="${new_path}.cmd"
31572    else
31573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31574$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31577      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31578    fi
31579  else
31580    input_to_shortpath="$new_path"
31581  fi
31582
31583  # Call helper function which possibly converts this using DOS-style short mode.
31584  # If so, the updated path is stored in $new_path.
31585  new_path="$input_to_shortpath"
31586
31587  input_path="$input_to_shortpath"
31588  # Check if we need to convert this using DOS-style short mode. If the path
31589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31590  # take no chances and rewrite it.
31591  # Note: m4 eats our [], so we need to use [ and ] instead.
31592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31593  if test "x$has_forbidden_chars" != x; then
31594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31598      # Going to short mode and back again did indeed matter. Since short mode is
31599      # case insensitive, let's make it lowercase to improve readability.
31600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31601      # Now convert it back to Unix-style (cygpath)
31602      input_path=`$CYGPATH -u "$shortmode_path"`
31603      new_path="$input_path"
31604    fi
31605  fi
31606
31607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31608  if test "x$test_cygdrive_prefix" = x; then
31609    # As a simple fix, exclude /usr/bin since it's not a real path.
31610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31612      # a path prefixed by /cygdrive for fixpath to work.
31613      new_path="$CYGWIN_ROOT_PATH$input_path"
31614    fi
31615  fi
31616
31617  # remove trailing .exe if any
31618  new_path="${new_path/%.exe/}"
31619
31620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31621
31622  # First separate the path from the arguments. This will split at the first
31623  # space.
31624  complete="$PROPER_COMPILER_CC"
31625  path="${complete%% *}"
31626  tmp="$complete EOL"
31627  arguments="${tmp#* }"
31628
31629  # Input might be given as Windows format, start by converting to
31630  # unix format.
31631  new_path="$path"
31632
31633  windows_path="$new_path"
31634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31635    unix_path=`$CYGPATH -u "$windows_path"`
31636    new_path="$unix_path"
31637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31639    new_path="$unix_path"
31640  fi
31641
31642
31643  # Now try to locate executable using which
31644  new_path=`$WHICH "$new_path" 2> /dev/null`
31645
31646  if test "x$new_path" = x; then
31647    # Oops. Which didn't find the executable.
31648    # The splitting of arguments from the executable at a space might have been incorrect,
31649    # since paths with space are more likely in Windows. Give it another try with the whole
31650    # argument.
31651    path="$complete"
31652    arguments="EOL"
31653    new_path="$path"
31654
31655  windows_path="$new_path"
31656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31657    unix_path=`$CYGPATH -u "$windows_path"`
31658    new_path="$unix_path"
31659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31661    new_path="$unix_path"
31662  fi
31663
31664
31665    new_path=`$WHICH "$new_path" 2> /dev/null`
31666    # bat and cmd files are not always considered executable in MSYS causing which
31667    # to not find them
31668    if test "x$new_path" = x \
31669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31671      new_path="$path"
31672
31673  windows_path="$new_path"
31674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31675    unix_path=`$CYGPATH -u "$windows_path"`
31676    new_path="$unix_path"
31677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31679    new_path="$unix_path"
31680  fi
31681
31682    fi
31683
31684    if test "x$new_path" = x; then
31685      # It's still not found. Now this is an unrecoverable error.
31686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31687$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31688      has_space=`$ECHO "$complete" | $GREP " "`
31689      if test "x$has_space" != x; then
31690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31692      fi
31693      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31694    fi
31695  fi
31696
31697  # Now new_path has a complete unix path to the binary
31698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31699    # Keep paths in /bin as-is, but remove trailing .exe if any
31700    new_path="${new_path/%.exe/}"
31701    # Do not save /bin paths to all_fixpath_prefixes!
31702  else
31703    # Not in mixed or Windows style, start by that.
31704    new_path=`cmd //c echo $new_path`
31705
31706  input_path="$new_path"
31707  # Check if we need to convert this using DOS-style short mode. If the path
31708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31709  # take no chances and rewrite it.
31710  # Note: m4 eats our [], so we need to use [ and ] instead.
31711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31712  if test "x$has_forbidden_chars" != x; then
31713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31715  fi
31716
31717    # Output is in $new_path
31718
31719  windows_path="$new_path"
31720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31721    unix_path=`$CYGPATH -u "$windows_path"`
31722    new_path="$unix_path"
31723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31725    new_path="$unix_path"
31726  fi
31727
31728    # remove trailing .exe if any
31729    new_path="${new_path/%.exe/}"
31730
31731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31733  fi
31734
31735    else
31736      # We're on a unix platform. Hooray! :)
31737      # First separate the path from the arguments. This will split at the first
31738      # space.
31739      complete="$PROPER_COMPILER_CC"
31740      path="${complete%% *}"
31741      tmp="$complete EOL"
31742      arguments="${tmp#* }"
31743
31744      # Cannot rely on the command "which" here since it doesn't always work.
31745      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31746      if test -z "$is_absolute_path"; then
31747        # Path to executable is not absolute. Find it.
31748        IFS_save="$IFS"
31749        IFS=:
31750        for p in $PATH; do
31751          if test -f "$p/$path" && test -x "$p/$path"; then
31752            new_path="$p/$path"
31753            break
31754          fi
31755        done
31756        IFS="$IFS_save"
31757      else
31758        # This is an absolute path, we can use it without further modifications.
31759        new_path="$path"
31760      fi
31761
31762      if test "x$new_path" = x; then
31763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31764$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31765        has_space=`$ECHO "$complete" | $GREP " "`
31766        if test "x$has_space" != x; then
31767          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31768$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31769        fi
31770        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31771      fi
31772    fi
31773
31774    # Now join together the path and the arguments once again
31775    if test "x$arguments" != xEOL; then
31776      new_complete="$new_path ${arguments% *}"
31777    else
31778      new_complete="$new_path"
31779    fi
31780
31781    if test "x$complete" != "x$new_complete"; then
31782      PROPER_COMPILER_CC="$new_complete"
31783      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31784$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31785    fi
31786  fi
31787
31788    PATH="$RETRY_COMPILER_SAVED_PATH"
31789
31790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31791$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31792
31793  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31794    # Follow a chain of symbolic links. Use readlink
31795    # where it exists, else fall back to horribly
31796    # complicated shell code.
31797    if test "x$READLINK_TESTED" != yes; then
31798      # On MacOSX there is a readlink tool with a different
31799      # purpose than the GNU readlink tool. Check the found readlink.
31800      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31801      if test "x$ISGNU" = x; then
31802        # A readlink that we do not know how to use.
31803        # Are there other non-GNU readlinks out there?
31804        READLINK_TESTED=yes
31805        READLINK=
31806      fi
31807    fi
31808
31809    if test "x$READLINK" != x; then
31810      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31811    else
31812      # Save the current directory for restoring afterwards
31813      STARTDIR=$PWD
31814      COUNTER=0
31815      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31816      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31817      cd $sym_link_dir
31818      # Use -P flag to resolve symlinks in directories.
31819      cd `$THEPWDCMD -P`
31820      sym_link_dir=`$THEPWDCMD -P`
31821      # Resolve file symlinks
31822      while test $COUNTER -lt 20; do
31823        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31824        if test "x$ISLINK" == x; then
31825          # This is not a symbolic link! We are done!
31826          break
31827        fi
31828        # Again resolve directory symlinks since the target of the just found
31829        # link could be in a different directory
31830        cd `$DIRNAME $ISLINK`
31831        sym_link_dir=`$THEPWDCMD -P`
31832        sym_link_file=`$BASENAME $ISLINK`
31833        let COUNTER=COUNTER+1
31834      done
31835      cd $STARTDIR
31836      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31837    fi
31838  fi
31839
31840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31841$as_echo "$PROPER_COMPILER_CC" >&6; }
31842    CC="$PROPER_COMPILER_CC"
31843  else
31844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31845$as_echo "no, keeping CC" >&6; }
31846  fi
31847
31848
31849  COMPILER=$CC
31850  COMPILER_NAME=$COMPILER_NAME
31851
31852  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31853    # cc -V output typically looks like
31854    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31855    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31856    # Check that this is likely to be the Solaris Studio cc.
31857    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31858    if test $? -ne 0; then
31859      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
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 -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31863$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31864      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31865$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31866      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31867    fi
31868    # Remove usage instructions (if present), and
31869    # collapse compiler output into a single line
31870    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31871        $SED -e 's/ *[Uu]sage:.*//'`
31872    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31873        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31874  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31875    # xlc -qversion output typically looks like
31876    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31877    #     Version: 11.01.0000.0015
31878    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31879    # Check that this is likely to be the IBM XL C compiler.
31880    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31881    if test $? -ne 0; then
31882      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31883      { $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
31884$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31885      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31886$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31888$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31889      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31890    fi
31891    # Collapse compiler output into a single line
31892    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31893    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31894        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31895  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31896    # There is no specific version flag, but all output starts with a version string.
31897    # First line typically looks something like:
31898    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31899    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31900    # Check that this is likely to be Microsoft CL.EXE.
31901    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31902    if test $? -ne 0; then
31903      { $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
31904$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31905      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31906$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31907      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31908    fi
31909    # Collapse compiler output into a single line
31910    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31911    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31912        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31913  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31914    # gcc --version output typically looks like
31915    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31916    #     Copyright (C) 2013 Free Software Foundation, Inc.
31917    #     This is free software; see the source for copying conditions.  There is NO
31918    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31919    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31920    # Check that this is likely to be GCC.
31921    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31922    if test $? -ne 0; then
31923      { $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
31924$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31925      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31926$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31927      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31928    fi
31929    # Remove Copyright and legalese from version string, and
31930    # collapse into a single line
31931    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31932        $SED -e 's/ *Copyright .*//'`
31933    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31934        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31935  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31936    # clang --version output typically looks like
31937    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31938    #    clang version 3.3 (tags/RELEASE_33/final)
31939    # or
31940    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31941    #    Target: x86_64-pc-linux-gnu
31942    #    Thread model: posix
31943    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31944    # Check that this is likely to be clang
31945    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31946    if test $? -ne 0; then
31947      { $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
31948$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31949      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31950$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31951      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31952    fi
31953    # Collapse compiler output into a single line
31954    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31955    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31956        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31957  else
31958      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31959  fi
31960  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31961  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31962  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31963  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31964
31965  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31966$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31967
31968
31969  # Now that we have resolved CC ourself, let autoconf have its go at it
31970  ac_ext=c
31971ac_cpp='$CPP $CPPFLAGS'
31972ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31973ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31974ac_compiler_gnu=$ac_cv_c_compiler_gnu
31975if test -n "$ac_tool_prefix"; then
31976  for ac_prog in $CC
31977  do
31978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31981$as_echo_n "checking for $ac_word... " >&6; }
31982if ${ac_cv_prog_CC+:} false; then :
31983  $as_echo_n "(cached) " >&6
31984else
31985  if test -n "$CC"; then
31986  ac_cv_prog_CC="$CC" # Let the user override the test.
31987else
31988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31989for as_dir in $PATH
31990do
31991  IFS=$as_save_IFS
31992  test -z "$as_dir" && as_dir=.
31993    for ac_exec_ext in '' $ac_executable_extensions; do
31994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31995    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
31996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31997    break 2
31998  fi
31999done
32000  done
32001IFS=$as_save_IFS
32002
32003fi
32004fi
32005CC=$ac_cv_prog_CC
32006if test -n "$CC"; then
32007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32008$as_echo "$CC" >&6; }
32009else
32010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32011$as_echo "no" >&6; }
32012fi
32013
32014
32015    test -n "$CC" && break
32016  done
32017fi
32018if test -z "$CC"; then
32019  ac_ct_CC=$CC
32020  for ac_prog in $CC
32021do
32022  # Extract the first word of "$ac_prog", so it can be a program name with args.
32023set dummy $ac_prog; ac_word=$2
32024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32025$as_echo_n "checking for $ac_word... " >&6; }
32026if ${ac_cv_prog_ac_ct_CC+:} false; then :
32027  $as_echo_n "(cached) " >&6
32028else
32029  if test -n "$ac_ct_CC"; then
32030  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32031else
32032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32033for as_dir in $PATH
32034do
32035  IFS=$as_save_IFS
32036  test -z "$as_dir" && as_dir=.
32037    for ac_exec_ext in '' $ac_executable_extensions; do
32038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32039    ac_cv_prog_ac_ct_CC="$ac_prog"
32040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32041    break 2
32042  fi
32043done
32044  done
32045IFS=$as_save_IFS
32046
32047fi
32048fi
32049ac_ct_CC=$ac_cv_prog_ac_ct_CC
32050if test -n "$ac_ct_CC"; then
32051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32052$as_echo "$ac_ct_CC" >&6; }
32053else
32054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32055$as_echo "no" >&6; }
32056fi
32057
32058
32059  test -n "$ac_ct_CC" && break
32060done
32061
32062  if test "x$ac_ct_CC" = x; then
32063    CC=""
32064  else
32065    case $cross_compiling:$ac_tool_warned in
32066yes:)
32067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32069ac_tool_warned=yes ;;
32070esac
32071    CC=$ac_ct_CC
32072  fi
32073fi
32074
32075
32076test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32078as_fn_error $? "no acceptable C compiler found in \$PATH
32079See \`config.log' for more details" "$LINENO" 5; }
32080
32081# Provide some information about the compiler.
32082$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32083set X $ac_compile
32084ac_compiler=$2
32085for ac_option in --version -v -V -qversion; do
32086  { { ac_try="$ac_compiler $ac_option >&5"
32087case "(($ac_try" in
32088  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32089  *) ac_try_echo=$ac_try;;
32090esac
32091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32092$as_echo "$ac_try_echo"; } >&5
32093  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32094  ac_status=$?
32095  if test -s conftest.err; then
32096    sed '10a\
32097... rest of stderr output deleted ...
32098         10q' conftest.err >conftest.er1
32099    cat conftest.er1 >&5
32100  fi
32101  rm -f conftest.er1 conftest.err
32102  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32103  test $ac_status = 0; }
32104done
32105
32106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32107/* end confdefs.h.  */
32108
32109int
32110main ()
32111{
32112
32113  ;
32114  return 0;
32115}
32116_ACEOF
32117ac_clean_files_save=$ac_clean_files
32118ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32119# Try to create an executable without -o first, disregard a.out.
32120# It will help us diagnose broken compilers, and finding out an intuition
32121# of exeext.
32122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32123$as_echo_n "checking whether the C compiler works... " >&6; }
32124ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32125
32126# The possible output files:
32127ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32128
32129ac_rmfiles=
32130for ac_file in $ac_files
32131do
32132  case $ac_file in
32133    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32134    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32135  esac
32136done
32137rm -f $ac_rmfiles
32138
32139if { { ac_try="$ac_link_default"
32140case "(($ac_try" in
32141  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32142  *) ac_try_echo=$ac_try;;
32143esac
32144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32145$as_echo "$ac_try_echo"; } >&5
32146  (eval "$ac_link_default") 2>&5
32147  ac_status=$?
32148  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32149  test $ac_status = 0; }; then :
32150  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32151# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32152# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32153# so that the user can short-circuit this test for compilers unknown to
32154# Autoconf.
32155for ac_file in $ac_files ''
32156do
32157  test -f "$ac_file" || continue
32158  case $ac_file in
32159    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32160	;;
32161    [ab].out )
32162	# We found the default executable, but exeext='' is most
32163	# certainly right.
32164	break;;
32165    *.* )
32166	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32167	then :; else
32168	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32169	fi
32170	# We set ac_cv_exeext here because the later test for it is not
32171	# safe: cross compilers may not add the suffix if given an `-o'
32172	# argument, so we may need to know it at that point already.
32173	# Even if this section looks crufty: it has the advantage of
32174	# actually working.
32175	break;;
32176    * )
32177	break;;
32178  esac
32179done
32180test "$ac_cv_exeext" = no && ac_cv_exeext=
32181
32182else
32183  ac_file=''
32184fi
32185if test -z "$ac_file"; then :
32186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32187$as_echo "no" >&6; }
32188$as_echo "$as_me: failed program was:" >&5
32189sed 's/^/| /' conftest.$ac_ext >&5
32190
32191{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32193as_fn_error 77 "C compiler cannot create executables
32194See \`config.log' for more details" "$LINENO" 5; }
32195else
32196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32197$as_echo "yes" >&6; }
32198fi
32199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32200$as_echo_n "checking for C compiler default output file name... " >&6; }
32201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32202$as_echo "$ac_file" >&6; }
32203ac_exeext=$ac_cv_exeext
32204
32205rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32206ac_clean_files=$ac_clean_files_save
32207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32208$as_echo_n "checking for suffix of executables... " >&6; }
32209if { { ac_try="$ac_link"
32210case "(($ac_try" in
32211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32212  *) ac_try_echo=$ac_try;;
32213esac
32214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32215$as_echo "$ac_try_echo"; } >&5
32216  (eval "$ac_link") 2>&5
32217  ac_status=$?
32218  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32219  test $ac_status = 0; }; then :
32220  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32221# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32222# work properly (i.e., refer to `conftest.exe'), while it won't with
32223# `rm'.
32224for ac_file in conftest.exe conftest conftest.*; do
32225  test -f "$ac_file" || continue
32226  case $ac_file in
32227    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32228    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32229	  break;;
32230    * ) break;;
32231  esac
32232done
32233else
32234  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32236as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32237See \`config.log' for more details" "$LINENO" 5; }
32238fi
32239rm -f conftest conftest$ac_cv_exeext
32240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32241$as_echo "$ac_cv_exeext" >&6; }
32242
32243rm -f conftest.$ac_ext
32244EXEEXT=$ac_cv_exeext
32245ac_exeext=$EXEEXT
32246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32247/* end confdefs.h.  */
32248#include <stdio.h>
32249int
32250main ()
32251{
32252FILE *f = fopen ("conftest.out", "w");
32253 return ferror (f) || fclose (f) != 0;
32254
32255  ;
32256  return 0;
32257}
32258_ACEOF
32259ac_clean_files="$ac_clean_files conftest.out"
32260# Check that the compiler produces executables we can run.  If not, either
32261# the compiler is broken, or we cross compile.
32262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32263$as_echo_n "checking whether we are cross compiling... " >&6; }
32264if test "$cross_compiling" != yes; then
32265  { { ac_try="$ac_link"
32266case "(($ac_try" in
32267  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32268  *) ac_try_echo=$ac_try;;
32269esac
32270eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32271$as_echo "$ac_try_echo"; } >&5
32272  (eval "$ac_link") 2>&5
32273  ac_status=$?
32274  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32275  test $ac_status = 0; }
32276  if { ac_try='./conftest$ac_cv_exeext'
32277  { { case "(($ac_try" in
32278  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32279  *) ac_try_echo=$ac_try;;
32280esac
32281eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32282$as_echo "$ac_try_echo"; } >&5
32283  (eval "$ac_try") 2>&5
32284  ac_status=$?
32285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32286  test $ac_status = 0; }; }; then
32287    cross_compiling=no
32288  else
32289    if test "$cross_compiling" = maybe; then
32290	cross_compiling=yes
32291    else
32292	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32294as_fn_error $? "cannot run C compiled programs.
32295If you meant to cross compile, use \`--host'.
32296See \`config.log' for more details" "$LINENO" 5; }
32297    fi
32298  fi
32299fi
32300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32301$as_echo "$cross_compiling" >&6; }
32302
32303rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32304ac_clean_files=$ac_clean_files_save
32305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32306$as_echo_n "checking for suffix of object files... " >&6; }
32307if ${ac_cv_objext+:} false; then :
32308  $as_echo_n "(cached) " >&6
32309else
32310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32311/* end confdefs.h.  */
32312
32313int
32314main ()
32315{
32316
32317  ;
32318  return 0;
32319}
32320_ACEOF
32321rm -f conftest.o conftest.obj
32322if { { ac_try="$ac_compile"
32323case "(($ac_try" in
32324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32325  *) ac_try_echo=$ac_try;;
32326esac
32327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32328$as_echo "$ac_try_echo"; } >&5
32329  (eval "$ac_compile") 2>&5
32330  ac_status=$?
32331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32332  test $ac_status = 0; }; then :
32333  for ac_file in conftest.o conftest.obj conftest.*; do
32334  test -f "$ac_file" || continue;
32335  case $ac_file in
32336    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32337    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32338       break;;
32339  esac
32340done
32341else
32342  $as_echo "$as_me: failed program was:" >&5
32343sed 's/^/| /' conftest.$ac_ext >&5
32344
32345{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32347as_fn_error $? "cannot compute suffix of object files: cannot compile
32348See \`config.log' for more details" "$LINENO" 5; }
32349fi
32350rm -f conftest.$ac_cv_objext conftest.$ac_ext
32351fi
32352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32353$as_echo "$ac_cv_objext" >&6; }
32354OBJEXT=$ac_cv_objext
32355ac_objext=$OBJEXT
32356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32357$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32358if ${ac_cv_c_compiler_gnu+:} false; then :
32359  $as_echo_n "(cached) " >&6
32360else
32361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32362/* end confdefs.h.  */
32363
32364int
32365main ()
32366{
32367#ifndef __GNUC__
32368       choke me
32369#endif
32370
32371  ;
32372  return 0;
32373}
32374_ACEOF
32375if ac_fn_c_try_compile "$LINENO"; then :
32376  ac_compiler_gnu=yes
32377else
32378  ac_compiler_gnu=no
32379fi
32380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32381ac_cv_c_compiler_gnu=$ac_compiler_gnu
32382
32383fi
32384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32385$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32386if test $ac_compiler_gnu = yes; then
32387  GCC=yes
32388else
32389  GCC=
32390fi
32391ac_test_CFLAGS=${CFLAGS+set}
32392ac_save_CFLAGS=$CFLAGS
32393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32394$as_echo_n "checking whether $CC accepts -g... " >&6; }
32395if ${ac_cv_prog_cc_g+:} false; then :
32396  $as_echo_n "(cached) " >&6
32397else
32398  ac_save_c_werror_flag=$ac_c_werror_flag
32399   ac_c_werror_flag=yes
32400   ac_cv_prog_cc_g=no
32401   CFLAGS="-g"
32402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32403/* end confdefs.h.  */
32404
32405int
32406main ()
32407{
32408
32409  ;
32410  return 0;
32411}
32412_ACEOF
32413if ac_fn_c_try_compile "$LINENO"; then :
32414  ac_cv_prog_cc_g=yes
32415else
32416  CFLAGS=""
32417      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32418/* end confdefs.h.  */
32419
32420int
32421main ()
32422{
32423
32424  ;
32425  return 0;
32426}
32427_ACEOF
32428if ac_fn_c_try_compile "$LINENO"; then :
32429
32430else
32431  ac_c_werror_flag=$ac_save_c_werror_flag
32432	 CFLAGS="-g"
32433	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32434/* end confdefs.h.  */
32435
32436int
32437main ()
32438{
32439
32440  ;
32441  return 0;
32442}
32443_ACEOF
32444if ac_fn_c_try_compile "$LINENO"; then :
32445  ac_cv_prog_cc_g=yes
32446fi
32447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32448fi
32449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32450fi
32451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32452   ac_c_werror_flag=$ac_save_c_werror_flag
32453fi
32454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32455$as_echo "$ac_cv_prog_cc_g" >&6; }
32456if test "$ac_test_CFLAGS" = set; then
32457  CFLAGS=$ac_save_CFLAGS
32458elif test $ac_cv_prog_cc_g = yes; then
32459  if test "$GCC" = yes; then
32460    CFLAGS="-g -O2"
32461  else
32462    CFLAGS="-g"
32463  fi
32464else
32465  if test "$GCC" = yes; then
32466    CFLAGS="-O2"
32467  else
32468    CFLAGS=
32469  fi
32470fi
32471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32472$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32473if ${ac_cv_prog_cc_c89+:} false; then :
32474  $as_echo_n "(cached) " >&6
32475else
32476  ac_cv_prog_cc_c89=no
32477ac_save_CC=$CC
32478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32479/* end confdefs.h.  */
32480#include <stdarg.h>
32481#include <stdio.h>
32482struct stat;
32483/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32484struct buf { int x; };
32485FILE * (*rcsopen) (struct buf *, struct stat *, int);
32486static char *e (p, i)
32487     char **p;
32488     int i;
32489{
32490  return p[i];
32491}
32492static char *f (char * (*g) (char **, int), char **p, ...)
32493{
32494  char *s;
32495  va_list v;
32496  va_start (v,p);
32497  s = g (p, va_arg (v,int));
32498  va_end (v);
32499  return s;
32500}
32501
32502/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32503   function prototypes and stuff, but not '\xHH' hex character constants.
32504   These don't provoke an error unfortunately, instead are silently treated
32505   as 'x'.  The following induces an error, until -std is added to get
32506   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32507   array size at least.  It's necessary to write '\x00'==0 to get something
32508   that's true only with -std.  */
32509int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32510
32511/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32512   inside strings and character constants.  */
32513#define FOO(x) 'x'
32514int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32515
32516int test (int i, double x);
32517struct s1 {int (*f) (int a);};
32518struct s2 {int (*f) (double a);};
32519int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32520int argc;
32521char **argv;
32522int
32523main ()
32524{
32525return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32526  ;
32527  return 0;
32528}
32529_ACEOF
32530for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32531	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32532do
32533  CC="$ac_save_CC $ac_arg"
32534  if ac_fn_c_try_compile "$LINENO"; then :
32535  ac_cv_prog_cc_c89=$ac_arg
32536fi
32537rm -f core conftest.err conftest.$ac_objext
32538  test "x$ac_cv_prog_cc_c89" != "xno" && break
32539done
32540rm -f conftest.$ac_ext
32541CC=$ac_save_CC
32542
32543fi
32544# AC_CACHE_VAL
32545case "x$ac_cv_prog_cc_c89" in
32546  x)
32547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32548$as_echo "none needed" >&6; } ;;
32549  xno)
32550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32551$as_echo "unsupported" >&6; } ;;
32552  *)
32553    CC="$CC $ac_cv_prog_cc_c89"
32554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32555$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32556esac
32557if test "x$ac_cv_prog_cc_c89" != xno; then :
32558
32559fi
32560
32561ac_ext=cpp
32562ac_cpp='$CXXCPP $CPPFLAGS'
32563ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32564ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32565ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32566
32567
32568
32569  COMPILER_NAME=C++
32570  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32571
32572  if test "x$CXX" != x; then
32573    # User has supplied compiler name already, always let that override.
32574    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32575$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32576    if test "x`basename $CXX`" = "x$CXX"; then
32577      # A command without a complete path is provided, search $PATH.
32578
32579      for ac_prog in $CXX
32580do
32581  # Extract the first word of "$ac_prog", so it can be a program name with args.
32582set dummy $ac_prog; ac_word=$2
32583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32584$as_echo_n "checking for $ac_word... " >&6; }
32585if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32586  $as_echo_n "(cached) " >&6
32587else
32588  case $POTENTIAL_CXX in
32589  [\\/]* | ?:[\\/]*)
32590  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32591  ;;
32592  *)
32593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32594for as_dir in $PATH
32595do
32596  IFS=$as_save_IFS
32597  test -z "$as_dir" && as_dir=.
32598    for ac_exec_ext in '' $ac_executable_extensions; do
32599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32600    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32602    break 2
32603  fi
32604done
32605  done
32606IFS=$as_save_IFS
32607
32608  ;;
32609esac
32610fi
32611POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32612if test -n "$POTENTIAL_CXX"; then
32613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32614$as_echo "$POTENTIAL_CXX" >&6; }
32615else
32616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32617$as_echo "no" >&6; }
32618fi
32619
32620
32621  test -n "$POTENTIAL_CXX" && break
32622done
32623
32624      if test "x$POTENTIAL_CXX" != x; then
32625        CXX=$POTENTIAL_CXX
32626      else
32627        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32628      fi
32629    else
32630      # Otherwise it might already be a complete path
32631      if test ! -x "$CXX"; then
32632        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32633      fi
32634    fi
32635  else
32636    # No user supplied value. Locate compiler ourselves.
32637
32638    # If we are cross compiling, assume cross compilation tools follows the
32639    # cross compilation standard where they are prefixed with the autoconf
32640    # standard name for the target. For example the binary
32641    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32642    # If we are not cross compiling, then the default compiler name will be
32643    # used.
32644
32645    CXX=
32646    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32647    # before checking the rest of the PATH.
32648    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32649    # step, this should not be necessary.
32650    if test -n "$TOOLCHAIN_PATH"; then
32651      PATH_save="$PATH"
32652      PATH="$TOOLCHAIN_PATH"
32653      for ac_prog in $SEARCH_LIST
32654do
32655  # Extract the first word of "$ac_prog", so it can be a program name with args.
32656set dummy $ac_prog; ac_word=$2
32657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32658$as_echo_n "checking for $ac_word... " >&6; }
32659if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32660  $as_echo_n "(cached) " >&6
32661else
32662  case $TOOLCHAIN_PATH_CXX in
32663  [\\/]* | ?:[\\/]*)
32664  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32665  ;;
32666  *)
32667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32668for as_dir in $PATH
32669do
32670  IFS=$as_save_IFS
32671  test -z "$as_dir" && as_dir=.
32672    for ac_exec_ext in '' $ac_executable_extensions; do
32673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32674    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32676    break 2
32677  fi
32678done
32679  done
32680IFS=$as_save_IFS
32681
32682  ;;
32683esac
32684fi
32685TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32686if test -n "$TOOLCHAIN_PATH_CXX"; then
32687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32688$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32689else
32690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32691$as_echo "no" >&6; }
32692fi
32693
32694
32695  test -n "$TOOLCHAIN_PATH_CXX" && break
32696done
32697
32698      CXX=$TOOLCHAIN_PATH_CXX
32699      PATH="$PATH_save"
32700    fi
32701
32702    # AC_PATH_PROGS can't be run multiple times with the same variable,
32703    # so create a new name for this run.
32704    if test "x$CXX" = x; then
32705      for ac_prog in $SEARCH_LIST
32706do
32707  # Extract the first word of "$ac_prog", so it can be a program name with args.
32708set dummy $ac_prog; ac_word=$2
32709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32710$as_echo_n "checking for $ac_word... " >&6; }
32711if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32712  $as_echo_n "(cached) " >&6
32713else
32714  case $POTENTIAL_CXX in
32715  [\\/]* | ?:[\\/]*)
32716  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32717  ;;
32718  *)
32719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32720for as_dir in $PATH
32721do
32722  IFS=$as_save_IFS
32723  test -z "$as_dir" && as_dir=.
32724    for ac_exec_ext in '' $ac_executable_extensions; do
32725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32726    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32728    break 2
32729  fi
32730done
32731  done
32732IFS=$as_save_IFS
32733
32734  ;;
32735esac
32736fi
32737POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32738if test -n "$POTENTIAL_CXX"; then
32739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32740$as_echo "$POTENTIAL_CXX" >&6; }
32741else
32742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32743$as_echo "no" >&6; }
32744fi
32745
32746
32747  test -n "$POTENTIAL_CXX" && break
32748done
32749
32750      CXX=$POTENTIAL_CXX
32751    fi
32752
32753    if test "x$CXX" = x; then
32754
32755  # Print a helpful message on how to acquire the necessary build dependency.
32756  # devkit is the help tag: freetype, cups, alsa etc
32757  MISSING_DEPENDENCY=devkit
32758
32759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32760    cygwin_help $MISSING_DEPENDENCY
32761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32762    msys_help $MISSING_DEPENDENCY
32763  else
32764    PKGHANDLER_COMMAND=
32765
32766    case $PKGHANDLER in
32767      apt-get)
32768        apt_help     $MISSING_DEPENDENCY ;;
32769      yum)
32770        yum_help     $MISSING_DEPENDENCY ;;
32771      port)
32772        port_help    $MISSING_DEPENDENCY ;;
32773      pkgutil)
32774        pkgutil_help $MISSING_DEPENDENCY ;;
32775      pkgadd)
32776        pkgadd_help  $MISSING_DEPENDENCY ;;
32777    esac
32778
32779    if test "x$PKGHANDLER_COMMAND" != x; then
32780      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32781    fi
32782  fi
32783
32784      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32785    fi
32786  fi
32787
32788  # Now we have a compiler binary in CXX. Make sure it's okay.
32789
32790  # Only process if variable expands to non-empty
32791
32792  if test "x$CXX" != x; then
32793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32794
32795  # First separate the path from the arguments. This will split at the first
32796  # space.
32797  complete="$CXX"
32798  path="${complete%% *}"
32799  tmp="$complete EOL"
32800  arguments="${tmp#* }"
32801
32802  # Input might be given as Windows format, start by converting to
32803  # unix format.
32804  new_path=`$CYGPATH -u "$path"`
32805
32806  # Now try to locate executable using which
32807  new_path=`$WHICH "$new_path" 2> /dev/null`
32808  # bat and cmd files are not always considered executable in cygwin causing which
32809  # to not find them
32810  if test "x$new_path" = x \
32811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32813    new_path=`$CYGPATH -u "$path"`
32814  fi
32815  if test "x$new_path" = x; then
32816    # Oops. Which didn't find the executable.
32817    # The splitting of arguments from the executable at a space might have been incorrect,
32818    # since paths with space are more likely in Windows. Give it another try with the whole
32819    # argument.
32820    path="$complete"
32821    arguments="EOL"
32822    new_path=`$CYGPATH -u "$path"`
32823    new_path=`$WHICH "$new_path" 2> /dev/null`
32824    # bat and cmd files are not always considered executable in cygwin causing which
32825    # to not find them
32826    if test "x$new_path" = x \
32827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32829      new_path=`$CYGPATH -u "$path"`
32830    fi
32831    if test "x$new_path" = x; then
32832      # It's still not found. Now this is an unrecoverable error.
32833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32834$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32835      has_space=`$ECHO "$complete" | $GREP " "`
32836      if test "x$has_space" != x; then
32837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32839      fi
32840      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32841    fi
32842  fi
32843
32844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32847  # "foo.exe" is OK but "foo" is an error.
32848  #
32849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32850  # It is also a way to make sure we got the proper file name for the real test later on.
32851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32852  if test "x$test_shortpath" = x; then
32853    # Short path failed, file does not exist as specified.
32854    # Try adding .exe or .cmd
32855    if test -f "${new_path}.exe"; then
32856      input_to_shortpath="${new_path}.exe"
32857    elif test -f "${new_path}.cmd"; then
32858      input_to_shortpath="${new_path}.cmd"
32859    else
32860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32861$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32864      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32865    fi
32866  else
32867    input_to_shortpath="$new_path"
32868  fi
32869
32870  # Call helper function which possibly converts this using DOS-style short mode.
32871  # If so, the updated path is stored in $new_path.
32872  new_path="$input_to_shortpath"
32873
32874  input_path="$input_to_shortpath"
32875  # Check if we need to convert this using DOS-style short mode. If the path
32876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32877  # take no chances and rewrite it.
32878  # Note: m4 eats our [], so we need to use [ and ] instead.
32879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32880  if test "x$has_forbidden_chars" != x; then
32881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32885      # Going to short mode and back again did indeed matter. Since short mode is
32886      # case insensitive, let's make it lowercase to improve readability.
32887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32888      # Now convert it back to Unix-style (cygpath)
32889      input_path=`$CYGPATH -u "$shortmode_path"`
32890      new_path="$input_path"
32891    fi
32892  fi
32893
32894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32895  if test "x$test_cygdrive_prefix" = x; then
32896    # As a simple fix, exclude /usr/bin since it's not a real path.
32897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32899      # a path prefixed by /cygdrive for fixpath to work.
32900      new_path="$CYGWIN_ROOT_PATH$input_path"
32901    fi
32902  fi
32903
32904  # remove trailing .exe if any
32905  new_path="${new_path/%.exe/}"
32906
32907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32908
32909  # First separate the path from the arguments. This will split at the first
32910  # space.
32911  complete="$CXX"
32912  path="${complete%% *}"
32913  tmp="$complete EOL"
32914  arguments="${tmp#* }"
32915
32916  # Input might be given as Windows format, start by converting to
32917  # unix format.
32918  new_path="$path"
32919
32920  windows_path="$new_path"
32921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32922    unix_path=`$CYGPATH -u "$windows_path"`
32923    new_path="$unix_path"
32924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32926    new_path="$unix_path"
32927  fi
32928
32929
32930  # Now try to locate executable using which
32931  new_path=`$WHICH "$new_path" 2> /dev/null`
32932
32933  if test "x$new_path" = x; then
32934    # Oops. Which didn't find the executable.
32935    # The splitting of arguments from the executable at a space might have been incorrect,
32936    # since paths with space are more likely in Windows. Give it another try with the whole
32937    # argument.
32938    path="$complete"
32939    arguments="EOL"
32940    new_path="$path"
32941
32942  windows_path="$new_path"
32943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32944    unix_path=`$CYGPATH -u "$windows_path"`
32945    new_path="$unix_path"
32946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32948    new_path="$unix_path"
32949  fi
32950
32951
32952    new_path=`$WHICH "$new_path" 2> /dev/null`
32953    # bat and cmd files are not always considered executable in MSYS causing which
32954    # to not find them
32955    if test "x$new_path" = x \
32956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32958      new_path="$path"
32959
32960  windows_path="$new_path"
32961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32962    unix_path=`$CYGPATH -u "$windows_path"`
32963    new_path="$unix_path"
32964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32966    new_path="$unix_path"
32967  fi
32968
32969    fi
32970
32971    if test "x$new_path" = x; then
32972      # It's still not found. Now this is an unrecoverable error.
32973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32974$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32975      has_space=`$ECHO "$complete" | $GREP " "`
32976      if test "x$has_space" != x; then
32977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32979      fi
32980      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32981    fi
32982  fi
32983
32984  # Now new_path has a complete unix path to the binary
32985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32986    # Keep paths in /bin as-is, but remove trailing .exe if any
32987    new_path="${new_path/%.exe/}"
32988    # Do not save /bin paths to all_fixpath_prefixes!
32989  else
32990    # Not in mixed or Windows style, start by that.
32991    new_path=`cmd //c echo $new_path`
32992
32993  input_path="$new_path"
32994  # Check if we need to convert this using DOS-style short mode. If the path
32995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32996  # take no chances and rewrite it.
32997  # Note: m4 eats our [], so we need to use [ and ] instead.
32998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32999  if test "x$has_forbidden_chars" != x; then
33000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33002  fi
33003
33004    # Output is in $new_path
33005
33006  windows_path="$new_path"
33007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33008    unix_path=`$CYGPATH -u "$windows_path"`
33009    new_path="$unix_path"
33010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33012    new_path="$unix_path"
33013  fi
33014
33015    # remove trailing .exe if any
33016    new_path="${new_path/%.exe/}"
33017
33018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33020  fi
33021
33022    else
33023      # We're on a unix platform. Hooray! :)
33024      # First separate the path from the arguments. This will split at the first
33025      # space.
33026      complete="$CXX"
33027      path="${complete%% *}"
33028      tmp="$complete EOL"
33029      arguments="${tmp#* }"
33030
33031      # Cannot rely on the command "which" here since it doesn't always work.
33032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33033      if test -z "$is_absolute_path"; then
33034        # Path to executable is not absolute. Find it.
33035        IFS_save="$IFS"
33036        IFS=:
33037        for p in $PATH; do
33038          if test -f "$p/$path" && test -x "$p/$path"; then
33039            new_path="$p/$path"
33040            break
33041          fi
33042        done
33043        IFS="$IFS_save"
33044      else
33045        # This is an absolute path, we can use it without further modifications.
33046        new_path="$path"
33047      fi
33048
33049      if test "x$new_path" = x; then
33050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33051$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33052        has_space=`$ECHO "$complete" | $GREP " "`
33053        if test "x$has_space" != x; then
33054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33056        fi
33057        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33058      fi
33059    fi
33060
33061    # Now join together the path and the arguments once again
33062    if test "x$arguments" != xEOL; then
33063      new_complete="$new_path ${arguments% *}"
33064    else
33065      new_complete="$new_path"
33066    fi
33067
33068    if test "x$complete" != "x$new_complete"; then
33069      CXX="$new_complete"
33070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33071$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33072    fi
33073  fi
33074
33075  TEST_COMPILER="$CXX"
33076  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33077  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33078  if test "x$OPENJDK_BUILD_OS" != xaix; then
33079    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33081$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33082
33083  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33084    # Follow a chain of symbolic links. Use readlink
33085    # where it exists, else fall back to horribly
33086    # complicated shell code.
33087    if test "x$READLINK_TESTED" != yes; then
33088      # On MacOSX there is a readlink tool with a different
33089      # purpose than the GNU readlink tool. Check the found readlink.
33090      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33091      if test "x$ISGNU" = x; then
33092        # A readlink that we do not know how to use.
33093        # Are there other non-GNU readlinks out there?
33094        READLINK_TESTED=yes
33095        READLINK=
33096      fi
33097    fi
33098
33099    if test "x$READLINK" != x; then
33100      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33101    else
33102      # Save the current directory for restoring afterwards
33103      STARTDIR=$PWD
33104      COUNTER=0
33105      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33106      sym_link_file=`$BASENAME $TEST_COMPILER`
33107      cd $sym_link_dir
33108      # Use -P flag to resolve symlinks in directories.
33109      cd `$THEPWDCMD -P`
33110      sym_link_dir=`$THEPWDCMD -P`
33111      # Resolve file symlinks
33112      while test $COUNTER -lt 20; do
33113        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33114        if test "x$ISLINK" == x; then
33115          # This is not a symbolic link! We are done!
33116          break
33117        fi
33118        # Again resolve directory symlinks since the target of the just found
33119        # link could be in a different directory
33120        cd `$DIRNAME $ISLINK`
33121        sym_link_dir=`$THEPWDCMD -P`
33122        sym_link_file=`$BASENAME $ISLINK`
33123        let COUNTER=COUNTER+1
33124      done
33125      cd $STARTDIR
33126      TEST_COMPILER=$sym_link_dir/$sym_link_file
33127    fi
33128  fi
33129
33130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33131$as_echo "$TEST_COMPILER" >&6; }
33132  fi
33133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33134$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33135
33136  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33137  if test "x$COMPILER_BASENAME" = "xccache"; then
33138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33139$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33140    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33141    # We want to control ccache invocation ourselves, so ignore this cc and try
33142    # searching again.
33143
33144    # Remove the path to the fake ccache cc from the PATH
33145    RETRY_COMPILER_SAVED_PATH="$PATH"
33146    COMPILER_DIRNAME=`$DIRNAME $CXX`
33147    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33148
33149    # Try again looking for our compiler
33150    if test -n "$ac_tool_prefix"; then
33151  for ac_prog in $TOOLCHAIN_CXX_BINARY
33152  do
33153    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33154set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33156$as_echo_n "checking for $ac_word... " >&6; }
33157if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33158  $as_echo_n "(cached) " >&6
33159else
33160  if test -n "$PROPER_COMPILER_CXX"; then
33161  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33162else
33163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33164for as_dir in $PATH
33165do
33166  IFS=$as_save_IFS
33167  test -z "$as_dir" && as_dir=.
33168    for ac_exec_ext in '' $ac_executable_extensions; do
33169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33170    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33172    break 2
33173  fi
33174done
33175  done
33176IFS=$as_save_IFS
33177
33178fi
33179fi
33180PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33181if test -n "$PROPER_COMPILER_CXX"; then
33182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33183$as_echo "$PROPER_COMPILER_CXX" >&6; }
33184else
33185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33186$as_echo "no" >&6; }
33187fi
33188
33189
33190    test -n "$PROPER_COMPILER_CXX" && break
33191  done
33192fi
33193if test -z "$PROPER_COMPILER_CXX"; then
33194  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33195  for ac_prog in $TOOLCHAIN_CXX_BINARY
33196do
33197  # Extract the first word of "$ac_prog", so it can be a program name with args.
33198set dummy $ac_prog; ac_word=$2
33199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33200$as_echo_n "checking for $ac_word... " >&6; }
33201if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33202  $as_echo_n "(cached) " >&6
33203else
33204  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33205  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33206else
33207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33208for as_dir in $PATH
33209do
33210  IFS=$as_save_IFS
33211  test -z "$as_dir" && as_dir=.
33212    for ac_exec_ext in '' $ac_executable_extensions; do
33213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33214    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33216    break 2
33217  fi
33218done
33219  done
33220IFS=$as_save_IFS
33221
33222fi
33223fi
33224ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33225if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33227$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33228else
33229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33230$as_echo "no" >&6; }
33231fi
33232
33233
33234  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33235done
33236
33237  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33238    PROPER_COMPILER_CXX=""
33239  else
33240    case $cross_compiling:$ac_tool_warned in
33241yes:)
33242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33244ac_tool_warned=yes ;;
33245esac
33246    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33247  fi
33248fi
33249
33250
33251  # Only process if variable expands to non-empty
33252
33253  if test "x$PROPER_COMPILER_CXX" != x; then
33254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33255
33256  # First separate the path from the arguments. This will split at the first
33257  # space.
33258  complete="$PROPER_COMPILER_CXX"
33259  path="${complete%% *}"
33260  tmp="$complete EOL"
33261  arguments="${tmp#* }"
33262
33263  # Input might be given as Windows format, start by converting to
33264  # unix format.
33265  new_path=`$CYGPATH -u "$path"`
33266
33267  # Now try to locate executable using which
33268  new_path=`$WHICH "$new_path" 2> /dev/null`
33269  # bat and cmd files are not always considered executable in cygwin causing which
33270  # to not find them
33271  if test "x$new_path" = x \
33272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33274    new_path=`$CYGPATH -u "$path"`
33275  fi
33276  if test "x$new_path" = x; then
33277    # Oops. Which didn't find the executable.
33278    # The splitting of arguments from the executable at a space might have been incorrect,
33279    # since paths with space are more likely in Windows. Give it another try with the whole
33280    # argument.
33281    path="$complete"
33282    arguments="EOL"
33283    new_path=`$CYGPATH -u "$path"`
33284    new_path=`$WHICH "$new_path" 2> /dev/null`
33285    # bat and cmd files are not always considered executable in cygwin causing which
33286    # to not find them
33287    if test "x$new_path" = x \
33288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33290      new_path=`$CYGPATH -u "$path"`
33291    fi
33292    if test "x$new_path" = x; then
33293      # It's still not found. Now this is an unrecoverable error.
33294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33295$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33296      has_space=`$ECHO "$complete" | $GREP " "`
33297      if test "x$has_space" != x; then
33298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33300      fi
33301      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33302    fi
33303  fi
33304
33305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33308  # "foo.exe" is OK but "foo" is an error.
33309  #
33310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33311  # It is also a way to make sure we got the proper file name for the real test later on.
33312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33313  if test "x$test_shortpath" = x; then
33314    # Short path failed, file does not exist as specified.
33315    # Try adding .exe or .cmd
33316    if test -f "${new_path}.exe"; then
33317      input_to_shortpath="${new_path}.exe"
33318    elif test -f "${new_path}.cmd"; then
33319      input_to_shortpath="${new_path}.cmd"
33320    else
33321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33322$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33325      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33326    fi
33327  else
33328    input_to_shortpath="$new_path"
33329  fi
33330
33331  # Call helper function which possibly converts this using DOS-style short mode.
33332  # If so, the updated path is stored in $new_path.
33333  new_path="$input_to_shortpath"
33334
33335  input_path="$input_to_shortpath"
33336  # Check if we need to convert this using DOS-style short mode. If the path
33337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33338  # take no chances and rewrite it.
33339  # Note: m4 eats our [], so we need to use [ and ] instead.
33340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33341  if test "x$has_forbidden_chars" != x; then
33342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33346      # Going to short mode and back again did indeed matter. Since short mode is
33347      # case insensitive, let's make it lowercase to improve readability.
33348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33349      # Now convert it back to Unix-style (cygpath)
33350      input_path=`$CYGPATH -u "$shortmode_path"`
33351      new_path="$input_path"
33352    fi
33353  fi
33354
33355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33356  if test "x$test_cygdrive_prefix" = x; then
33357    # As a simple fix, exclude /usr/bin since it's not a real path.
33358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33360      # a path prefixed by /cygdrive for fixpath to work.
33361      new_path="$CYGWIN_ROOT_PATH$input_path"
33362    fi
33363  fi
33364
33365  # remove trailing .exe if any
33366  new_path="${new_path/%.exe/}"
33367
33368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33369
33370  # First separate the path from the arguments. This will split at the first
33371  # space.
33372  complete="$PROPER_COMPILER_CXX"
33373  path="${complete%% *}"
33374  tmp="$complete EOL"
33375  arguments="${tmp#* }"
33376
33377  # Input might be given as Windows format, start by converting to
33378  # unix format.
33379  new_path="$path"
33380
33381  windows_path="$new_path"
33382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33383    unix_path=`$CYGPATH -u "$windows_path"`
33384    new_path="$unix_path"
33385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33387    new_path="$unix_path"
33388  fi
33389
33390
33391  # Now try to locate executable using which
33392  new_path=`$WHICH "$new_path" 2> /dev/null`
33393
33394  if test "x$new_path" = x; then
33395    # Oops. Which didn't find the executable.
33396    # The splitting of arguments from the executable at a space might have been incorrect,
33397    # since paths with space are more likely in Windows. Give it another try with the whole
33398    # argument.
33399    path="$complete"
33400    arguments="EOL"
33401    new_path="$path"
33402
33403  windows_path="$new_path"
33404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33405    unix_path=`$CYGPATH -u "$windows_path"`
33406    new_path="$unix_path"
33407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33409    new_path="$unix_path"
33410  fi
33411
33412
33413    new_path=`$WHICH "$new_path" 2> /dev/null`
33414    # bat and cmd files are not always considered executable in MSYS causing which
33415    # to not find them
33416    if test "x$new_path" = x \
33417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33419      new_path="$path"
33420
33421  windows_path="$new_path"
33422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33423    unix_path=`$CYGPATH -u "$windows_path"`
33424    new_path="$unix_path"
33425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33427    new_path="$unix_path"
33428  fi
33429
33430    fi
33431
33432    if test "x$new_path" = x; then
33433      # It's still not found. Now this is an unrecoverable error.
33434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33435$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33436      has_space=`$ECHO "$complete" | $GREP " "`
33437      if test "x$has_space" != x; then
33438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33440      fi
33441      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33442    fi
33443  fi
33444
33445  # Now new_path has a complete unix path to the binary
33446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33447    # Keep paths in /bin as-is, but remove trailing .exe if any
33448    new_path="${new_path/%.exe/}"
33449    # Do not save /bin paths to all_fixpath_prefixes!
33450  else
33451    # Not in mixed or Windows style, start by that.
33452    new_path=`cmd //c echo $new_path`
33453
33454  input_path="$new_path"
33455  # Check if we need to convert this using DOS-style short mode. If the path
33456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33457  # take no chances and rewrite it.
33458  # Note: m4 eats our [], so we need to use [ and ] instead.
33459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33460  if test "x$has_forbidden_chars" != x; then
33461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33463  fi
33464
33465    # Output is in $new_path
33466
33467  windows_path="$new_path"
33468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33469    unix_path=`$CYGPATH -u "$windows_path"`
33470    new_path="$unix_path"
33471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33473    new_path="$unix_path"
33474  fi
33475
33476    # remove trailing .exe if any
33477    new_path="${new_path/%.exe/}"
33478
33479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33481  fi
33482
33483    else
33484      # We're on a unix platform. Hooray! :)
33485      # First separate the path from the arguments. This will split at the first
33486      # space.
33487      complete="$PROPER_COMPILER_CXX"
33488      path="${complete%% *}"
33489      tmp="$complete EOL"
33490      arguments="${tmp#* }"
33491
33492      # Cannot rely on the command "which" here since it doesn't always work.
33493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33494      if test -z "$is_absolute_path"; then
33495        # Path to executable is not absolute. Find it.
33496        IFS_save="$IFS"
33497        IFS=:
33498        for p in $PATH; do
33499          if test -f "$p/$path" && test -x "$p/$path"; then
33500            new_path="$p/$path"
33501            break
33502          fi
33503        done
33504        IFS="$IFS_save"
33505      else
33506        # This is an absolute path, we can use it without further modifications.
33507        new_path="$path"
33508      fi
33509
33510      if test "x$new_path" = x; then
33511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33512$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33513        has_space=`$ECHO "$complete" | $GREP " "`
33514        if test "x$has_space" != x; then
33515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33517        fi
33518        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33519      fi
33520    fi
33521
33522    # Now join together the path and the arguments once again
33523    if test "x$arguments" != xEOL; then
33524      new_complete="$new_path ${arguments% *}"
33525    else
33526      new_complete="$new_path"
33527    fi
33528
33529    if test "x$complete" != "x$new_complete"; then
33530      PROPER_COMPILER_CXX="$new_complete"
33531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33532$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33533    fi
33534  fi
33535
33536    PATH="$RETRY_COMPILER_SAVED_PATH"
33537
33538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33539$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33540
33541  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33542    # Follow a chain of symbolic links. Use readlink
33543    # where it exists, else fall back to horribly
33544    # complicated shell code.
33545    if test "x$READLINK_TESTED" != yes; then
33546      # On MacOSX there is a readlink tool with a different
33547      # purpose than the GNU readlink tool. Check the found readlink.
33548      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33549      if test "x$ISGNU" = x; then
33550        # A readlink that we do not know how to use.
33551        # Are there other non-GNU readlinks out there?
33552        READLINK_TESTED=yes
33553        READLINK=
33554      fi
33555    fi
33556
33557    if test "x$READLINK" != x; then
33558      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33559    else
33560      # Save the current directory for restoring afterwards
33561      STARTDIR=$PWD
33562      COUNTER=0
33563      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33564      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33565      cd $sym_link_dir
33566      # Use -P flag to resolve symlinks in directories.
33567      cd `$THEPWDCMD -P`
33568      sym_link_dir=`$THEPWDCMD -P`
33569      # Resolve file symlinks
33570      while test $COUNTER -lt 20; do
33571        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33572        if test "x$ISLINK" == x; then
33573          # This is not a symbolic link! We are done!
33574          break
33575        fi
33576        # Again resolve directory symlinks since the target of the just found
33577        # link could be in a different directory
33578        cd `$DIRNAME $ISLINK`
33579        sym_link_dir=`$THEPWDCMD -P`
33580        sym_link_file=`$BASENAME $ISLINK`
33581        let COUNTER=COUNTER+1
33582      done
33583      cd $STARTDIR
33584      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33585    fi
33586  fi
33587
33588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33589$as_echo "$PROPER_COMPILER_CXX" >&6; }
33590    CXX="$PROPER_COMPILER_CXX"
33591  else
33592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33593$as_echo "no, keeping CXX" >&6; }
33594  fi
33595
33596
33597  COMPILER=$CXX
33598  COMPILER_NAME=$COMPILER_NAME
33599
33600  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33601    # cc -V output typically looks like
33602    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33603    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33604    # Check that this is likely to be the Solaris Studio cc.
33605    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33606    if test $? -ne 0; then
33607      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
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 -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33611$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33612      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33613$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33614      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33615    fi
33616    # Remove usage instructions (if present), and
33617    # collapse compiler output into a single line
33618    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33619        $SED -e 's/ *[Uu]sage:.*//'`
33620    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33621        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33622  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33623    # xlc -qversion output typically looks like
33624    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33625    #     Version: 11.01.0000.0015
33626    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33627    # Check that this is likely to be the IBM XL C compiler.
33628    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33629    if test $? -ne 0; then
33630      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33631      { $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
33632$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33633      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33634$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33635      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33636$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33637      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33638    fi
33639    # Collapse compiler output into a single line
33640    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33641    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33642        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33643  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33644    # There is no specific version flag, but all output starts with a version string.
33645    # First line typically looks something like:
33646    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33647    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33648    # Check that this is likely to be Microsoft CL.EXE.
33649    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33650    if test $? -ne 0; then
33651      { $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
33652$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33653      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33654$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33655      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33656    fi
33657    # Collapse compiler output into a single line
33658    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33659    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33660        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33661  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33662    # gcc --version output typically looks like
33663    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33664    #     Copyright (C) 2013 Free Software Foundation, Inc.
33665    #     This is free software; see the source for copying conditions.  There is NO
33666    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33667    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33668    # Check that this is likely to be GCC.
33669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33670    if test $? -ne 0; then
33671      { $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
33672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33674$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33675      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33676    fi
33677    # Remove Copyright and legalese from version string, and
33678    # collapse into a single line
33679    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33680        $SED -e 's/ *Copyright .*//'`
33681    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33682        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33683  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33684    # clang --version output typically looks like
33685    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33686    #    clang version 3.3 (tags/RELEASE_33/final)
33687    # or
33688    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33689    #    Target: x86_64-pc-linux-gnu
33690    #    Thread model: posix
33691    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33692    # Check that this is likely to be clang
33693    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33694    if test $? -ne 0; then
33695      { $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
33696$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33697      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33698$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33699      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33700    fi
33701    # Collapse compiler output into a single line
33702    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33703    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33704        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33705  else
33706      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33707  fi
33708  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33709  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33710  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33711  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33712
33713  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33714$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33715
33716
33717  # Now that we have resolved CXX ourself, let autoconf have its go at it
33718  ac_ext=cpp
33719ac_cpp='$CXXCPP $CPPFLAGS'
33720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33723if test -z "$CXX"; then
33724  if test -n "$CCC"; then
33725    CXX=$CCC
33726  else
33727    if test -n "$ac_tool_prefix"; then
33728  for ac_prog in $CXX
33729  do
33730    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33733$as_echo_n "checking for $ac_word... " >&6; }
33734if ${ac_cv_prog_CXX+:} false; then :
33735  $as_echo_n "(cached) " >&6
33736else
33737  if test -n "$CXX"; then
33738  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33739else
33740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33741for as_dir in $PATH
33742do
33743  IFS=$as_save_IFS
33744  test -z "$as_dir" && as_dir=.
33745    for ac_exec_ext in '' $ac_executable_extensions; do
33746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33747    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33749    break 2
33750  fi
33751done
33752  done
33753IFS=$as_save_IFS
33754
33755fi
33756fi
33757CXX=$ac_cv_prog_CXX
33758if test -n "$CXX"; then
33759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33760$as_echo "$CXX" >&6; }
33761else
33762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33763$as_echo "no" >&6; }
33764fi
33765
33766
33767    test -n "$CXX" && break
33768  done
33769fi
33770if test -z "$CXX"; then
33771  ac_ct_CXX=$CXX
33772  for ac_prog in $CXX
33773do
33774  # Extract the first word of "$ac_prog", so it can be a program name with args.
33775set dummy $ac_prog; ac_word=$2
33776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33777$as_echo_n "checking for $ac_word... " >&6; }
33778if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33779  $as_echo_n "(cached) " >&6
33780else
33781  if test -n "$ac_ct_CXX"; then
33782  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33783else
33784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33785for as_dir in $PATH
33786do
33787  IFS=$as_save_IFS
33788  test -z "$as_dir" && as_dir=.
33789    for ac_exec_ext in '' $ac_executable_extensions; do
33790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33791    ac_cv_prog_ac_ct_CXX="$ac_prog"
33792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33793    break 2
33794  fi
33795done
33796  done
33797IFS=$as_save_IFS
33798
33799fi
33800fi
33801ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33802if test -n "$ac_ct_CXX"; then
33803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33804$as_echo "$ac_ct_CXX" >&6; }
33805else
33806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33807$as_echo "no" >&6; }
33808fi
33809
33810
33811  test -n "$ac_ct_CXX" && break
33812done
33813
33814  if test "x$ac_ct_CXX" = x; then
33815    CXX="g++"
33816  else
33817    case $cross_compiling:$ac_tool_warned in
33818yes:)
33819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33821ac_tool_warned=yes ;;
33822esac
33823    CXX=$ac_ct_CXX
33824  fi
33825fi
33826
33827  fi
33828fi
33829# Provide some information about the compiler.
33830$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33831set X $ac_compile
33832ac_compiler=$2
33833for ac_option in --version -v -V -qversion; do
33834  { { ac_try="$ac_compiler $ac_option >&5"
33835case "(($ac_try" in
33836  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33837  *) ac_try_echo=$ac_try;;
33838esac
33839eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33840$as_echo "$ac_try_echo"; } >&5
33841  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33842  ac_status=$?
33843  if test -s conftest.err; then
33844    sed '10a\
33845... rest of stderr output deleted ...
33846         10q' conftest.err >conftest.er1
33847    cat conftest.er1 >&5
33848  fi
33849  rm -f conftest.er1 conftest.err
33850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33851  test $ac_status = 0; }
33852done
33853
33854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33855$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33856if ${ac_cv_cxx_compiler_gnu+:} false; then :
33857  $as_echo_n "(cached) " >&6
33858else
33859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33860/* end confdefs.h.  */
33861
33862int
33863main ()
33864{
33865#ifndef __GNUC__
33866       choke me
33867#endif
33868
33869  ;
33870  return 0;
33871}
33872_ACEOF
33873if ac_fn_cxx_try_compile "$LINENO"; then :
33874  ac_compiler_gnu=yes
33875else
33876  ac_compiler_gnu=no
33877fi
33878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33879ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33880
33881fi
33882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33883$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33884if test $ac_compiler_gnu = yes; then
33885  GXX=yes
33886else
33887  GXX=
33888fi
33889ac_test_CXXFLAGS=${CXXFLAGS+set}
33890ac_save_CXXFLAGS=$CXXFLAGS
33891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33892$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33893if ${ac_cv_prog_cxx_g+:} false; then :
33894  $as_echo_n "(cached) " >&6
33895else
33896  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33897   ac_cxx_werror_flag=yes
33898   ac_cv_prog_cxx_g=no
33899   CXXFLAGS="-g"
33900   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33901/* end confdefs.h.  */
33902
33903int
33904main ()
33905{
33906
33907  ;
33908  return 0;
33909}
33910_ACEOF
33911if ac_fn_cxx_try_compile "$LINENO"; then :
33912  ac_cv_prog_cxx_g=yes
33913else
33914  CXXFLAGS=""
33915      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33916/* end confdefs.h.  */
33917
33918int
33919main ()
33920{
33921
33922  ;
33923  return 0;
33924}
33925_ACEOF
33926if ac_fn_cxx_try_compile "$LINENO"; then :
33927
33928else
33929  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33930	 CXXFLAGS="-g"
33931	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33932/* end confdefs.h.  */
33933
33934int
33935main ()
33936{
33937
33938  ;
33939  return 0;
33940}
33941_ACEOF
33942if ac_fn_cxx_try_compile "$LINENO"; then :
33943  ac_cv_prog_cxx_g=yes
33944fi
33945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33946fi
33947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33948fi
33949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33950   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33951fi
33952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33953$as_echo "$ac_cv_prog_cxx_g" >&6; }
33954if test "$ac_test_CXXFLAGS" = set; then
33955  CXXFLAGS=$ac_save_CXXFLAGS
33956elif test $ac_cv_prog_cxx_g = yes; then
33957  if test "$GXX" = yes; then
33958    CXXFLAGS="-g -O2"
33959  else
33960    CXXFLAGS="-g"
33961  fi
33962else
33963  if test "$GXX" = yes; then
33964    CXXFLAGS="-O2"
33965  else
33966    CXXFLAGS=
33967  fi
33968fi
33969ac_ext=cpp
33970ac_cpp='$CXXCPP $CPPFLAGS'
33971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33974
33975
33976  #
33977  # Setup the preprocessor (CPP and CXXCPP)
33978  #
33979  ac_ext=c
33980ac_cpp='$CPP $CPPFLAGS'
33981ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33982ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33983ac_compiler_gnu=$ac_cv_c_compiler_gnu
33984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33985$as_echo_n "checking how to run the C preprocessor... " >&6; }
33986# On Suns, sometimes $CPP names a directory.
33987if test -n "$CPP" && test -d "$CPP"; then
33988  CPP=
33989fi
33990if test -z "$CPP"; then
33991  if ${ac_cv_prog_CPP+:} false; then :
33992  $as_echo_n "(cached) " >&6
33993else
33994      # Double quotes because CPP needs to be expanded
33995    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33996    do
33997      ac_preproc_ok=false
33998for ac_c_preproc_warn_flag in '' yes
33999do
34000  # Use a header file that comes with gcc, so configuring glibc
34001  # with a fresh cross-compiler works.
34002  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34003  # <limits.h> exists even on freestanding compilers.
34004  # On the NeXT, cc -E runs the code through the compiler's parser,
34005  # not just through cpp. "Syntax error" is here to catch this case.
34006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34007/* end confdefs.h.  */
34008#ifdef __STDC__
34009# include <limits.h>
34010#else
34011# include <assert.h>
34012#endif
34013		     Syntax error
34014_ACEOF
34015if ac_fn_c_try_cpp "$LINENO"; then :
34016
34017else
34018  # Broken: fails on valid input.
34019continue
34020fi
34021rm -f conftest.err conftest.i conftest.$ac_ext
34022
34023  # OK, works on sane cases.  Now check whether nonexistent headers
34024  # can be detected and how.
34025  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34026/* end confdefs.h.  */
34027#include <ac_nonexistent.h>
34028_ACEOF
34029if ac_fn_c_try_cpp "$LINENO"; then :
34030  # Broken: success on invalid input.
34031continue
34032else
34033  # Passes both tests.
34034ac_preproc_ok=:
34035break
34036fi
34037rm -f conftest.err conftest.i conftest.$ac_ext
34038
34039done
34040# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34041rm -f conftest.i conftest.err conftest.$ac_ext
34042if $ac_preproc_ok; then :
34043  break
34044fi
34045
34046    done
34047    ac_cv_prog_CPP=$CPP
34048
34049fi
34050  CPP=$ac_cv_prog_CPP
34051else
34052  ac_cv_prog_CPP=$CPP
34053fi
34054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34055$as_echo "$CPP" >&6; }
34056ac_preproc_ok=false
34057for ac_c_preproc_warn_flag in '' yes
34058do
34059  # Use a header file that comes with gcc, so configuring glibc
34060  # with a fresh cross-compiler works.
34061  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34062  # <limits.h> exists even on freestanding compilers.
34063  # On the NeXT, cc -E runs the code through the compiler's parser,
34064  # not just through cpp. "Syntax error" is here to catch this case.
34065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34066/* end confdefs.h.  */
34067#ifdef __STDC__
34068# include <limits.h>
34069#else
34070# include <assert.h>
34071#endif
34072		     Syntax error
34073_ACEOF
34074if ac_fn_c_try_cpp "$LINENO"; then :
34075
34076else
34077  # Broken: fails on valid input.
34078continue
34079fi
34080rm -f conftest.err conftest.i conftest.$ac_ext
34081
34082  # OK, works on sane cases.  Now check whether nonexistent headers
34083  # can be detected and how.
34084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34085/* end confdefs.h.  */
34086#include <ac_nonexistent.h>
34087_ACEOF
34088if ac_fn_c_try_cpp "$LINENO"; then :
34089  # Broken: success on invalid input.
34090continue
34091else
34092  # Passes both tests.
34093ac_preproc_ok=:
34094break
34095fi
34096rm -f conftest.err conftest.i conftest.$ac_ext
34097
34098done
34099# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34100rm -f conftest.i conftest.err conftest.$ac_ext
34101if $ac_preproc_ok; then :
34102
34103else
34104  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34106as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34107See \`config.log' for more details" "$LINENO" 5; }
34108fi
34109
34110ac_ext=cpp
34111ac_cpp='$CXXCPP $CPPFLAGS'
34112ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34113ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34114ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34115
34116
34117  # Only process if variable expands to non-empty
34118
34119  if test "x$CPP" != x; then
34120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34121
34122  # First separate the path from the arguments. This will split at the first
34123  # space.
34124  complete="$CPP"
34125  path="${complete%% *}"
34126  tmp="$complete EOL"
34127  arguments="${tmp#* }"
34128
34129  # Input might be given as Windows format, start by converting to
34130  # unix format.
34131  new_path=`$CYGPATH -u "$path"`
34132
34133  # Now try to locate executable using which
34134  new_path=`$WHICH "$new_path" 2> /dev/null`
34135  # bat and cmd files are not always considered executable in cygwin causing which
34136  # to not find them
34137  if test "x$new_path" = x \
34138      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34139      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34140    new_path=`$CYGPATH -u "$path"`
34141  fi
34142  if test "x$new_path" = x; then
34143    # Oops. Which didn't find the executable.
34144    # The splitting of arguments from the executable at a space might have been incorrect,
34145    # since paths with space are more likely in Windows. Give it another try with the whole
34146    # argument.
34147    path="$complete"
34148    arguments="EOL"
34149    new_path=`$CYGPATH -u "$path"`
34150    new_path=`$WHICH "$new_path" 2> /dev/null`
34151    # bat and cmd files are not always considered executable in cygwin causing which
34152    # to not find them
34153    if test "x$new_path" = x \
34154        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34155        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34156      new_path=`$CYGPATH -u "$path"`
34157    fi
34158    if test "x$new_path" = x; then
34159      # It's still not found. Now this is an unrecoverable error.
34160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34161$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34162      has_space=`$ECHO "$complete" | $GREP " "`
34163      if test "x$has_space" != x; then
34164        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34165$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34166      fi
34167      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34168    fi
34169  fi
34170
34171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34174  # "foo.exe" is OK but "foo" is an error.
34175  #
34176  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34177  # It is also a way to make sure we got the proper file name for the real test later on.
34178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34179  if test "x$test_shortpath" = x; then
34180    # Short path failed, file does not exist as specified.
34181    # Try adding .exe or .cmd
34182    if test -f "${new_path}.exe"; then
34183      input_to_shortpath="${new_path}.exe"
34184    elif test -f "${new_path}.cmd"; then
34185      input_to_shortpath="${new_path}.cmd"
34186    else
34187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34188$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34189      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34190$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34191      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34192    fi
34193  else
34194    input_to_shortpath="$new_path"
34195  fi
34196
34197  # Call helper function which possibly converts this using DOS-style short mode.
34198  # If so, the updated path is stored in $new_path.
34199  new_path="$input_to_shortpath"
34200
34201  input_path="$input_to_shortpath"
34202  # Check if we need to convert this using DOS-style short mode. If the path
34203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34204  # take no chances and rewrite it.
34205  # Note: m4 eats our [], so we need to use [ and ] instead.
34206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34207  if test "x$has_forbidden_chars" != x; then
34208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34212      # Going to short mode and back again did indeed matter. Since short mode is
34213      # case insensitive, let's make it lowercase to improve readability.
34214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34215      # Now convert it back to Unix-style (cygpath)
34216      input_path=`$CYGPATH -u "$shortmode_path"`
34217      new_path="$input_path"
34218    fi
34219  fi
34220
34221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34222  if test "x$test_cygdrive_prefix" = x; then
34223    # As a simple fix, exclude /usr/bin since it's not a real path.
34224    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34226      # a path prefixed by /cygdrive for fixpath to work.
34227      new_path="$CYGWIN_ROOT_PATH$input_path"
34228    fi
34229  fi
34230
34231  # remove trailing .exe if any
34232  new_path="${new_path/%.exe/}"
34233
34234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34235
34236  # First separate the path from the arguments. This will split at the first
34237  # space.
34238  complete="$CPP"
34239  path="${complete%% *}"
34240  tmp="$complete EOL"
34241  arguments="${tmp#* }"
34242
34243  # Input might be given as Windows format, start by converting to
34244  # unix format.
34245  new_path="$path"
34246
34247  windows_path="$new_path"
34248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34249    unix_path=`$CYGPATH -u "$windows_path"`
34250    new_path="$unix_path"
34251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34253    new_path="$unix_path"
34254  fi
34255
34256
34257  # Now try to locate executable using which
34258  new_path=`$WHICH "$new_path" 2> /dev/null`
34259
34260  if test "x$new_path" = x; then
34261    # Oops. Which didn't find the executable.
34262    # The splitting of arguments from the executable at a space might have been incorrect,
34263    # since paths with space are more likely in Windows. Give it another try with the whole
34264    # argument.
34265    path="$complete"
34266    arguments="EOL"
34267    new_path="$path"
34268
34269  windows_path="$new_path"
34270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34271    unix_path=`$CYGPATH -u "$windows_path"`
34272    new_path="$unix_path"
34273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34275    new_path="$unix_path"
34276  fi
34277
34278
34279    new_path=`$WHICH "$new_path" 2> /dev/null`
34280    # bat and cmd files are not always considered executable in MSYS causing which
34281    # to not find them
34282    if test "x$new_path" = x \
34283        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34284        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34285      new_path="$path"
34286
34287  windows_path="$new_path"
34288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34289    unix_path=`$CYGPATH -u "$windows_path"`
34290    new_path="$unix_path"
34291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34293    new_path="$unix_path"
34294  fi
34295
34296    fi
34297
34298    if test "x$new_path" = x; then
34299      # It's still not found. Now this is an unrecoverable error.
34300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34301$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34302      has_space=`$ECHO "$complete" | $GREP " "`
34303      if test "x$has_space" != x; then
34304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34306      fi
34307      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34308    fi
34309  fi
34310
34311  # Now new_path has a complete unix path to the binary
34312  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34313    # Keep paths in /bin as-is, but remove trailing .exe if any
34314    new_path="${new_path/%.exe/}"
34315    # Do not save /bin paths to all_fixpath_prefixes!
34316  else
34317    # Not in mixed or Windows style, start by that.
34318    new_path=`cmd //c echo $new_path`
34319
34320  input_path="$new_path"
34321  # Check if we need to convert this using DOS-style short mode. If the path
34322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34323  # take no chances and rewrite it.
34324  # Note: m4 eats our [], so we need to use [ and ] instead.
34325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34326  if test "x$has_forbidden_chars" != x; then
34327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34329  fi
34330
34331    # Output is in $new_path
34332
34333  windows_path="$new_path"
34334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34335    unix_path=`$CYGPATH -u "$windows_path"`
34336    new_path="$unix_path"
34337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34339    new_path="$unix_path"
34340  fi
34341
34342    # remove trailing .exe if any
34343    new_path="${new_path/%.exe/}"
34344
34345    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34346    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34347  fi
34348
34349    else
34350      # We're on a unix platform. Hooray! :)
34351      # First separate the path from the arguments. This will split at the first
34352      # space.
34353      complete="$CPP"
34354      path="${complete%% *}"
34355      tmp="$complete EOL"
34356      arguments="${tmp#* }"
34357
34358      # Cannot rely on the command "which" here since it doesn't always work.
34359      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34360      if test -z "$is_absolute_path"; then
34361        # Path to executable is not absolute. Find it.
34362        IFS_save="$IFS"
34363        IFS=:
34364        for p in $PATH; do
34365          if test -f "$p/$path" && test -x "$p/$path"; then
34366            new_path="$p/$path"
34367            break
34368          fi
34369        done
34370        IFS="$IFS_save"
34371      else
34372        # This is an absolute path, we can use it without further modifications.
34373        new_path="$path"
34374      fi
34375
34376      if test "x$new_path" = x; then
34377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34378$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34379        has_space=`$ECHO "$complete" | $GREP " "`
34380        if test "x$has_space" != x; then
34381          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34382$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34383        fi
34384        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34385      fi
34386    fi
34387
34388    # Now join together the path and the arguments once again
34389    if test "x$arguments" != xEOL; then
34390      new_complete="$new_path ${arguments% *}"
34391    else
34392      new_complete="$new_path"
34393    fi
34394
34395    if test "x$complete" != "x$new_complete"; then
34396      CPP="$new_complete"
34397      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34398$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34399    fi
34400  fi
34401
34402  ac_ext=cpp
34403ac_cpp='$CXXCPP $CPPFLAGS'
34404ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34405ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34406ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34408$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34409if test -z "$CXXCPP"; then
34410  if ${ac_cv_prog_CXXCPP+:} false; then :
34411  $as_echo_n "(cached) " >&6
34412else
34413      # Double quotes because CXXCPP needs to be expanded
34414    for CXXCPP in "$CXX -E" "/lib/cpp"
34415    do
34416      ac_preproc_ok=false
34417for ac_cxx_preproc_warn_flag in '' yes
34418do
34419  # Use a header file that comes with gcc, so configuring glibc
34420  # with a fresh cross-compiler works.
34421  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34422  # <limits.h> exists even on freestanding compilers.
34423  # On the NeXT, cc -E runs the code through the compiler's parser,
34424  # not just through cpp. "Syntax error" is here to catch this case.
34425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34426/* end confdefs.h.  */
34427#ifdef __STDC__
34428# include <limits.h>
34429#else
34430# include <assert.h>
34431#endif
34432		     Syntax error
34433_ACEOF
34434if ac_fn_cxx_try_cpp "$LINENO"; then :
34435
34436else
34437  # Broken: fails on valid input.
34438continue
34439fi
34440rm -f conftest.err conftest.i conftest.$ac_ext
34441
34442  # OK, works on sane cases.  Now check whether nonexistent headers
34443  # can be detected and how.
34444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34445/* end confdefs.h.  */
34446#include <ac_nonexistent.h>
34447_ACEOF
34448if ac_fn_cxx_try_cpp "$LINENO"; then :
34449  # Broken: success on invalid input.
34450continue
34451else
34452  # Passes both tests.
34453ac_preproc_ok=:
34454break
34455fi
34456rm -f conftest.err conftest.i conftest.$ac_ext
34457
34458done
34459# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34460rm -f conftest.i conftest.err conftest.$ac_ext
34461if $ac_preproc_ok; then :
34462  break
34463fi
34464
34465    done
34466    ac_cv_prog_CXXCPP=$CXXCPP
34467
34468fi
34469  CXXCPP=$ac_cv_prog_CXXCPP
34470else
34471  ac_cv_prog_CXXCPP=$CXXCPP
34472fi
34473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34474$as_echo "$CXXCPP" >&6; }
34475ac_preproc_ok=false
34476for ac_cxx_preproc_warn_flag in '' yes
34477do
34478  # Use a header file that comes with gcc, so configuring glibc
34479  # with a fresh cross-compiler works.
34480  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34481  # <limits.h> exists even on freestanding compilers.
34482  # On the NeXT, cc -E runs the code through the compiler's parser,
34483  # not just through cpp. "Syntax error" is here to catch this case.
34484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34485/* end confdefs.h.  */
34486#ifdef __STDC__
34487# include <limits.h>
34488#else
34489# include <assert.h>
34490#endif
34491		     Syntax error
34492_ACEOF
34493if ac_fn_cxx_try_cpp "$LINENO"; then :
34494
34495else
34496  # Broken: fails on valid input.
34497continue
34498fi
34499rm -f conftest.err conftest.i conftest.$ac_ext
34500
34501  # OK, works on sane cases.  Now check whether nonexistent headers
34502  # can be detected and how.
34503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34504/* end confdefs.h.  */
34505#include <ac_nonexistent.h>
34506_ACEOF
34507if ac_fn_cxx_try_cpp "$LINENO"; then :
34508  # Broken: success on invalid input.
34509continue
34510else
34511  # Passes both tests.
34512ac_preproc_ok=:
34513break
34514fi
34515rm -f conftest.err conftest.i conftest.$ac_ext
34516
34517done
34518# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34519rm -f conftest.i conftest.err conftest.$ac_ext
34520if $ac_preproc_ok; then :
34521
34522else
34523  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34525as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34526See \`config.log' for more details" "$LINENO" 5; }
34527fi
34528
34529ac_ext=cpp
34530ac_cpp='$CXXCPP $CPPFLAGS'
34531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34534
34535
34536  # Only process if variable expands to non-empty
34537
34538  if test "x$CXXCPP" != x; then
34539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34540
34541  # First separate the path from the arguments. This will split at the first
34542  # space.
34543  complete="$CXXCPP"
34544  path="${complete%% *}"
34545  tmp="$complete EOL"
34546  arguments="${tmp#* }"
34547
34548  # Input might be given as Windows format, start by converting to
34549  # unix format.
34550  new_path=`$CYGPATH -u "$path"`
34551
34552  # Now try to locate executable using which
34553  new_path=`$WHICH "$new_path" 2> /dev/null`
34554  # bat and cmd files are not always considered executable in cygwin causing which
34555  # to not find them
34556  if test "x$new_path" = x \
34557      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34558      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34559    new_path=`$CYGPATH -u "$path"`
34560  fi
34561  if test "x$new_path" = x; then
34562    # Oops. Which didn't find the executable.
34563    # The splitting of arguments from the executable at a space might have been incorrect,
34564    # since paths with space are more likely in Windows. Give it another try with the whole
34565    # argument.
34566    path="$complete"
34567    arguments="EOL"
34568    new_path=`$CYGPATH -u "$path"`
34569    new_path=`$WHICH "$new_path" 2> /dev/null`
34570    # bat and cmd files are not always considered executable in cygwin causing which
34571    # to not find them
34572    if test "x$new_path" = x \
34573        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34574        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34575      new_path=`$CYGPATH -u "$path"`
34576    fi
34577    if test "x$new_path" = x; then
34578      # It's still not found. Now this is an unrecoverable error.
34579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34580$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34581      has_space=`$ECHO "$complete" | $GREP " "`
34582      if test "x$has_space" != x; then
34583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34585      fi
34586      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34587    fi
34588  fi
34589
34590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34593  # "foo.exe" is OK but "foo" is an error.
34594  #
34595  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34596  # It is also a way to make sure we got the proper file name for the real test later on.
34597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34598  if test "x$test_shortpath" = x; then
34599    # Short path failed, file does not exist as specified.
34600    # Try adding .exe or .cmd
34601    if test -f "${new_path}.exe"; then
34602      input_to_shortpath="${new_path}.exe"
34603    elif test -f "${new_path}.cmd"; then
34604      input_to_shortpath="${new_path}.cmd"
34605    else
34606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34607$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34608      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34609$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34610      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34611    fi
34612  else
34613    input_to_shortpath="$new_path"
34614  fi
34615
34616  # Call helper function which possibly converts this using DOS-style short mode.
34617  # If so, the updated path is stored in $new_path.
34618  new_path="$input_to_shortpath"
34619
34620  input_path="$input_to_shortpath"
34621  # Check if we need to convert this using DOS-style short mode. If the path
34622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34623  # take no chances and rewrite it.
34624  # Note: m4 eats our [], so we need to use [ and ] instead.
34625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34626  if test "x$has_forbidden_chars" != x; then
34627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34631      # Going to short mode and back again did indeed matter. Since short mode is
34632      # case insensitive, let's make it lowercase to improve readability.
34633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34634      # Now convert it back to Unix-style (cygpath)
34635      input_path=`$CYGPATH -u "$shortmode_path"`
34636      new_path="$input_path"
34637    fi
34638  fi
34639
34640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34641  if test "x$test_cygdrive_prefix" = x; then
34642    # As a simple fix, exclude /usr/bin since it's not a real path.
34643    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34645      # a path prefixed by /cygdrive for fixpath to work.
34646      new_path="$CYGWIN_ROOT_PATH$input_path"
34647    fi
34648  fi
34649
34650  # remove trailing .exe if any
34651  new_path="${new_path/%.exe/}"
34652
34653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34654
34655  # First separate the path from the arguments. This will split at the first
34656  # space.
34657  complete="$CXXCPP"
34658  path="${complete%% *}"
34659  tmp="$complete EOL"
34660  arguments="${tmp#* }"
34661
34662  # Input might be given as Windows format, start by converting to
34663  # unix format.
34664  new_path="$path"
34665
34666  windows_path="$new_path"
34667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34668    unix_path=`$CYGPATH -u "$windows_path"`
34669    new_path="$unix_path"
34670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34672    new_path="$unix_path"
34673  fi
34674
34675
34676  # Now try to locate executable using which
34677  new_path=`$WHICH "$new_path" 2> /dev/null`
34678
34679  if test "x$new_path" = x; then
34680    # Oops. Which didn't find the executable.
34681    # The splitting of arguments from the executable at a space might have been incorrect,
34682    # since paths with space are more likely in Windows. Give it another try with the whole
34683    # argument.
34684    path="$complete"
34685    arguments="EOL"
34686    new_path="$path"
34687
34688  windows_path="$new_path"
34689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34690    unix_path=`$CYGPATH -u "$windows_path"`
34691    new_path="$unix_path"
34692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34694    new_path="$unix_path"
34695  fi
34696
34697
34698    new_path=`$WHICH "$new_path" 2> /dev/null`
34699    # bat and cmd files are not always considered executable in MSYS causing which
34700    # to not find them
34701    if test "x$new_path" = x \
34702        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34703        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34704      new_path="$path"
34705
34706  windows_path="$new_path"
34707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34708    unix_path=`$CYGPATH -u "$windows_path"`
34709    new_path="$unix_path"
34710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34712    new_path="$unix_path"
34713  fi
34714
34715    fi
34716
34717    if test "x$new_path" = x; then
34718      # It's still not found. Now this is an unrecoverable error.
34719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34720$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34721      has_space=`$ECHO "$complete" | $GREP " "`
34722      if test "x$has_space" != x; then
34723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34725      fi
34726      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34727    fi
34728  fi
34729
34730  # Now new_path has a complete unix path to the binary
34731  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34732    # Keep paths in /bin as-is, but remove trailing .exe if any
34733    new_path="${new_path/%.exe/}"
34734    # Do not save /bin paths to all_fixpath_prefixes!
34735  else
34736    # Not in mixed or Windows style, start by that.
34737    new_path=`cmd //c echo $new_path`
34738
34739  input_path="$new_path"
34740  # Check if we need to convert this using DOS-style short mode. If the path
34741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34742  # take no chances and rewrite it.
34743  # Note: m4 eats our [], so we need to use [ and ] instead.
34744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34745  if test "x$has_forbidden_chars" != x; then
34746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34748  fi
34749
34750    # Output is in $new_path
34751
34752  windows_path="$new_path"
34753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34754    unix_path=`$CYGPATH -u "$windows_path"`
34755    new_path="$unix_path"
34756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34758    new_path="$unix_path"
34759  fi
34760
34761    # remove trailing .exe if any
34762    new_path="${new_path/%.exe/}"
34763
34764    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34765    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34766  fi
34767
34768    else
34769      # We're on a unix platform. Hooray! :)
34770      # First separate the path from the arguments. This will split at the first
34771      # space.
34772      complete="$CXXCPP"
34773      path="${complete%% *}"
34774      tmp="$complete EOL"
34775      arguments="${tmp#* }"
34776
34777      # Cannot rely on the command "which" here since it doesn't always work.
34778      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34779      if test -z "$is_absolute_path"; then
34780        # Path to executable is not absolute. Find it.
34781        IFS_save="$IFS"
34782        IFS=:
34783        for p in $PATH; do
34784          if test -f "$p/$path" && test -x "$p/$path"; then
34785            new_path="$p/$path"
34786            break
34787          fi
34788        done
34789        IFS="$IFS_save"
34790      else
34791        # This is an absolute path, we can use it without further modifications.
34792        new_path="$path"
34793      fi
34794
34795      if test "x$new_path" = x; then
34796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34797$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34798        has_space=`$ECHO "$complete" | $GREP " "`
34799        if test "x$has_space" != x; then
34800          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34801$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34802        fi
34803        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34804      fi
34805    fi
34806
34807    # Now join together the path and the arguments once again
34808    if test "x$arguments" != xEOL; then
34809      new_complete="$new_path ${arguments% *}"
34810    else
34811      new_complete="$new_path"
34812    fi
34813
34814    if test "x$complete" != "x$new_complete"; then
34815      CXXCPP="$new_complete"
34816      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34817$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34818    fi
34819  fi
34820
34821
34822  #
34823  # Setup the linker (LD)
34824  #
34825  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34826    # In the Microsoft toolchain we have a separate LD command "link".
34827    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34828    # a cygwin program for something completely different.
34829    # Extract the first word of "link", so it can be a program name with args.
34830set dummy link; ac_word=$2
34831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34832$as_echo_n "checking for $ac_word... " >&6; }
34833if ${ac_cv_prog_LD+:} false; then :
34834  $as_echo_n "(cached) " >&6
34835else
34836  if test -n "$LD"; then
34837  ac_cv_prog_LD="$LD" # Let the user override the test.
34838else
34839  ac_prog_rejected=no
34840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34841for as_dir in $PATH
34842do
34843  IFS=$as_save_IFS
34844  test -z "$as_dir" && as_dir=.
34845    for ac_exec_ext in '' $ac_executable_extensions; do
34846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34847    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34848       ac_prog_rejected=yes
34849       continue
34850     fi
34851    ac_cv_prog_LD="link"
34852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34853    break 2
34854  fi
34855done
34856  done
34857IFS=$as_save_IFS
34858
34859if test $ac_prog_rejected = yes; then
34860  # We found a bogon in the path, so make sure we never use it.
34861  set dummy $ac_cv_prog_LD
34862  shift
34863  if test $# != 0; then
34864    # We chose a different compiler from the bogus one.
34865    # However, it has the same basename, so the bogon will be chosen
34866    # first if we set LD to just the basename; use the full file name.
34867    shift
34868    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34869  fi
34870fi
34871fi
34872fi
34873LD=$ac_cv_prog_LD
34874if test -n "$LD"; then
34875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34876$as_echo "$LD" >&6; }
34877else
34878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34879$as_echo "no" >&6; }
34880fi
34881
34882
34883
34884  # Only process if variable expands to non-empty
34885
34886  if test "x$LD" != x; then
34887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34888
34889  # First separate the path from the arguments. This will split at the first
34890  # space.
34891  complete="$LD"
34892  path="${complete%% *}"
34893  tmp="$complete EOL"
34894  arguments="${tmp#* }"
34895
34896  # Input might be given as Windows format, start by converting to
34897  # unix format.
34898  new_path=`$CYGPATH -u "$path"`
34899
34900  # Now try to locate executable using which
34901  new_path=`$WHICH "$new_path" 2> /dev/null`
34902  # bat and cmd files are not always considered executable in cygwin causing which
34903  # to not find them
34904  if test "x$new_path" = x \
34905      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34906      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34907    new_path=`$CYGPATH -u "$path"`
34908  fi
34909  if test "x$new_path" = x; then
34910    # Oops. Which didn't find the executable.
34911    # The splitting of arguments from the executable at a space might have been incorrect,
34912    # since paths with space are more likely in Windows. Give it another try with the whole
34913    # argument.
34914    path="$complete"
34915    arguments="EOL"
34916    new_path=`$CYGPATH -u "$path"`
34917    new_path=`$WHICH "$new_path" 2> /dev/null`
34918    # bat and cmd files are not always considered executable in cygwin causing which
34919    # to not find them
34920    if test "x$new_path" = x \
34921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34923      new_path=`$CYGPATH -u "$path"`
34924    fi
34925    if test "x$new_path" = x; then
34926      # It's still not found. Now this is an unrecoverable error.
34927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34928$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34929      has_space=`$ECHO "$complete" | $GREP " "`
34930      if test "x$has_space" != x; then
34931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34933      fi
34934      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34935    fi
34936  fi
34937
34938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34941  # "foo.exe" is OK but "foo" is an error.
34942  #
34943  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34944  # It is also a way to make sure we got the proper file name for the real test later on.
34945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34946  if test "x$test_shortpath" = x; then
34947    # Short path failed, file does not exist as specified.
34948    # Try adding .exe or .cmd
34949    if test -f "${new_path}.exe"; then
34950      input_to_shortpath="${new_path}.exe"
34951    elif test -f "${new_path}.cmd"; then
34952      input_to_shortpath="${new_path}.cmd"
34953    else
34954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34955$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34958      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34959    fi
34960  else
34961    input_to_shortpath="$new_path"
34962  fi
34963
34964  # Call helper function which possibly converts this using DOS-style short mode.
34965  # If so, the updated path is stored in $new_path.
34966  new_path="$input_to_shortpath"
34967
34968  input_path="$input_to_shortpath"
34969  # Check if we need to convert this using DOS-style short mode. If the path
34970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34971  # take no chances and rewrite it.
34972  # Note: m4 eats our [], so we need to use [ and ] instead.
34973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34974  if test "x$has_forbidden_chars" != x; then
34975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34979      # Going to short mode and back again did indeed matter. Since short mode is
34980      # case insensitive, let's make it lowercase to improve readability.
34981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34982      # Now convert it back to Unix-style (cygpath)
34983      input_path=`$CYGPATH -u "$shortmode_path"`
34984      new_path="$input_path"
34985    fi
34986  fi
34987
34988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34989  if test "x$test_cygdrive_prefix" = x; then
34990    # As a simple fix, exclude /usr/bin since it's not a real path.
34991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34993      # a path prefixed by /cygdrive for fixpath to work.
34994      new_path="$CYGWIN_ROOT_PATH$input_path"
34995    fi
34996  fi
34997
34998  # remove trailing .exe if any
34999  new_path="${new_path/%.exe/}"
35000
35001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35002
35003  # First separate the path from the arguments. This will split at the first
35004  # space.
35005  complete="$LD"
35006  path="${complete%% *}"
35007  tmp="$complete EOL"
35008  arguments="${tmp#* }"
35009
35010  # Input might be given as Windows format, start by converting to
35011  # unix format.
35012  new_path="$path"
35013
35014  windows_path="$new_path"
35015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35016    unix_path=`$CYGPATH -u "$windows_path"`
35017    new_path="$unix_path"
35018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35020    new_path="$unix_path"
35021  fi
35022
35023
35024  # Now try to locate executable using which
35025  new_path=`$WHICH "$new_path" 2> /dev/null`
35026
35027  if test "x$new_path" = x; then
35028    # Oops. Which didn't find the executable.
35029    # The splitting of arguments from the executable at a space might have been incorrect,
35030    # since paths with space are more likely in Windows. Give it another try with the whole
35031    # argument.
35032    path="$complete"
35033    arguments="EOL"
35034    new_path="$path"
35035
35036  windows_path="$new_path"
35037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35038    unix_path=`$CYGPATH -u "$windows_path"`
35039    new_path="$unix_path"
35040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35042    new_path="$unix_path"
35043  fi
35044
35045
35046    new_path=`$WHICH "$new_path" 2> /dev/null`
35047    # bat and cmd files are not always considered executable in MSYS causing which
35048    # to not find them
35049    if test "x$new_path" = x \
35050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35052      new_path="$path"
35053
35054  windows_path="$new_path"
35055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35056    unix_path=`$CYGPATH -u "$windows_path"`
35057    new_path="$unix_path"
35058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35060    new_path="$unix_path"
35061  fi
35062
35063    fi
35064
35065    if test "x$new_path" = x; then
35066      # It's still not found. Now this is an unrecoverable error.
35067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35068$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35069      has_space=`$ECHO "$complete" | $GREP " "`
35070      if test "x$has_space" != x; then
35071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35073      fi
35074      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35075    fi
35076  fi
35077
35078  # Now new_path has a complete unix path to the binary
35079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35080    # Keep paths in /bin as-is, but remove trailing .exe if any
35081    new_path="${new_path/%.exe/}"
35082    # Do not save /bin paths to all_fixpath_prefixes!
35083  else
35084    # Not in mixed or Windows style, start by that.
35085    new_path=`cmd //c echo $new_path`
35086
35087  input_path="$new_path"
35088  # Check if we need to convert this using DOS-style short mode. If the path
35089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35090  # take no chances and rewrite it.
35091  # Note: m4 eats our [], so we need to use [ and ] instead.
35092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35093  if test "x$has_forbidden_chars" != x; then
35094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35096  fi
35097
35098    # Output is in $new_path
35099
35100  windows_path="$new_path"
35101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35102    unix_path=`$CYGPATH -u "$windows_path"`
35103    new_path="$unix_path"
35104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35106    new_path="$unix_path"
35107  fi
35108
35109    # remove trailing .exe if any
35110    new_path="${new_path/%.exe/}"
35111
35112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35114  fi
35115
35116    else
35117      # We're on a unix platform. Hooray! :)
35118      # First separate the path from the arguments. This will split at the first
35119      # space.
35120      complete="$LD"
35121      path="${complete%% *}"
35122      tmp="$complete EOL"
35123      arguments="${tmp#* }"
35124
35125      # Cannot rely on the command "which" here since it doesn't always work.
35126      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35127      if test -z "$is_absolute_path"; then
35128        # Path to executable is not absolute. Find it.
35129        IFS_save="$IFS"
35130        IFS=:
35131        for p in $PATH; do
35132          if test -f "$p/$path" && test -x "$p/$path"; then
35133            new_path="$p/$path"
35134            break
35135          fi
35136        done
35137        IFS="$IFS_save"
35138      else
35139        # This is an absolute path, we can use it without further modifications.
35140        new_path="$path"
35141      fi
35142
35143      if test "x$new_path" = x; then
35144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35145$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35146        has_space=`$ECHO "$complete" | $GREP " "`
35147        if test "x$has_space" != x; then
35148          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35149$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35150        fi
35151        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35152      fi
35153    fi
35154
35155    # Now join together the path and the arguments once again
35156    if test "x$arguments" != xEOL; then
35157      new_complete="$new_path ${arguments% *}"
35158    else
35159      new_complete="$new_path"
35160    fi
35161
35162    if test "x$complete" != "x$new_complete"; then
35163      LD="$new_complete"
35164      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35165$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35166    fi
35167  fi
35168
35169    # Verify that we indeed succeeded with this trick.
35170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35171$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35172    "$LD" --version > /dev/null
35173    if test $? -eq 0 ; then
35174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35175$as_echo "no" >&6; }
35176      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35177    else
35178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35179$as_echo "yes" >&6; }
35180    fi
35181    LDCXX="$LD"
35182  else
35183    # All other toolchains use the compiler to link.
35184    LD="$CC"
35185    LDCXX="$CXX"
35186  fi
35187
35188  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35189
35190
35191  #
35192  # Setup the assembler (AS)
35193  #
35194  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35195    # FIXME: should this really be solaris, or solstudio?
35196
35197
35198  # Publish this variable in the help.
35199
35200
35201  if [ -z "${AS+x}" ]; then
35202    # The variable is not set by user, try to locate tool using the code snippet
35203    for ac_prog in as
35204do
35205  # Extract the first word of "$ac_prog", so it can be a program name with args.
35206set dummy $ac_prog; ac_word=$2
35207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35208$as_echo_n "checking for $ac_word... " >&6; }
35209if ${ac_cv_path_AS+:} false; then :
35210  $as_echo_n "(cached) " >&6
35211else
35212  case $AS in
35213  [\\/]* | ?:[\\/]*)
35214  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35215  ;;
35216  *)
35217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35218for as_dir in $PATH
35219do
35220  IFS=$as_save_IFS
35221  test -z "$as_dir" && as_dir=.
35222    for ac_exec_ext in '' $ac_executable_extensions; do
35223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35224    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35226    break 2
35227  fi
35228done
35229  done
35230IFS=$as_save_IFS
35231
35232  ;;
35233esac
35234fi
35235AS=$ac_cv_path_AS
35236if test -n "$AS"; then
35237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35238$as_echo "$AS" >&6; }
35239else
35240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35241$as_echo "no" >&6; }
35242fi
35243
35244
35245  test -n "$AS" && break
35246done
35247
35248  else
35249    # The variable is set, but is it from the command line or the environment?
35250
35251    # Try to remove the string !AS! from our list.
35252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35254      # If it failed, the variable was not from the command line. Ignore it,
35255      # but warn the user (except for BASH, which is always set by the calling BASH).
35256      if test "xAS" != xBASH; then
35257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35258$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35259      fi
35260      # Try to locate tool using the code snippet
35261      for ac_prog in as
35262do
35263  # Extract the first word of "$ac_prog", so it can be a program name with args.
35264set dummy $ac_prog; ac_word=$2
35265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35266$as_echo_n "checking for $ac_word... " >&6; }
35267if ${ac_cv_path_AS+:} false; then :
35268  $as_echo_n "(cached) " >&6
35269else
35270  case $AS in
35271  [\\/]* | ?:[\\/]*)
35272  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35273  ;;
35274  *)
35275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35276for as_dir in $PATH
35277do
35278  IFS=$as_save_IFS
35279  test -z "$as_dir" && as_dir=.
35280    for ac_exec_ext in '' $ac_executable_extensions; do
35281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35282    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35284    break 2
35285  fi
35286done
35287  done
35288IFS=$as_save_IFS
35289
35290  ;;
35291esac
35292fi
35293AS=$ac_cv_path_AS
35294if test -n "$AS"; then
35295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35296$as_echo "$AS" >&6; }
35297else
35298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35299$as_echo "no" >&6; }
35300fi
35301
35302
35303  test -n "$AS" && break
35304done
35305
35306    else
35307      # If it succeeded, then it was overridden by the user. We will use it
35308      # for the tool.
35309
35310      # First remove it from the list of overridden variables, so we can test
35311      # for unknown variables in the end.
35312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35313
35314      # Check if we try to supply an empty value
35315      if test "x$AS" = x; then
35316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35317$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35319$as_echo_n "checking for AS... " >&6; }
35320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35321$as_echo "disabled" >&6; }
35322      else
35323        # Check if the provided tool contains a complete path.
35324        tool_specified="$AS"
35325        tool_basename="${tool_specified##*/}"
35326        if test "x$tool_basename" = "x$tool_specified"; then
35327          # A command without a complete path is provided, search $PATH.
35328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35329$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35330          # Extract the first word of "$tool_basename", so it can be a program name with args.
35331set dummy $tool_basename; ac_word=$2
35332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35333$as_echo_n "checking for $ac_word... " >&6; }
35334if ${ac_cv_path_AS+:} false; then :
35335  $as_echo_n "(cached) " >&6
35336else
35337  case $AS in
35338  [\\/]* | ?:[\\/]*)
35339  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35340  ;;
35341  *)
35342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35343for as_dir in $PATH
35344do
35345  IFS=$as_save_IFS
35346  test -z "$as_dir" && as_dir=.
35347    for ac_exec_ext in '' $ac_executable_extensions; do
35348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35349    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35351    break 2
35352  fi
35353done
35354  done
35355IFS=$as_save_IFS
35356
35357  ;;
35358esac
35359fi
35360AS=$ac_cv_path_AS
35361if test -n "$AS"; then
35362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35363$as_echo "$AS" >&6; }
35364else
35365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35366$as_echo "no" >&6; }
35367fi
35368
35369
35370          if test "x$AS" = x; then
35371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35372          fi
35373        else
35374          # Otherwise we believe it is a complete path. Use it as it is.
35375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35376$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35378$as_echo_n "checking for AS... " >&6; }
35379          if test ! -x "$tool_specified"; then
35380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35381$as_echo "not found" >&6; }
35382            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35383          fi
35384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35385$as_echo "$tool_specified" >&6; }
35386        fi
35387      fi
35388    fi
35389
35390  fi
35391
35392
35393
35394  # Only process if variable expands to non-empty
35395
35396  if test "x$AS" != x; then
35397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35398
35399  # First separate the path from the arguments. This will split at the first
35400  # space.
35401  complete="$AS"
35402  path="${complete%% *}"
35403  tmp="$complete EOL"
35404  arguments="${tmp#* }"
35405
35406  # Input might be given as Windows format, start by converting to
35407  # unix format.
35408  new_path=`$CYGPATH -u "$path"`
35409
35410  # Now try to locate executable using which
35411  new_path=`$WHICH "$new_path" 2> /dev/null`
35412  # bat and cmd files are not always considered executable in cygwin causing which
35413  # to not find them
35414  if test "x$new_path" = x \
35415      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35416      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35417    new_path=`$CYGPATH -u "$path"`
35418  fi
35419  if test "x$new_path" = x; then
35420    # Oops. Which didn't find the executable.
35421    # The splitting of arguments from the executable at a space might have been incorrect,
35422    # since paths with space are more likely in Windows. Give it another try with the whole
35423    # argument.
35424    path="$complete"
35425    arguments="EOL"
35426    new_path=`$CYGPATH -u "$path"`
35427    new_path=`$WHICH "$new_path" 2> /dev/null`
35428    # bat and cmd files are not always considered executable in cygwin causing which
35429    # to not find them
35430    if test "x$new_path" = x \
35431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35433      new_path=`$CYGPATH -u "$path"`
35434    fi
35435    if test "x$new_path" = x; then
35436      # It's still not found. Now this is an unrecoverable error.
35437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35438$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35439      has_space=`$ECHO "$complete" | $GREP " "`
35440      if test "x$has_space" != x; then
35441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35443      fi
35444      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35445    fi
35446  fi
35447
35448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35451  # "foo.exe" is OK but "foo" is an error.
35452  #
35453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35454  # It is also a way to make sure we got the proper file name for the real test later on.
35455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35456  if test "x$test_shortpath" = x; then
35457    # Short path failed, file does not exist as specified.
35458    # Try adding .exe or .cmd
35459    if test -f "${new_path}.exe"; then
35460      input_to_shortpath="${new_path}.exe"
35461    elif test -f "${new_path}.cmd"; then
35462      input_to_shortpath="${new_path}.cmd"
35463    else
35464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35465$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35468      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35469    fi
35470  else
35471    input_to_shortpath="$new_path"
35472  fi
35473
35474  # Call helper function which possibly converts this using DOS-style short mode.
35475  # If so, the updated path is stored in $new_path.
35476  new_path="$input_to_shortpath"
35477
35478  input_path="$input_to_shortpath"
35479  # Check if we need to convert this using DOS-style short mode. If the path
35480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35481  # take no chances and rewrite it.
35482  # Note: m4 eats our [], so we need to use [ and ] instead.
35483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35484  if test "x$has_forbidden_chars" != x; then
35485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35489      # Going to short mode and back again did indeed matter. Since short mode is
35490      # case insensitive, let's make it lowercase to improve readability.
35491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35492      # Now convert it back to Unix-style (cygpath)
35493      input_path=`$CYGPATH -u "$shortmode_path"`
35494      new_path="$input_path"
35495    fi
35496  fi
35497
35498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35499  if test "x$test_cygdrive_prefix" = x; then
35500    # As a simple fix, exclude /usr/bin since it's not a real path.
35501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35503      # a path prefixed by /cygdrive for fixpath to work.
35504      new_path="$CYGWIN_ROOT_PATH$input_path"
35505    fi
35506  fi
35507
35508  # remove trailing .exe if any
35509  new_path="${new_path/%.exe/}"
35510
35511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35512
35513  # First separate the path from the arguments. This will split at the first
35514  # space.
35515  complete="$AS"
35516  path="${complete%% *}"
35517  tmp="$complete EOL"
35518  arguments="${tmp#* }"
35519
35520  # Input might be given as Windows format, start by converting to
35521  # unix format.
35522  new_path="$path"
35523
35524  windows_path="$new_path"
35525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35526    unix_path=`$CYGPATH -u "$windows_path"`
35527    new_path="$unix_path"
35528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35530    new_path="$unix_path"
35531  fi
35532
35533
35534  # Now try to locate executable using which
35535  new_path=`$WHICH "$new_path" 2> /dev/null`
35536
35537  if test "x$new_path" = x; then
35538    # Oops. Which didn't find the executable.
35539    # The splitting of arguments from the executable at a space might have been incorrect,
35540    # since paths with space are more likely in Windows. Give it another try with the whole
35541    # argument.
35542    path="$complete"
35543    arguments="EOL"
35544    new_path="$path"
35545
35546  windows_path="$new_path"
35547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35548    unix_path=`$CYGPATH -u "$windows_path"`
35549    new_path="$unix_path"
35550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35552    new_path="$unix_path"
35553  fi
35554
35555
35556    new_path=`$WHICH "$new_path" 2> /dev/null`
35557    # bat and cmd files are not always considered executable in MSYS causing which
35558    # to not find them
35559    if test "x$new_path" = x \
35560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35562      new_path="$path"
35563
35564  windows_path="$new_path"
35565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35566    unix_path=`$CYGPATH -u "$windows_path"`
35567    new_path="$unix_path"
35568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35570    new_path="$unix_path"
35571  fi
35572
35573    fi
35574
35575    if test "x$new_path" = x; then
35576      # It's still not found. Now this is an unrecoverable error.
35577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35578$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35579      has_space=`$ECHO "$complete" | $GREP " "`
35580      if test "x$has_space" != x; then
35581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35583      fi
35584      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35585    fi
35586  fi
35587
35588  # Now new_path has a complete unix path to the binary
35589  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35590    # Keep paths in /bin as-is, but remove trailing .exe if any
35591    new_path="${new_path/%.exe/}"
35592    # Do not save /bin paths to all_fixpath_prefixes!
35593  else
35594    # Not in mixed or Windows style, start by that.
35595    new_path=`cmd //c echo $new_path`
35596
35597  input_path="$new_path"
35598  # Check if we need to convert this using DOS-style short mode. If the path
35599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35600  # take no chances and rewrite it.
35601  # Note: m4 eats our [], so we need to use [ and ] instead.
35602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35603  if test "x$has_forbidden_chars" != x; then
35604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35606  fi
35607
35608    # Output is in $new_path
35609
35610  windows_path="$new_path"
35611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35612    unix_path=`$CYGPATH -u "$windows_path"`
35613    new_path="$unix_path"
35614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35616    new_path="$unix_path"
35617  fi
35618
35619    # remove trailing .exe if any
35620    new_path="${new_path/%.exe/}"
35621
35622    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35623    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35624  fi
35625
35626    else
35627      # We're on a unix platform. Hooray! :)
35628      # First separate the path from the arguments. This will split at the first
35629      # space.
35630      complete="$AS"
35631      path="${complete%% *}"
35632      tmp="$complete EOL"
35633      arguments="${tmp#* }"
35634
35635      # Cannot rely on the command "which" here since it doesn't always work.
35636      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35637      if test -z "$is_absolute_path"; then
35638        # Path to executable is not absolute. Find it.
35639        IFS_save="$IFS"
35640        IFS=:
35641        for p in $PATH; do
35642          if test -f "$p/$path" && test -x "$p/$path"; then
35643            new_path="$p/$path"
35644            break
35645          fi
35646        done
35647        IFS="$IFS_save"
35648      else
35649        # This is an absolute path, we can use it without further modifications.
35650        new_path="$path"
35651      fi
35652
35653      if test "x$new_path" = x; then
35654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35655$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35656        has_space=`$ECHO "$complete" | $GREP " "`
35657        if test "x$has_space" != x; then
35658          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35659$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35660        fi
35661        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35662      fi
35663    fi
35664
35665    # Now join together the path and the arguments once again
35666    if test "x$arguments" != xEOL; then
35667      new_complete="$new_path ${arguments% *}"
35668    else
35669      new_complete="$new_path"
35670    fi
35671
35672    if test "x$complete" != "x$new_complete"; then
35673      AS="$new_complete"
35674      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35675$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35676    fi
35677  fi
35678
35679  else
35680    # FIXME: is this correct for microsoft?
35681    AS="$CC -c"
35682  fi
35683
35684
35685  #
35686  # Setup the archiver (AR)
35687  #
35688  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35689    # The corresponding ar tool is lib.exe (used to create static libraries)
35690    # Extract the first word of "lib", so it can be a program name with args.
35691set dummy lib; ac_word=$2
35692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35693$as_echo_n "checking for $ac_word... " >&6; }
35694if ${ac_cv_prog_AR+:} false; then :
35695  $as_echo_n "(cached) " >&6
35696else
35697  if test -n "$AR"; then
35698  ac_cv_prog_AR="$AR" # Let the user override the test.
35699else
35700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35701for as_dir in $PATH
35702do
35703  IFS=$as_save_IFS
35704  test -z "$as_dir" && as_dir=.
35705    for ac_exec_ext in '' $ac_executable_extensions; do
35706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35707    ac_cv_prog_AR="lib"
35708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35709    break 2
35710  fi
35711done
35712  done
35713IFS=$as_save_IFS
35714
35715fi
35716fi
35717AR=$ac_cv_prog_AR
35718if test -n "$AR"; then
35719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35720$as_echo "$AR" >&6; }
35721else
35722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35723$as_echo "no" >&6; }
35724fi
35725
35726
35727  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35728
35729
35730  # Publish this variable in the help.
35731
35732
35733  if [ -z "${AR+x}" ]; then
35734    # The variable is not set by user, try to locate tool using the code snippet
35735    if test -n "$ac_tool_prefix"; then
35736  for ac_prog in ar gcc-ar
35737  do
35738    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35741$as_echo_n "checking for $ac_word... " >&6; }
35742if ${ac_cv_prog_AR+:} false; then :
35743  $as_echo_n "(cached) " >&6
35744else
35745  if test -n "$AR"; then
35746  ac_cv_prog_AR="$AR" # Let the user override the test.
35747else
35748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35749for as_dir in $PATH
35750do
35751  IFS=$as_save_IFS
35752  test -z "$as_dir" && as_dir=.
35753    for ac_exec_ext in '' $ac_executable_extensions; do
35754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35755    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35757    break 2
35758  fi
35759done
35760  done
35761IFS=$as_save_IFS
35762
35763fi
35764fi
35765AR=$ac_cv_prog_AR
35766if test -n "$AR"; then
35767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35768$as_echo "$AR" >&6; }
35769else
35770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35771$as_echo "no" >&6; }
35772fi
35773
35774
35775    test -n "$AR" && break
35776  done
35777fi
35778if test -z "$AR"; then
35779  ac_ct_AR=$AR
35780  for ac_prog in ar gcc-ar
35781do
35782  # Extract the first word of "$ac_prog", so it can be a program name with args.
35783set dummy $ac_prog; ac_word=$2
35784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35785$as_echo_n "checking for $ac_word... " >&6; }
35786if ${ac_cv_prog_ac_ct_AR+:} false; then :
35787  $as_echo_n "(cached) " >&6
35788else
35789  if test -n "$ac_ct_AR"; then
35790  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35791else
35792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35793for as_dir in $PATH
35794do
35795  IFS=$as_save_IFS
35796  test -z "$as_dir" && as_dir=.
35797    for ac_exec_ext in '' $ac_executable_extensions; do
35798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35799    ac_cv_prog_ac_ct_AR="$ac_prog"
35800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35801    break 2
35802  fi
35803done
35804  done
35805IFS=$as_save_IFS
35806
35807fi
35808fi
35809ac_ct_AR=$ac_cv_prog_ac_ct_AR
35810if test -n "$ac_ct_AR"; then
35811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35812$as_echo "$ac_ct_AR" >&6; }
35813else
35814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35815$as_echo "no" >&6; }
35816fi
35817
35818
35819  test -n "$ac_ct_AR" && break
35820done
35821
35822  if test "x$ac_ct_AR" = x; then
35823    AR=""
35824  else
35825    case $cross_compiling:$ac_tool_warned in
35826yes:)
35827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35829ac_tool_warned=yes ;;
35830esac
35831    AR=$ac_ct_AR
35832  fi
35833fi
35834
35835  else
35836    # The variable is set, but is it from the command line or the environment?
35837
35838    # Try to remove the string !AR! from our list.
35839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35841      # If it failed, the variable was not from the command line. Ignore it,
35842      # but warn the user (except for BASH, which is always set by the calling BASH).
35843      if test "xAR" != xBASH; then
35844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35845$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35846      fi
35847      # Try to locate tool using the code snippet
35848      if test -n "$ac_tool_prefix"; then
35849  for ac_prog in ar gcc-ar
35850  do
35851    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35852set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35854$as_echo_n "checking for $ac_word... " >&6; }
35855if ${ac_cv_prog_AR+:} false; then :
35856  $as_echo_n "(cached) " >&6
35857else
35858  if test -n "$AR"; then
35859  ac_cv_prog_AR="$AR" # Let the user override the test.
35860else
35861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35862for as_dir in $PATH
35863do
35864  IFS=$as_save_IFS
35865  test -z "$as_dir" && as_dir=.
35866    for ac_exec_ext in '' $ac_executable_extensions; do
35867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35868    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35870    break 2
35871  fi
35872done
35873  done
35874IFS=$as_save_IFS
35875
35876fi
35877fi
35878AR=$ac_cv_prog_AR
35879if test -n "$AR"; then
35880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35881$as_echo "$AR" >&6; }
35882else
35883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35884$as_echo "no" >&6; }
35885fi
35886
35887
35888    test -n "$AR" && break
35889  done
35890fi
35891if test -z "$AR"; then
35892  ac_ct_AR=$AR
35893  for ac_prog in ar gcc-ar
35894do
35895  # Extract the first word of "$ac_prog", so it can be a program name with args.
35896set dummy $ac_prog; ac_word=$2
35897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35898$as_echo_n "checking for $ac_word... " >&6; }
35899if ${ac_cv_prog_ac_ct_AR+:} false; then :
35900  $as_echo_n "(cached) " >&6
35901else
35902  if test -n "$ac_ct_AR"; then
35903  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35904else
35905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35906for as_dir in $PATH
35907do
35908  IFS=$as_save_IFS
35909  test -z "$as_dir" && as_dir=.
35910    for ac_exec_ext in '' $ac_executable_extensions; do
35911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35912    ac_cv_prog_ac_ct_AR="$ac_prog"
35913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35914    break 2
35915  fi
35916done
35917  done
35918IFS=$as_save_IFS
35919
35920fi
35921fi
35922ac_ct_AR=$ac_cv_prog_ac_ct_AR
35923if test -n "$ac_ct_AR"; then
35924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35925$as_echo "$ac_ct_AR" >&6; }
35926else
35927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35928$as_echo "no" >&6; }
35929fi
35930
35931
35932  test -n "$ac_ct_AR" && break
35933done
35934
35935  if test "x$ac_ct_AR" = x; then
35936    AR=""
35937  else
35938    case $cross_compiling:$ac_tool_warned in
35939yes:)
35940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35942ac_tool_warned=yes ;;
35943esac
35944    AR=$ac_ct_AR
35945  fi
35946fi
35947
35948    else
35949      # If it succeeded, then it was overridden by the user. We will use it
35950      # for the tool.
35951
35952      # First remove it from the list of overridden variables, so we can test
35953      # for unknown variables in the end.
35954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35955
35956      # Check if we try to supply an empty value
35957      if test "x$AR" = x; then
35958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35959$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35961$as_echo_n "checking for AR... " >&6; }
35962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35963$as_echo "disabled" >&6; }
35964      else
35965        # Check if the provided tool contains a complete path.
35966        tool_specified="$AR"
35967        tool_basename="${tool_specified##*/}"
35968        if test "x$tool_basename" = "x$tool_specified"; then
35969          # A command without a complete path is provided, search $PATH.
35970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35971$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35972          # Extract the first word of "$tool_basename", so it can be a program name with args.
35973set dummy $tool_basename; ac_word=$2
35974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35975$as_echo_n "checking for $ac_word... " >&6; }
35976if ${ac_cv_path_AR+:} false; then :
35977  $as_echo_n "(cached) " >&6
35978else
35979  case $AR in
35980  [\\/]* | ?:[\\/]*)
35981  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35982  ;;
35983  *)
35984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35985for as_dir in $PATH
35986do
35987  IFS=$as_save_IFS
35988  test -z "$as_dir" && as_dir=.
35989    for ac_exec_ext in '' $ac_executable_extensions; do
35990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35991    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35993    break 2
35994  fi
35995done
35996  done
35997IFS=$as_save_IFS
35998
35999  ;;
36000esac
36001fi
36002AR=$ac_cv_path_AR
36003if test -n "$AR"; then
36004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36005$as_echo "$AR" >&6; }
36006else
36007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36008$as_echo "no" >&6; }
36009fi
36010
36011
36012          if test "x$AR" = x; then
36013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36014          fi
36015        else
36016          # Otherwise we believe it is a complete path. Use it as it is.
36017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36018$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36020$as_echo_n "checking for AR... " >&6; }
36021          if test ! -x "$tool_specified"; then
36022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36023$as_echo "not found" >&6; }
36024            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36025          fi
36026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36027$as_echo "$tool_specified" >&6; }
36028        fi
36029      fi
36030    fi
36031
36032  fi
36033
36034
36035  else
36036
36037
36038  # Publish this variable in the help.
36039
36040
36041  if [ -z "${AR+x}" ]; then
36042    # The variable is not set by user, try to locate tool using the code snippet
36043    if test -n "$ac_tool_prefix"; then
36044  for ac_prog in ar
36045  do
36046    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36047set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36049$as_echo_n "checking for $ac_word... " >&6; }
36050if ${ac_cv_prog_AR+:} false; then :
36051  $as_echo_n "(cached) " >&6
36052else
36053  if test -n "$AR"; then
36054  ac_cv_prog_AR="$AR" # Let the user override the test.
36055else
36056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36057for as_dir in $PATH
36058do
36059  IFS=$as_save_IFS
36060  test -z "$as_dir" && as_dir=.
36061    for ac_exec_ext in '' $ac_executable_extensions; do
36062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36063    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36065    break 2
36066  fi
36067done
36068  done
36069IFS=$as_save_IFS
36070
36071fi
36072fi
36073AR=$ac_cv_prog_AR
36074if test -n "$AR"; then
36075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36076$as_echo "$AR" >&6; }
36077else
36078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36079$as_echo "no" >&6; }
36080fi
36081
36082
36083    test -n "$AR" && break
36084  done
36085fi
36086if test -z "$AR"; then
36087  ac_ct_AR=$AR
36088  for ac_prog in ar
36089do
36090  # Extract the first word of "$ac_prog", so it can be a program name with args.
36091set dummy $ac_prog; ac_word=$2
36092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36093$as_echo_n "checking for $ac_word... " >&6; }
36094if ${ac_cv_prog_ac_ct_AR+:} false; then :
36095  $as_echo_n "(cached) " >&6
36096else
36097  if test -n "$ac_ct_AR"; then
36098  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36099else
36100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36101for as_dir in $PATH
36102do
36103  IFS=$as_save_IFS
36104  test -z "$as_dir" && as_dir=.
36105    for ac_exec_ext in '' $ac_executable_extensions; do
36106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36107    ac_cv_prog_ac_ct_AR="$ac_prog"
36108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36109    break 2
36110  fi
36111done
36112  done
36113IFS=$as_save_IFS
36114
36115fi
36116fi
36117ac_ct_AR=$ac_cv_prog_ac_ct_AR
36118if test -n "$ac_ct_AR"; then
36119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36120$as_echo "$ac_ct_AR" >&6; }
36121else
36122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36123$as_echo "no" >&6; }
36124fi
36125
36126
36127  test -n "$ac_ct_AR" && break
36128done
36129
36130  if test "x$ac_ct_AR" = x; then
36131    AR=""
36132  else
36133    case $cross_compiling:$ac_tool_warned in
36134yes:)
36135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36137ac_tool_warned=yes ;;
36138esac
36139    AR=$ac_ct_AR
36140  fi
36141fi
36142
36143  else
36144    # The variable is set, but is it from the command line or the environment?
36145
36146    # Try to remove the string !AR! from our list.
36147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36149      # If it failed, the variable was not from the command line. Ignore it,
36150      # but warn the user (except for BASH, which is always set by the calling BASH).
36151      if test "xAR" != xBASH; then
36152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36153$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36154      fi
36155      # Try to locate tool using the code snippet
36156      if test -n "$ac_tool_prefix"; then
36157  for ac_prog in ar
36158  do
36159    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36160set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36162$as_echo_n "checking for $ac_word... " >&6; }
36163if ${ac_cv_prog_AR+:} false; then :
36164  $as_echo_n "(cached) " >&6
36165else
36166  if test -n "$AR"; then
36167  ac_cv_prog_AR="$AR" # Let the user override the test.
36168else
36169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36170for as_dir in $PATH
36171do
36172  IFS=$as_save_IFS
36173  test -z "$as_dir" && as_dir=.
36174    for ac_exec_ext in '' $ac_executable_extensions; do
36175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36176    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36178    break 2
36179  fi
36180done
36181  done
36182IFS=$as_save_IFS
36183
36184fi
36185fi
36186AR=$ac_cv_prog_AR
36187if test -n "$AR"; then
36188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36189$as_echo "$AR" >&6; }
36190else
36191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36192$as_echo "no" >&6; }
36193fi
36194
36195
36196    test -n "$AR" && break
36197  done
36198fi
36199if test -z "$AR"; then
36200  ac_ct_AR=$AR
36201  for ac_prog in ar
36202do
36203  # Extract the first word of "$ac_prog", so it can be a program name with args.
36204set dummy $ac_prog; ac_word=$2
36205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36206$as_echo_n "checking for $ac_word... " >&6; }
36207if ${ac_cv_prog_ac_ct_AR+:} false; then :
36208  $as_echo_n "(cached) " >&6
36209else
36210  if test -n "$ac_ct_AR"; then
36211  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36212else
36213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36214for as_dir in $PATH
36215do
36216  IFS=$as_save_IFS
36217  test -z "$as_dir" && as_dir=.
36218    for ac_exec_ext in '' $ac_executable_extensions; do
36219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36220    ac_cv_prog_ac_ct_AR="$ac_prog"
36221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36222    break 2
36223  fi
36224done
36225  done
36226IFS=$as_save_IFS
36227
36228fi
36229fi
36230ac_ct_AR=$ac_cv_prog_ac_ct_AR
36231if test -n "$ac_ct_AR"; then
36232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36233$as_echo "$ac_ct_AR" >&6; }
36234else
36235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36236$as_echo "no" >&6; }
36237fi
36238
36239
36240  test -n "$ac_ct_AR" && break
36241done
36242
36243  if test "x$ac_ct_AR" = x; then
36244    AR=""
36245  else
36246    case $cross_compiling:$ac_tool_warned in
36247yes:)
36248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36250ac_tool_warned=yes ;;
36251esac
36252    AR=$ac_ct_AR
36253  fi
36254fi
36255
36256    else
36257      # If it succeeded, then it was overridden by the user. We will use it
36258      # for the tool.
36259
36260      # First remove it from the list of overridden variables, so we can test
36261      # for unknown variables in the end.
36262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36263
36264      # Check if we try to supply an empty value
36265      if test "x$AR" = x; then
36266        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36267$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36269$as_echo_n "checking for AR... " >&6; }
36270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36271$as_echo "disabled" >&6; }
36272      else
36273        # Check if the provided tool contains a complete path.
36274        tool_specified="$AR"
36275        tool_basename="${tool_specified##*/}"
36276        if test "x$tool_basename" = "x$tool_specified"; then
36277          # A command without a complete path is provided, search $PATH.
36278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36279$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36280          # Extract the first word of "$tool_basename", so it can be a program name with args.
36281set dummy $tool_basename; ac_word=$2
36282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36283$as_echo_n "checking for $ac_word... " >&6; }
36284if ${ac_cv_path_AR+:} false; then :
36285  $as_echo_n "(cached) " >&6
36286else
36287  case $AR in
36288  [\\/]* | ?:[\\/]*)
36289  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36290  ;;
36291  *)
36292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36293for as_dir in $PATH
36294do
36295  IFS=$as_save_IFS
36296  test -z "$as_dir" && as_dir=.
36297    for ac_exec_ext in '' $ac_executable_extensions; do
36298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36299    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36301    break 2
36302  fi
36303done
36304  done
36305IFS=$as_save_IFS
36306
36307  ;;
36308esac
36309fi
36310AR=$ac_cv_path_AR
36311if test -n "$AR"; then
36312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36313$as_echo "$AR" >&6; }
36314else
36315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36316$as_echo "no" >&6; }
36317fi
36318
36319
36320          if test "x$AR" = x; then
36321            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36322          fi
36323        else
36324          # Otherwise we believe it is a complete path. Use it as it is.
36325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36326$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36328$as_echo_n "checking for AR... " >&6; }
36329          if test ! -x "$tool_specified"; then
36330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36331$as_echo "not found" >&6; }
36332            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36333          fi
36334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36335$as_echo "$tool_specified" >&6; }
36336        fi
36337      fi
36338    fi
36339
36340  fi
36341
36342
36343  fi
36344
36345  # Only process if variable expands to non-empty
36346
36347  if test "x$AR" != x; then
36348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36349
36350  # First separate the path from the arguments. This will split at the first
36351  # space.
36352  complete="$AR"
36353  path="${complete%% *}"
36354  tmp="$complete EOL"
36355  arguments="${tmp#* }"
36356
36357  # Input might be given as Windows format, start by converting to
36358  # unix format.
36359  new_path=`$CYGPATH -u "$path"`
36360
36361  # Now try to locate executable using which
36362  new_path=`$WHICH "$new_path" 2> /dev/null`
36363  # bat and cmd files are not always considered executable in cygwin causing which
36364  # to not find them
36365  if test "x$new_path" = x \
36366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36368    new_path=`$CYGPATH -u "$path"`
36369  fi
36370  if test "x$new_path" = x; then
36371    # Oops. Which didn't find the executable.
36372    # The splitting of arguments from the executable at a space might have been incorrect,
36373    # since paths with space are more likely in Windows. Give it another try with the whole
36374    # argument.
36375    path="$complete"
36376    arguments="EOL"
36377    new_path=`$CYGPATH -u "$path"`
36378    new_path=`$WHICH "$new_path" 2> /dev/null`
36379    # bat and cmd files are not always considered executable in cygwin causing which
36380    # to not find them
36381    if test "x$new_path" = x \
36382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36384      new_path=`$CYGPATH -u "$path"`
36385    fi
36386    if test "x$new_path" = x; then
36387      # It's still not found. Now this is an unrecoverable error.
36388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36389$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36390      has_space=`$ECHO "$complete" | $GREP " "`
36391      if test "x$has_space" != x; then
36392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36394      fi
36395      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36396    fi
36397  fi
36398
36399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36402  # "foo.exe" is OK but "foo" is an error.
36403  #
36404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36405  # It is also a way to make sure we got the proper file name for the real test later on.
36406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36407  if test "x$test_shortpath" = x; then
36408    # Short path failed, file does not exist as specified.
36409    # Try adding .exe or .cmd
36410    if test -f "${new_path}.exe"; then
36411      input_to_shortpath="${new_path}.exe"
36412    elif test -f "${new_path}.cmd"; then
36413      input_to_shortpath="${new_path}.cmd"
36414    else
36415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36416$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36419      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36420    fi
36421  else
36422    input_to_shortpath="$new_path"
36423  fi
36424
36425  # Call helper function which possibly converts this using DOS-style short mode.
36426  # If so, the updated path is stored in $new_path.
36427  new_path="$input_to_shortpath"
36428
36429  input_path="$input_to_shortpath"
36430  # Check if we need to convert this using DOS-style short mode. If the path
36431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36432  # take no chances and rewrite it.
36433  # Note: m4 eats our [], so we need to use [ and ] instead.
36434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36435  if test "x$has_forbidden_chars" != x; then
36436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36440      # Going to short mode and back again did indeed matter. Since short mode is
36441      # case insensitive, let's make it lowercase to improve readability.
36442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36443      # Now convert it back to Unix-style (cygpath)
36444      input_path=`$CYGPATH -u "$shortmode_path"`
36445      new_path="$input_path"
36446    fi
36447  fi
36448
36449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36450  if test "x$test_cygdrive_prefix" = x; then
36451    # As a simple fix, exclude /usr/bin since it's not a real path.
36452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36454      # a path prefixed by /cygdrive for fixpath to work.
36455      new_path="$CYGWIN_ROOT_PATH$input_path"
36456    fi
36457  fi
36458
36459  # remove trailing .exe if any
36460  new_path="${new_path/%.exe/}"
36461
36462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36463
36464  # First separate the path from the arguments. This will split at the first
36465  # space.
36466  complete="$AR"
36467  path="${complete%% *}"
36468  tmp="$complete EOL"
36469  arguments="${tmp#* }"
36470
36471  # Input might be given as Windows format, start by converting to
36472  # unix format.
36473  new_path="$path"
36474
36475  windows_path="$new_path"
36476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36477    unix_path=`$CYGPATH -u "$windows_path"`
36478    new_path="$unix_path"
36479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36481    new_path="$unix_path"
36482  fi
36483
36484
36485  # Now try to locate executable using which
36486  new_path=`$WHICH "$new_path" 2> /dev/null`
36487
36488  if test "x$new_path" = x; then
36489    # Oops. Which didn't find the executable.
36490    # The splitting of arguments from the executable at a space might have been incorrect,
36491    # since paths with space are more likely in Windows. Give it another try with the whole
36492    # argument.
36493    path="$complete"
36494    arguments="EOL"
36495    new_path="$path"
36496
36497  windows_path="$new_path"
36498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36499    unix_path=`$CYGPATH -u "$windows_path"`
36500    new_path="$unix_path"
36501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36503    new_path="$unix_path"
36504  fi
36505
36506
36507    new_path=`$WHICH "$new_path" 2> /dev/null`
36508    # bat and cmd files are not always considered executable in MSYS causing which
36509    # to not find them
36510    if test "x$new_path" = x \
36511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36513      new_path="$path"
36514
36515  windows_path="$new_path"
36516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36517    unix_path=`$CYGPATH -u "$windows_path"`
36518    new_path="$unix_path"
36519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36521    new_path="$unix_path"
36522  fi
36523
36524    fi
36525
36526    if test "x$new_path" = x; then
36527      # It's still not found. Now this is an unrecoverable error.
36528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36529$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36530      has_space=`$ECHO "$complete" | $GREP " "`
36531      if test "x$has_space" != x; then
36532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36534      fi
36535      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36536    fi
36537  fi
36538
36539  # Now new_path has a complete unix path to the binary
36540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36541    # Keep paths in /bin as-is, but remove trailing .exe if any
36542    new_path="${new_path/%.exe/}"
36543    # Do not save /bin paths to all_fixpath_prefixes!
36544  else
36545    # Not in mixed or Windows style, start by that.
36546    new_path=`cmd //c echo $new_path`
36547
36548  input_path="$new_path"
36549  # Check if we need to convert this using DOS-style short mode. If the path
36550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36551  # take no chances and rewrite it.
36552  # Note: m4 eats our [], so we need to use [ and ] instead.
36553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36554  if test "x$has_forbidden_chars" != x; then
36555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36557  fi
36558
36559    # Output is in $new_path
36560
36561  windows_path="$new_path"
36562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36563    unix_path=`$CYGPATH -u "$windows_path"`
36564    new_path="$unix_path"
36565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36567    new_path="$unix_path"
36568  fi
36569
36570    # remove trailing .exe if any
36571    new_path="${new_path/%.exe/}"
36572
36573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36575  fi
36576
36577    else
36578      # We're on a unix platform. Hooray! :)
36579      # First separate the path from the arguments. This will split at the first
36580      # space.
36581      complete="$AR"
36582      path="${complete%% *}"
36583      tmp="$complete EOL"
36584      arguments="${tmp#* }"
36585
36586      # Cannot rely on the command "which" here since it doesn't always work.
36587      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36588      if test -z "$is_absolute_path"; then
36589        # Path to executable is not absolute. Find it.
36590        IFS_save="$IFS"
36591        IFS=:
36592        for p in $PATH; do
36593          if test -f "$p/$path" && test -x "$p/$path"; then
36594            new_path="$p/$path"
36595            break
36596          fi
36597        done
36598        IFS="$IFS_save"
36599      else
36600        # This is an absolute path, we can use it without further modifications.
36601        new_path="$path"
36602      fi
36603
36604      if test "x$new_path" = x; then
36605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36606$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36607        has_space=`$ECHO "$complete" | $GREP " "`
36608        if test "x$has_space" != x; then
36609          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36611        fi
36612        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36613      fi
36614    fi
36615
36616    # Now join together the path and the arguments once again
36617    if test "x$arguments" != xEOL; then
36618      new_complete="$new_path ${arguments% *}"
36619    else
36620      new_complete="$new_path"
36621    fi
36622
36623    if test "x$complete" != "x$new_complete"; then
36624      AR="$new_complete"
36625      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36626$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36627    fi
36628  fi
36629
36630
36631
36632  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36633
36634
36635  # Publish this variable in the help.
36636
36637
36638  if [ -z "${LIPO+x}" ]; then
36639    # The variable is not set by user, try to locate tool using the code snippet
36640    for ac_prog in lipo
36641do
36642  # Extract the first word of "$ac_prog", so it can be a program name with args.
36643set dummy $ac_prog; ac_word=$2
36644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36645$as_echo_n "checking for $ac_word... " >&6; }
36646if ${ac_cv_path_LIPO+:} false; then :
36647  $as_echo_n "(cached) " >&6
36648else
36649  case $LIPO in
36650  [\\/]* | ?:[\\/]*)
36651  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36652  ;;
36653  *)
36654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36655for as_dir in $PATH
36656do
36657  IFS=$as_save_IFS
36658  test -z "$as_dir" && as_dir=.
36659    for ac_exec_ext in '' $ac_executable_extensions; do
36660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36661    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36663    break 2
36664  fi
36665done
36666  done
36667IFS=$as_save_IFS
36668
36669  ;;
36670esac
36671fi
36672LIPO=$ac_cv_path_LIPO
36673if test -n "$LIPO"; then
36674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36675$as_echo "$LIPO" >&6; }
36676else
36677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36678$as_echo "no" >&6; }
36679fi
36680
36681
36682  test -n "$LIPO" && break
36683done
36684
36685  else
36686    # The variable is set, but is it from the command line or the environment?
36687
36688    # Try to remove the string !LIPO! from our list.
36689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36691      # If it failed, the variable was not from the command line. Ignore it,
36692      # but warn the user (except for BASH, which is always set by the calling BASH).
36693      if test "xLIPO" != xBASH; then
36694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36695$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36696      fi
36697      # Try to locate tool using the code snippet
36698      for ac_prog in lipo
36699do
36700  # Extract the first word of "$ac_prog", so it can be a program name with args.
36701set dummy $ac_prog; ac_word=$2
36702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36703$as_echo_n "checking for $ac_word... " >&6; }
36704if ${ac_cv_path_LIPO+:} false; then :
36705  $as_echo_n "(cached) " >&6
36706else
36707  case $LIPO in
36708  [\\/]* | ?:[\\/]*)
36709  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36710  ;;
36711  *)
36712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36713for as_dir in $PATH
36714do
36715  IFS=$as_save_IFS
36716  test -z "$as_dir" && as_dir=.
36717    for ac_exec_ext in '' $ac_executable_extensions; do
36718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36719    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36721    break 2
36722  fi
36723done
36724  done
36725IFS=$as_save_IFS
36726
36727  ;;
36728esac
36729fi
36730LIPO=$ac_cv_path_LIPO
36731if test -n "$LIPO"; then
36732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36733$as_echo "$LIPO" >&6; }
36734else
36735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36736$as_echo "no" >&6; }
36737fi
36738
36739
36740  test -n "$LIPO" && break
36741done
36742
36743    else
36744      # If it succeeded, then it was overridden by the user. We will use it
36745      # for the tool.
36746
36747      # First remove it from the list of overridden variables, so we can test
36748      # for unknown variables in the end.
36749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36750
36751      # Check if we try to supply an empty value
36752      if test "x$LIPO" = x; then
36753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36754$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36756$as_echo_n "checking for LIPO... " >&6; }
36757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36758$as_echo "disabled" >&6; }
36759      else
36760        # Check if the provided tool contains a complete path.
36761        tool_specified="$LIPO"
36762        tool_basename="${tool_specified##*/}"
36763        if test "x$tool_basename" = "x$tool_specified"; then
36764          # A command without a complete path is provided, search $PATH.
36765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36766$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36767          # Extract the first word of "$tool_basename", so it can be a program name with args.
36768set dummy $tool_basename; ac_word=$2
36769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36770$as_echo_n "checking for $ac_word... " >&6; }
36771if ${ac_cv_path_LIPO+:} false; then :
36772  $as_echo_n "(cached) " >&6
36773else
36774  case $LIPO in
36775  [\\/]* | ?:[\\/]*)
36776  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36777  ;;
36778  *)
36779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36780for as_dir in $PATH
36781do
36782  IFS=$as_save_IFS
36783  test -z "$as_dir" && as_dir=.
36784    for ac_exec_ext in '' $ac_executable_extensions; do
36785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36786    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36788    break 2
36789  fi
36790done
36791  done
36792IFS=$as_save_IFS
36793
36794  ;;
36795esac
36796fi
36797LIPO=$ac_cv_path_LIPO
36798if test -n "$LIPO"; then
36799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36800$as_echo "$LIPO" >&6; }
36801else
36802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36803$as_echo "no" >&6; }
36804fi
36805
36806
36807          if test "x$LIPO" = x; then
36808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36809          fi
36810        else
36811          # Otherwise we believe it is a complete path. Use it as it is.
36812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36813$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36815$as_echo_n "checking for LIPO... " >&6; }
36816          if test ! -x "$tool_specified"; then
36817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36818$as_echo "not found" >&6; }
36819            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36820          fi
36821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36822$as_echo "$tool_specified" >&6; }
36823        fi
36824      fi
36825    fi
36826
36827  fi
36828
36829
36830
36831  # Only process if variable expands to non-empty
36832
36833  if test "x$LIPO" != x; then
36834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36835
36836  # First separate the path from the arguments. This will split at the first
36837  # space.
36838  complete="$LIPO"
36839  path="${complete%% *}"
36840  tmp="$complete EOL"
36841  arguments="${tmp#* }"
36842
36843  # Input might be given as Windows format, start by converting to
36844  # unix format.
36845  new_path=`$CYGPATH -u "$path"`
36846
36847  # Now try to locate executable using which
36848  new_path=`$WHICH "$new_path" 2> /dev/null`
36849  # bat and cmd files are not always considered executable in cygwin causing which
36850  # to not find them
36851  if test "x$new_path" = x \
36852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36854    new_path=`$CYGPATH -u "$path"`
36855  fi
36856  if test "x$new_path" = x; then
36857    # Oops. Which didn't find the executable.
36858    # The splitting of arguments from the executable at a space might have been incorrect,
36859    # since paths with space are more likely in Windows. Give it another try with the whole
36860    # argument.
36861    path="$complete"
36862    arguments="EOL"
36863    new_path=`$CYGPATH -u "$path"`
36864    new_path=`$WHICH "$new_path" 2> /dev/null`
36865    # bat and cmd files are not always considered executable in cygwin causing which
36866    # to not find them
36867    if test "x$new_path" = x \
36868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36870      new_path=`$CYGPATH -u "$path"`
36871    fi
36872    if test "x$new_path" = x; then
36873      # It's still not found. Now this is an unrecoverable error.
36874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36875$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36876      has_space=`$ECHO "$complete" | $GREP " "`
36877      if test "x$has_space" != x; then
36878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36880      fi
36881      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36882    fi
36883  fi
36884
36885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36888  # "foo.exe" is OK but "foo" is an error.
36889  #
36890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36891  # It is also a way to make sure we got the proper file name for the real test later on.
36892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36893  if test "x$test_shortpath" = x; then
36894    # Short path failed, file does not exist as specified.
36895    # Try adding .exe or .cmd
36896    if test -f "${new_path}.exe"; then
36897      input_to_shortpath="${new_path}.exe"
36898    elif test -f "${new_path}.cmd"; then
36899      input_to_shortpath="${new_path}.cmd"
36900    else
36901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36902$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36905      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36906    fi
36907  else
36908    input_to_shortpath="$new_path"
36909  fi
36910
36911  # Call helper function which possibly converts this using DOS-style short mode.
36912  # If so, the updated path is stored in $new_path.
36913  new_path="$input_to_shortpath"
36914
36915  input_path="$input_to_shortpath"
36916  # Check if we need to convert this using DOS-style short mode. If the path
36917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36918  # take no chances and rewrite it.
36919  # Note: m4 eats our [], so we need to use [ and ] instead.
36920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36921  if test "x$has_forbidden_chars" != x; then
36922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36926      # Going to short mode and back again did indeed matter. Since short mode is
36927      # case insensitive, let's make it lowercase to improve readability.
36928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36929      # Now convert it back to Unix-style (cygpath)
36930      input_path=`$CYGPATH -u "$shortmode_path"`
36931      new_path="$input_path"
36932    fi
36933  fi
36934
36935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36936  if test "x$test_cygdrive_prefix" = x; then
36937    # As a simple fix, exclude /usr/bin since it's not a real path.
36938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36940      # a path prefixed by /cygdrive for fixpath to work.
36941      new_path="$CYGWIN_ROOT_PATH$input_path"
36942    fi
36943  fi
36944
36945  # remove trailing .exe if any
36946  new_path="${new_path/%.exe/}"
36947
36948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36949
36950  # First separate the path from the arguments. This will split at the first
36951  # space.
36952  complete="$LIPO"
36953  path="${complete%% *}"
36954  tmp="$complete EOL"
36955  arguments="${tmp#* }"
36956
36957  # Input might be given as Windows format, start by converting to
36958  # unix format.
36959  new_path="$path"
36960
36961  windows_path="$new_path"
36962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36963    unix_path=`$CYGPATH -u "$windows_path"`
36964    new_path="$unix_path"
36965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36967    new_path="$unix_path"
36968  fi
36969
36970
36971  # Now try to locate executable using which
36972  new_path=`$WHICH "$new_path" 2> /dev/null`
36973
36974  if test "x$new_path" = x; then
36975    # Oops. Which didn't find the executable.
36976    # The splitting of arguments from the executable at a space might have been incorrect,
36977    # since paths with space are more likely in Windows. Give it another try with the whole
36978    # argument.
36979    path="$complete"
36980    arguments="EOL"
36981    new_path="$path"
36982
36983  windows_path="$new_path"
36984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36985    unix_path=`$CYGPATH -u "$windows_path"`
36986    new_path="$unix_path"
36987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36989    new_path="$unix_path"
36990  fi
36991
36992
36993    new_path=`$WHICH "$new_path" 2> /dev/null`
36994    # bat and cmd files are not always considered executable in MSYS causing which
36995    # to not find them
36996    if test "x$new_path" = x \
36997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36999      new_path="$path"
37000
37001  windows_path="$new_path"
37002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37003    unix_path=`$CYGPATH -u "$windows_path"`
37004    new_path="$unix_path"
37005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37007    new_path="$unix_path"
37008  fi
37009
37010    fi
37011
37012    if test "x$new_path" = x; then
37013      # It's still not found. Now this is an unrecoverable error.
37014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37015$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37016      has_space=`$ECHO "$complete" | $GREP " "`
37017      if test "x$has_space" != x; then
37018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37020      fi
37021      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37022    fi
37023  fi
37024
37025  # Now new_path has a complete unix path to the binary
37026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37027    # Keep paths in /bin as-is, but remove trailing .exe if any
37028    new_path="${new_path/%.exe/}"
37029    # Do not save /bin paths to all_fixpath_prefixes!
37030  else
37031    # Not in mixed or Windows style, start by that.
37032    new_path=`cmd //c echo $new_path`
37033
37034  input_path="$new_path"
37035  # Check if we need to convert this using DOS-style short mode. If the path
37036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37037  # take no chances and rewrite it.
37038  # Note: m4 eats our [], so we need to use [ and ] instead.
37039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37040  if test "x$has_forbidden_chars" != x; then
37041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37043  fi
37044
37045    # Output is in $new_path
37046
37047  windows_path="$new_path"
37048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37049    unix_path=`$CYGPATH -u "$windows_path"`
37050    new_path="$unix_path"
37051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37053    new_path="$unix_path"
37054  fi
37055
37056    # remove trailing .exe if any
37057    new_path="${new_path/%.exe/}"
37058
37059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37061  fi
37062
37063    else
37064      # We're on a unix platform. Hooray! :)
37065      # First separate the path from the arguments. This will split at the first
37066      # space.
37067      complete="$LIPO"
37068      path="${complete%% *}"
37069      tmp="$complete EOL"
37070      arguments="${tmp#* }"
37071
37072      # Cannot rely on the command "which" here since it doesn't always work.
37073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37074      if test -z "$is_absolute_path"; then
37075        # Path to executable is not absolute. Find it.
37076        IFS_save="$IFS"
37077        IFS=:
37078        for p in $PATH; do
37079          if test -f "$p/$path" && test -x "$p/$path"; then
37080            new_path="$p/$path"
37081            break
37082          fi
37083        done
37084        IFS="$IFS_save"
37085      else
37086        # This is an absolute path, we can use it without further modifications.
37087        new_path="$path"
37088      fi
37089
37090      if test "x$new_path" = x; then
37091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37092$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37093        has_space=`$ECHO "$complete" | $GREP " "`
37094        if test "x$has_space" != x; then
37095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37097        fi
37098        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37099      fi
37100    fi
37101
37102    # Now join together the path and the arguments once again
37103    if test "x$arguments" != xEOL; then
37104      new_complete="$new_path ${arguments% *}"
37105    else
37106      new_complete="$new_path"
37107    fi
37108
37109    if test "x$complete" != "x$new_complete"; then
37110      LIPO="$new_complete"
37111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37112$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37113    fi
37114  fi
37115
37116  fi
37117
37118  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37119    # Extract the first word of "mt", so it can be a program name with args.
37120set dummy mt; ac_word=$2
37121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37122$as_echo_n "checking for $ac_word... " >&6; }
37123if ${ac_cv_prog_MT+:} false; then :
37124  $as_echo_n "(cached) " >&6
37125else
37126  if test -n "$MT"; then
37127  ac_cv_prog_MT="$MT" # Let the user override the test.
37128else
37129  ac_prog_rejected=no
37130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37131for as_dir in $PATH
37132do
37133  IFS=$as_save_IFS
37134  test -z "$as_dir" && as_dir=.
37135    for ac_exec_ext in '' $ac_executable_extensions; do
37136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37137    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37138       ac_prog_rejected=yes
37139       continue
37140     fi
37141    ac_cv_prog_MT="mt"
37142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37143    break 2
37144  fi
37145done
37146  done
37147IFS=$as_save_IFS
37148
37149if test $ac_prog_rejected = yes; then
37150  # We found a bogon in the path, so make sure we never use it.
37151  set dummy $ac_cv_prog_MT
37152  shift
37153  if test $# != 0; then
37154    # We chose a different compiler from the bogus one.
37155    # However, it has the same basename, so the bogon will be chosen
37156    # first if we set MT to just the basename; use the full file name.
37157    shift
37158    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37159  fi
37160fi
37161fi
37162fi
37163MT=$ac_cv_prog_MT
37164if test -n "$MT"; then
37165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37166$as_echo "$MT" >&6; }
37167else
37168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37169$as_echo "no" >&6; }
37170fi
37171
37172
37173
37174  # Only process if variable expands to non-empty
37175
37176  if test "x$MT" != x; then
37177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37178
37179  # First separate the path from the arguments. This will split at the first
37180  # space.
37181  complete="$MT"
37182  path="${complete%% *}"
37183  tmp="$complete EOL"
37184  arguments="${tmp#* }"
37185
37186  # Input might be given as Windows format, start by converting to
37187  # unix format.
37188  new_path=`$CYGPATH -u "$path"`
37189
37190  # Now try to locate executable using which
37191  new_path=`$WHICH "$new_path" 2> /dev/null`
37192  # bat and cmd files are not always considered executable in cygwin causing which
37193  # to not find them
37194  if test "x$new_path" = x \
37195      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37196      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37197    new_path=`$CYGPATH -u "$path"`
37198  fi
37199  if test "x$new_path" = x; then
37200    # Oops. Which didn't find the executable.
37201    # The splitting of arguments from the executable at a space might have been incorrect,
37202    # since paths with space are more likely in Windows. Give it another try with the whole
37203    # argument.
37204    path="$complete"
37205    arguments="EOL"
37206    new_path=`$CYGPATH -u "$path"`
37207    new_path=`$WHICH "$new_path" 2> /dev/null`
37208    # bat and cmd files are not always considered executable in cygwin causing which
37209    # to not find them
37210    if test "x$new_path" = x \
37211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37213      new_path=`$CYGPATH -u "$path"`
37214    fi
37215    if test "x$new_path" = x; then
37216      # It's still not found. Now this is an unrecoverable error.
37217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37218$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37219      has_space=`$ECHO "$complete" | $GREP " "`
37220      if test "x$has_space" != x; then
37221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37223      fi
37224      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37225    fi
37226  fi
37227
37228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37231  # "foo.exe" is OK but "foo" is an error.
37232  #
37233  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37234  # It is also a way to make sure we got the proper file name for the real test later on.
37235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37236  if test "x$test_shortpath" = x; then
37237    # Short path failed, file does not exist as specified.
37238    # Try adding .exe or .cmd
37239    if test -f "${new_path}.exe"; then
37240      input_to_shortpath="${new_path}.exe"
37241    elif test -f "${new_path}.cmd"; then
37242      input_to_shortpath="${new_path}.cmd"
37243    else
37244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37245$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37248      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37249    fi
37250  else
37251    input_to_shortpath="$new_path"
37252  fi
37253
37254  # Call helper function which possibly converts this using DOS-style short mode.
37255  # If so, the updated path is stored in $new_path.
37256  new_path="$input_to_shortpath"
37257
37258  input_path="$input_to_shortpath"
37259  # Check if we need to convert this using DOS-style short mode. If the path
37260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37261  # take no chances and rewrite it.
37262  # Note: m4 eats our [], so we need to use [ and ] instead.
37263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37264  if test "x$has_forbidden_chars" != x; then
37265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37269      # Going to short mode and back again did indeed matter. Since short mode is
37270      # case insensitive, let's make it lowercase to improve readability.
37271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37272      # Now convert it back to Unix-style (cygpath)
37273      input_path=`$CYGPATH -u "$shortmode_path"`
37274      new_path="$input_path"
37275    fi
37276  fi
37277
37278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37279  if test "x$test_cygdrive_prefix" = x; then
37280    # As a simple fix, exclude /usr/bin since it's not a real path.
37281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37283      # a path prefixed by /cygdrive for fixpath to work.
37284      new_path="$CYGWIN_ROOT_PATH$input_path"
37285    fi
37286  fi
37287
37288  # remove trailing .exe if any
37289  new_path="${new_path/%.exe/}"
37290
37291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37292
37293  # First separate the path from the arguments. This will split at the first
37294  # space.
37295  complete="$MT"
37296  path="${complete%% *}"
37297  tmp="$complete EOL"
37298  arguments="${tmp#* }"
37299
37300  # Input might be given as Windows format, start by converting to
37301  # unix format.
37302  new_path="$path"
37303
37304  windows_path="$new_path"
37305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37306    unix_path=`$CYGPATH -u "$windows_path"`
37307    new_path="$unix_path"
37308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37310    new_path="$unix_path"
37311  fi
37312
37313
37314  # Now try to locate executable using which
37315  new_path=`$WHICH "$new_path" 2> /dev/null`
37316
37317  if test "x$new_path" = x; then
37318    # Oops. Which didn't find the executable.
37319    # The splitting of arguments from the executable at a space might have been incorrect,
37320    # since paths with space are more likely in Windows. Give it another try with the whole
37321    # argument.
37322    path="$complete"
37323    arguments="EOL"
37324    new_path="$path"
37325
37326  windows_path="$new_path"
37327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37328    unix_path=`$CYGPATH -u "$windows_path"`
37329    new_path="$unix_path"
37330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37332    new_path="$unix_path"
37333  fi
37334
37335
37336    new_path=`$WHICH "$new_path" 2> /dev/null`
37337    # bat and cmd files are not always considered executable in MSYS causing which
37338    # to not find them
37339    if test "x$new_path" = x \
37340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37342      new_path="$path"
37343
37344  windows_path="$new_path"
37345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37346    unix_path=`$CYGPATH -u "$windows_path"`
37347    new_path="$unix_path"
37348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37350    new_path="$unix_path"
37351  fi
37352
37353    fi
37354
37355    if test "x$new_path" = x; then
37356      # It's still not found. Now this is an unrecoverable error.
37357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37358$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37359      has_space=`$ECHO "$complete" | $GREP " "`
37360      if test "x$has_space" != x; then
37361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37363      fi
37364      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37365    fi
37366  fi
37367
37368  # Now new_path has a complete unix path to the binary
37369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37370    # Keep paths in /bin as-is, but remove trailing .exe if any
37371    new_path="${new_path/%.exe/}"
37372    # Do not save /bin paths to all_fixpath_prefixes!
37373  else
37374    # Not in mixed or Windows style, start by that.
37375    new_path=`cmd //c echo $new_path`
37376
37377  input_path="$new_path"
37378  # Check if we need to convert this using DOS-style short mode. If the path
37379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37380  # take no chances and rewrite it.
37381  # Note: m4 eats our [], so we need to use [ and ] instead.
37382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37383  if test "x$has_forbidden_chars" != x; then
37384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37386  fi
37387
37388    # Output is in $new_path
37389
37390  windows_path="$new_path"
37391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37392    unix_path=`$CYGPATH -u "$windows_path"`
37393    new_path="$unix_path"
37394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37396    new_path="$unix_path"
37397  fi
37398
37399    # remove trailing .exe if any
37400    new_path="${new_path/%.exe/}"
37401
37402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37404  fi
37405
37406    else
37407      # We're on a unix platform. Hooray! :)
37408      # First separate the path from the arguments. This will split at the first
37409      # space.
37410      complete="$MT"
37411      path="${complete%% *}"
37412      tmp="$complete EOL"
37413      arguments="${tmp#* }"
37414
37415      # Cannot rely on the command "which" here since it doesn't always work.
37416      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37417      if test -z "$is_absolute_path"; then
37418        # Path to executable is not absolute. Find it.
37419        IFS_save="$IFS"
37420        IFS=:
37421        for p in $PATH; do
37422          if test -f "$p/$path" && test -x "$p/$path"; then
37423            new_path="$p/$path"
37424            break
37425          fi
37426        done
37427        IFS="$IFS_save"
37428      else
37429        # This is an absolute path, we can use it without further modifications.
37430        new_path="$path"
37431      fi
37432
37433      if test "x$new_path" = x; then
37434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37435$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37436        has_space=`$ECHO "$complete" | $GREP " "`
37437        if test "x$has_space" != x; then
37438          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37440        fi
37441        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37442      fi
37443    fi
37444
37445    # Now join together the path and the arguments once again
37446    if test "x$arguments" != xEOL; then
37447      new_complete="$new_path ${arguments% *}"
37448    else
37449      new_complete="$new_path"
37450    fi
37451
37452    if test "x$complete" != "x$new_complete"; then
37453      MT="$new_complete"
37454      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37455$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37456    fi
37457  fi
37458
37459    # Setup the resource compiler (RC)
37460    # Extract the first word of "rc", so it can be a program name with args.
37461set dummy rc; ac_word=$2
37462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37463$as_echo_n "checking for $ac_word... " >&6; }
37464if ${ac_cv_prog_RC+:} false; then :
37465  $as_echo_n "(cached) " >&6
37466else
37467  if test -n "$RC"; then
37468  ac_cv_prog_RC="$RC" # Let the user override the test.
37469else
37470  ac_prog_rejected=no
37471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37472for as_dir in $PATH
37473do
37474  IFS=$as_save_IFS
37475  test -z "$as_dir" && as_dir=.
37476    for ac_exec_ext in '' $ac_executable_extensions; do
37477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37478    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37479       ac_prog_rejected=yes
37480       continue
37481     fi
37482    ac_cv_prog_RC="rc"
37483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37484    break 2
37485  fi
37486done
37487  done
37488IFS=$as_save_IFS
37489
37490if test $ac_prog_rejected = yes; then
37491  # We found a bogon in the path, so make sure we never use it.
37492  set dummy $ac_cv_prog_RC
37493  shift
37494  if test $# != 0; then
37495    # We chose a different compiler from the bogus one.
37496    # However, it has the same basename, so the bogon will be chosen
37497    # first if we set RC to just the basename; use the full file name.
37498    shift
37499    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37500  fi
37501fi
37502fi
37503fi
37504RC=$ac_cv_prog_RC
37505if test -n "$RC"; then
37506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37507$as_echo "$RC" >&6; }
37508else
37509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37510$as_echo "no" >&6; }
37511fi
37512
37513
37514
37515  # Only process if variable expands to non-empty
37516
37517  if test "x$RC" != x; then
37518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37519
37520  # First separate the path from the arguments. This will split at the first
37521  # space.
37522  complete="$RC"
37523  path="${complete%% *}"
37524  tmp="$complete EOL"
37525  arguments="${tmp#* }"
37526
37527  # Input might be given as Windows format, start by converting to
37528  # unix format.
37529  new_path=`$CYGPATH -u "$path"`
37530
37531  # Now try to locate executable using which
37532  new_path=`$WHICH "$new_path" 2> /dev/null`
37533  # bat and cmd files are not always considered executable in cygwin causing which
37534  # to not find them
37535  if test "x$new_path" = x \
37536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37538    new_path=`$CYGPATH -u "$path"`
37539  fi
37540  if test "x$new_path" = x; then
37541    # Oops. Which didn't find the executable.
37542    # The splitting of arguments from the executable at a space might have been incorrect,
37543    # since paths with space are more likely in Windows. Give it another try with the whole
37544    # argument.
37545    path="$complete"
37546    arguments="EOL"
37547    new_path=`$CYGPATH -u "$path"`
37548    new_path=`$WHICH "$new_path" 2> /dev/null`
37549    # bat and cmd files are not always considered executable in cygwin causing which
37550    # to not find them
37551    if test "x$new_path" = x \
37552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37554      new_path=`$CYGPATH -u "$path"`
37555    fi
37556    if test "x$new_path" = x; then
37557      # It's still not found. Now this is an unrecoverable error.
37558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37559$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37560      has_space=`$ECHO "$complete" | $GREP " "`
37561      if test "x$has_space" != x; then
37562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37564      fi
37565      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37566    fi
37567  fi
37568
37569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37572  # "foo.exe" is OK but "foo" is an error.
37573  #
37574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37575  # It is also a way to make sure we got the proper file name for the real test later on.
37576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37577  if test "x$test_shortpath" = x; then
37578    # Short path failed, file does not exist as specified.
37579    # Try adding .exe or .cmd
37580    if test -f "${new_path}.exe"; then
37581      input_to_shortpath="${new_path}.exe"
37582    elif test -f "${new_path}.cmd"; then
37583      input_to_shortpath="${new_path}.cmd"
37584    else
37585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37586$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37589      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37590    fi
37591  else
37592    input_to_shortpath="$new_path"
37593  fi
37594
37595  # Call helper function which possibly converts this using DOS-style short mode.
37596  # If so, the updated path is stored in $new_path.
37597  new_path="$input_to_shortpath"
37598
37599  input_path="$input_to_shortpath"
37600  # Check if we need to convert this using DOS-style short mode. If the path
37601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37602  # take no chances and rewrite it.
37603  # Note: m4 eats our [], so we need to use [ and ] instead.
37604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37605  if test "x$has_forbidden_chars" != x; then
37606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37610      # Going to short mode and back again did indeed matter. Since short mode is
37611      # case insensitive, let's make it lowercase to improve readability.
37612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37613      # Now convert it back to Unix-style (cygpath)
37614      input_path=`$CYGPATH -u "$shortmode_path"`
37615      new_path="$input_path"
37616    fi
37617  fi
37618
37619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37620  if test "x$test_cygdrive_prefix" = x; then
37621    # As a simple fix, exclude /usr/bin since it's not a real path.
37622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37624      # a path prefixed by /cygdrive for fixpath to work.
37625      new_path="$CYGWIN_ROOT_PATH$input_path"
37626    fi
37627  fi
37628
37629  # remove trailing .exe if any
37630  new_path="${new_path/%.exe/}"
37631
37632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37633
37634  # First separate the path from the arguments. This will split at the first
37635  # space.
37636  complete="$RC"
37637  path="${complete%% *}"
37638  tmp="$complete EOL"
37639  arguments="${tmp#* }"
37640
37641  # Input might be given as Windows format, start by converting to
37642  # unix format.
37643  new_path="$path"
37644
37645  windows_path="$new_path"
37646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37647    unix_path=`$CYGPATH -u "$windows_path"`
37648    new_path="$unix_path"
37649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37651    new_path="$unix_path"
37652  fi
37653
37654
37655  # Now try to locate executable using which
37656  new_path=`$WHICH "$new_path" 2> /dev/null`
37657
37658  if test "x$new_path" = x; then
37659    # Oops. Which didn't find the executable.
37660    # The splitting of arguments from the executable at a space might have been incorrect,
37661    # since paths with space are more likely in Windows. Give it another try with the whole
37662    # argument.
37663    path="$complete"
37664    arguments="EOL"
37665    new_path="$path"
37666
37667  windows_path="$new_path"
37668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37669    unix_path=`$CYGPATH -u "$windows_path"`
37670    new_path="$unix_path"
37671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37673    new_path="$unix_path"
37674  fi
37675
37676
37677    new_path=`$WHICH "$new_path" 2> /dev/null`
37678    # bat and cmd files are not always considered executable in MSYS causing which
37679    # to not find them
37680    if test "x$new_path" = x \
37681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37683      new_path="$path"
37684
37685  windows_path="$new_path"
37686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37687    unix_path=`$CYGPATH -u "$windows_path"`
37688    new_path="$unix_path"
37689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37691    new_path="$unix_path"
37692  fi
37693
37694    fi
37695
37696    if test "x$new_path" = x; then
37697      # It's still not found. Now this is an unrecoverable error.
37698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37699$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37700      has_space=`$ECHO "$complete" | $GREP " "`
37701      if test "x$has_space" != x; then
37702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37704      fi
37705      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37706    fi
37707  fi
37708
37709  # Now new_path has a complete unix path to the binary
37710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37711    # Keep paths in /bin as-is, but remove trailing .exe if any
37712    new_path="${new_path/%.exe/}"
37713    # Do not save /bin paths to all_fixpath_prefixes!
37714  else
37715    # Not in mixed or Windows style, start by that.
37716    new_path=`cmd //c echo $new_path`
37717
37718  input_path="$new_path"
37719  # Check if we need to convert this using DOS-style short mode. If the path
37720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37721  # take no chances and rewrite it.
37722  # Note: m4 eats our [], so we need to use [ and ] instead.
37723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37724  if test "x$has_forbidden_chars" != x; then
37725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37727  fi
37728
37729    # Output is in $new_path
37730
37731  windows_path="$new_path"
37732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37733    unix_path=`$CYGPATH -u "$windows_path"`
37734    new_path="$unix_path"
37735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37737    new_path="$unix_path"
37738  fi
37739
37740    # remove trailing .exe if any
37741    new_path="${new_path/%.exe/}"
37742
37743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37745  fi
37746
37747    else
37748      # We're on a unix platform. Hooray! :)
37749      # First separate the path from the arguments. This will split at the first
37750      # space.
37751      complete="$RC"
37752      path="${complete%% *}"
37753      tmp="$complete EOL"
37754      arguments="${tmp#* }"
37755
37756      # Cannot rely on the command "which" here since it doesn't always work.
37757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37758      if test -z "$is_absolute_path"; then
37759        # Path to executable is not absolute. Find it.
37760        IFS_save="$IFS"
37761        IFS=:
37762        for p in $PATH; do
37763          if test -f "$p/$path" && test -x "$p/$path"; then
37764            new_path="$p/$path"
37765            break
37766          fi
37767        done
37768        IFS="$IFS_save"
37769      else
37770        # This is an absolute path, we can use it without further modifications.
37771        new_path="$path"
37772      fi
37773
37774      if test "x$new_path" = x; then
37775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37776$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37777        has_space=`$ECHO "$complete" | $GREP " "`
37778        if test "x$has_space" != x; then
37779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37781        fi
37782        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37783      fi
37784    fi
37785
37786    # Now join together the path and the arguments once again
37787    if test "x$arguments" != xEOL; then
37788      new_complete="$new_path ${arguments% *}"
37789    else
37790      new_complete="$new_path"
37791    fi
37792
37793    if test "x$complete" != "x$new_complete"; then
37794      RC="$new_complete"
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37796$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37797    fi
37798  fi
37799
37800    # Extract the first word of "dumpbin", so it can be a program name with args.
37801set dummy dumpbin; ac_word=$2
37802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37803$as_echo_n "checking for $ac_word... " >&6; }
37804if ${ac_cv_prog_DUMPBIN+:} false; then :
37805  $as_echo_n "(cached) " >&6
37806else
37807  if test -n "$DUMPBIN"; then
37808  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37809else
37810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37811for as_dir in $PATH
37812do
37813  IFS=$as_save_IFS
37814  test -z "$as_dir" && as_dir=.
37815    for ac_exec_ext in '' $ac_executable_extensions; do
37816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37817    ac_cv_prog_DUMPBIN="dumpbin"
37818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37819    break 2
37820  fi
37821done
37822  done
37823IFS=$as_save_IFS
37824
37825fi
37826fi
37827DUMPBIN=$ac_cv_prog_DUMPBIN
37828if test -n "$DUMPBIN"; then
37829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37830$as_echo "$DUMPBIN" >&6; }
37831else
37832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37833$as_echo "no" >&6; }
37834fi
37835
37836
37837
37838  # Only process if variable expands to non-empty
37839
37840  if test "x$DUMPBIN" != x; then
37841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37842
37843  # First separate the path from the arguments. This will split at the first
37844  # space.
37845  complete="$DUMPBIN"
37846  path="${complete%% *}"
37847  tmp="$complete EOL"
37848  arguments="${tmp#* }"
37849
37850  # Input might be given as Windows format, start by converting to
37851  # unix format.
37852  new_path=`$CYGPATH -u "$path"`
37853
37854  # Now try to locate executable using which
37855  new_path=`$WHICH "$new_path" 2> /dev/null`
37856  # bat and cmd files are not always considered executable in cygwin causing which
37857  # to not find them
37858  if test "x$new_path" = x \
37859      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37860      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37861    new_path=`$CYGPATH -u "$path"`
37862  fi
37863  if test "x$new_path" = x; then
37864    # Oops. Which didn't find the executable.
37865    # The splitting of arguments from the executable at a space might have been incorrect,
37866    # since paths with space are more likely in Windows. Give it another try with the whole
37867    # argument.
37868    path="$complete"
37869    arguments="EOL"
37870    new_path=`$CYGPATH -u "$path"`
37871    new_path=`$WHICH "$new_path" 2> /dev/null`
37872    # bat and cmd files are not always considered executable in cygwin causing which
37873    # to not find them
37874    if test "x$new_path" = x \
37875        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37876        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37877      new_path=`$CYGPATH -u "$path"`
37878    fi
37879    if test "x$new_path" = x; then
37880      # It's still not found. Now this is an unrecoverable error.
37881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37882$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37883      has_space=`$ECHO "$complete" | $GREP " "`
37884      if test "x$has_space" != x; then
37885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37887      fi
37888      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37889    fi
37890  fi
37891
37892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37895  # "foo.exe" is OK but "foo" is an error.
37896  #
37897  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37898  # It is also a way to make sure we got the proper file name for the real test later on.
37899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37900  if test "x$test_shortpath" = x; then
37901    # Short path failed, file does not exist as specified.
37902    # Try adding .exe or .cmd
37903    if test -f "${new_path}.exe"; then
37904      input_to_shortpath="${new_path}.exe"
37905    elif test -f "${new_path}.cmd"; then
37906      input_to_shortpath="${new_path}.cmd"
37907    else
37908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37909$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37912      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37913    fi
37914  else
37915    input_to_shortpath="$new_path"
37916  fi
37917
37918  # Call helper function which possibly converts this using DOS-style short mode.
37919  # If so, the updated path is stored in $new_path.
37920  new_path="$input_to_shortpath"
37921
37922  input_path="$input_to_shortpath"
37923  # Check if we need to convert this using DOS-style short mode. If the path
37924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37925  # take no chances and rewrite it.
37926  # Note: m4 eats our [], so we need to use [ and ] instead.
37927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37928  if test "x$has_forbidden_chars" != x; then
37929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37933      # Going to short mode and back again did indeed matter. Since short mode is
37934      # case insensitive, let's make it lowercase to improve readability.
37935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37936      # Now convert it back to Unix-style (cygpath)
37937      input_path=`$CYGPATH -u "$shortmode_path"`
37938      new_path="$input_path"
37939    fi
37940  fi
37941
37942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37943  if test "x$test_cygdrive_prefix" = x; then
37944    # As a simple fix, exclude /usr/bin since it's not a real path.
37945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37947      # a path prefixed by /cygdrive for fixpath to work.
37948      new_path="$CYGWIN_ROOT_PATH$input_path"
37949    fi
37950  fi
37951
37952  # remove trailing .exe if any
37953  new_path="${new_path/%.exe/}"
37954
37955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37956
37957  # First separate the path from the arguments. This will split at the first
37958  # space.
37959  complete="$DUMPBIN"
37960  path="${complete%% *}"
37961  tmp="$complete EOL"
37962  arguments="${tmp#* }"
37963
37964  # Input might be given as Windows format, start by converting to
37965  # unix format.
37966  new_path="$path"
37967
37968  windows_path="$new_path"
37969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37970    unix_path=`$CYGPATH -u "$windows_path"`
37971    new_path="$unix_path"
37972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37974    new_path="$unix_path"
37975  fi
37976
37977
37978  # Now try to locate executable using which
37979  new_path=`$WHICH "$new_path" 2> /dev/null`
37980
37981  if test "x$new_path" = x; then
37982    # Oops. Which didn't find the executable.
37983    # The splitting of arguments from the executable at a space might have been incorrect,
37984    # since paths with space are more likely in Windows. Give it another try with the whole
37985    # argument.
37986    path="$complete"
37987    arguments="EOL"
37988    new_path="$path"
37989
37990  windows_path="$new_path"
37991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37992    unix_path=`$CYGPATH -u "$windows_path"`
37993    new_path="$unix_path"
37994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37996    new_path="$unix_path"
37997  fi
37998
37999
38000    new_path=`$WHICH "$new_path" 2> /dev/null`
38001    # bat and cmd files are not always considered executable in MSYS causing which
38002    # to not find them
38003    if test "x$new_path" = x \
38004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38006      new_path="$path"
38007
38008  windows_path="$new_path"
38009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38010    unix_path=`$CYGPATH -u "$windows_path"`
38011    new_path="$unix_path"
38012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38014    new_path="$unix_path"
38015  fi
38016
38017    fi
38018
38019    if test "x$new_path" = x; then
38020      # It's still not found. Now this is an unrecoverable error.
38021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38022$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38023      has_space=`$ECHO "$complete" | $GREP " "`
38024      if test "x$has_space" != x; then
38025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38027      fi
38028      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38029    fi
38030  fi
38031
38032  # Now new_path has a complete unix path to the binary
38033  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38034    # Keep paths in /bin as-is, but remove trailing .exe if any
38035    new_path="${new_path/%.exe/}"
38036    # Do not save /bin paths to all_fixpath_prefixes!
38037  else
38038    # Not in mixed or Windows style, start by that.
38039    new_path=`cmd //c echo $new_path`
38040
38041  input_path="$new_path"
38042  # Check if we need to convert this using DOS-style short mode. If the path
38043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38044  # take no chances and rewrite it.
38045  # Note: m4 eats our [], so we need to use [ and ] instead.
38046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38047  if test "x$has_forbidden_chars" != x; then
38048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38050  fi
38051
38052    # Output is in $new_path
38053
38054  windows_path="$new_path"
38055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38056    unix_path=`$CYGPATH -u "$windows_path"`
38057    new_path="$unix_path"
38058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38060    new_path="$unix_path"
38061  fi
38062
38063    # remove trailing .exe if any
38064    new_path="${new_path/%.exe/}"
38065
38066    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38067    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38068  fi
38069
38070    else
38071      # We're on a unix platform. Hooray! :)
38072      # First separate the path from the arguments. This will split at the first
38073      # space.
38074      complete="$DUMPBIN"
38075      path="${complete%% *}"
38076      tmp="$complete EOL"
38077      arguments="${tmp#* }"
38078
38079      # Cannot rely on the command "which" here since it doesn't always work.
38080      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38081      if test -z "$is_absolute_path"; then
38082        # Path to executable is not absolute. Find it.
38083        IFS_save="$IFS"
38084        IFS=:
38085        for p in $PATH; do
38086          if test -f "$p/$path" && test -x "$p/$path"; then
38087            new_path="$p/$path"
38088            break
38089          fi
38090        done
38091        IFS="$IFS_save"
38092      else
38093        # This is an absolute path, we can use it without further modifications.
38094        new_path="$path"
38095      fi
38096
38097      if test "x$new_path" = x; then
38098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38099$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38100        has_space=`$ECHO "$complete" | $GREP " "`
38101        if test "x$has_space" != x; then
38102          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38103$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38104        fi
38105        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38106      fi
38107    fi
38108
38109    # Now join together the path and the arguments once again
38110    if test "x$arguments" != xEOL; then
38111      new_complete="$new_path ${arguments% *}"
38112    else
38113      new_complete="$new_path"
38114    fi
38115
38116    if test "x$complete" != "x$new_complete"; then
38117      DUMPBIN="$new_complete"
38118      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38119$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38120    fi
38121  fi
38122
38123    # We need to check for 'msbuild.exe' because at the place where we expect to
38124    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38125    # won't find the 'msbuild.exe' executable in that case (and the
38126    # 'ac_executable_extensions' is unusable due to performance reasons).
38127    # Notice that we intentionally don't fix up the path to MSBUILD because we
38128    # will call it in a DOS shell during freetype detection on Windows (see
38129    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38130    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38131set dummy msbuild.exe; ac_word=$2
38132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38133$as_echo_n "checking for $ac_word... " >&6; }
38134if ${ac_cv_prog_MSBUILD+:} false; then :
38135  $as_echo_n "(cached) " >&6
38136else
38137  if test -n "$MSBUILD"; then
38138  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38139else
38140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38141for as_dir in $PATH
38142do
38143  IFS=$as_save_IFS
38144  test -z "$as_dir" && as_dir=.
38145    for ac_exec_ext in '' $ac_executable_extensions; do
38146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38147    ac_cv_prog_MSBUILD="msbuild.exe"
38148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38149    break 2
38150  fi
38151done
38152  done
38153IFS=$as_save_IFS
38154
38155fi
38156fi
38157MSBUILD=$ac_cv_prog_MSBUILD
38158if test -n "$MSBUILD"; then
38159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38160$as_echo "$MSBUILD" >&6; }
38161else
38162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38163$as_echo "no" >&6; }
38164fi
38165
38166
38167  fi
38168
38169  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38170
38171
38172  # Publish this variable in the help.
38173
38174
38175  if [ -z "${STRIP+x}" ]; then
38176    # The variable is not set by user, try to locate tool using the code snippet
38177    for ac_prog in strip
38178do
38179  # Extract the first word of "$ac_prog", so it can be a program name with args.
38180set dummy $ac_prog; ac_word=$2
38181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38182$as_echo_n "checking for $ac_word... " >&6; }
38183if ${ac_cv_path_STRIP+:} false; then :
38184  $as_echo_n "(cached) " >&6
38185else
38186  case $STRIP in
38187  [\\/]* | ?:[\\/]*)
38188  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38189  ;;
38190  *)
38191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38192for as_dir in $PATH
38193do
38194  IFS=$as_save_IFS
38195  test -z "$as_dir" && as_dir=.
38196    for ac_exec_ext in '' $ac_executable_extensions; do
38197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38198    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38200    break 2
38201  fi
38202done
38203  done
38204IFS=$as_save_IFS
38205
38206  ;;
38207esac
38208fi
38209STRIP=$ac_cv_path_STRIP
38210if test -n "$STRIP"; then
38211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38212$as_echo "$STRIP" >&6; }
38213else
38214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38215$as_echo "no" >&6; }
38216fi
38217
38218
38219  test -n "$STRIP" && break
38220done
38221
38222  else
38223    # The variable is set, but is it from the command line or the environment?
38224
38225    # Try to remove the string !STRIP! from our list.
38226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38228      # If it failed, the variable was not from the command line. Ignore it,
38229      # but warn the user (except for BASH, which is always set by the calling BASH).
38230      if test "xSTRIP" != xBASH; then
38231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38232$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38233      fi
38234      # Try to locate tool using the code snippet
38235      for ac_prog in strip
38236do
38237  # Extract the first word of "$ac_prog", so it can be a program name with args.
38238set dummy $ac_prog; ac_word=$2
38239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38240$as_echo_n "checking for $ac_word... " >&6; }
38241if ${ac_cv_path_STRIP+:} false; then :
38242  $as_echo_n "(cached) " >&6
38243else
38244  case $STRIP in
38245  [\\/]* | ?:[\\/]*)
38246  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38247  ;;
38248  *)
38249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38250for as_dir in $PATH
38251do
38252  IFS=$as_save_IFS
38253  test -z "$as_dir" && as_dir=.
38254    for ac_exec_ext in '' $ac_executable_extensions; do
38255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38256    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38258    break 2
38259  fi
38260done
38261  done
38262IFS=$as_save_IFS
38263
38264  ;;
38265esac
38266fi
38267STRIP=$ac_cv_path_STRIP
38268if test -n "$STRIP"; then
38269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38270$as_echo "$STRIP" >&6; }
38271else
38272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38273$as_echo "no" >&6; }
38274fi
38275
38276
38277  test -n "$STRIP" && break
38278done
38279
38280    else
38281      # If it succeeded, then it was overridden by the user. We will use it
38282      # for the tool.
38283
38284      # First remove it from the list of overridden variables, so we can test
38285      # for unknown variables in the end.
38286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38287
38288      # Check if we try to supply an empty value
38289      if test "x$STRIP" = x; then
38290        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38291$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38293$as_echo_n "checking for STRIP... " >&6; }
38294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38295$as_echo "disabled" >&6; }
38296      else
38297        # Check if the provided tool contains a complete path.
38298        tool_specified="$STRIP"
38299        tool_basename="${tool_specified##*/}"
38300        if test "x$tool_basename" = "x$tool_specified"; then
38301          # A command without a complete path is provided, search $PATH.
38302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38303$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38304          # Extract the first word of "$tool_basename", so it can be a program name with args.
38305set dummy $tool_basename; ac_word=$2
38306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38307$as_echo_n "checking for $ac_word... " >&6; }
38308if ${ac_cv_path_STRIP+:} false; then :
38309  $as_echo_n "(cached) " >&6
38310else
38311  case $STRIP in
38312  [\\/]* | ?:[\\/]*)
38313  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38314  ;;
38315  *)
38316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38317for as_dir in $PATH
38318do
38319  IFS=$as_save_IFS
38320  test -z "$as_dir" && as_dir=.
38321    for ac_exec_ext in '' $ac_executable_extensions; do
38322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38323    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38325    break 2
38326  fi
38327done
38328  done
38329IFS=$as_save_IFS
38330
38331  ;;
38332esac
38333fi
38334STRIP=$ac_cv_path_STRIP
38335if test -n "$STRIP"; then
38336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38337$as_echo "$STRIP" >&6; }
38338else
38339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38340$as_echo "no" >&6; }
38341fi
38342
38343
38344          if test "x$STRIP" = x; then
38345            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38346          fi
38347        else
38348          # Otherwise we believe it is a complete path. Use it as it is.
38349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38350$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38351          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38352$as_echo_n "checking for STRIP... " >&6; }
38353          if test ! -x "$tool_specified"; then
38354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38355$as_echo "not found" >&6; }
38356            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38357          fi
38358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38359$as_echo "$tool_specified" >&6; }
38360        fi
38361      fi
38362    fi
38363
38364  fi
38365
38366
38367
38368  # Only process if variable expands to non-empty
38369
38370  if test "x$STRIP" != x; then
38371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38372
38373  # First separate the path from the arguments. This will split at the first
38374  # space.
38375  complete="$STRIP"
38376  path="${complete%% *}"
38377  tmp="$complete EOL"
38378  arguments="${tmp#* }"
38379
38380  # Input might be given as Windows format, start by converting to
38381  # unix format.
38382  new_path=`$CYGPATH -u "$path"`
38383
38384  # Now try to locate executable using which
38385  new_path=`$WHICH "$new_path" 2> /dev/null`
38386  # bat and cmd files are not always considered executable in cygwin causing which
38387  # to not find them
38388  if test "x$new_path" = x \
38389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38391    new_path=`$CYGPATH -u "$path"`
38392  fi
38393  if test "x$new_path" = x; then
38394    # Oops. Which didn't find the executable.
38395    # The splitting of arguments from the executable at a space might have been incorrect,
38396    # since paths with space are more likely in Windows. Give it another try with the whole
38397    # argument.
38398    path="$complete"
38399    arguments="EOL"
38400    new_path=`$CYGPATH -u "$path"`
38401    new_path=`$WHICH "$new_path" 2> /dev/null`
38402    # bat and cmd files are not always considered executable in cygwin causing which
38403    # to not find them
38404    if test "x$new_path" = x \
38405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38407      new_path=`$CYGPATH -u "$path"`
38408    fi
38409    if test "x$new_path" = x; then
38410      # It's still not found. Now this is an unrecoverable error.
38411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38412$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38413      has_space=`$ECHO "$complete" | $GREP " "`
38414      if test "x$has_space" != x; then
38415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38417      fi
38418      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38419    fi
38420  fi
38421
38422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38425  # "foo.exe" is OK but "foo" is an error.
38426  #
38427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38428  # It is also a way to make sure we got the proper file name for the real test later on.
38429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38430  if test "x$test_shortpath" = x; then
38431    # Short path failed, file does not exist as specified.
38432    # Try adding .exe or .cmd
38433    if test -f "${new_path}.exe"; then
38434      input_to_shortpath="${new_path}.exe"
38435    elif test -f "${new_path}.cmd"; then
38436      input_to_shortpath="${new_path}.cmd"
38437    else
38438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38439$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38442      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38443    fi
38444  else
38445    input_to_shortpath="$new_path"
38446  fi
38447
38448  # Call helper function which possibly converts this using DOS-style short mode.
38449  # If so, the updated path is stored in $new_path.
38450  new_path="$input_to_shortpath"
38451
38452  input_path="$input_to_shortpath"
38453  # Check if we need to convert this using DOS-style short mode. If the path
38454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38455  # take no chances and rewrite it.
38456  # Note: m4 eats our [], so we need to use [ and ] instead.
38457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38458  if test "x$has_forbidden_chars" != x; then
38459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38463      # Going to short mode and back again did indeed matter. Since short mode is
38464      # case insensitive, let's make it lowercase to improve readability.
38465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38466      # Now convert it back to Unix-style (cygpath)
38467      input_path=`$CYGPATH -u "$shortmode_path"`
38468      new_path="$input_path"
38469    fi
38470  fi
38471
38472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38473  if test "x$test_cygdrive_prefix" = x; then
38474    # As a simple fix, exclude /usr/bin since it's not a real path.
38475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38477      # a path prefixed by /cygdrive for fixpath to work.
38478      new_path="$CYGWIN_ROOT_PATH$input_path"
38479    fi
38480  fi
38481
38482  # remove trailing .exe if any
38483  new_path="${new_path/%.exe/}"
38484
38485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38486
38487  # First separate the path from the arguments. This will split at the first
38488  # space.
38489  complete="$STRIP"
38490  path="${complete%% *}"
38491  tmp="$complete EOL"
38492  arguments="${tmp#* }"
38493
38494  # Input might be given as Windows format, start by converting to
38495  # unix format.
38496  new_path="$path"
38497
38498  windows_path="$new_path"
38499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38500    unix_path=`$CYGPATH -u "$windows_path"`
38501    new_path="$unix_path"
38502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38504    new_path="$unix_path"
38505  fi
38506
38507
38508  # Now try to locate executable using which
38509  new_path=`$WHICH "$new_path" 2> /dev/null`
38510
38511  if test "x$new_path" = x; then
38512    # Oops. Which didn't find the executable.
38513    # The splitting of arguments from the executable at a space might have been incorrect,
38514    # since paths with space are more likely in Windows. Give it another try with the whole
38515    # argument.
38516    path="$complete"
38517    arguments="EOL"
38518    new_path="$path"
38519
38520  windows_path="$new_path"
38521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38522    unix_path=`$CYGPATH -u "$windows_path"`
38523    new_path="$unix_path"
38524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38526    new_path="$unix_path"
38527  fi
38528
38529
38530    new_path=`$WHICH "$new_path" 2> /dev/null`
38531    # bat and cmd files are not always considered executable in MSYS causing which
38532    # to not find them
38533    if test "x$new_path" = x \
38534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38536      new_path="$path"
38537
38538  windows_path="$new_path"
38539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38540    unix_path=`$CYGPATH -u "$windows_path"`
38541    new_path="$unix_path"
38542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38544    new_path="$unix_path"
38545  fi
38546
38547    fi
38548
38549    if test "x$new_path" = x; then
38550      # It's still not found. Now this is an unrecoverable error.
38551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38552$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38553      has_space=`$ECHO "$complete" | $GREP " "`
38554      if test "x$has_space" != x; then
38555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38557      fi
38558      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38559    fi
38560  fi
38561
38562  # Now new_path has a complete unix path to the binary
38563  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38564    # Keep paths in /bin as-is, but remove trailing .exe if any
38565    new_path="${new_path/%.exe/}"
38566    # Do not save /bin paths to all_fixpath_prefixes!
38567  else
38568    # Not in mixed or Windows style, start by that.
38569    new_path=`cmd //c echo $new_path`
38570
38571  input_path="$new_path"
38572  # Check if we need to convert this using DOS-style short mode. If the path
38573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38574  # take no chances and rewrite it.
38575  # Note: m4 eats our [], so we need to use [ and ] instead.
38576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38577  if test "x$has_forbidden_chars" != x; then
38578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38580  fi
38581
38582    # Output is in $new_path
38583
38584  windows_path="$new_path"
38585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38586    unix_path=`$CYGPATH -u "$windows_path"`
38587    new_path="$unix_path"
38588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38590    new_path="$unix_path"
38591  fi
38592
38593    # remove trailing .exe if any
38594    new_path="${new_path/%.exe/}"
38595
38596    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38597    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38598  fi
38599
38600    else
38601      # We're on a unix platform. Hooray! :)
38602      # First separate the path from the arguments. This will split at the first
38603      # space.
38604      complete="$STRIP"
38605      path="${complete%% *}"
38606      tmp="$complete EOL"
38607      arguments="${tmp#* }"
38608
38609      # Cannot rely on the command "which" here since it doesn't always work.
38610      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38611      if test -z "$is_absolute_path"; then
38612        # Path to executable is not absolute. Find it.
38613        IFS_save="$IFS"
38614        IFS=:
38615        for p in $PATH; do
38616          if test -f "$p/$path" && test -x "$p/$path"; then
38617            new_path="$p/$path"
38618            break
38619          fi
38620        done
38621        IFS="$IFS_save"
38622      else
38623        # This is an absolute path, we can use it without further modifications.
38624        new_path="$path"
38625      fi
38626
38627      if test "x$new_path" = x; then
38628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38629$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38630        has_space=`$ECHO "$complete" | $GREP " "`
38631        if test "x$has_space" != x; then
38632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38634        fi
38635        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38636      fi
38637    fi
38638
38639    # Now join together the path and the arguments once again
38640    if test "x$arguments" != xEOL; then
38641      new_complete="$new_path ${arguments% *}"
38642    else
38643      new_complete="$new_path"
38644    fi
38645
38646    if test "x$complete" != "x$new_complete"; then
38647      STRIP="$new_complete"
38648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38649$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38650    fi
38651  fi
38652
38653
38654
38655  # Publish this variable in the help.
38656
38657
38658  if [ -z "${NM+x}" ]; then
38659    # The variable is not set by user, try to locate tool using the code snippet
38660    for ac_prog in nm
38661do
38662  # Extract the first word of "$ac_prog", so it can be a program name with args.
38663set dummy $ac_prog; ac_word=$2
38664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38665$as_echo_n "checking for $ac_word... " >&6; }
38666if ${ac_cv_path_NM+:} false; then :
38667  $as_echo_n "(cached) " >&6
38668else
38669  case $NM in
38670  [\\/]* | ?:[\\/]*)
38671  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38672  ;;
38673  *)
38674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38675for as_dir in $PATH
38676do
38677  IFS=$as_save_IFS
38678  test -z "$as_dir" && as_dir=.
38679    for ac_exec_ext in '' $ac_executable_extensions; do
38680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38681    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38683    break 2
38684  fi
38685done
38686  done
38687IFS=$as_save_IFS
38688
38689  ;;
38690esac
38691fi
38692NM=$ac_cv_path_NM
38693if test -n "$NM"; then
38694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38695$as_echo "$NM" >&6; }
38696else
38697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38698$as_echo "no" >&6; }
38699fi
38700
38701
38702  test -n "$NM" && break
38703done
38704
38705  else
38706    # The variable is set, but is it from the command line or the environment?
38707
38708    # Try to remove the string !NM! from our list.
38709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38711      # If it failed, the variable was not from the command line. Ignore it,
38712      # but warn the user (except for BASH, which is always set by the calling BASH).
38713      if test "xNM" != xBASH; then
38714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38715$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38716      fi
38717      # Try to locate tool using the code snippet
38718      for ac_prog in nm
38719do
38720  # Extract the first word of "$ac_prog", so it can be a program name with args.
38721set dummy $ac_prog; ac_word=$2
38722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38723$as_echo_n "checking for $ac_word... " >&6; }
38724if ${ac_cv_path_NM+:} false; then :
38725  $as_echo_n "(cached) " >&6
38726else
38727  case $NM in
38728  [\\/]* | ?:[\\/]*)
38729  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38730  ;;
38731  *)
38732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38733for as_dir in $PATH
38734do
38735  IFS=$as_save_IFS
38736  test -z "$as_dir" && as_dir=.
38737    for ac_exec_ext in '' $ac_executable_extensions; do
38738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38739    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38741    break 2
38742  fi
38743done
38744  done
38745IFS=$as_save_IFS
38746
38747  ;;
38748esac
38749fi
38750NM=$ac_cv_path_NM
38751if test -n "$NM"; then
38752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38753$as_echo "$NM" >&6; }
38754else
38755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38756$as_echo "no" >&6; }
38757fi
38758
38759
38760  test -n "$NM" && break
38761done
38762
38763    else
38764      # If it succeeded, then it was overridden by the user. We will use it
38765      # for the tool.
38766
38767      # First remove it from the list of overridden variables, so we can test
38768      # for unknown variables in the end.
38769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38770
38771      # Check if we try to supply an empty value
38772      if test "x$NM" = x; then
38773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38774$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38776$as_echo_n "checking for NM... " >&6; }
38777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38778$as_echo "disabled" >&6; }
38779      else
38780        # Check if the provided tool contains a complete path.
38781        tool_specified="$NM"
38782        tool_basename="${tool_specified##*/}"
38783        if test "x$tool_basename" = "x$tool_specified"; then
38784          # A command without a complete path is provided, search $PATH.
38785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38786$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38787          # Extract the first word of "$tool_basename", so it can be a program name with args.
38788set dummy $tool_basename; ac_word=$2
38789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38790$as_echo_n "checking for $ac_word... " >&6; }
38791if ${ac_cv_path_NM+:} false; then :
38792  $as_echo_n "(cached) " >&6
38793else
38794  case $NM in
38795  [\\/]* | ?:[\\/]*)
38796  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38797  ;;
38798  *)
38799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38800for as_dir in $PATH
38801do
38802  IFS=$as_save_IFS
38803  test -z "$as_dir" && as_dir=.
38804    for ac_exec_ext in '' $ac_executable_extensions; do
38805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38806    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38808    break 2
38809  fi
38810done
38811  done
38812IFS=$as_save_IFS
38813
38814  ;;
38815esac
38816fi
38817NM=$ac_cv_path_NM
38818if test -n "$NM"; then
38819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38820$as_echo "$NM" >&6; }
38821else
38822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38823$as_echo "no" >&6; }
38824fi
38825
38826
38827          if test "x$NM" = x; then
38828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38829          fi
38830        else
38831          # Otherwise we believe it is a complete path. Use it as it is.
38832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38833$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38835$as_echo_n "checking for NM... " >&6; }
38836          if test ! -x "$tool_specified"; then
38837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38838$as_echo "not found" >&6; }
38839            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38840          fi
38841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38842$as_echo "$tool_specified" >&6; }
38843        fi
38844      fi
38845    fi
38846
38847  fi
38848
38849
38850
38851  # Only process if variable expands to non-empty
38852
38853  if test "x$NM" != x; then
38854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38855
38856  # First separate the path from the arguments. This will split at the first
38857  # space.
38858  complete="$NM"
38859  path="${complete%% *}"
38860  tmp="$complete EOL"
38861  arguments="${tmp#* }"
38862
38863  # Input might be given as Windows format, start by converting to
38864  # unix format.
38865  new_path=`$CYGPATH -u "$path"`
38866
38867  # Now try to locate executable using which
38868  new_path=`$WHICH "$new_path" 2> /dev/null`
38869  # bat and cmd files are not always considered executable in cygwin causing which
38870  # to not find them
38871  if test "x$new_path" = x \
38872      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38873      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38874    new_path=`$CYGPATH -u "$path"`
38875  fi
38876  if test "x$new_path" = x; then
38877    # Oops. Which didn't find the executable.
38878    # The splitting of arguments from the executable at a space might have been incorrect,
38879    # since paths with space are more likely in Windows. Give it another try with the whole
38880    # argument.
38881    path="$complete"
38882    arguments="EOL"
38883    new_path=`$CYGPATH -u "$path"`
38884    new_path=`$WHICH "$new_path" 2> /dev/null`
38885    # bat and cmd files are not always considered executable in cygwin causing which
38886    # to not find them
38887    if test "x$new_path" = x \
38888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38890      new_path=`$CYGPATH -u "$path"`
38891    fi
38892    if test "x$new_path" = x; then
38893      # It's still not found. Now this is an unrecoverable error.
38894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38895$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38896      has_space=`$ECHO "$complete" | $GREP " "`
38897      if test "x$has_space" != x; then
38898        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38899$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38900      fi
38901      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38902    fi
38903  fi
38904
38905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38908  # "foo.exe" is OK but "foo" is an error.
38909  #
38910  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38911  # It is also a way to make sure we got the proper file name for the real test later on.
38912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38913  if test "x$test_shortpath" = x; then
38914    # Short path failed, file does not exist as specified.
38915    # Try adding .exe or .cmd
38916    if test -f "${new_path}.exe"; then
38917      input_to_shortpath="${new_path}.exe"
38918    elif test -f "${new_path}.cmd"; then
38919      input_to_shortpath="${new_path}.cmd"
38920    else
38921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38922$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38923      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38924$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38925      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38926    fi
38927  else
38928    input_to_shortpath="$new_path"
38929  fi
38930
38931  # Call helper function which possibly converts this using DOS-style short mode.
38932  # If so, the updated path is stored in $new_path.
38933  new_path="$input_to_shortpath"
38934
38935  input_path="$input_to_shortpath"
38936  # Check if we need to convert this using DOS-style short mode. If the path
38937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38938  # take no chances and rewrite it.
38939  # Note: m4 eats our [], so we need to use [ and ] instead.
38940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38941  if test "x$has_forbidden_chars" != x; then
38942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38946      # Going to short mode and back again did indeed matter. Since short mode is
38947      # case insensitive, let's make it lowercase to improve readability.
38948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38949      # Now convert it back to Unix-style (cygpath)
38950      input_path=`$CYGPATH -u "$shortmode_path"`
38951      new_path="$input_path"
38952    fi
38953  fi
38954
38955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38956  if test "x$test_cygdrive_prefix" = x; then
38957    # As a simple fix, exclude /usr/bin since it's not a real path.
38958    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38960      # a path prefixed by /cygdrive for fixpath to work.
38961      new_path="$CYGWIN_ROOT_PATH$input_path"
38962    fi
38963  fi
38964
38965  # remove trailing .exe if any
38966  new_path="${new_path/%.exe/}"
38967
38968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38969
38970  # First separate the path from the arguments. This will split at the first
38971  # space.
38972  complete="$NM"
38973  path="${complete%% *}"
38974  tmp="$complete EOL"
38975  arguments="${tmp#* }"
38976
38977  # Input might be given as Windows format, start by converting to
38978  # unix format.
38979  new_path="$path"
38980
38981  windows_path="$new_path"
38982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38983    unix_path=`$CYGPATH -u "$windows_path"`
38984    new_path="$unix_path"
38985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38987    new_path="$unix_path"
38988  fi
38989
38990
38991  # Now try to locate executable using which
38992  new_path=`$WHICH "$new_path" 2> /dev/null`
38993
38994  if test "x$new_path" = x; then
38995    # Oops. Which didn't find the executable.
38996    # The splitting of arguments from the executable at a space might have been incorrect,
38997    # since paths with space are more likely in Windows. Give it another try with the whole
38998    # argument.
38999    path="$complete"
39000    arguments="EOL"
39001    new_path="$path"
39002
39003  windows_path="$new_path"
39004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39005    unix_path=`$CYGPATH -u "$windows_path"`
39006    new_path="$unix_path"
39007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39009    new_path="$unix_path"
39010  fi
39011
39012
39013    new_path=`$WHICH "$new_path" 2> /dev/null`
39014    # bat and cmd files are not always considered executable in MSYS causing which
39015    # to not find them
39016    if test "x$new_path" = x \
39017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39019      new_path="$path"
39020
39021  windows_path="$new_path"
39022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39023    unix_path=`$CYGPATH -u "$windows_path"`
39024    new_path="$unix_path"
39025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39027    new_path="$unix_path"
39028  fi
39029
39030    fi
39031
39032    if test "x$new_path" = x; then
39033      # It's still not found. Now this is an unrecoverable error.
39034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39035$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39036      has_space=`$ECHO "$complete" | $GREP " "`
39037      if test "x$has_space" != x; then
39038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39040      fi
39041      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39042    fi
39043  fi
39044
39045  # Now new_path has a complete unix path to the binary
39046  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39047    # Keep paths in /bin as-is, but remove trailing .exe if any
39048    new_path="${new_path/%.exe/}"
39049    # Do not save /bin paths to all_fixpath_prefixes!
39050  else
39051    # Not in mixed or Windows style, start by that.
39052    new_path=`cmd //c echo $new_path`
39053
39054  input_path="$new_path"
39055  # Check if we need to convert this using DOS-style short mode. If the path
39056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39057  # take no chances and rewrite it.
39058  # Note: m4 eats our [], so we need to use [ and ] instead.
39059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39060  if test "x$has_forbidden_chars" != x; then
39061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39063  fi
39064
39065    # Output is in $new_path
39066
39067  windows_path="$new_path"
39068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39069    unix_path=`$CYGPATH -u "$windows_path"`
39070    new_path="$unix_path"
39071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39073    new_path="$unix_path"
39074  fi
39075
39076    # remove trailing .exe if any
39077    new_path="${new_path/%.exe/}"
39078
39079    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39080    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39081  fi
39082
39083    else
39084      # We're on a unix platform. Hooray! :)
39085      # First separate the path from the arguments. This will split at the first
39086      # space.
39087      complete="$NM"
39088      path="${complete%% *}"
39089      tmp="$complete EOL"
39090      arguments="${tmp#* }"
39091
39092      # Cannot rely on the command "which" here since it doesn't always work.
39093      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39094      if test -z "$is_absolute_path"; then
39095        # Path to executable is not absolute. Find it.
39096        IFS_save="$IFS"
39097        IFS=:
39098        for p in $PATH; do
39099          if test -f "$p/$path" && test -x "$p/$path"; then
39100            new_path="$p/$path"
39101            break
39102          fi
39103        done
39104        IFS="$IFS_save"
39105      else
39106        # This is an absolute path, we can use it without further modifications.
39107        new_path="$path"
39108      fi
39109
39110      if test "x$new_path" = x; then
39111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39112$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39113        has_space=`$ECHO "$complete" | $GREP " "`
39114        if test "x$has_space" != x; then
39115          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39116$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39117        fi
39118        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39119      fi
39120    fi
39121
39122    # Now join together the path and the arguments once again
39123    if test "x$arguments" != xEOL; then
39124      new_complete="$new_path ${arguments% *}"
39125    else
39126      new_complete="$new_path"
39127    fi
39128
39129    if test "x$complete" != "x$new_complete"; then
39130      NM="$new_complete"
39131      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39132$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39133    fi
39134  fi
39135
39136
39137
39138  # Publish this variable in the help.
39139
39140
39141  if [ -z "${GNM+x}" ]; then
39142    # The variable is not set by user, try to locate tool using the code snippet
39143    for ac_prog in gnm
39144do
39145  # Extract the first word of "$ac_prog", so it can be a program name with args.
39146set dummy $ac_prog; ac_word=$2
39147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39148$as_echo_n "checking for $ac_word... " >&6; }
39149if ${ac_cv_path_GNM+:} false; then :
39150  $as_echo_n "(cached) " >&6
39151else
39152  case $GNM in
39153  [\\/]* | ?:[\\/]*)
39154  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39155  ;;
39156  *)
39157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39158for as_dir in $PATH
39159do
39160  IFS=$as_save_IFS
39161  test -z "$as_dir" && as_dir=.
39162    for ac_exec_ext in '' $ac_executable_extensions; do
39163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39164    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39166    break 2
39167  fi
39168done
39169  done
39170IFS=$as_save_IFS
39171
39172  ;;
39173esac
39174fi
39175GNM=$ac_cv_path_GNM
39176if test -n "$GNM"; then
39177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39178$as_echo "$GNM" >&6; }
39179else
39180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39181$as_echo "no" >&6; }
39182fi
39183
39184
39185  test -n "$GNM" && break
39186done
39187
39188  else
39189    # The variable is set, but is it from the command line or the environment?
39190
39191    # Try to remove the string !GNM! from our list.
39192    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39193    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39194      # If it failed, the variable was not from the command line. Ignore it,
39195      # but warn the user (except for BASH, which is always set by the calling BASH).
39196      if test "xGNM" != xBASH; then
39197        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39198$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39199      fi
39200      # Try to locate tool using the code snippet
39201      for ac_prog in gnm
39202do
39203  # Extract the first word of "$ac_prog", so it can be a program name with args.
39204set dummy $ac_prog; ac_word=$2
39205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39206$as_echo_n "checking for $ac_word... " >&6; }
39207if ${ac_cv_path_GNM+:} false; then :
39208  $as_echo_n "(cached) " >&6
39209else
39210  case $GNM in
39211  [\\/]* | ?:[\\/]*)
39212  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39213  ;;
39214  *)
39215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39216for as_dir in $PATH
39217do
39218  IFS=$as_save_IFS
39219  test -z "$as_dir" && as_dir=.
39220    for ac_exec_ext in '' $ac_executable_extensions; do
39221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39222    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39224    break 2
39225  fi
39226done
39227  done
39228IFS=$as_save_IFS
39229
39230  ;;
39231esac
39232fi
39233GNM=$ac_cv_path_GNM
39234if test -n "$GNM"; then
39235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39236$as_echo "$GNM" >&6; }
39237else
39238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39239$as_echo "no" >&6; }
39240fi
39241
39242
39243  test -n "$GNM" && break
39244done
39245
39246    else
39247      # If it succeeded, then it was overridden by the user. We will use it
39248      # for the tool.
39249
39250      # First remove it from the list of overridden variables, so we can test
39251      # for unknown variables in the end.
39252      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39253
39254      # Check if we try to supply an empty value
39255      if test "x$GNM" = x; then
39256        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39257$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39259$as_echo_n "checking for GNM... " >&6; }
39260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39261$as_echo "disabled" >&6; }
39262      else
39263        # Check if the provided tool contains a complete path.
39264        tool_specified="$GNM"
39265        tool_basename="${tool_specified##*/}"
39266        if test "x$tool_basename" = "x$tool_specified"; then
39267          # A command without a complete path is provided, search $PATH.
39268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39269$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39270          # Extract the first word of "$tool_basename", so it can be a program name with args.
39271set dummy $tool_basename; ac_word=$2
39272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39273$as_echo_n "checking for $ac_word... " >&6; }
39274if ${ac_cv_path_GNM+:} false; then :
39275  $as_echo_n "(cached) " >&6
39276else
39277  case $GNM in
39278  [\\/]* | ?:[\\/]*)
39279  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39280  ;;
39281  *)
39282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39283for as_dir in $PATH
39284do
39285  IFS=$as_save_IFS
39286  test -z "$as_dir" && as_dir=.
39287    for ac_exec_ext in '' $ac_executable_extensions; do
39288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39289    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39291    break 2
39292  fi
39293done
39294  done
39295IFS=$as_save_IFS
39296
39297  ;;
39298esac
39299fi
39300GNM=$ac_cv_path_GNM
39301if test -n "$GNM"; then
39302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39303$as_echo "$GNM" >&6; }
39304else
39305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39306$as_echo "no" >&6; }
39307fi
39308
39309
39310          if test "x$GNM" = x; then
39311            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39312          fi
39313        else
39314          # Otherwise we believe it is a complete path. Use it as it is.
39315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39316$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39317          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39318$as_echo_n "checking for GNM... " >&6; }
39319          if test ! -x "$tool_specified"; then
39320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39321$as_echo "not found" >&6; }
39322            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39323          fi
39324          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39325$as_echo "$tool_specified" >&6; }
39326        fi
39327      fi
39328    fi
39329
39330  fi
39331
39332
39333
39334  # Only process if variable expands to non-empty
39335
39336  if test "x$GNM" != x; then
39337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39338
39339  # First separate the path from the arguments. This will split at the first
39340  # space.
39341  complete="$GNM"
39342  path="${complete%% *}"
39343  tmp="$complete EOL"
39344  arguments="${tmp#* }"
39345
39346  # Input might be given as Windows format, start by converting to
39347  # unix format.
39348  new_path=`$CYGPATH -u "$path"`
39349
39350  # Now try to locate executable using which
39351  new_path=`$WHICH "$new_path" 2> /dev/null`
39352  # bat and cmd files are not always considered executable in cygwin causing which
39353  # to not find them
39354  if test "x$new_path" = x \
39355      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39356      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39357    new_path=`$CYGPATH -u "$path"`
39358  fi
39359  if test "x$new_path" = x; then
39360    # Oops. Which didn't find the executable.
39361    # The splitting of arguments from the executable at a space might have been incorrect,
39362    # since paths with space are more likely in Windows. Give it another try with the whole
39363    # argument.
39364    path="$complete"
39365    arguments="EOL"
39366    new_path=`$CYGPATH -u "$path"`
39367    new_path=`$WHICH "$new_path" 2> /dev/null`
39368    # bat and cmd files are not always considered executable in cygwin causing which
39369    # to not find them
39370    if test "x$new_path" = x \
39371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39373      new_path=`$CYGPATH -u "$path"`
39374    fi
39375    if test "x$new_path" = x; then
39376      # It's still not found. Now this is an unrecoverable error.
39377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39378$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39379      has_space=`$ECHO "$complete" | $GREP " "`
39380      if test "x$has_space" != x; then
39381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39383      fi
39384      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39385    fi
39386  fi
39387
39388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39391  # "foo.exe" is OK but "foo" is an error.
39392  #
39393  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39394  # It is also a way to make sure we got the proper file name for the real test later on.
39395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39396  if test "x$test_shortpath" = x; then
39397    # Short path failed, file does not exist as specified.
39398    # Try adding .exe or .cmd
39399    if test -f "${new_path}.exe"; then
39400      input_to_shortpath="${new_path}.exe"
39401    elif test -f "${new_path}.cmd"; then
39402      input_to_shortpath="${new_path}.cmd"
39403    else
39404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39405$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39408      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39409    fi
39410  else
39411    input_to_shortpath="$new_path"
39412  fi
39413
39414  # Call helper function which possibly converts this using DOS-style short mode.
39415  # If so, the updated path is stored in $new_path.
39416  new_path="$input_to_shortpath"
39417
39418  input_path="$input_to_shortpath"
39419  # Check if we need to convert this using DOS-style short mode. If the path
39420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39421  # take no chances and rewrite it.
39422  # Note: m4 eats our [], so we need to use [ and ] instead.
39423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39424  if test "x$has_forbidden_chars" != x; then
39425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39429      # Going to short mode and back again did indeed matter. Since short mode is
39430      # case insensitive, let's make it lowercase to improve readability.
39431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39432      # Now convert it back to Unix-style (cygpath)
39433      input_path=`$CYGPATH -u "$shortmode_path"`
39434      new_path="$input_path"
39435    fi
39436  fi
39437
39438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39439  if test "x$test_cygdrive_prefix" = x; then
39440    # As a simple fix, exclude /usr/bin since it's not a real path.
39441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39443      # a path prefixed by /cygdrive for fixpath to work.
39444      new_path="$CYGWIN_ROOT_PATH$input_path"
39445    fi
39446  fi
39447
39448  # remove trailing .exe if any
39449  new_path="${new_path/%.exe/}"
39450
39451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39452
39453  # First separate the path from the arguments. This will split at the first
39454  # space.
39455  complete="$GNM"
39456  path="${complete%% *}"
39457  tmp="$complete EOL"
39458  arguments="${tmp#* }"
39459
39460  # Input might be given as Windows format, start by converting to
39461  # unix format.
39462  new_path="$path"
39463
39464  windows_path="$new_path"
39465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39466    unix_path=`$CYGPATH -u "$windows_path"`
39467    new_path="$unix_path"
39468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39470    new_path="$unix_path"
39471  fi
39472
39473
39474  # Now try to locate executable using which
39475  new_path=`$WHICH "$new_path" 2> /dev/null`
39476
39477  if test "x$new_path" = x; then
39478    # Oops. Which didn't find the executable.
39479    # The splitting of arguments from the executable at a space might have been incorrect,
39480    # since paths with space are more likely in Windows. Give it another try with the whole
39481    # argument.
39482    path="$complete"
39483    arguments="EOL"
39484    new_path="$path"
39485
39486  windows_path="$new_path"
39487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39488    unix_path=`$CYGPATH -u "$windows_path"`
39489    new_path="$unix_path"
39490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39492    new_path="$unix_path"
39493  fi
39494
39495
39496    new_path=`$WHICH "$new_path" 2> /dev/null`
39497    # bat and cmd files are not always considered executable in MSYS causing which
39498    # to not find them
39499    if test "x$new_path" = x \
39500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39502      new_path="$path"
39503
39504  windows_path="$new_path"
39505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39506    unix_path=`$CYGPATH -u "$windows_path"`
39507    new_path="$unix_path"
39508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39510    new_path="$unix_path"
39511  fi
39512
39513    fi
39514
39515    if test "x$new_path" = x; then
39516      # It's still not found. Now this is an unrecoverable error.
39517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39518$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39519      has_space=`$ECHO "$complete" | $GREP " "`
39520      if test "x$has_space" != x; then
39521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39523      fi
39524      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39525    fi
39526  fi
39527
39528  # Now new_path has a complete unix path to the binary
39529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39530    # Keep paths in /bin as-is, but remove trailing .exe if any
39531    new_path="${new_path/%.exe/}"
39532    # Do not save /bin paths to all_fixpath_prefixes!
39533  else
39534    # Not in mixed or Windows style, start by that.
39535    new_path=`cmd //c echo $new_path`
39536
39537  input_path="$new_path"
39538  # Check if we need to convert this using DOS-style short mode. If the path
39539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39540  # take no chances and rewrite it.
39541  # Note: m4 eats our [], so we need to use [ and ] instead.
39542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39543  if test "x$has_forbidden_chars" != x; then
39544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39546  fi
39547
39548    # Output is in $new_path
39549
39550  windows_path="$new_path"
39551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39552    unix_path=`$CYGPATH -u "$windows_path"`
39553    new_path="$unix_path"
39554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39556    new_path="$unix_path"
39557  fi
39558
39559    # remove trailing .exe if any
39560    new_path="${new_path/%.exe/}"
39561
39562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39564  fi
39565
39566    else
39567      # We're on a unix platform. Hooray! :)
39568      # First separate the path from the arguments. This will split at the first
39569      # space.
39570      complete="$GNM"
39571      path="${complete%% *}"
39572      tmp="$complete EOL"
39573      arguments="${tmp#* }"
39574
39575      # Cannot rely on the command "which" here since it doesn't always work.
39576      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39577      if test -z "$is_absolute_path"; then
39578        # Path to executable is not absolute. Find it.
39579        IFS_save="$IFS"
39580        IFS=:
39581        for p in $PATH; do
39582          if test -f "$p/$path" && test -x "$p/$path"; then
39583            new_path="$p/$path"
39584            break
39585          fi
39586        done
39587        IFS="$IFS_save"
39588      else
39589        # This is an absolute path, we can use it without further modifications.
39590        new_path="$path"
39591      fi
39592
39593      if test "x$new_path" = x; then
39594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39595$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39596        has_space=`$ECHO "$complete" | $GREP " "`
39597        if test "x$has_space" != x; then
39598          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39599$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39600        fi
39601        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39602      fi
39603    fi
39604
39605    # Now join together the path and the arguments once again
39606    if test "x$arguments" != xEOL; then
39607      new_complete="$new_path ${arguments% *}"
39608    else
39609      new_complete="$new_path"
39610    fi
39611
39612    if test "x$complete" != "x$new_complete"; then
39613      GNM="$new_complete"
39614      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39615$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39616    fi
39617  fi
39618
39619  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39620    # FIXME: we should unify this with the solaris case above.
39621
39622
39623  # Publish this variable in the help.
39624
39625
39626  if [ -z "${STRIP+x}" ]; then
39627    # The variable is not set by user, try to locate tool using the code snippet
39628    if test -n "$ac_tool_prefix"; then
39629  for ac_prog in strip
39630  do
39631    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39632set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39634$as_echo_n "checking for $ac_word... " >&6; }
39635if ${ac_cv_prog_STRIP+:} false; then :
39636  $as_echo_n "(cached) " >&6
39637else
39638  if test -n "$STRIP"; then
39639  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39640else
39641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39642for as_dir in $PATH
39643do
39644  IFS=$as_save_IFS
39645  test -z "$as_dir" && as_dir=.
39646    for ac_exec_ext in '' $ac_executable_extensions; do
39647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39648    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39650    break 2
39651  fi
39652done
39653  done
39654IFS=$as_save_IFS
39655
39656fi
39657fi
39658STRIP=$ac_cv_prog_STRIP
39659if test -n "$STRIP"; then
39660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39661$as_echo "$STRIP" >&6; }
39662else
39663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39664$as_echo "no" >&6; }
39665fi
39666
39667
39668    test -n "$STRIP" && break
39669  done
39670fi
39671if test -z "$STRIP"; then
39672  ac_ct_STRIP=$STRIP
39673  for ac_prog in strip
39674do
39675  # Extract the first word of "$ac_prog", so it can be a program name with args.
39676set dummy $ac_prog; ac_word=$2
39677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39678$as_echo_n "checking for $ac_word... " >&6; }
39679if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39680  $as_echo_n "(cached) " >&6
39681else
39682  if test -n "$ac_ct_STRIP"; then
39683  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39684else
39685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39686for as_dir in $PATH
39687do
39688  IFS=$as_save_IFS
39689  test -z "$as_dir" && as_dir=.
39690    for ac_exec_ext in '' $ac_executable_extensions; do
39691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39692    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39694    break 2
39695  fi
39696done
39697  done
39698IFS=$as_save_IFS
39699
39700fi
39701fi
39702ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39703if test -n "$ac_ct_STRIP"; then
39704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39705$as_echo "$ac_ct_STRIP" >&6; }
39706else
39707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39708$as_echo "no" >&6; }
39709fi
39710
39711
39712  test -n "$ac_ct_STRIP" && break
39713done
39714
39715  if test "x$ac_ct_STRIP" = x; then
39716    STRIP=""
39717  else
39718    case $cross_compiling:$ac_tool_warned in
39719yes:)
39720{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39721$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39722ac_tool_warned=yes ;;
39723esac
39724    STRIP=$ac_ct_STRIP
39725  fi
39726fi
39727
39728  else
39729    # The variable is set, but is it from the command line or the environment?
39730
39731    # Try to remove the string !STRIP! from our list.
39732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39734      # If it failed, the variable was not from the command line. Ignore it,
39735      # but warn the user (except for BASH, which is always set by the calling BASH).
39736      if test "xSTRIP" != xBASH; then
39737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39738$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39739      fi
39740      # Try to locate tool using the code snippet
39741      if test -n "$ac_tool_prefix"; then
39742  for ac_prog in strip
39743  do
39744    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39747$as_echo_n "checking for $ac_word... " >&6; }
39748if ${ac_cv_prog_STRIP+:} false; then :
39749  $as_echo_n "(cached) " >&6
39750else
39751  if test -n "$STRIP"; then
39752  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39753else
39754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39755for as_dir in $PATH
39756do
39757  IFS=$as_save_IFS
39758  test -z "$as_dir" && as_dir=.
39759    for ac_exec_ext in '' $ac_executable_extensions; do
39760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39761    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39763    break 2
39764  fi
39765done
39766  done
39767IFS=$as_save_IFS
39768
39769fi
39770fi
39771STRIP=$ac_cv_prog_STRIP
39772if test -n "$STRIP"; then
39773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39774$as_echo "$STRIP" >&6; }
39775else
39776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39777$as_echo "no" >&6; }
39778fi
39779
39780
39781    test -n "$STRIP" && break
39782  done
39783fi
39784if test -z "$STRIP"; then
39785  ac_ct_STRIP=$STRIP
39786  for ac_prog in strip
39787do
39788  # Extract the first word of "$ac_prog", so it can be a program name with args.
39789set dummy $ac_prog; ac_word=$2
39790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39791$as_echo_n "checking for $ac_word... " >&6; }
39792if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39793  $as_echo_n "(cached) " >&6
39794else
39795  if test -n "$ac_ct_STRIP"; then
39796  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39797else
39798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39799for as_dir in $PATH
39800do
39801  IFS=$as_save_IFS
39802  test -z "$as_dir" && as_dir=.
39803    for ac_exec_ext in '' $ac_executable_extensions; do
39804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39805    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39807    break 2
39808  fi
39809done
39810  done
39811IFS=$as_save_IFS
39812
39813fi
39814fi
39815ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39816if test -n "$ac_ct_STRIP"; then
39817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39818$as_echo "$ac_ct_STRIP" >&6; }
39819else
39820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39821$as_echo "no" >&6; }
39822fi
39823
39824
39825  test -n "$ac_ct_STRIP" && break
39826done
39827
39828  if test "x$ac_ct_STRIP" = x; then
39829    STRIP=""
39830  else
39831    case $cross_compiling:$ac_tool_warned in
39832yes:)
39833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39835ac_tool_warned=yes ;;
39836esac
39837    STRIP=$ac_ct_STRIP
39838  fi
39839fi
39840
39841    else
39842      # If it succeeded, then it was overridden by the user. We will use it
39843      # for the tool.
39844
39845      # First remove it from the list of overridden variables, so we can test
39846      # for unknown variables in the end.
39847      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39848
39849      # Check if we try to supply an empty value
39850      if test "x$STRIP" = x; then
39851        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39852$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39853        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39854$as_echo_n "checking for STRIP... " >&6; }
39855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39856$as_echo "disabled" >&6; }
39857      else
39858        # Check if the provided tool contains a complete path.
39859        tool_specified="$STRIP"
39860        tool_basename="${tool_specified##*/}"
39861        if test "x$tool_basename" = "x$tool_specified"; then
39862          # A command without a complete path is provided, search $PATH.
39863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39864$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39865          # Extract the first word of "$tool_basename", so it can be a program name with args.
39866set dummy $tool_basename; ac_word=$2
39867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39868$as_echo_n "checking for $ac_word... " >&6; }
39869if ${ac_cv_path_STRIP+:} false; then :
39870  $as_echo_n "(cached) " >&6
39871else
39872  case $STRIP in
39873  [\\/]* | ?:[\\/]*)
39874  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39875  ;;
39876  *)
39877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39878for as_dir in $PATH
39879do
39880  IFS=$as_save_IFS
39881  test -z "$as_dir" && as_dir=.
39882    for ac_exec_ext in '' $ac_executable_extensions; do
39883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39884    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39886    break 2
39887  fi
39888done
39889  done
39890IFS=$as_save_IFS
39891
39892  ;;
39893esac
39894fi
39895STRIP=$ac_cv_path_STRIP
39896if test -n "$STRIP"; then
39897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39898$as_echo "$STRIP" >&6; }
39899else
39900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39901$as_echo "no" >&6; }
39902fi
39903
39904
39905          if test "x$STRIP" = x; then
39906            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39907          fi
39908        else
39909          # Otherwise we believe it is a complete path. Use it as it is.
39910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39911$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39912          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39913$as_echo_n "checking for STRIP... " >&6; }
39914          if test ! -x "$tool_specified"; then
39915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39916$as_echo "not found" >&6; }
39917            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39918          fi
39919          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39920$as_echo "$tool_specified" >&6; }
39921        fi
39922      fi
39923    fi
39924
39925  fi
39926
39927
39928
39929  # Only process if variable expands to non-empty
39930
39931  if test "x$STRIP" != x; then
39932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39933
39934  # First separate the path from the arguments. This will split at the first
39935  # space.
39936  complete="$STRIP"
39937  path="${complete%% *}"
39938  tmp="$complete EOL"
39939  arguments="${tmp#* }"
39940
39941  # Input might be given as Windows format, start by converting to
39942  # unix format.
39943  new_path=`$CYGPATH -u "$path"`
39944
39945  # Now try to locate executable using which
39946  new_path=`$WHICH "$new_path" 2> /dev/null`
39947  # bat and cmd files are not always considered executable in cygwin causing which
39948  # to not find them
39949  if test "x$new_path" = x \
39950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39952    new_path=`$CYGPATH -u "$path"`
39953  fi
39954  if test "x$new_path" = x; then
39955    # Oops. Which didn't find the executable.
39956    # The splitting of arguments from the executable at a space might have been incorrect,
39957    # since paths with space are more likely in Windows. Give it another try with the whole
39958    # argument.
39959    path="$complete"
39960    arguments="EOL"
39961    new_path=`$CYGPATH -u "$path"`
39962    new_path=`$WHICH "$new_path" 2> /dev/null`
39963    # bat and cmd files are not always considered executable in cygwin causing which
39964    # to not find them
39965    if test "x$new_path" = x \
39966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39968      new_path=`$CYGPATH -u "$path"`
39969    fi
39970    if test "x$new_path" = x; then
39971      # It's still not found. Now this is an unrecoverable error.
39972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39973$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39974      has_space=`$ECHO "$complete" | $GREP " "`
39975      if test "x$has_space" != x; then
39976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39978      fi
39979      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39980    fi
39981  fi
39982
39983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39986  # "foo.exe" is OK but "foo" is an error.
39987  #
39988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39989  # It is also a way to make sure we got the proper file name for the real test later on.
39990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39991  if test "x$test_shortpath" = x; then
39992    # Short path failed, file does not exist as specified.
39993    # Try adding .exe or .cmd
39994    if test -f "${new_path}.exe"; then
39995      input_to_shortpath="${new_path}.exe"
39996    elif test -f "${new_path}.cmd"; then
39997      input_to_shortpath="${new_path}.cmd"
39998    else
39999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40000$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40003      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40004    fi
40005  else
40006    input_to_shortpath="$new_path"
40007  fi
40008
40009  # Call helper function which possibly converts this using DOS-style short mode.
40010  # If so, the updated path is stored in $new_path.
40011  new_path="$input_to_shortpath"
40012
40013  input_path="$input_to_shortpath"
40014  # Check if we need to convert this using DOS-style short mode. If the path
40015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40016  # take no chances and rewrite it.
40017  # Note: m4 eats our [], so we need to use [ and ] instead.
40018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40019  if test "x$has_forbidden_chars" != x; then
40020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40024      # Going to short mode and back again did indeed matter. Since short mode is
40025      # case insensitive, let's make it lowercase to improve readability.
40026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40027      # Now convert it back to Unix-style (cygpath)
40028      input_path=`$CYGPATH -u "$shortmode_path"`
40029      new_path="$input_path"
40030    fi
40031  fi
40032
40033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40034  if test "x$test_cygdrive_prefix" = x; then
40035    # As a simple fix, exclude /usr/bin since it's not a real path.
40036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40038      # a path prefixed by /cygdrive for fixpath to work.
40039      new_path="$CYGWIN_ROOT_PATH$input_path"
40040    fi
40041  fi
40042
40043  # remove trailing .exe if any
40044  new_path="${new_path/%.exe/}"
40045
40046    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40047
40048  # First separate the path from the arguments. This will split at the first
40049  # space.
40050  complete="$STRIP"
40051  path="${complete%% *}"
40052  tmp="$complete EOL"
40053  arguments="${tmp#* }"
40054
40055  # Input might be given as Windows format, start by converting to
40056  # unix format.
40057  new_path="$path"
40058
40059  windows_path="$new_path"
40060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40061    unix_path=`$CYGPATH -u "$windows_path"`
40062    new_path="$unix_path"
40063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40065    new_path="$unix_path"
40066  fi
40067
40068
40069  # Now try to locate executable using which
40070  new_path=`$WHICH "$new_path" 2> /dev/null`
40071
40072  if test "x$new_path" = x; then
40073    # Oops. Which didn't find the executable.
40074    # The splitting of arguments from the executable at a space might have been incorrect,
40075    # since paths with space are more likely in Windows. Give it another try with the whole
40076    # argument.
40077    path="$complete"
40078    arguments="EOL"
40079    new_path="$path"
40080
40081  windows_path="$new_path"
40082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40083    unix_path=`$CYGPATH -u "$windows_path"`
40084    new_path="$unix_path"
40085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40087    new_path="$unix_path"
40088  fi
40089
40090
40091    new_path=`$WHICH "$new_path" 2> /dev/null`
40092    # bat and cmd files are not always considered executable in MSYS causing which
40093    # to not find them
40094    if test "x$new_path" = x \
40095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40097      new_path="$path"
40098
40099  windows_path="$new_path"
40100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40101    unix_path=`$CYGPATH -u "$windows_path"`
40102    new_path="$unix_path"
40103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40105    new_path="$unix_path"
40106  fi
40107
40108    fi
40109
40110    if test "x$new_path" = x; then
40111      # It's still not found. Now this is an unrecoverable error.
40112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40113$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40114      has_space=`$ECHO "$complete" | $GREP " "`
40115      if test "x$has_space" != x; then
40116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40118      fi
40119      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40120    fi
40121  fi
40122
40123  # Now new_path has a complete unix path to the binary
40124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40125    # Keep paths in /bin as-is, but remove trailing .exe if any
40126    new_path="${new_path/%.exe/}"
40127    # Do not save /bin paths to all_fixpath_prefixes!
40128  else
40129    # Not in mixed or Windows style, start by that.
40130    new_path=`cmd //c echo $new_path`
40131
40132  input_path="$new_path"
40133  # Check if we need to convert this using DOS-style short mode. If the path
40134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40135  # take no chances and rewrite it.
40136  # Note: m4 eats our [], so we need to use [ and ] instead.
40137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40138  if test "x$has_forbidden_chars" != x; then
40139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40141  fi
40142
40143    # Output is in $new_path
40144
40145  windows_path="$new_path"
40146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40147    unix_path=`$CYGPATH -u "$windows_path"`
40148    new_path="$unix_path"
40149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40151    new_path="$unix_path"
40152  fi
40153
40154    # remove trailing .exe if any
40155    new_path="${new_path/%.exe/}"
40156
40157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40159  fi
40160
40161    else
40162      # We're on a unix platform. Hooray! :)
40163      # First separate the path from the arguments. This will split at the first
40164      # space.
40165      complete="$STRIP"
40166      path="${complete%% *}"
40167      tmp="$complete EOL"
40168      arguments="${tmp#* }"
40169
40170      # Cannot rely on the command "which" here since it doesn't always work.
40171      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40172      if test -z "$is_absolute_path"; then
40173        # Path to executable is not absolute. Find it.
40174        IFS_save="$IFS"
40175        IFS=:
40176        for p in $PATH; do
40177          if test -f "$p/$path" && test -x "$p/$path"; then
40178            new_path="$p/$path"
40179            break
40180          fi
40181        done
40182        IFS="$IFS_save"
40183      else
40184        # This is an absolute path, we can use it without further modifications.
40185        new_path="$path"
40186      fi
40187
40188      if test "x$new_path" = x; then
40189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40190$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40191        has_space=`$ECHO "$complete" | $GREP " "`
40192        if test "x$has_space" != x; then
40193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40195        fi
40196        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40197      fi
40198    fi
40199
40200    # Now join together the path and the arguments once again
40201    if test "x$arguments" != xEOL; then
40202      new_complete="$new_path ${arguments% *}"
40203    else
40204      new_complete="$new_path"
40205    fi
40206
40207    if test "x$complete" != "x$new_complete"; then
40208      STRIP="$new_complete"
40209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40210$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40211    fi
40212  fi
40213
40214    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40215
40216
40217  # Publish this variable in the help.
40218
40219
40220  if [ -z "${NM+x}" ]; then
40221    # The variable is not set by user, try to locate tool using the code snippet
40222    if test -n "$ac_tool_prefix"; then
40223  for ac_prog in nm gcc-nm
40224  do
40225    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40228$as_echo_n "checking for $ac_word... " >&6; }
40229if ${ac_cv_prog_NM+:} false; then :
40230  $as_echo_n "(cached) " >&6
40231else
40232  if test -n "$NM"; then
40233  ac_cv_prog_NM="$NM" # Let the user override the test.
40234else
40235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40236for as_dir in $PATH
40237do
40238  IFS=$as_save_IFS
40239  test -z "$as_dir" && as_dir=.
40240    for ac_exec_ext in '' $ac_executable_extensions; do
40241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40242    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40244    break 2
40245  fi
40246done
40247  done
40248IFS=$as_save_IFS
40249
40250fi
40251fi
40252NM=$ac_cv_prog_NM
40253if test -n "$NM"; then
40254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40255$as_echo "$NM" >&6; }
40256else
40257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40258$as_echo "no" >&6; }
40259fi
40260
40261
40262    test -n "$NM" && break
40263  done
40264fi
40265if test -z "$NM"; then
40266  ac_ct_NM=$NM
40267  for ac_prog in nm gcc-nm
40268do
40269  # Extract the first word of "$ac_prog", so it can be a program name with args.
40270set dummy $ac_prog; ac_word=$2
40271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40272$as_echo_n "checking for $ac_word... " >&6; }
40273if ${ac_cv_prog_ac_ct_NM+:} false; then :
40274  $as_echo_n "(cached) " >&6
40275else
40276  if test -n "$ac_ct_NM"; then
40277  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40278else
40279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40280for as_dir in $PATH
40281do
40282  IFS=$as_save_IFS
40283  test -z "$as_dir" && as_dir=.
40284    for ac_exec_ext in '' $ac_executable_extensions; do
40285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40286    ac_cv_prog_ac_ct_NM="$ac_prog"
40287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40288    break 2
40289  fi
40290done
40291  done
40292IFS=$as_save_IFS
40293
40294fi
40295fi
40296ac_ct_NM=$ac_cv_prog_ac_ct_NM
40297if test -n "$ac_ct_NM"; then
40298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40299$as_echo "$ac_ct_NM" >&6; }
40300else
40301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40302$as_echo "no" >&6; }
40303fi
40304
40305
40306  test -n "$ac_ct_NM" && break
40307done
40308
40309  if test "x$ac_ct_NM" = x; then
40310    NM=""
40311  else
40312    case $cross_compiling:$ac_tool_warned in
40313yes:)
40314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40316ac_tool_warned=yes ;;
40317esac
40318    NM=$ac_ct_NM
40319  fi
40320fi
40321
40322  else
40323    # The variable is set, but is it from the command line or the environment?
40324
40325    # Try to remove the string !NM! from our list.
40326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40328      # If it failed, the variable was not from the command line. Ignore it,
40329      # but warn the user (except for BASH, which is always set by the calling BASH).
40330      if test "xNM" != xBASH; then
40331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40332$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40333      fi
40334      # Try to locate tool using the code snippet
40335      if test -n "$ac_tool_prefix"; then
40336  for ac_prog in nm gcc-nm
40337  do
40338    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40339set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40341$as_echo_n "checking for $ac_word... " >&6; }
40342if ${ac_cv_prog_NM+:} false; then :
40343  $as_echo_n "(cached) " >&6
40344else
40345  if test -n "$NM"; then
40346  ac_cv_prog_NM="$NM" # Let the user override the test.
40347else
40348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40349for as_dir in $PATH
40350do
40351  IFS=$as_save_IFS
40352  test -z "$as_dir" && as_dir=.
40353    for ac_exec_ext in '' $ac_executable_extensions; do
40354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40355    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40357    break 2
40358  fi
40359done
40360  done
40361IFS=$as_save_IFS
40362
40363fi
40364fi
40365NM=$ac_cv_prog_NM
40366if test -n "$NM"; then
40367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40368$as_echo "$NM" >&6; }
40369else
40370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40371$as_echo "no" >&6; }
40372fi
40373
40374
40375    test -n "$NM" && break
40376  done
40377fi
40378if test -z "$NM"; then
40379  ac_ct_NM=$NM
40380  for ac_prog in nm gcc-nm
40381do
40382  # Extract the first word of "$ac_prog", so it can be a program name with args.
40383set dummy $ac_prog; ac_word=$2
40384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40385$as_echo_n "checking for $ac_word... " >&6; }
40386if ${ac_cv_prog_ac_ct_NM+:} false; then :
40387  $as_echo_n "(cached) " >&6
40388else
40389  if test -n "$ac_ct_NM"; then
40390  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40391else
40392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40393for as_dir in $PATH
40394do
40395  IFS=$as_save_IFS
40396  test -z "$as_dir" && as_dir=.
40397    for ac_exec_ext in '' $ac_executable_extensions; do
40398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40399    ac_cv_prog_ac_ct_NM="$ac_prog"
40400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40401    break 2
40402  fi
40403done
40404  done
40405IFS=$as_save_IFS
40406
40407fi
40408fi
40409ac_ct_NM=$ac_cv_prog_ac_ct_NM
40410if test -n "$ac_ct_NM"; then
40411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40412$as_echo "$ac_ct_NM" >&6; }
40413else
40414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40415$as_echo "no" >&6; }
40416fi
40417
40418
40419  test -n "$ac_ct_NM" && break
40420done
40421
40422  if test "x$ac_ct_NM" = x; then
40423    NM=""
40424  else
40425    case $cross_compiling:$ac_tool_warned in
40426yes:)
40427{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40428$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40429ac_tool_warned=yes ;;
40430esac
40431    NM=$ac_ct_NM
40432  fi
40433fi
40434
40435    else
40436      # If it succeeded, then it was overridden by the user. We will use it
40437      # for the tool.
40438
40439      # First remove it from the list of overridden variables, so we can test
40440      # for unknown variables in the end.
40441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40442
40443      # Check if we try to supply an empty value
40444      if test "x$NM" = x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40446$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40447        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40448$as_echo_n "checking for NM... " >&6; }
40449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40450$as_echo "disabled" >&6; }
40451      else
40452        # Check if the provided tool contains a complete path.
40453        tool_specified="$NM"
40454        tool_basename="${tool_specified##*/}"
40455        if test "x$tool_basename" = "x$tool_specified"; then
40456          # A command without a complete path is provided, search $PATH.
40457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40458$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40459          # Extract the first word of "$tool_basename", so it can be a program name with args.
40460set dummy $tool_basename; ac_word=$2
40461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40462$as_echo_n "checking for $ac_word... " >&6; }
40463if ${ac_cv_path_NM+:} false; then :
40464  $as_echo_n "(cached) " >&6
40465else
40466  case $NM in
40467  [\\/]* | ?:[\\/]*)
40468  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40469  ;;
40470  *)
40471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40472for as_dir in $PATH
40473do
40474  IFS=$as_save_IFS
40475  test -z "$as_dir" && as_dir=.
40476    for ac_exec_ext in '' $ac_executable_extensions; do
40477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40478    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40480    break 2
40481  fi
40482done
40483  done
40484IFS=$as_save_IFS
40485
40486  ;;
40487esac
40488fi
40489NM=$ac_cv_path_NM
40490if test -n "$NM"; then
40491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40492$as_echo "$NM" >&6; }
40493else
40494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40495$as_echo "no" >&6; }
40496fi
40497
40498
40499          if test "x$NM" = x; then
40500            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40501          fi
40502        else
40503          # Otherwise we believe it is a complete path. Use it as it is.
40504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40505$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40507$as_echo_n "checking for NM... " >&6; }
40508          if test ! -x "$tool_specified"; then
40509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40510$as_echo "not found" >&6; }
40511            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40512          fi
40513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40514$as_echo "$tool_specified" >&6; }
40515        fi
40516      fi
40517    fi
40518
40519  fi
40520
40521
40522    else
40523
40524
40525  # Publish this variable in the help.
40526
40527
40528  if [ -z "${NM+x}" ]; then
40529    # The variable is not set by user, try to locate tool using the code snippet
40530    if test -n "$ac_tool_prefix"; then
40531  for ac_prog in nm
40532  do
40533    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40534set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40536$as_echo_n "checking for $ac_word... " >&6; }
40537if ${ac_cv_prog_NM+:} false; then :
40538  $as_echo_n "(cached) " >&6
40539else
40540  if test -n "$NM"; then
40541  ac_cv_prog_NM="$NM" # Let the user override the test.
40542else
40543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40544for as_dir in $PATH
40545do
40546  IFS=$as_save_IFS
40547  test -z "$as_dir" && as_dir=.
40548    for ac_exec_ext in '' $ac_executable_extensions; do
40549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40550    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40552    break 2
40553  fi
40554done
40555  done
40556IFS=$as_save_IFS
40557
40558fi
40559fi
40560NM=$ac_cv_prog_NM
40561if test -n "$NM"; then
40562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40563$as_echo "$NM" >&6; }
40564else
40565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40566$as_echo "no" >&6; }
40567fi
40568
40569
40570    test -n "$NM" && break
40571  done
40572fi
40573if test -z "$NM"; then
40574  ac_ct_NM=$NM
40575  for ac_prog in nm
40576do
40577  # Extract the first word of "$ac_prog", so it can be a program name with args.
40578set dummy $ac_prog; ac_word=$2
40579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40580$as_echo_n "checking for $ac_word... " >&6; }
40581if ${ac_cv_prog_ac_ct_NM+:} false; then :
40582  $as_echo_n "(cached) " >&6
40583else
40584  if test -n "$ac_ct_NM"; then
40585  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40586else
40587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40588for as_dir in $PATH
40589do
40590  IFS=$as_save_IFS
40591  test -z "$as_dir" && as_dir=.
40592    for ac_exec_ext in '' $ac_executable_extensions; do
40593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40594    ac_cv_prog_ac_ct_NM="$ac_prog"
40595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40596    break 2
40597  fi
40598done
40599  done
40600IFS=$as_save_IFS
40601
40602fi
40603fi
40604ac_ct_NM=$ac_cv_prog_ac_ct_NM
40605if test -n "$ac_ct_NM"; then
40606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40607$as_echo "$ac_ct_NM" >&6; }
40608else
40609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40610$as_echo "no" >&6; }
40611fi
40612
40613
40614  test -n "$ac_ct_NM" && break
40615done
40616
40617  if test "x$ac_ct_NM" = x; then
40618    NM=""
40619  else
40620    case $cross_compiling:$ac_tool_warned in
40621yes:)
40622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40624ac_tool_warned=yes ;;
40625esac
40626    NM=$ac_ct_NM
40627  fi
40628fi
40629
40630  else
40631    # The variable is set, but is it from the command line or the environment?
40632
40633    # Try to remove the string !NM! from our list.
40634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40636      # If it failed, the variable was not from the command line. Ignore it,
40637      # but warn the user (except for BASH, which is always set by the calling BASH).
40638      if test "xNM" != xBASH; then
40639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40640$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40641      fi
40642      # Try to locate tool using the code snippet
40643      if test -n "$ac_tool_prefix"; then
40644  for ac_prog in nm
40645  do
40646    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40649$as_echo_n "checking for $ac_word... " >&6; }
40650if ${ac_cv_prog_NM+:} false; then :
40651  $as_echo_n "(cached) " >&6
40652else
40653  if test -n "$NM"; then
40654  ac_cv_prog_NM="$NM" # Let the user override the test.
40655else
40656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40657for as_dir in $PATH
40658do
40659  IFS=$as_save_IFS
40660  test -z "$as_dir" && as_dir=.
40661    for ac_exec_ext in '' $ac_executable_extensions; do
40662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40663    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40665    break 2
40666  fi
40667done
40668  done
40669IFS=$as_save_IFS
40670
40671fi
40672fi
40673NM=$ac_cv_prog_NM
40674if test -n "$NM"; then
40675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40676$as_echo "$NM" >&6; }
40677else
40678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40679$as_echo "no" >&6; }
40680fi
40681
40682
40683    test -n "$NM" && break
40684  done
40685fi
40686if test -z "$NM"; then
40687  ac_ct_NM=$NM
40688  for ac_prog in nm
40689do
40690  # Extract the first word of "$ac_prog", so it can be a program name with args.
40691set dummy $ac_prog; ac_word=$2
40692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40693$as_echo_n "checking for $ac_word... " >&6; }
40694if ${ac_cv_prog_ac_ct_NM+:} false; then :
40695  $as_echo_n "(cached) " >&6
40696else
40697  if test -n "$ac_ct_NM"; then
40698  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40699else
40700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40701for as_dir in $PATH
40702do
40703  IFS=$as_save_IFS
40704  test -z "$as_dir" && as_dir=.
40705    for ac_exec_ext in '' $ac_executable_extensions; do
40706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40707    ac_cv_prog_ac_ct_NM="$ac_prog"
40708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40709    break 2
40710  fi
40711done
40712  done
40713IFS=$as_save_IFS
40714
40715fi
40716fi
40717ac_ct_NM=$ac_cv_prog_ac_ct_NM
40718if test -n "$ac_ct_NM"; then
40719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40720$as_echo "$ac_ct_NM" >&6; }
40721else
40722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40723$as_echo "no" >&6; }
40724fi
40725
40726
40727  test -n "$ac_ct_NM" && break
40728done
40729
40730  if test "x$ac_ct_NM" = x; then
40731    NM=""
40732  else
40733    case $cross_compiling:$ac_tool_warned in
40734yes:)
40735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40737ac_tool_warned=yes ;;
40738esac
40739    NM=$ac_ct_NM
40740  fi
40741fi
40742
40743    else
40744      # If it succeeded, then it was overridden by the user. We will use it
40745      # for the tool.
40746
40747      # First remove it from the list of overridden variables, so we can test
40748      # for unknown variables in the end.
40749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40750
40751      # Check if we try to supply an empty value
40752      if test "x$NM" = x; then
40753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40754$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40756$as_echo_n "checking for NM... " >&6; }
40757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40758$as_echo "disabled" >&6; }
40759      else
40760        # Check if the provided tool contains a complete path.
40761        tool_specified="$NM"
40762        tool_basename="${tool_specified##*/}"
40763        if test "x$tool_basename" = "x$tool_specified"; then
40764          # A command without a complete path is provided, search $PATH.
40765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40766$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40767          # Extract the first word of "$tool_basename", so it can be a program name with args.
40768set dummy $tool_basename; ac_word=$2
40769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40770$as_echo_n "checking for $ac_word... " >&6; }
40771if ${ac_cv_path_NM+:} false; then :
40772  $as_echo_n "(cached) " >&6
40773else
40774  case $NM in
40775  [\\/]* | ?:[\\/]*)
40776  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40777  ;;
40778  *)
40779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40780for as_dir in $PATH
40781do
40782  IFS=$as_save_IFS
40783  test -z "$as_dir" && as_dir=.
40784    for ac_exec_ext in '' $ac_executable_extensions; do
40785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40786    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40788    break 2
40789  fi
40790done
40791  done
40792IFS=$as_save_IFS
40793
40794  ;;
40795esac
40796fi
40797NM=$ac_cv_path_NM
40798if test -n "$NM"; then
40799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40800$as_echo "$NM" >&6; }
40801else
40802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40803$as_echo "no" >&6; }
40804fi
40805
40806
40807          if test "x$NM" = x; then
40808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40809          fi
40810        else
40811          # Otherwise we believe it is a complete path. Use it as it is.
40812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40813$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40815$as_echo_n "checking for NM... " >&6; }
40816          if test ! -x "$tool_specified"; then
40817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40818$as_echo "not found" >&6; }
40819            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40820          fi
40821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40822$as_echo "$tool_specified" >&6; }
40823        fi
40824      fi
40825    fi
40826
40827  fi
40828
40829
40830    fi
40831
40832  # Only process if variable expands to non-empty
40833
40834  if test "x$NM" != x; then
40835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40836
40837  # First separate the path from the arguments. This will split at the first
40838  # space.
40839  complete="$NM"
40840  path="${complete%% *}"
40841  tmp="$complete EOL"
40842  arguments="${tmp#* }"
40843
40844  # Input might be given as Windows format, start by converting to
40845  # unix format.
40846  new_path=`$CYGPATH -u "$path"`
40847
40848  # Now try to locate executable using which
40849  new_path=`$WHICH "$new_path" 2> /dev/null`
40850  # bat and cmd files are not always considered executable in cygwin causing which
40851  # to not find them
40852  if test "x$new_path" = x \
40853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40855    new_path=`$CYGPATH -u "$path"`
40856  fi
40857  if test "x$new_path" = x; then
40858    # Oops. Which didn't find the executable.
40859    # The splitting of arguments from the executable at a space might have been incorrect,
40860    # since paths with space are more likely in Windows. Give it another try with the whole
40861    # argument.
40862    path="$complete"
40863    arguments="EOL"
40864    new_path=`$CYGPATH -u "$path"`
40865    new_path=`$WHICH "$new_path" 2> /dev/null`
40866    # bat and cmd files are not always considered executable in cygwin causing which
40867    # to not find them
40868    if test "x$new_path" = x \
40869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40871      new_path=`$CYGPATH -u "$path"`
40872    fi
40873    if test "x$new_path" = x; then
40874      # It's still not found. Now this is an unrecoverable error.
40875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40876$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40877      has_space=`$ECHO "$complete" | $GREP " "`
40878      if test "x$has_space" != x; then
40879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40881      fi
40882      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40883    fi
40884  fi
40885
40886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40889  # "foo.exe" is OK but "foo" is an error.
40890  #
40891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40892  # It is also a way to make sure we got the proper file name for the real test later on.
40893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40894  if test "x$test_shortpath" = x; then
40895    # Short path failed, file does not exist as specified.
40896    # Try adding .exe or .cmd
40897    if test -f "${new_path}.exe"; then
40898      input_to_shortpath="${new_path}.exe"
40899    elif test -f "${new_path}.cmd"; then
40900      input_to_shortpath="${new_path}.cmd"
40901    else
40902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40903$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40906      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40907    fi
40908  else
40909    input_to_shortpath="$new_path"
40910  fi
40911
40912  # Call helper function which possibly converts this using DOS-style short mode.
40913  # If so, the updated path is stored in $new_path.
40914  new_path="$input_to_shortpath"
40915
40916  input_path="$input_to_shortpath"
40917  # Check if we need to convert this using DOS-style short mode. If the path
40918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40919  # take no chances and rewrite it.
40920  # Note: m4 eats our [], so we need to use [ and ] instead.
40921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40922  if test "x$has_forbidden_chars" != x; then
40923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40927      # Going to short mode and back again did indeed matter. Since short mode is
40928      # case insensitive, let's make it lowercase to improve readability.
40929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40930      # Now convert it back to Unix-style (cygpath)
40931      input_path=`$CYGPATH -u "$shortmode_path"`
40932      new_path="$input_path"
40933    fi
40934  fi
40935
40936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40937  if test "x$test_cygdrive_prefix" = x; then
40938    # As a simple fix, exclude /usr/bin since it's not a real path.
40939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40941      # a path prefixed by /cygdrive for fixpath to work.
40942      new_path="$CYGWIN_ROOT_PATH$input_path"
40943    fi
40944  fi
40945
40946  # remove trailing .exe if any
40947  new_path="${new_path/%.exe/}"
40948
40949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40950
40951  # First separate the path from the arguments. This will split at the first
40952  # space.
40953  complete="$NM"
40954  path="${complete%% *}"
40955  tmp="$complete EOL"
40956  arguments="${tmp#* }"
40957
40958  # Input might be given as Windows format, start by converting to
40959  # unix format.
40960  new_path="$path"
40961
40962  windows_path="$new_path"
40963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40964    unix_path=`$CYGPATH -u "$windows_path"`
40965    new_path="$unix_path"
40966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40968    new_path="$unix_path"
40969  fi
40970
40971
40972  # Now try to locate executable using which
40973  new_path=`$WHICH "$new_path" 2> /dev/null`
40974
40975  if test "x$new_path" = x; then
40976    # Oops. Which didn't find the executable.
40977    # The splitting of arguments from the executable at a space might have been incorrect,
40978    # since paths with space are more likely in Windows. Give it another try with the whole
40979    # argument.
40980    path="$complete"
40981    arguments="EOL"
40982    new_path="$path"
40983
40984  windows_path="$new_path"
40985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40986    unix_path=`$CYGPATH -u "$windows_path"`
40987    new_path="$unix_path"
40988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40990    new_path="$unix_path"
40991  fi
40992
40993
40994    new_path=`$WHICH "$new_path" 2> /dev/null`
40995    # bat and cmd files are not always considered executable in MSYS causing which
40996    # to not find them
40997    if test "x$new_path" = x \
40998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41000      new_path="$path"
41001
41002  windows_path="$new_path"
41003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41004    unix_path=`$CYGPATH -u "$windows_path"`
41005    new_path="$unix_path"
41006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41008    new_path="$unix_path"
41009  fi
41010
41011    fi
41012
41013    if test "x$new_path" = x; then
41014      # It's still not found. Now this is an unrecoverable error.
41015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41016$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41017      has_space=`$ECHO "$complete" | $GREP " "`
41018      if test "x$has_space" != x; then
41019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41021      fi
41022      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41023    fi
41024  fi
41025
41026  # Now new_path has a complete unix path to the binary
41027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41028    # Keep paths in /bin as-is, but remove trailing .exe if any
41029    new_path="${new_path/%.exe/}"
41030    # Do not save /bin paths to all_fixpath_prefixes!
41031  else
41032    # Not in mixed or Windows style, start by that.
41033    new_path=`cmd //c echo $new_path`
41034
41035  input_path="$new_path"
41036  # Check if we need to convert this using DOS-style short mode. If the path
41037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41038  # take no chances and rewrite it.
41039  # Note: m4 eats our [], so we need to use [ and ] instead.
41040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41041  if test "x$has_forbidden_chars" != x; then
41042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41044  fi
41045
41046    # Output is in $new_path
41047
41048  windows_path="$new_path"
41049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41050    unix_path=`$CYGPATH -u "$windows_path"`
41051    new_path="$unix_path"
41052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41054    new_path="$unix_path"
41055  fi
41056
41057    # remove trailing .exe if any
41058    new_path="${new_path/%.exe/}"
41059
41060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41062  fi
41063
41064    else
41065      # We're on a unix platform. Hooray! :)
41066      # First separate the path from the arguments. This will split at the first
41067      # space.
41068      complete="$NM"
41069      path="${complete%% *}"
41070      tmp="$complete EOL"
41071      arguments="${tmp#* }"
41072
41073      # Cannot rely on the command "which" here since it doesn't always work.
41074      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41075      if test -z "$is_absolute_path"; then
41076        # Path to executable is not absolute. Find it.
41077        IFS_save="$IFS"
41078        IFS=:
41079        for p in $PATH; do
41080          if test -f "$p/$path" && test -x "$p/$path"; then
41081            new_path="$p/$path"
41082            break
41083          fi
41084        done
41085        IFS="$IFS_save"
41086      else
41087        # This is an absolute path, we can use it without further modifications.
41088        new_path="$path"
41089      fi
41090
41091      if test "x$new_path" = x; then
41092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41093$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41094        has_space=`$ECHO "$complete" | $GREP " "`
41095        if test "x$has_space" != x; then
41096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41098        fi
41099        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41100      fi
41101    fi
41102
41103    # Now join together the path and the arguments once again
41104    if test "x$arguments" != xEOL; then
41105      new_complete="$new_path ${arguments% *}"
41106    else
41107      new_complete="$new_path"
41108    fi
41109
41110    if test "x$complete" != "x$new_complete"; then
41111      NM="$new_complete"
41112      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41113$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41114    fi
41115  fi
41116
41117    GNM="$NM"
41118
41119  fi
41120
41121  # objcopy is used for moving debug symbols to separate files when
41122  # full debug symbols are enabled.
41123  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41124
41125
41126  # Publish this variable in the help.
41127
41128
41129  if [ -z "${OBJCOPY+x}" ]; then
41130    # The variable is not set by user, try to locate tool using the code snippet
41131    if test -n "$ac_tool_prefix"; then
41132  for ac_prog in gobjcopy objcopy
41133  do
41134    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41135set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41137$as_echo_n "checking for $ac_word... " >&6; }
41138if ${ac_cv_prog_OBJCOPY+:} false; then :
41139  $as_echo_n "(cached) " >&6
41140else
41141  if test -n "$OBJCOPY"; then
41142  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41143else
41144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41145for as_dir in $PATH
41146do
41147  IFS=$as_save_IFS
41148  test -z "$as_dir" && as_dir=.
41149    for ac_exec_ext in '' $ac_executable_extensions; do
41150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41151    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41153    break 2
41154  fi
41155done
41156  done
41157IFS=$as_save_IFS
41158
41159fi
41160fi
41161OBJCOPY=$ac_cv_prog_OBJCOPY
41162if test -n "$OBJCOPY"; then
41163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41164$as_echo "$OBJCOPY" >&6; }
41165else
41166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41167$as_echo "no" >&6; }
41168fi
41169
41170
41171    test -n "$OBJCOPY" && break
41172  done
41173fi
41174if test -z "$OBJCOPY"; then
41175  ac_ct_OBJCOPY=$OBJCOPY
41176  for ac_prog in gobjcopy objcopy
41177do
41178  # Extract the first word of "$ac_prog", so it can be a program name with args.
41179set dummy $ac_prog; ac_word=$2
41180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41181$as_echo_n "checking for $ac_word... " >&6; }
41182if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41183  $as_echo_n "(cached) " >&6
41184else
41185  if test -n "$ac_ct_OBJCOPY"; then
41186  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41187else
41188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41189for as_dir in $PATH
41190do
41191  IFS=$as_save_IFS
41192  test -z "$as_dir" && as_dir=.
41193    for ac_exec_ext in '' $ac_executable_extensions; do
41194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41195    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41197    break 2
41198  fi
41199done
41200  done
41201IFS=$as_save_IFS
41202
41203fi
41204fi
41205ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41206if test -n "$ac_ct_OBJCOPY"; then
41207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41208$as_echo "$ac_ct_OBJCOPY" >&6; }
41209else
41210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41211$as_echo "no" >&6; }
41212fi
41213
41214
41215  test -n "$ac_ct_OBJCOPY" && break
41216done
41217
41218  if test "x$ac_ct_OBJCOPY" = x; then
41219    OBJCOPY=""
41220  else
41221    case $cross_compiling:$ac_tool_warned in
41222yes:)
41223{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41224$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41225ac_tool_warned=yes ;;
41226esac
41227    OBJCOPY=$ac_ct_OBJCOPY
41228  fi
41229fi
41230
41231  else
41232    # The variable is set, but is it from the command line or the environment?
41233
41234    # Try to remove the string !OBJCOPY! from our list.
41235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41237      # If it failed, the variable was not from the command line. Ignore it,
41238      # but warn the user (except for BASH, which is always set by the calling BASH).
41239      if test "xOBJCOPY" != xBASH; then
41240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41241$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41242      fi
41243      # Try to locate tool using the code snippet
41244      if test -n "$ac_tool_prefix"; then
41245  for ac_prog in gobjcopy objcopy
41246  do
41247    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41248set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41250$as_echo_n "checking for $ac_word... " >&6; }
41251if ${ac_cv_prog_OBJCOPY+:} false; then :
41252  $as_echo_n "(cached) " >&6
41253else
41254  if test -n "$OBJCOPY"; then
41255  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41256else
41257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41258for as_dir in $PATH
41259do
41260  IFS=$as_save_IFS
41261  test -z "$as_dir" && as_dir=.
41262    for ac_exec_ext in '' $ac_executable_extensions; do
41263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41264    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41266    break 2
41267  fi
41268done
41269  done
41270IFS=$as_save_IFS
41271
41272fi
41273fi
41274OBJCOPY=$ac_cv_prog_OBJCOPY
41275if test -n "$OBJCOPY"; then
41276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41277$as_echo "$OBJCOPY" >&6; }
41278else
41279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41280$as_echo "no" >&6; }
41281fi
41282
41283
41284    test -n "$OBJCOPY" && break
41285  done
41286fi
41287if test -z "$OBJCOPY"; then
41288  ac_ct_OBJCOPY=$OBJCOPY
41289  for ac_prog in gobjcopy objcopy
41290do
41291  # Extract the first word of "$ac_prog", so it can be a program name with args.
41292set dummy $ac_prog; ac_word=$2
41293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41294$as_echo_n "checking for $ac_word... " >&6; }
41295if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41296  $as_echo_n "(cached) " >&6
41297else
41298  if test -n "$ac_ct_OBJCOPY"; then
41299  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41300else
41301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41302for as_dir in $PATH
41303do
41304  IFS=$as_save_IFS
41305  test -z "$as_dir" && as_dir=.
41306    for ac_exec_ext in '' $ac_executable_extensions; do
41307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41308    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41310    break 2
41311  fi
41312done
41313  done
41314IFS=$as_save_IFS
41315
41316fi
41317fi
41318ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41319if test -n "$ac_ct_OBJCOPY"; then
41320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41321$as_echo "$ac_ct_OBJCOPY" >&6; }
41322else
41323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41324$as_echo "no" >&6; }
41325fi
41326
41327
41328  test -n "$ac_ct_OBJCOPY" && break
41329done
41330
41331  if test "x$ac_ct_OBJCOPY" = x; then
41332    OBJCOPY=""
41333  else
41334    case $cross_compiling:$ac_tool_warned in
41335yes:)
41336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41338ac_tool_warned=yes ;;
41339esac
41340    OBJCOPY=$ac_ct_OBJCOPY
41341  fi
41342fi
41343
41344    else
41345      # If it succeeded, then it was overridden by the user. We will use it
41346      # for the tool.
41347
41348      # First remove it from the list of overridden variables, so we can test
41349      # for unknown variables in the end.
41350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41351
41352      # Check if we try to supply an empty value
41353      if test "x$OBJCOPY" = x; then
41354        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41355$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41357$as_echo_n "checking for OBJCOPY... " >&6; }
41358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41359$as_echo "disabled" >&6; }
41360      else
41361        # Check if the provided tool contains a complete path.
41362        tool_specified="$OBJCOPY"
41363        tool_basename="${tool_specified##*/}"
41364        if test "x$tool_basename" = "x$tool_specified"; then
41365          # A command without a complete path is provided, search $PATH.
41366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41367$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41368          # Extract the first word of "$tool_basename", so it can be a program name with args.
41369set dummy $tool_basename; ac_word=$2
41370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41371$as_echo_n "checking for $ac_word... " >&6; }
41372if ${ac_cv_path_OBJCOPY+:} false; then :
41373  $as_echo_n "(cached) " >&6
41374else
41375  case $OBJCOPY in
41376  [\\/]* | ?:[\\/]*)
41377  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41378  ;;
41379  *)
41380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41381for as_dir in $PATH
41382do
41383  IFS=$as_save_IFS
41384  test -z "$as_dir" && as_dir=.
41385    for ac_exec_ext in '' $ac_executable_extensions; do
41386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41387    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41389    break 2
41390  fi
41391done
41392  done
41393IFS=$as_save_IFS
41394
41395  ;;
41396esac
41397fi
41398OBJCOPY=$ac_cv_path_OBJCOPY
41399if test -n "$OBJCOPY"; then
41400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41401$as_echo "$OBJCOPY" >&6; }
41402else
41403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41404$as_echo "no" >&6; }
41405fi
41406
41407
41408          if test "x$OBJCOPY" = x; then
41409            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41410          fi
41411        else
41412          # Otherwise we believe it is a complete path. Use it as it is.
41413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41414$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41415          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41416$as_echo_n "checking for OBJCOPY... " >&6; }
41417          if test ! -x "$tool_specified"; then
41418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41419$as_echo "not found" >&6; }
41420            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41421          fi
41422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41423$as_echo "$tool_specified" >&6; }
41424        fi
41425      fi
41426    fi
41427
41428  fi
41429
41430
41431    # Only call fixup if objcopy was found.
41432    if test -n "$OBJCOPY"; then
41433
41434  # Only process if variable expands to non-empty
41435
41436  if test "x$OBJCOPY" != x; then
41437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41438
41439  # First separate the path from the arguments. This will split at the first
41440  # space.
41441  complete="$OBJCOPY"
41442  path="${complete%% *}"
41443  tmp="$complete EOL"
41444  arguments="${tmp#* }"
41445
41446  # Input might be given as Windows format, start by converting to
41447  # unix format.
41448  new_path=`$CYGPATH -u "$path"`
41449
41450  # Now try to locate executable using which
41451  new_path=`$WHICH "$new_path" 2> /dev/null`
41452  # bat and cmd files are not always considered executable in cygwin causing which
41453  # to not find them
41454  if test "x$new_path" = x \
41455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41457    new_path=`$CYGPATH -u "$path"`
41458  fi
41459  if test "x$new_path" = x; then
41460    # Oops. Which didn't find the executable.
41461    # The splitting of arguments from the executable at a space might have been incorrect,
41462    # since paths with space are more likely in Windows. Give it another try with the whole
41463    # argument.
41464    path="$complete"
41465    arguments="EOL"
41466    new_path=`$CYGPATH -u "$path"`
41467    new_path=`$WHICH "$new_path" 2> /dev/null`
41468    # bat and cmd files are not always considered executable in cygwin causing which
41469    # to not find them
41470    if test "x$new_path" = x \
41471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41473      new_path=`$CYGPATH -u "$path"`
41474    fi
41475    if test "x$new_path" = x; then
41476      # It's still not found. Now this is an unrecoverable error.
41477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41478$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41479      has_space=`$ECHO "$complete" | $GREP " "`
41480      if test "x$has_space" != x; then
41481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41483      fi
41484      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41485    fi
41486  fi
41487
41488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41491  # "foo.exe" is OK but "foo" is an error.
41492  #
41493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41494  # It is also a way to make sure we got the proper file name for the real test later on.
41495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41496  if test "x$test_shortpath" = x; then
41497    # Short path failed, file does not exist as specified.
41498    # Try adding .exe or .cmd
41499    if test -f "${new_path}.exe"; then
41500      input_to_shortpath="${new_path}.exe"
41501    elif test -f "${new_path}.cmd"; then
41502      input_to_shortpath="${new_path}.cmd"
41503    else
41504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41505$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41508      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41509    fi
41510  else
41511    input_to_shortpath="$new_path"
41512  fi
41513
41514  # Call helper function which possibly converts this using DOS-style short mode.
41515  # If so, the updated path is stored in $new_path.
41516  new_path="$input_to_shortpath"
41517
41518  input_path="$input_to_shortpath"
41519  # Check if we need to convert this using DOS-style short mode. If the path
41520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41521  # take no chances and rewrite it.
41522  # Note: m4 eats our [], so we need to use [ and ] instead.
41523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41524  if test "x$has_forbidden_chars" != x; then
41525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41529      # Going to short mode and back again did indeed matter. Since short mode is
41530      # case insensitive, let's make it lowercase to improve readability.
41531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41532      # Now convert it back to Unix-style (cygpath)
41533      input_path=`$CYGPATH -u "$shortmode_path"`
41534      new_path="$input_path"
41535    fi
41536  fi
41537
41538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41539  if test "x$test_cygdrive_prefix" = x; then
41540    # As a simple fix, exclude /usr/bin since it's not a real path.
41541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41543      # a path prefixed by /cygdrive for fixpath to work.
41544      new_path="$CYGWIN_ROOT_PATH$input_path"
41545    fi
41546  fi
41547
41548  # remove trailing .exe if any
41549  new_path="${new_path/%.exe/}"
41550
41551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41552
41553  # First separate the path from the arguments. This will split at the first
41554  # space.
41555  complete="$OBJCOPY"
41556  path="${complete%% *}"
41557  tmp="$complete EOL"
41558  arguments="${tmp#* }"
41559
41560  # Input might be given as Windows format, start by converting to
41561  # unix format.
41562  new_path="$path"
41563
41564  windows_path="$new_path"
41565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41566    unix_path=`$CYGPATH -u "$windows_path"`
41567    new_path="$unix_path"
41568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41570    new_path="$unix_path"
41571  fi
41572
41573
41574  # Now try to locate executable using which
41575  new_path=`$WHICH "$new_path" 2> /dev/null`
41576
41577  if test "x$new_path" = x; then
41578    # Oops. Which didn't find the executable.
41579    # The splitting of arguments from the executable at a space might have been incorrect,
41580    # since paths with space are more likely in Windows. Give it another try with the whole
41581    # argument.
41582    path="$complete"
41583    arguments="EOL"
41584    new_path="$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
41596    new_path=`$WHICH "$new_path" 2> /dev/null`
41597    # bat and cmd files are not always considered executable in MSYS causing which
41598    # to not find them
41599    if test "x$new_path" = x \
41600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41602      new_path="$path"
41603
41604  windows_path="$new_path"
41605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41606    unix_path=`$CYGPATH -u "$windows_path"`
41607    new_path="$unix_path"
41608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41610    new_path="$unix_path"
41611  fi
41612
41613    fi
41614
41615    if test "x$new_path" = x; then
41616      # It's still not found. Now this is an unrecoverable error.
41617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41618$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41619      has_space=`$ECHO "$complete" | $GREP " "`
41620      if test "x$has_space" != x; then
41621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41623      fi
41624      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41625    fi
41626  fi
41627
41628  # Now new_path has a complete unix path to the binary
41629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41630    # Keep paths in /bin as-is, but remove trailing .exe if any
41631    new_path="${new_path/%.exe/}"
41632    # Do not save /bin paths to all_fixpath_prefixes!
41633  else
41634    # Not in mixed or Windows style, start by that.
41635    new_path=`cmd //c echo $new_path`
41636
41637  input_path="$new_path"
41638  # Check if we need to convert this using DOS-style short mode. If the path
41639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41640  # take no chances and rewrite it.
41641  # Note: m4 eats our [], so we need to use [ and ] instead.
41642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41643  if test "x$has_forbidden_chars" != x; then
41644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41646  fi
41647
41648    # Output is in $new_path
41649
41650  windows_path="$new_path"
41651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41652    unix_path=`$CYGPATH -u "$windows_path"`
41653    new_path="$unix_path"
41654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41656    new_path="$unix_path"
41657  fi
41658
41659    # remove trailing .exe if any
41660    new_path="${new_path/%.exe/}"
41661
41662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41664  fi
41665
41666    else
41667      # We're on a unix platform. Hooray! :)
41668      # First separate the path from the arguments. This will split at the first
41669      # space.
41670      complete="$OBJCOPY"
41671      path="${complete%% *}"
41672      tmp="$complete EOL"
41673      arguments="${tmp#* }"
41674
41675      # Cannot rely on the command "which" here since it doesn't always work.
41676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41677      if test -z "$is_absolute_path"; then
41678        # Path to executable is not absolute. Find it.
41679        IFS_save="$IFS"
41680        IFS=:
41681        for p in $PATH; do
41682          if test -f "$p/$path" && test -x "$p/$path"; then
41683            new_path="$p/$path"
41684            break
41685          fi
41686        done
41687        IFS="$IFS_save"
41688      else
41689        # This is an absolute path, we can use it without further modifications.
41690        new_path="$path"
41691      fi
41692
41693      if test "x$new_path" = x; then
41694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41695$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41696        has_space=`$ECHO "$complete" | $GREP " "`
41697        if test "x$has_space" != x; then
41698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41700        fi
41701        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41702      fi
41703    fi
41704
41705    # Now join together the path and the arguments once again
41706    if test "x$arguments" != xEOL; then
41707      new_complete="$new_path ${arguments% *}"
41708    else
41709      new_complete="$new_path"
41710    fi
41711
41712    if test "x$complete" != "x$new_complete"; then
41713      OBJCOPY="$new_complete"
41714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41715$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41716    fi
41717  fi
41718
41719      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41720        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41721        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41722        # - version number is last blank separate word on first line
41723        # - version number formats that have been seen:
41724        #   - <major>.<minor>
41725        #   - <major>.<minor>.<micro>
41726        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41727        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41728         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41729              -e 's/.* //' \
41730              -e '/^[01]\./b bad' \
41731              -e '/^2\./{' \
41732              -e '  s/^2\.//' \
41733              -e '  /^[0-9]$/b bad' \
41734              -e '  /^[0-9]\./b bad' \
41735              -e '  /^1[0-9]$/b bad' \
41736              -e '  /^1[0-9]\./b bad' \
41737              -e '  /^20\./b bad' \
41738              -e '  /^21\.0$/b bad' \
41739              -e '  /^21\.0\./b bad' \
41740              -e '}' \
41741              -e ':good' \
41742              -e 's/.*/VALID_VERSION/p' \
41743              -e 'q' \
41744              -e ':bad' \
41745              -e 's/.*/BAD_VERSION/p' \
41746              -e 'q'`
41747        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41748          OBJCOPY=
41749          { $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
41750$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41751          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41752$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41753          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41754$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41755          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41756$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41757          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41758$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41759        fi
41760      fi
41761    fi
41762  fi
41763
41764
41765
41766  # Publish this variable in the help.
41767
41768
41769  if [ -z "${OBJDUMP+x}" ]; then
41770    # The variable is not set by user, try to locate tool using the code snippet
41771    if test -n "$ac_tool_prefix"; then
41772  for ac_prog in gobjdump objdump
41773  do
41774    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41775set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41777$as_echo_n "checking for $ac_word... " >&6; }
41778if ${ac_cv_prog_OBJDUMP+:} false; then :
41779  $as_echo_n "(cached) " >&6
41780else
41781  if test -n "$OBJDUMP"; then
41782  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41783else
41784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41785for as_dir in $PATH
41786do
41787  IFS=$as_save_IFS
41788  test -z "$as_dir" && as_dir=.
41789    for ac_exec_ext in '' $ac_executable_extensions; do
41790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41791    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41793    break 2
41794  fi
41795done
41796  done
41797IFS=$as_save_IFS
41798
41799fi
41800fi
41801OBJDUMP=$ac_cv_prog_OBJDUMP
41802if test -n "$OBJDUMP"; then
41803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41804$as_echo "$OBJDUMP" >&6; }
41805else
41806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41807$as_echo "no" >&6; }
41808fi
41809
41810
41811    test -n "$OBJDUMP" && break
41812  done
41813fi
41814if test -z "$OBJDUMP"; then
41815  ac_ct_OBJDUMP=$OBJDUMP
41816  for ac_prog in gobjdump objdump
41817do
41818  # Extract the first word of "$ac_prog", so it can be a program name with args.
41819set dummy $ac_prog; ac_word=$2
41820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41821$as_echo_n "checking for $ac_word... " >&6; }
41822if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41823  $as_echo_n "(cached) " >&6
41824else
41825  if test -n "$ac_ct_OBJDUMP"; then
41826  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41827else
41828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41829for as_dir in $PATH
41830do
41831  IFS=$as_save_IFS
41832  test -z "$as_dir" && as_dir=.
41833    for ac_exec_ext in '' $ac_executable_extensions; do
41834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41835    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41837    break 2
41838  fi
41839done
41840  done
41841IFS=$as_save_IFS
41842
41843fi
41844fi
41845ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41846if test -n "$ac_ct_OBJDUMP"; then
41847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41848$as_echo "$ac_ct_OBJDUMP" >&6; }
41849else
41850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41851$as_echo "no" >&6; }
41852fi
41853
41854
41855  test -n "$ac_ct_OBJDUMP" && break
41856done
41857
41858  if test "x$ac_ct_OBJDUMP" = x; then
41859    OBJDUMP=""
41860  else
41861    case $cross_compiling:$ac_tool_warned in
41862yes:)
41863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41865ac_tool_warned=yes ;;
41866esac
41867    OBJDUMP=$ac_ct_OBJDUMP
41868  fi
41869fi
41870
41871  else
41872    # The variable is set, but is it from the command line or the environment?
41873
41874    # Try to remove the string !OBJDUMP! from our list.
41875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41877      # If it failed, the variable was not from the command line. Ignore it,
41878      # but warn the user (except for BASH, which is always set by the calling BASH).
41879      if test "xOBJDUMP" != xBASH; then
41880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41881$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41882      fi
41883      # Try to locate tool using the code snippet
41884      if test -n "$ac_tool_prefix"; then
41885  for ac_prog in gobjdump objdump
41886  do
41887    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41888set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41890$as_echo_n "checking for $ac_word... " >&6; }
41891if ${ac_cv_prog_OBJDUMP+:} false; then :
41892  $as_echo_n "(cached) " >&6
41893else
41894  if test -n "$OBJDUMP"; then
41895  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41896else
41897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41898for as_dir in $PATH
41899do
41900  IFS=$as_save_IFS
41901  test -z "$as_dir" && as_dir=.
41902    for ac_exec_ext in '' $ac_executable_extensions; do
41903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41904    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41906    break 2
41907  fi
41908done
41909  done
41910IFS=$as_save_IFS
41911
41912fi
41913fi
41914OBJDUMP=$ac_cv_prog_OBJDUMP
41915if test -n "$OBJDUMP"; then
41916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41917$as_echo "$OBJDUMP" >&6; }
41918else
41919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41920$as_echo "no" >&6; }
41921fi
41922
41923
41924    test -n "$OBJDUMP" && break
41925  done
41926fi
41927if test -z "$OBJDUMP"; then
41928  ac_ct_OBJDUMP=$OBJDUMP
41929  for ac_prog in gobjdump objdump
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_prog_ac_ct_OBJDUMP+:} false; then :
41936  $as_echo_n "(cached) " >&6
41937else
41938  if test -n "$ac_ct_OBJDUMP"; then
41939  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41940else
41941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41942for as_dir in $PATH
41943do
41944  IFS=$as_save_IFS
41945  test -z "$as_dir" && as_dir=.
41946    for ac_exec_ext in '' $ac_executable_extensions; do
41947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41948    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41950    break 2
41951  fi
41952done
41953  done
41954IFS=$as_save_IFS
41955
41956fi
41957fi
41958ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41959if test -n "$ac_ct_OBJDUMP"; then
41960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41961$as_echo "$ac_ct_OBJDUMP" >&6; }
41962else
41963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41964$as_echo "no" >&6; }
41965fi
41966
41967
41968  test -n "$ac_ct_OBJDUMP" && break
41969done
41970
41971  if test "x$ac_ct_OBJDUMP" = x; then
41972    OBJDUMP=""
41973  else
41974    case $cross_compiling:$ac_tool_warned in
41975yes:)
41976{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41977$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41978ac_tool_warned=yes ;;
41979esac
41980    OBJDUMP=$ac_ct_OBJDUMP
41981  fi
41982fi
41983
41984    else
41985      # If it succeeded, then it was overridden by the user. We will use it
41986      # for the tool.
41987
41988      # First remove it from the list of overridden variables, so we can test
41989      # for unknown variables in the end.
41990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41991
41992      # Check if we try to supply an empty value
41993      if test "x$OBJDUMP" = x; then
41994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41995$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41997$as_echo_n "checking for OBJDUMP... " >&6; }
41998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41999$as_echo "disabled" >&6; }
42000      else
42001        # Check if the provided tool contains a complete path.
42002        tool_specified="$OBJDUMP"
42003        tool_basename="${tool_specified##*/}"
42004        if test "x$tool_basename" = "x$tool_specified"; then
42005          # A command without a complete path is provided, search $PATH.
42006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42007$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42008          # Extract the first word of "$tool_basename", so it can be a program name with args.
42009set dummy $tool_basename; ac_word=$2
42010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42011$as_echo_n "checking for $ac_word... " >&6; }
42012if ${ac_cv_path_OBJDUMP+:} false; then :
42013  $as_echo_n "(cached) " >&6
42014else
42015  case $OBJDUMP in
42016  [\\/]* | ?:[\\/]*)
42017  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42018  ;;
42019  *)
42020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42021for as_dir in $PATH
42022do
42023  IFS=$as_save_IFS
42024  test -z "$as_dir" && as_dir=.
42025    for ac_exec_ext in '' $ac_executable_extensions; do
42026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42027    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42029    break 2
42030  fi
42031done
42032  done
42033IFS=$as_save_IFS
42034
42035  ;;
42036esac
42037fi
42038OBJDUMP=$ac_cv_path_OBJDUMP
42039if test -n "$OBJDUMP"; then
42040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42041$as_echo "$OBJDUMP" >&6; }
42042else
42043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42044$as_echo "no" >&6; }
42045fi
42046
42047
42048          if test "x$OBJDUMP" = x; then
42049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42050          fi
42051        else
42052          # Otherwise we believe it is a complete path. Use it as it is.
42053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42054$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42056$as_echo_n "checking for OBJDUMP... " >&6; }
42057          if test ! -x "$tool_specified"; then
42058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42059$as_echo "not found" >&6; }
42060            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42061          fi
42062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42063$as_echo "$tool_specified" >&6; }
42064        fi
42065      fi
42066    fi
42067
42068  fi
42069
42070
42071  if test "x$OBJDUMP" != x; then
42072    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42073    # bails if argument is missing.
42074
42075  # Only process if variable expands to non-empty
42076
42077  if test "x$OBJDUMP" != x; then
42078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42079
42080  # First separate the path from the arguments. This will split at the first
42081  # space.
42082  complete="$OBJDUMP"
42083  path="${complete%% *}"
42084  tmp="$complete EOL"
42085  arguments="${tmp#* }"
42086
42087  # Input might be given as Windows format, start by converting to
42088  # unix format.
42089  new_path=`$CYGPATH -u "$path"`
42090
42091  # Now try to locate executable using which
42092  new_path=`$WHICH "$new_path" 2> /dev/null`
42093  # bat and cmd files are not always considered executable in cygwin causing which
42094  # to not find them
42095  if test "x$new_path" = x \
42096      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42097      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42098    new_path=`$CYGPATH -u "$path"`
42099  fi
42100  if test "x$new_path" = x; then
42101    # Oops. Which didn't find the executable.
42102    # The splitting of arguments from the executable at a space might have been incorrect,
42103    # since paths with space are more likely in Windows. Give it another try with the whole
42104    # argument.
42105    path="$complete"
42106    arguments="EOL"
42107    new_path=`$CYGPATH -u "$path"`
42108    new_path=`$WHICH "$new_path" 2> /dev/null`
42109    # bat and cmd files are not always considered executable in cygwin causing which
42110    # to not find them
42111    if test "x$new_path" = x \
42112        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42113        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42114      new_path=`$CYGPATH -u "$path"`
42115    fi
42116    if test "x$new_path" = x; then
42117      # It's still not found. Now this is an unrecoverable error.
42118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42119$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42120      has_space=`$ECHO "$complete" | $GREP " "`
42121      if test "x$has_space" != x; then
42122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42124      fi
42125      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42126    fi
42127  fi
42128
42129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42132  # "foo.exe" is OK but "foo" is an error.
42133  #
42134  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42135  # It is also a way to make sure we got the proper file name for the real test later on.
42136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42137  if test "x$test_shortpath" = x; then
42138    # Short path failed, file does not exist as specified.
42139    # Try adding .exe or .cmd
42140    if test -f "${new_path}.exe"; then
42141      input_to_shortpath="${new_path}.exe"
42142    elif test -f "${new_path}.cmd"; then
42143      input_to_shortpath="${new_path}.cmd"
42144    else
42145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42146$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42147      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42148$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42149      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42150    fi
42151  else
42152    input_to_shortpath="$new_path"
42153  fi
42154
42155  # Call helper function which possibly converts this using DOS-style short mode.
42156  # If so, the updated path is stored in $new_path.
42157  new_path="$input_to_shortpath"
42158
42159  input_path="$input_to_shortpath"
42160  # Check if we need to convert this using DOS-style short mode. If the path
42161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42162  # take no chances and rewrite it.
42163  # Note: m4 eats our [], so we need to use [ and ] instead.
42164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42165  if test "x$has_forbidden_chars" != x; then
42166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42170      # Going to short mode and back again did indeed matter. Since short mode is
42171      # case insensitive, let's make it lowercase to improve readability.
42172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42173      # Now convert it back to Unix-style (cygpath)
42174      input_path=`$CYGPATH -u "$shortmode_path"`
42175      new_path="$input_path"
42176    fi
42177  fi
42178
42179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42180  if test "x$test_cygdrive_prefix" = x; then
42181    # As a simple fix, exclude /usr/bin since it's not a real path.
42182    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42184      # a path prefixed by /cygdrive for fixpath to work.
42185      new_path="$CYGWIN_ROOT_PATH$input_path"
42186    fi
42187  fi
42188
42189  # remove trailing .exe if any
42190  new_path="${new_path/%.exe/}"
42191
42192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42193
42194  # First separate the path from the arguments. This will split at the first
42195  # space.
42196  complete="$OBJDUMP"
42197  path="${complete%% *}"
42198  tmp="$complete EOL"
42199  arguments="${tmp#* }"
42200
42201  # Input might be given as Windows format, start by converting to
42202  # unix format.
42203  new_path="$path"
42204
42205  windows_path="$new_path"
42206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42207    unix_path=`$CYGPATH -u "$windows_path"`
42208    new_path="$unix_path"
42209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42211    new_path="$unix_path"
42212  fi
42213
42214
42215  # Now try to locate executable using which
42216  new_path=`$WHICH "$new_path" 2> /dev/null`
42217
42218  if test "x$new_path" = x; then
42219    # Oops. Which didn't find the executable.
42220    # The splitting of arguments from the executable at a space might have been incorrect,
42221    # since paths with space are more likely in Windows. Give it another try with the whole
42222    # argument.
42223    path="$complete"
42224    arguments="EOL"
42225    new_path="$path"
42226
42227  windows_path="$new_path"
42228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42229    unix_path=`$CYGPATH -u "$windows_path"`
42230    new_path="$unix_path"
42231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42233    new_path="$unix_path"
42234  fi
42235
42236
42237    new_path=`$WHICH "$new_path" 2> /dev/null`
42238    # bat and cmd files are not always considered executable in MSYS causing which
42239    # to not find them
42240    if test "x$new_path" = x \
42241        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42242        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42243      new_path="$path"
42244
42245  windows_path="$new_path"
42246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42247    unix_path=`$CYGPATH -u "$windows_path"`
42248    new_path="$unix_path"
42249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42251    new_path="$unix_path"
42252  fi
42253
42254    fi
42255
42256    if test "x$new_path" = x; then
42257      # It's still not found. Now this is an unrecoverable error.
42258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42259$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42260      has_space=`$ECHO "$complete" | $GREP " "`
42261      if test "x$has_space" != x; then
42262        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42263$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42264      fi
42265      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42266    fi
42267  fi
42268
42269  # Now new_path has a complete unix path to the binary
42270  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42271    # Keep paths in /bin as-is, but remove trailing .exe if any
42272    new_path="${new_path/%.exe/}"
42273    # Do not save /bin paths to all_fixpath_prefixes!
42274  else
42275    # Not in mixed or Windows style, start by that.
42276    new_path=`cmd //c echo $new_path`
42277
42278  input_path="$new_path"
42279  # Check if we need to convert this using DOS-style short mode. If the path
42280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42281  # take no chances and rewrite it.
42282  # Note: m4 eats our [], so we need to use [ and ] instead.
42283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42284  if test "x$has_forbidden_chars" != x; then
42285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42287  fi
42288
42289    # Output is in $new_path
42290
42291  windows_path="$new_path"
42292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42293    unix_path=`$CYGPATH -u "$windows_path"`
42294    new_path="$unix_path"
42295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42297    new_path="$unix_path"
42298  fi
42299
42300    # remove trailing .exe if any
42301    new_path="${new_path/%.exe/}"
42302
42303    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42304    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42305  fi
42306
42307    else
42308      # We're on a unix platform. Hooray! :)
42309      # First separate the path from the arguments. This will split at the first
42310      # space.
42311      complete="$OBJDUMP"
42312      path="${complete%% *}"
42313      tmp="$complete EOL"
42314      arguments="${tmp#* }"
42315
42316      # Cannot rely on the command "which" here since it doesn't always work.
42317      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42318      if test -z "$is_absolute_path"; then
42319        # Path to executable is not absolute. Find it.
42320        IFS_save="$IFS"
42321        IFS=:
42322        for p in $PATH; do
42323          if test -f "$p/$path" && test -x "$p/$path"; then
42324            new_path="$p/$path"
42325            break
42326          fi
42327        done
42328        IFS="$IFS_save"
42329      else
42330        # This is an absolute path, we can use it without further modifications.
42331        new_path="$path"
42332      fi
42333
42334      if test "x$new_path" = x; then
42335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42336$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42337        has_space=`$ECHO "$complete" | $GREP " "`
42338        if test "x$has_space" != x; then
42339          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42340$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42341        fi
42342        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42343      fi
42344    fi
42345
42346    # Now join together the path and the arguments once again
42347    if test "x$arguments" != xEOL; then
42348      new_complete="$new_path ${arguments% *}"
42349    else
42350      new_complete="$new_path"
42351    fi
42352
42353    if test "x$complete" != "x$new_complete"; then
42354      OBJDUMP="$new_complete"
42355      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42356$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42357    fi
42358  fi
42359
42360  fi
42361
42362
42363  # Restore old path.
42364  PATH="$OLD_PATH"
42365
42366  # Restore the flags to the user specified values.
42367  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42368  CFLAGS="$ORG_CFLAGS"
42369  CXXFLAGS="$ORG_CXXFLAGS"
42370
42371
42372# Finally do some processing after the detection phase
42373
42374  if test "x$COMPILE_TYPE" = "xcross"; then
42375    # Now we need to find a C/C++ compiler that can build executables for the
42376    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42377    # used once. Also, we need to do this without adding a tools dir to the
42378    # path, otherwise we might pick up cross-compilers which don't use standard
42379    # naming.
42380
42381    OLDPATH="$PATH"
42382
42383
42384# Check whether --with-build-devkit was given.
42385if test "${with_build_devkit+set}" = set; then :
42386  withval=$with_build_devkit;
42387fi
42388
42389    if test "x$with_build_devkit" = "xyes"; then
42390      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42391    elif test -n "$with_build_devkit"; then
42392      if test ! -d "$with_build_devkit"; then
42393        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42394      else
42395
42396  # Only process if variable expands to non-empty
42397
42398  if test "x$with_build_devkit" != x; then
42399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42400
42401  # Input might be given as Windows format, start by converting to
42402  # unix format.
42403  path="$with_build_devkit"
42404  new_path=`$CYGPATH -u "$path"`
42405
42406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42409  # "foo.exe" is OK but "foo" is an error.
42410  #
42411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42412  # It is also a way to make sure we got the proper file name for the real test later on.
42413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42414  if test "x$test_shortpath" = x; then
42415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42416$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42417    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42418  fi
42419
42420  # Call helper function which possibly converts this using DOS-style short mode.
42421  # If so, the updated path is stored in $new_path.
42422
42423  input_path="$new_path"
42424  # Check if we need to convert this using DOS-style short mode. If the path
42425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42426  # take no chances and rewrite it.
42427  # Note: m4 eats our [], so we need to use [ and ] instead.
42428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42429  if test "x$has_forbidden_chars" != x; then
42430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42434      # Going to short mode and back again did indeed matter. Since short mode is
42435      # case insensitive, let's make it lowercase to improve readability.
42436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42437      # Now convert it back to Unix-style (cygpath)
42438      input_path=`$CYGPATH -u "$shortmode_path"`
42439      new_path="$input_path"
42440    fi
42441  fi
42442
42443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42444  if test "x$test_cygdrive_prefix" = x; then
42445    # As a simple fix, exclude /usr/bin since it's not a real path.
42446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42448      # a path prefixed by /cygdrive for fixpath to work.
42449      new_path="$CYGWIN_ROOT_PATH$input_path"
42450    fi
42451  fi
42452
42453
42454  if test "x$path" != "x$new_path"; then
42455    with_build_devkit="$new_path"
42456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42457$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42458  fi
42459
42460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42461
42462  path="$with_build_devkit"
42463  has_colon=`$ECHO $path | $GREP ^.:`
42464  new_path="$path"
42465  if test "x$has_colon" = x; then
42466    # Not in mixed or Windows style, start by that.
42467    new_path=`cmd //c echo $path`
42468  fi
42469
42470
42471  input_path="$new_path"
42472  # Check if we need to convert this using DOS-style short mode. If the path
42473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42474  # take no chances and rewrite it.
42475  # Note: m4 eats our [], so we need to use [ and ] instead.
42476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42477  if test "x$has_forbidden_chars" != x; then
42478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42480  fi
42481
42482
42483  windows_path="$new_path"
42484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42485    unix_path=`$CYGPATH -u "$windows_path"`
42486    new_path="$unix_path"
42487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42489    new_path="$unix_path"
42490  fi
42491
42492  if test "x$path" != "x$new_path"; then
42493    with_build_devkit="$new_path"
42494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42495$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42496  fi
42497
42498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42500
42501    else
42502      # We're on a unix platform. Hooray! :)
42503      path="$with_build_devkit"
42504      has_space=`$ECHO "$path" | $GREP " "`
42505      if test "x$has_space" != x; then
42506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42507$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42509      fi
42510
42511      # Use eval to expand a potential ~
42512      eval path="$path"
42513      if test ! -f "$path" && test ! -d "$path"; then
42514        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42515      fi
42516
42517      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42518    fi
42519  fi
42520
42521        BUILD_DEVKIT_ROOT="$with_build_devkit"
42522        # Check for a meta data info file in the root of the devkit
42523        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42524          # Process devkit.info so that existing devkit variables are not
42525          # modified by this
42526          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42527              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42528              -e "s/\$host/\$build/g" \
42529              $BUILD_DEVKIT_ROOT/devkit.info \
42530              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42531          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42532          # This potentially sets the following:
42533          # A descriptive name of the devkit
42534
42535  if test "x$BUILD_DEVKIT_NAME" = x; then
42536    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42537  fi
42538
42539          # Corresponds to --with-extra-path
42540
42541  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42542    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42543  fi
42544
42545          # Corresponds to --with-toolchain-path
42546
42547  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42548    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42549  fi
42550
42551          # Corresponds to --with-sysroot
42552
42553  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42554    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42555  fi
42556
42557          # Skip the Window specific parts
42558        fi
42559
42560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42561$as_echo_n "checking for build platform devkit... " >&6; }
42562        if test "x$BUILD_DEVKIT_NAME" != x; then
42563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42564$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42565        else
42566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42567$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42568        fi
42569
42570        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42571
42572  if test "x$BUILD_SYSROOT" != "x"; then
42573    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42574      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42575        # Solaris Studio does not have a concept of sysroot. Instead we must
42576        # make sure the default include and lib dirs are appended to each
42577        # compile and link command line.
42578        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42579        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42580            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42581            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42582      fi
42583    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42584      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42585      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42586    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42587      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42588      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42589    fi
42590    # Propagate the sysroot args to hotspot
42591    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42592    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42593    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42594    # The global CFLAGS and LDFLAGS variables need these for configure to function
42595    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42596    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42597    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42598    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42599  fi
42600
42601  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42602    # We also need -iframework<path>/System/Library/Frameworks
42603    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42604    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42605    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42606    # set this here so it doesn't have to be peppered throughout the forest
42607    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42608    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42609  fi
42610
42611
42612
42613
42614
42615         # Fallback default of just /bin if DEVKIT_PATH is not defined
42616        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42617          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42618        fi
42619        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42620      fi
42621    fi
42622
42623    # FIXME: we should list the discovered compilers as an exclude pattern!
42624    # If we do that, we can do this detection before POST_DETECTION, and still
42625    # find the build compilers in the tools dir, if needed.
42626
42627
42628
42629  # Publish this variable in the help.
42630
42631
42632  if [ -z "${BUILD_CC+x}" ]; then
42633    # The variable is not set by user, try to locate tool using the code snippet
42634    for ac_prog in cl cc gcc
42635do
42636  # Extract the first word of "$ac_prog", so it can be a program name with args.
42637set dummy $ac_prog; ac_word=$2
42638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42639$as_echo_n "checking for $ac_word... " >&6; }
42640if ${ac_cv_path_BUILD_CC+:} false; then :
42641  $as_echo_n "(cached) " >&6
42642else
42643  case $BUILD_CC in
42644  [\\/]* | ?:[\\/]*)
42645  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42646  ;;
42647  *)
42648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42649for as_dir in $PATH
42650do
42651  IFS=$as_save_IFS
42652  test -z "$as_dir" && as_dir=.
42653    for ac_exec_ext in '' $ac_executable_extensions; do
42654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42655    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42657    break 2
42658  fi
42659done
42660  done
42661IFS=$as_save_IFS
42662
42663  ;;
42664esac
42665fi
42666BUILD_CC=$ac_cv_path_BUILD_CC
42667if test -n "$BUILD_CC"; then
42668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42669$as_echo "$BUILD_CC" >&6; }
42670else
42671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42672$as_echo "no" >&6; }
42673fi
42674
42675
42676  test -n "$BUILD_CC" && break
42677done
42678
42679  else
42680    # The variable is set, but is it from the command line or the environment?
42681
42682    # Try to remove the string !BUILD_CC! from our list.
42683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42685      # If it failed, the variable was not from the command line. Ignore it,
42686      # but warn the user (except for BASH, which is always set by the calling BASH).
42687      if test "xBUILD_CC" != xBASH; then
42688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42689$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42690      fi
42691      # Try to locate tool using the code snippet
42692      for ac_prog in cl cc gcc
42693do
42694  # Extract the first word of "$ac_prog", so it can be a program name with args.
42695set dummy $ac_prog; ac_word=$2
42696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42697$as_echo_n "checking for $ac_word... " >&6; }
42698if ${ac_cv_path_BUILD_CC+:} false; then :
42699  $as_echo_n "(cached) " >&6
42700else
42701  case $BUILD_CC in
42702  [\\/]* | ?:[\\/]*)
42703  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42704  ;;
42705  *)
42706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42707for as_dir in $PATH
42708do
42709  IFS=$as_save_IFS
42710  test -z "$as_dir" && as_dir=.
42711    for ac_exec_ext in '' $ac_executable_extensions; do
42712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42713    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42715    break 2
42716  fi
42717done
42718  done
42719IFS=$as_save_IFS
42720
42721  ;;
42722esac
42723fi
42724BUILD_CC=$ac_cv_path_BUILD_CC
42725if test -n "$BUILD_CC"; then
42726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42727$as_echo "$BUILD_CC" >&6; }
42728else
42729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42730$as_echo "no" >&6; }
42731fi
42732
42733
42734  test -n "$BUILD_CC" && break
42735done
42736
42737    else
42738      # If it succeeded, then it was overridden by the user. We will use it
42739      # for the tool.
42740
42741      # First remove it from the list of overridden variables, so we can test
42742      # for unknown variables in the end.
42743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42744
42745      # Check if we try to supply an empty value
42746      if test "x$BUILD_CC" = x; then
42747        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42748$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42750$as_echo_n "checking for BUILD_CC... " >&6; }
42751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42752$as_echo "disabled" >&6; }
42753      else
42754        # Check if the provided tool contains a complete path.
42755        tool_specified="$BUILD_CC"
42756        tool_basename="${tool_specified##*/}"
42757        if test "x$tool_basename" = "x$tool_specified"; then
42758          # A command without a complete path is provided, search $PATH.
42759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42760$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42761          # Extract the first word of "$tool_basename", so it can be a program name with args.
42762set dummy $tool_basename; ac_word=$2
42763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42764$as_echo_n "checking for $ac_word... " >&6; }
42765if ${ac_cv_path_BUILD_CC+:} false; then :
42766  $as_echo_n "(cached) " >&6
42767else
42768  case $BUILD_CC in
42769  [\\/]* | ?:[\\/]*)
42770  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42771  ;;
42772  *)
42773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42774for as_dir in $PATH
42775do
42776  IFS=$as_save_IFS
42777  test -z "$as_dir" && as_dir=.
42778    for ac_exec_ext in '' $ac_executable_extensions; do
42779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42780    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42782    break 2
42783  fi
42784done
42785  done
42786IFS=$as_save_IFS
42787
42788  ;;
42789esac
42790fi
42791BUILD_CC=$ac_cv_path_BUILD_CC
42792if test -n "$BUILD_CC"; then
42793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42794$as_echo "$BUILD_CC" >&6; }
42795else
42796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42797$as_echo "no" >&6; }
42798fi
42799
42800
42801          if test "x$BUILD_CC" = x; then
42802            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42803          fi
42804        else
42805          # Otherwise we believe it is a complete path. Use it as it is.
42806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42807$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42808          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42809$as_echo_n "checking for BUILD_CC... " >&6; }
42810          if test ! -x "$tool_specified"; then
42811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42812$as_echo "not found" >&6; }
42813            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42814          fi
42815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42816$as_echo "$tool_specified" >&6; }
42817        fi
42818      fi
42819    fi
42820
42821  fi
42822
42823
42824
42825  if test "x$BUILD_CC" = x; then
42826    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42827  fi
42828
42829
42830
42831  # Only process if variable expands to non-empty
42832
42833  if test "x$BUILD_CC" != x; then
42834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42835
42836  # First separate the path from the arguments. This will split at the first
42837  # space.
42838  complete="$BUILD_CC"
42839  path="${complete%% *}"
42840  tmp="$complete EOL"
42841  arguments="${tmp#* }"
42842
42843  # Input might be given as Windows format, start by converting to
42844  # unix format.
42845  new_path=`$CYGPATH -u "$path"`
42846
42847  # Now try to locate executable using which
42848  new_path=`$WHICH "$new_path" 2> /dev/null`
42849  # bat and cmd files are not always considered executable in cygwin causing which
42850  # to not find them
42851  if test "x$new_path" = x \
42852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42854    new_path=`$CYGPATH -u "$path"`
42855  fi
42856  if test "x$new_path" = x; then
42857    # Oops. Which didn't find the executable.
42858    # The splitting of arguments from the executable at a space might have been incorrect,
42859    # since paths with space are more likely in Windows. Give it another try with the whole
42860    # argument.
42861    path="$complete"
42862    arguments="EOL"
42863    new_path=`$CYGPATH -u "$path"`
42864    new_path=`$WHICH "$new_path" 2> /dev/null`
42865    # bat and cmd files are not always considered executable in cygwin causing which
42866    # to not find them
42867    if test "x$new_path" = x \
42868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42870      new_path=`$CYGPATH -u "$path"`
42871    fi
42872    if test "x$new_path" = x; then
42873      # It's still not found. Now this is an unrecoverable error.
42874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42875$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42876      has_space=`$ECHO "$complete" | $GREP " "`
42877      if test "x$has_space" != x; then
42878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42880      fi
42881      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42882    fi
42883  fi
42884
42885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42888  # "foo.exe" is OK but "foo" is an error.
42889  #
42890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42891  # It is also a way to make sure we got the proper file name for the real test later on.
42892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42893  if test "x$test_shortpath" = x; then
42894    # Short path failed, file does not exist as specified.
42895    # Try adding .exe or .cmd
42896    if test -f "${new_path}.exe"; then
42897      input_to_shortpath="${new_path}.exe"
42898    elif test -f "${new_path}.cmd"; then
42899      input_to_shortpath="${new_path}.cmd"
42900    else
42901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42902$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42905      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42906    fi
42907  else
42908    input_to_shortpath="$new_path"
42909  fi
42910
42911  # Call helper function which possibly converts this using DOS-style short mode.
42912  # If so, the updated path is stored in $new_path.
42913  new_path="$input_to_shortpath"
42914
42915  input_path="$input_to_shortpath"
42916  # Check if we need to convert this using DOS-style short mode. If the path
42917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42918  # take no chances and rewrite it.
42919  # Note: m4 eats our [], so we need to use [ and ] instead.
42920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42921  if test "x$has_forbidden_chars" != x; then
42922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42926      # Going to short mode and back again did indeed matter. Since short mode is
42927      # case insensitive, let's make it lowercase to improve readability.
42928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42929      # Now convert it back to Unix-style (cygpath)
42930      input_path=`$CYGPATH -u "$shortmode_path"`
42931      new_path="$input_path"
42932    fi
42933  fi
42934
42935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42936  if test "x$test_cygdrive_prefix" = x; then
42937    # As a simple fix, exclude /usr/bin since it's not a real path.
42938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42940      # a path prefixed by /cygdrive for fixpath to work.
42941      new_path="$CYGWIN_ROOT_PATH$input_path"
42942    fi
42943  fi
42944
42945  # remove trailing .exe if any
42946  new_path="${new_path/%.exe/}"
42947
42948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42949
42950  # First separate the path from the arguments. This will split at the first
42951  # space.
42952  complete="$BUILD_CC"
42953  path="${complete%% *}"
42954  tmp="$complete EOL"
42955  arguments="${tmp#* }"
42956
42957  # Input might be given as Windows format, start by converting to
42958  # unix format.
42959  new_path="$path"
42960
42961  windows_path="$new_path"
42962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42963    unix_path=`$CYGPATH -u "$windows_path"`
42964    new_path="$unix_path"
42965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42967    new_path="$unix_path"
42968  fi
42969
42970
42971  # Now try to locate executable using which
42972  new_path=`$WHICH "$new_path" 2> /dev/null`
42973
42974  if test "x$new_path" = x; then
42975    # Oops. Which didn't find the executable.
42976    # The splitting of arguments from the executable at a space might have been incorrect,
42977    # since paths with space are more likely in Windows. Give it another try with the whole
42978    # argument.
42979    path="$complete"
42980    arguments="EOL"
42981    new_path="$path"
42982
42983  windows_path="$new_path"
42984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42985    unix_path=`$CYGPATH -u "$windows_path"`
42986    new_path="$unix_path"
42987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42989    new_path="$unix_path"
42990  fi
42991
42992
42993    new_path=`$WHICH "$new_path" 2> /dev/null`
42994    # bat and cmd files are not always considered executable in MSYS causing which
42995    # to not find them
42996    if test "x$new_path" = x \
42997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42999      new_path="$path"
43000
43001  windows_path="$new_path"
43002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43003    unix_path=`$CYGPATH -u "$windows_path"`
43004    new_path="$unix_path"
43005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43007    new_path="$unix_path"
43008  fi
43009
43010    fi
43011
43012    if test "x$new_path" = x; then
43013      # It's still not found. Now this is an unrecoverable error.
43014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43015$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43016      has_space=`$ECHO "$complete" | $GREP " "`
43017      if test "x$has_space" != x; then
43018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43020      fi
43021      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43022    fi
43023  fi
43024
43025  # Now new_path has a complete unix path to the binary
43026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43027    # Keep paths in /bin as-is, but remove trailing .exe if any
43028    new_path="${new_path/%.exe/}"
43029    # Do not save /bin paths to all_fixpath_prefixes!
43030  else
43031    # Not in mixed or Windows style, start by that.
43032    new_path=`cmd //c echo $new_path`
43033
43034  input_path="$new_path"
43035  # Check if we need to convert this using DOS-style short mode. If the path
43036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43037  # take no chances and rewrite it.
43038  # Note: m4 eats our [], so we need to use [ and ] instead.
43039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43040  if test "x$has_forbidden_chars" != x; then
43041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43043  fi
43044
43045    # Output is in $new_path
43046
43047  windows_path="$new_path"
43048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43049    unix_path=`$CYGPATH -u "$windows_path"`
43050    new_path="$unix_path"
43051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43053    new_path="$unix_path"
43054  fi
43055
43056    # remove trailing .exe if any
43057    new_path="${new_path/%.exe/}"
43058
43059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43061  fi
43062
43063    else
43064      # We're on a unix platform. Hooray! :)
43065      # First separate the path from the arguments. This will split at the first
43066      # space.
43067      complete="$BUILD_CC"
43068      path="${complete%% *}"
43069      tmp="$complete EOL"
43070      arguments="${tmp#* }"
43071
43072      # Cannot rely on the command "which" here since it doesn't always work.
43073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43074      if test -z "$is_absolute_path"; then
43075        # Path to executable is not absolute. Find it.
43076        IFS_save="$IFS"
43077        IFS=:
43078        for p in $PATH; do
43079          if test -f "$p/$path" && test -x "$p/$path"; then
43080            new_path="$p/$path"
43081            break
43082          fi
43083        done
43084        IFS="$IFS_save"
43085      else
43086        # This is an absolute path, we can use it without further modifications.
43087        new_path="$path"
43088      fi
43089
43090      if test "x$new_path" = x; then
43091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43092$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43093        has_space=`$ECHO "$complete" | $GREP " "`
43094        if test "x$has_space" != x; then
43095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43097        fi
43098        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43099      fi
43100    fi
43101
43102    # Now join together the path and the arguments once again
43103    if test "x$arguments" != xEOL; then
43104      new_complete="$new_path ${arguments% *}"
43105    else
43106      new_complete="$new_path"
43107    fi
43108
43109    if test "x$complete" != "x$new_complete"; then
43110      BUILD_CC="$new_complete"
43111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43112$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43113    fi
43114  fi
43115
43116
43117
43118
43119  # Publish this variable in the help.
43120
43121
43122  if [ -z "${BUILD_CXX+x}" ]; then
43123    # The variable is not set by user, try to locate tool using the code snippet
43124    for ac_prog in cl CC g++
43125do
43126  # Extract the first word of "$ac_prog", so it can be a program name with args.
43127set dummy $ac_prog; ac_word=$2
43128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43129$as_echo_n "checking for $ac_word... " >&6; }
43130if ${ac_cv_path_BUILD_CXX+:} false; then :
43131  $as_echo_n "(cached) " >&6
43132else
43133  case $BUILD_CXX in
43134  [\\/]* | ?:[\\/]*)
43135  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43136  ;;
43137  *)
43138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43139for as_dir in $PATH
43140do
43141  IFS=$as_save_IFS
43142  test -z "$as_dir" && as_dir=.
43143    for ac_exec_ext in '' $ac_executable_extensions; do
43144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43145    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43147    break 2
43148  fi
43149done
43150  done
43151IFS=$as_save_IFS
43152
43153  ;;
43154esac
43155fi
43156BUILD_CXX=$ac_cv_path_BUILD_CXX
43157if test -n "$BUILD_CXX"; then
43158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43159$as_echo "$BUILD_CXX" >&6; }
43160else
43161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43162$as_echo "no" >&6; }
43163fi
43164
43165
43166  test -n "$BUILD_CXX" && break
43167done
43168
43169  else
43170    # The variable is set, but is it from the command line or the environment?
43171
43172    # Try to remove the string !BUILD_CXX! from our list.
43173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43175      # If it failed, the variable was not from the command line. Ignore it,
43176      # but warn the user (except for BASH, which is always set by the calling BASH).
43177      if test "xBUILD_CXX" != xBASH; then
43178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43179$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43180      fi
43181      # Try to locate tool using the code snippet
43182      for ac_prog in cl CC g++
43183do
43184  # Extract the first word of "$ac_prog", so it can be a program name with args.
43185set dummy $ac_prog; ac_word=$2
43186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43187$as_echo_n "checking for $ac_word... " >&6; }
43188if ${ac_cv_path_BUILD_CXX+:} false; then :
43189  $as_echo_n "(cached) " >&6
43190else
43191  case $BUILD_CXX in
43192  [\\/]* | ?:[\\/]*)
43193  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43194  ;;
43195  *)
43196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43197for as_dir in $PATH
43198do
43199  IFS=$as_save_IFS
43200  test -z "$as_dir" && as_dir=.
43201    for ac_exec_ext in '' $ac_executable_extensions; do
43202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43203    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43205    break 2
43206  fi
43207done
43208  done
43209IFS=$as_save_IFS
43210
43211  ;;
43212esac
43213fi
43214BUILD_CXX=$ac_cv_path_BUILD_CXX
43215if test -n "$BUILD_CXX"; then
43216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43217$as_echo "$BUILD_CXX" >&6; }
43218else
43219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43220$as_echo "no" >&6; }
43221fi
43222
43223
43224  test -n "$BUILD_CXX" && break
43225done
43226
43227    else
43228      # If it succeeded, then it was overridden by the user. We will use it
43229      # for the tool.
43230
43231      # First remove it from the list of overridden variables, so we can test
43232      # for unknown variables in the end.
43233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43234
43235      # Check if we try to supply an empty value
43236      if test "x$BUILD_CXX" = x; then
43237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43238$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43240$as_echo_n "checking for BUILD_CXX... " >&6; }
43241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43242$as_echo "disabled" >&6; }
43243      else
43244        # Check if the provided tool contains a complete path.
43245        tool_specified="$BUILD_CXX"
43246        tool_basename="${tool_specified##*/}"
43247        if test "x$tool_basename" = "x$tool_specified"; then
43248          # A command without a complete path is provided, search $PATH.
43249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43250$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43251          # Extract the first word of "$tool_basename", so it can be a program name with args.
43252set dummy $tool_basename; ac_word=$2
43253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43254$as_echo_n "checking for $ac_word... " >&6; }
43255if ${ac_cv_path_BUILD_CXX+:} false; then :
43256  $as_echo_n "(cached) " >&6
43257else
43258  case $BUILD_CXX in
43259  [\\/]* | ?:[\\/]*)
43260  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43261  ;;
43262  *)
43263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43264for as_dir in $PATH
43265do
43266  IFS=$as_save_IFS
43267  test -z "$as_dir" && as_dir=.
43268    for ac_exec_ext in '' $ac_executable_extensions; do
43269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43270    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43272    break 2
43273  fi
43274done
43275  done
43276IFS=$as_save_IFS
43277
43278  ;;
43279esac
43280fi
43281BUILD_CXX=$ac_cv_path_BUILD_CXX
43282if test -n "$BUILD_CXX"; then
43283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43284$as_echo "$BUILD_CXX" >&6; }
43285else
43286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43287$as_echo "no" >&6; }
43288fi
43289
43290
43291          if test "x$BUILD_CXX" = x; then
43292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43293          fi
43294        else
43295          # Otherwise we believe it is a complete path. Use it as it is.
43296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43297$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43299$as_echo_n "checking for BUILD_CXX... " >&6; }
43300          if test ! -x "$tool_specified"; then
43301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43302$as_echo "not found" >&6; }
43303            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43304          fi
43305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43306$as_echo "$tool_specified" >&6; }
43307        fi
43308      fi
43309    fi
43310
43311  fi
43312
43313
43314
43315  if test "x$BUILD_CXX" = x; then
43316    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43317  fi
43318
43319
43320
43321  # Only process if variable expands to non-empty
43322
43323  if test "x$BUILD_CXX" != x; then
43324    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43325
43326  # First separate the path from the arguments. This will split at the first
43327  # space.
43328  complete="$BUILD_CXX"
43329  path="${complete%% *}"
43330  tmp="$complete EOL"
43331  arguments="${tmp#* }"
43332
43333  # Input might be given as Windows format, start by converting to
43334  # unix format.
43335  new_path=`$CYGPATH -u "$path"`
43336
43337  # Now try to locate executable using which
43338  new_path=`$WHICH "$new_path" 2> /dev/null`
43339  # bat and cmd files are not always considered executable in cygwin causing which
43340  # to not find them
43341  if test "x$new_path" = x \
43342      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43343      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43344    new_path=`$CYGPATH -u "$path"`
43345  fi
43346  if test "x$new_path" = x; then
43347    # Oops. Which didn't find the executable.
43348    # The splitting of arguments from the executable at a space might have been incorrect,
43349    # since paths with space are more likely in Windows. Give it another try with the whole
43350    # argument.
43351    path="$complete"
43352    arguments="EOL"
43353    new_path=`$CYGPATH -u "$path"`
43354    new_path=`$WHICH "$new_path" 2> /dev/null`
43355    # bat and cmd files are not always considered executable in cygwin causing which
43356    # to not find them
43357    if test "x$new_path" = x \
43358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43360      new_path=`$CYGPATH -u "$path"`
43361    fi
43362    if test "x$new_path" = x; then
43363      # It's still not found. Now this is an unrecoverable error.
43364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43365$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43366      has_space=`$ECHO "$complete" | $GREP " "`
43367      if test "x$has_space" != x; then
43368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43370      fi
43371      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43372    fi
43373  fi
43374
43375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43378  # "foo.exe" is OK but "foo" is an error.
43379  #
43380  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43381  # It is also a way to make sure we got the proper file name for the real test later on.
43382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43383  if test "x$test_shortpath" = x; then
43384    # Short path failed, file does not exist as specified.
43385    # Try adding .exe or .cmd
43386    if test -f "${new_path}.exe"; then
43387      input_to_shortpath="${new_path}.exe"
43388    elif test -f "${new_path}.cmd"; then
43389      input_to_shortpath="${new_path}.cmd"
43390    else
43391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43392$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43395      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43396    fi
43397  else
43398    input_to_shortpath="$new_path"
43399  fi
43400
43401  # Call helper function which possibly converts this using DOS-style short mode.
43402  # If so, the updated path is stored in $new_path.
43403  new_path="$input_to_shortpath"
43404
43405  input_path="$input_to_shortpath"
43406  # Check if we need to convert this using DOS-style short mode. If the path
43407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43408  # take no chances and rewrite it.
43409  # Note: m4 eats our [], so we need to use [ and ] instead.
43410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43411  if test "x$has_forbidden_chars" != x; then
43412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43416      # Going to short mode and back again did indeed matter. Since short mode is
43417      # case insensitive, let's make it lowercase to improve readability.
43418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43419      # Now convert it back to Unix-style (cygpath)
43420      input_path=`$CYGPATH -u "$shortmode_path"`
43421      new_path="$input_path"
43422    fi
43423  fi
43424
43425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43426  if test "x$test_cygdrive_prefix" = x; then
43427    # As a simple fix, exclude /usr/bin since it's not a real path.
43428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43430      # a path prefixed by /cygdrive for fixpath to work.
43431      new_path="$CYGWIN_ROOT_PATH$input_path"
43432    fi
43433  fi
43434
43435  # remove trailing .exe if any
43436  new_path="${new_path/%.exe/}"
43437
43438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43439
43440  # First separate the path from the arguments. This will split at the first
43441  # space.
43442  complete="$BUILD_CXX"
43443  path="${complete%% *}"
43444  tmp="$complete EOL"
43445  arguments="${tmp#* }"
43446
43447  # Input might be given as Windows format, start by converting to
43448  # unix format.
43449  new_path="$path"
43450
43451  windows_path="$new_path"
43452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43453    unix_path=`$CYGPATH -u "$windows_path"`
43454    new_path="$unix_path"
43455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43457    new_path="$unix_path"
43458  fi
43459
43460
43461  # Now try to locate executable using which
43462  new_path=`$WHICH "$new_path" 2> /dev/null`
43463
43464  if test "x$new_path" = x; then
43465    # Oops. Which didn't find the executable.
43466    # The splitting of arguments from the executable at a space might have been incorrect,
43467    # since paths with space are more likely in Windows. Give it another try with the whole
43468    # argument.
43469    path="$complete"
43470    arguments="EOL"
43471    new_path="$path"
43472
43473  windows_path="$new_path"
43474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43475    unix_path=`$CYGPATH -u "$windows_path"`
43476    new_path="$unix_path"
43477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43479    new_path="$unix_path"
43480  fi
43481
43482
43483    new_path=`$WHICH "$new_path" 2> /dev/null`
43484    # bat and cmd files are not always considered executable in MSYS causing which
43485    # to not find them
43486    if test "x$new_path" = x \
43487        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43488        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43489      new_path="$path"
43490
43491  windows_path="$new_path"
43492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43493    unix_path=`$CYGPATH -u "$windows_path"`
43494    new_path="$unix_path"
43495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43497    new_path="$unix_path"
43498  fi
43499
43500    fi
43501
43502    if test "x$new_path" = x; then
43503      # It's still not found. Now this is an unrecoverable error.
43504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43505$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43506      has_space=`$ECHO "$complete" | $GREP " "`
43507      if test "x$has_space" != x; then
43508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43510      fi
43511      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43512    fi
43513  fi
43514
43515  # Now new_path has a complete unix path to the binary
43516  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43517    # Keep paths in /bin as-is, but remove trailing .exe if any
43518    new_path="${new_path/%.exe/}"
43519    # Do not save /bin paths to all_fixpath_prefixes!
43520  else
43521    # Not in mixed or Windows style, start by that.
43522    new_path=`cmd //c echo $new_path`
43523
43524  input_path="$new_path"
43525  # Check if we need to convert this using DOS-style short mode. If the path
43526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43527  # take no chances and rewrite it.
43528  # Note: m4 eats our [], so we need to use [ and ] instead.
43529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43530  if test "x$has_forbidden_chars" != x; then
43531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43532    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43533  fi
43534
43535    # Output is in $new_path
43536
43537  windows_path="$new_path"
43538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43539    unix_path=`$CYGPATH -u "$windows_path"`
43540    new_path="$unix_path"
43541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43543    new_path="$unix_path"
43544  fi
43545
43546    # remove trailing .exe if any
43547    new_path="${new_path/%.exe/}"
43548
43549    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43550    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43551  fi
43552
43553    else
43554      # We're on a unix platform. Hooray! :)
43555      # First separate the path from the arguments. This will split at the first
43556      # space.
43557      complete="$BUILD_CXX"
43558      path="${complete%% *}"
43559      tmp="$complete EOL"
43560      arguments="${tmp#* }"
43561
43562      # Cannot rely on the command "which" here since it doesn't always work.
43563      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43564      if test -z "$is_absolute_path"; then
43565        # Path to executable is not absolute. Find it.
43566        IFS_save="$IFS"
43567        IFS=:
43568        for p in $PATH; do
43569          if test -f "$p/$path" && test -x "$p/$path"; then
43570            new_path="$p/$path"
43571            break
43572          fi
43573        done
43574        IFS="$IFS_save"
43575      else
43576        # This is an absolute path, we can use it without further modifications.
43577        new_path="$path"
43578      fi
43579
43580      if test "x$new_path" = x; then
43581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43582$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43583        has_space=`$ECHO "$complete" | $GREP " "`
43584        if test "x$has_space" != x; then
43585          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43586$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43587        fi
43588        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43589      fi
43590    fi
43591
43592    # Now join together the path and the arguments once again
43593    if test "x$arguments" != xEOL; then
43594      new_complete="$new_path ${arguments% *}"
43595    else
43596      new_complete="$new_path"
43597    fi
43598
43599    if test "x$complete" != "x$new_complete"; then
43600      BUILD_CXX="$new_complete"
43601      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43602$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43603    fi
43604  fi
43605
43606
43607
43608  # Publish this variable in the help.
43609
43610
43611  if [ -z "${BUILD_NM+x}" ]; then
43612    # The variable is not set by user, try to locate tool using the code snippet
43613    for ac_prog in nm gcc-nm
43614do
43615  # Extract the first word of "$ac_prog", so it can be a program name with args.
43616set dummy $ac_prog; ac_word=$2
43617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43618$as_echo_n "checking for $ac_word... " >&6; }
43619if ${ac_cv_path_BUILD_NM+:} false; then :
43620  $as_echo_n "(cached) " >&6
43621else
43622  case $BUILD_NM in
43623  [\\/]* | ?:[\\/]*)
43624  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43625  ;;
43626  *)
43627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43628for as_dir in $PATH
43629do
43630  IFS=$as_save_IFS
43631  test -z "$as_dir" && as_dir=.
43632    for ac_exec_ext in '' $ac_executable_extensions; do
43633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43634    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43636    break 2
43637  fi
43638done
43639  done
43640IFS=$as_save_IFS
43641
43642  ;;
43643esac
43644fi
43645BUILD_NM=$ac_cv_path_BUILD_NM
43646if test -n "$BUILD_NM"; then
43647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43648$as_echo "$BUILD_NM" >&6; }
43649else
43650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43651$as_echo "no" >&6; }
43652fi
43653
43654
43655  test -n "$BUILD_NM" && break
43656done
43657
43658  else
43659    # The variable is set, but is it from the command line or the environment?
43660
43661    # Try to remove the string !BUILD_NM! from our list.
43662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43664      # If it failed, the variable was not from the command line. Ignore it,
43665      # but warn the user (except for BASH, which is always set by the calling BASH).
43666      if test "xBUILD_NM" != xBASH; then
43667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43668$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43669      fi
43670      # Try to locate tool using the code snippet
43671      for ac_prog in nm gcc-nm
43672do
43673  # Extract the first word of "$ac_prog", so it can be a program name with args.
43674set dummy $ac_prog; ac_word=$2
43675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43676$as_echo_n "checking for $ac_word... " >&6; }
43677if ${ac_cv_path_BUILD_NM+:} false; then :
43678  $as_echo_n "(cached) " >&6
43679else
43680  case $BUILD_NM in
43681  [\\/]* | ?:[\\/]*)
43682  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43683  ;;
43684  *)
43685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43686for as_dir in $PATH
43687do
43688  IFS=$as_save_IFS
43689  test -z "$as_dir" && as_dir=.
43690    for ac_exec_ext in '' $ac_executable_extensions; do
43691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43692    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43694    break 2
43695  fi
43696done
43697  done
43698IFS=$as_save_IFS
43699
43700  ;;
43701esac
43702fi
43703BUILD_NM=$ac_cv_path_BUILD_NM
43704if test -n "$BUILD_NM"; then
43705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43706$as_echo "$BUILD_NM" >&6; }
43707else
43708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43709$as_echo "no" >&6; }
43710fi
43711
43712
43713  test -n "$BUILD_NM" && break
43714done
43715
43716    else
43717      # If it succeeded, then it was overridden by the user. We will use it
43718      # for the tool.
43719
43720      # First remove it from the list of overridden variables, so we can test
43721      # for unknown variables in the end.
43722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43723
43724      # Check if we try to supply an empty value
43725      if test "x$BUILD_NM" = x; then
43726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43727$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43729$as_echo_n "checking for BUILD_NM... " >&6; }
43730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43731$as_echo "disabled" >&6; }
43732      else
43733        # Check if the provided tool contains a complete path.
43734        tool_specified="$BUILD_NM"
43735        tool_basename="${tool_specified##*/}"
43736        if test "x$tool_basename" = "x$tool_specified"; then
43737          # A command without a complete path is provided, search $PATH.
43738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43739$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43740          # Extract the first word of "$tool_basename", so it can be a program name with args.
43741set dummy $tool_basename; ac_word=$2
43742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43743$as_echo_n "checking for $ac_word... " >&6; }
43744if ${ac_cv_path_BUILD_NM+:} false; then :
43745  $as_echo_n "(cached) " >&6
43746else
43747  case $BUILD_NM in
43748  [\\/]* | ?:[\\/]*)
43749  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43750  ;;
43751  *)
43752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43753for as_dir in $PATH
43754do
43755  IFS=$as_save_IFS
43756  test -z "$as_dir" && as_dir=.
43757    for ac_exec_ext in '' $ac_executable_extensions; do
43758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43759    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43761    break 2
43762  fi
43763done
43764  done
43765IFS=$as_save_IFS
43766
43767  ;;
43768esac
43769fi
43770BUILD_NM=$ac_cv_path_BUILD_NM
43771if test -n "$BUILD_NM"; then
43772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43773$as_echo "$BUILD_NM" >&6; }
43774else
43775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43776$as_echo "no" >&6; }
43777fi
43778
43779
43780          if test "x$BUILD_NM" = x; then
43781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43782          fi
43783        else
43784          # Otherwise we believe it is a complete path. Use it as it is.
43785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43786$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43788$as_echo_n "checking for BUILD_NM... " >&6; }
43789          if test ! -x "$tool_specified"; then
43790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43791$as_echo "not found" >&6; }
43792            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43793          fi
43794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43795$as_echo "$tool_specified" >&6; }
43796        fi
43797      fi
43798    fi
43799
43800  fi
43801
43802
43803
43804  # Only process if variable expands to non-empty
43805
43806  if test "x$BUILD_NM" != x; then
43807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43808
43809  # First separate the path from the arguments. This will split at the first
43810  # space.
43811  complete="$BUILD_NM"
43812  path="${complete%% *}"
43813  tmp="$complete EOL"
43814  arguments="${tmp#* }"
43815
43816  # Input might be given as Windows format, start by converting to
43817  # unix format.
43818  new_path=`$CYGPATH -u "$path"`
43819
43820  # Now try to locate executable using which
43821  new_path=`$WHICH "$new_path" 2> /dev/null`
43822  # bat and cmd files are not always considered executable in cygwin causing which
43823  # to not find them
43824  if test "x$new_path" = x \
43825      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43826      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43827    new_path=`$CYGPATH -u "$path"`
43828  fi
43829  if test "x$new_path" = x; then
43830    # Oops. Which didn't find the executable.
43831    # The splitting of arguments from the executable at a space might have been incorrect,
43832    # since paths with space are more likely in Windows. Give it another try with the whole
43833    # argument.
43834    path="$complete"
43835    arguments="EOL"
43836    new_path=`$CYGPATH -u "$path"`
43837    new_path=`$WHICH "$new_path" 2> /dev/null`
43838    # bat and cmd files are not always considered executable in cygwin causing which
43839    # to not find them
43840    if test "x$new_path" = x \
43841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43843      new_path=`$CYGPATH -u "$path"`
43844    fi
43845    if test "x$new_path" = x; then
43846      # It's still not found. Now this is an unrecoverable error.
43847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43848$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43849      has_space=`$ECHO "$complete" | $GREP " "`
43850      if test "x$has_space" != x; then
43851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43853      fi
43854      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43855    fi
43856  fi
43857
43858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43861  # "foo.exe" is OK but "foo" is an error.
43862  #
43863  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43864  # It is also a way to make sure we got the proper file name for the real test later on.
43865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43866  if test "x$test_shortpath" = x; then
43867    # Short path failed, file does not exist as specified.
43868    # Try adding .exe or .cmd
43869    if test -f "${new_path}.exe"; then
43870      input_to_shortpath="${new_path}.exe"
43871    elif test -f "${new_path}.cmd"; then
43872      input_to_shortpath="${new_path}.cmd"
43873    else
43874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43875$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43876      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43877$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43878      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43879    fi
43880  else
43881    input_to_shortpath="$new_path"
43882  fi
43883
43884  # Call helper function which possibly converts this using DOS-style short mode.
43885  # If so, the updated path is stored in $new_path.
43886  new_path="$input_to_shortpath"
43887
43888  input_path="$input_to_shortpath"
43889  # Check if we need to convert this using DOS-style short mode. If the path
43890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43891  # take no chances and rewrite it.
43892  # Note: m4 eats our [], so we need to use [ and ] instead.
43893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43894  if test "x$has_forbidden_chars" != x; then
43895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43899      # Going to short mode and back again did indeed matter. Since short mode is
43900      # case insensitive, let's make it lowercase to improve readability.
43901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43902      # Now convert it back to Unix-style (cygpath)
43903      input_path=`$CYGPATH -u "$shortmode_path"`
43904      new_path="$input_path"
43905    fi
43906  fi
43907
43908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43909  if test "x$test_cygdrive_prefix" = x; then
43910    # As a simple fix, exclude /usr/bin since it's not a real path.
43911    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43913      # a path prefixed by /cygdrive for fixpath to work.
43914      new_path="$CYGWIN_ROOT_PATH$input_path"
43915    fi
43916  fi
43917
43918  # remove trailing .exe if any
43919  new_path="${new_path/%.exe/}"
43920
43921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43922
43923  # First separate the path from the arguments. This will split at the first
43924  # space.
43925  complete="$BUILD_NM"
43926  path="${complete%% *}"
43927  tmp="$complete EOL"
43928  arguments="${tmp#* }"
43929
43930  # Input might be given as Windows format, start by converting to
43931  # unix format.
43932  new_path="$path"
43933
43934  windows_path="$new_path"
43935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43936    unix_path=`$CYGPATH -u "$windows_path"`
43937    new_path="$unix_path"
43938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43940    new_path="$unix_path"
43941  fi
43942
43943
43944  # Now try to locate executable using which
43945  new_path=`$WHICH "$new_path" 2> /dev/null`
43946
43947  if test "x$new_path" = x; then
43948    # Oops. Which didn't find the executable.
43949    # The splitting of arguments from the executable at a space might have been incorrect,
43950    # since paths with space are more likely in Windows. Give it another try with the whole
43951    # argument.
43952    path="$complete"
43953    arguments="EOL"
43954    new_path="$path"
43955
43956  windows_path="$new_path"
43957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43958    unix_path=`$CYGPATH -u "$windows_path"`
43959    new_path="$unix_path"
43960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43962    new_path="$unix_path"
43963  fi
43964
43965
43966    new_path=`$WHICH "$new_path" 2> /dev/null`
43967    # bat and cmd files are not always considered executable in MSYS causing which
43968    # to not find them
43969    if test "x$new_path" = x \
43970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43972      new_path="$path"
43973
43974  windows_path="$new_path"
43975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43976    unix_path=`$CYGPATH -u "$windows_path"`
43977    new_path="$unix_path"
43978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43980    new_path="$unix_path"
43981  fi
43982
43983    fi
43984
43985    if test "x$new_path" = x; then
43986      # It's still not found. Now this is an unrecoverable error.
43987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43988$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43989      has_space=`$ECHO "$complete" | $GREP " "`
43990      if test "x$has_space" != x; then
43991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43993      fi
43994      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43995    fi
43996  fi
43997
43998  # Now new_path has a complete unix path to the binary
43999  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44000    # Keep paths in /bin as-is, but remove trailing .exe if any
44001    new_path="${new_path/%.exe/}"
44002    # Do not save /bin paths to all_fixpath_prefixes!
44003  else
44004    # Not in mixed or Windows style, start by that.
44005    new_path=`cmd //c echo $new_path`
44006
44007  input_path="$new_path"
44008  # Check if we need to convert this using DOS-style short mode. If the path
44009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44010  # take no chances and rewrite it.
44011  # Note: m4 eats our [], so we need to use [ and ] instead.
44012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44013  if test "x$has_forbidden_chars" != x; then
44014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44016  fi
44017
44018    # Output is in $new_path
44019
44020  windows_path="$new_path"
44021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44022    unix_path=`$CYGPATH -u "$windows_path"`
44023    new_path="$unix_path"
44024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44026    new_path="$unix_path"
44027  fi
44028
44029    # remove trailing .exe if any
44030    new_path="${new_path/%.exe/}"
44031
44032    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44033    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44034  fi
44035
44036    else
44037      # We're on a unix platform. Hooray! :)
44038      # First separate the path from the arguments. This will split at the first
44039      # space.
44040      complete="$BUILD_NM"
44041      path="${complete%% *}"
44042      tmp="$complete EOL"
44043      arguments="${tmp#* }"
44044
44045      # Cannot rely on the command "which" here since it doesn't always work.
44046      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44047      if test -z "$is_absolute_path"; then
44048        # Path to executable is not absolute. Find it.
44049        IFS_save="$IFS"
44050        IFS=:
44051        for p in $PATH; do
44052          if test -f "$p/$path" && test -x "$p/$path"; then
44053            new_path="$p/$path"
44054            break
44055          fi
44056        done
44057        IFS="$IFS_save"
44058      else
44059        # This is an absolute path, we can use it without further modifications.
44060        new_path="$path"
44061      fi
44062
44063      if test "x$new_path" = x; then
44064        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44065$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44066        has_space=`$ECHO "$complete" | $GREP " "`
44067        if test "x$has_space" != x; then
44068          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44069$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44070        fi
44071        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44072      fi
44073    fi
44074
44075    # Now join together the path and the arguments once again
44076    if test "x$arguments" != xEOL; then
44077      new_complete="$new_path ${arguments% *}"
44078    else
44079      new_complete="$new_path"
44080    fi
44081
44082    if test "x$complete" != "x$new_complete"; then
44083      BUILD_NM="$new_complete"
44084      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44085$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44086    fi
44087  fi
44088
44089
44090
44091  # Publish this variable in the help.
44092
44093
44094  if [ -z "${BUILD_AR+x}" ]; then
44095    # The variable is not set by user, try to locate tool using the code snippet
44096    for ac_prog in ar gcc-ar
44097do
44098  # Extract the first word of "$ac_prog", so it can be a program name with args.
44099set dummy $ac_prog; ac_word=$2
44100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44101$as_echo_n "checking for $ac_word... " >&6; }
44102if ${ac_cv_path_BUILD_AR+:} false; then :
44103  $as_echo_n "(cached) " >&6
44104else
44105  case $BUILD_AR in
44106  [\\/]* | ?:[\\/]*)
44107  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44108  ;;
44109  *)
44110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44111for as_dir in $PATH
44112do
44113  IFS=$as_save_IFS
44114  test -z "$as_dir" && as_dir=.
44115    for ac_exec_ext in '' $ac_executable_extensions; do
44116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44117    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44119    break 2
44120  fi
44121done
44122  done
44123IFS=$as_save_IFS
44124
44125  ;;
44126esac
44127fi
44128BUILD_AR=$ac_cv_path_BUILD_AR
44129if test -n "$BUILD_AR"; then
44130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44131$as_echo "$BUILD_AR" >&6; }
44132else
44133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44134$as_echo "no" >&6; }
44135fi
44136
44137
44138  test -n "$BUILD_AR" && break
44139done
44140
44141  else
44142    # The variable is set, but is it from the command line or the environment?
44143
44144    # Try to remove the string !BUILD_AR! from our list.
44145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44147      # If it failed, the variable was not from the command line. Ignore it,
44148      # but warn the user (except for BASH, which is always set by the calling BASH).
44149      if test "xBUILD_AR" != xBASH; then
44150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44151$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44152      fi
44153      # Try to locate tool using the code snippet
44154      for ac_prog in ar gcc-ar
44155do
44156  # Extract the first word of "$ac_prog", so it can be a program name with args.
44157set dummy $ac_prog; ac_word=$2
44158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44159$as_echo_n "checking for $ac_word... " >&6; }
44160if ${ac_cv_path_BUILD_AR+:} false; then :
44161  $as_echo_n "(cached) " >&6
44162else
44163  case $BUILD_AR in
44164  [\\/]* | ?:[\\/]*)
44165  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44166  ;;
44167  *)
44168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44169for as_dir in $PATH
44170do
44171  IFS=$as_save_IFS
44172  test -z "$as_dir" && as_dir=.
44173    for ac_exec_ext in '' $ac_executable_extensions; do
44174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44175    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44177    break 2
44178  fi
44179done
44180  done
44181IFS=$as_save_IFS
44182
44183  ;;
44184esac
44185fi
44186BUILD_AR=$ac_cv_path_BUILD_AR
44187if test -n "$BUILD_AR"; then
44188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44189$as_echo "$BUILD_AR" >&6; }
44190else
44191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44192$as_echo "no" >&6; }
44193fi
44194
44195
44196  test -n "$BUILD_AR" && break
44197done
44198
44199    else
44200      # If it succeeded, then it was overridden by the user. We will use it
44201      # for the tool.
44202
44203      # First remove it from the list of overridden variables, so we can test
44204      # for unknown variables in the end.
44205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44206
44207      # Check if we try to supply an empty value
44208      if test "x$BUILD_AR" = x; then
44209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44210$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44212$as_echo_n "checking for BUILD_AR... " >&6; }
44213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44214$as_echo "disabled" >&6; }
44215      else
44216        # Check if the provided tool contains a complete path.
44217        tool_specified="$BUILD_AR"
44218        tool_basename="${tool_specified##*/}"
44219        if test "x$tool_basename" = "x$tool_specified"; then
44220          # A command without a complete path is provided, search $PATH.
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44222$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44223          # Extract the first word of "$tool_basename", so it can be a program name with args.
44224set dummy $tool_basename; ac_word=$2
44225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44226$as_echo_n "checking for $ac_word... " >&6; }
44227if ${ac_cv_path_BUILD_AR+:} false; then :
44228  $as_echo_n "(cached) " >&6
44229else
44230  case $BUILD_AR in
44231  [\\/]* | ?:[\\/]*)
44232  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44233  ;;
44234  *)
44235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44236for as_dir in $PATH
44237do
44238  IFS=$as_save_IFS
44239  test -z "$as_dir" && as_dir=.
44240    for ac_exec_ext in '' $ac_executable_extensions; do
44241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44242    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44244    break 2
44245  fi
44246done
44247  done
44248IFS=$as_save_IFS
44249
44250  ;;
44251esac
44252fi
44253BUILD_AR=$ac_cv_path_BUILD_AR
44254if test -n "$BUILD_AR"; then
44255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44256$as_echo "$BUILD_AR" >&6; }
44257else
44258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44259$as_echo "no" >&6; }
44260fi
44261
44262
44263          if test "x$BUILD_AR" = x; then
44264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44265          fi
44266        else
44267          # Otherwise we believe it is a complete path. Use it as it is.
44268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44269$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44271$as_echo_n "checking for BUILD_AR... " >&6; }
44272          if test ! -x "$tool_specified"; then
44273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44274$as_echo "not found" >&6; }
44275            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44276          fi
44277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44278$as_echo "$tool_specified" >&6; }
44279        fi
44280      fi
44281    fi
44282
44283  fi
44284
44285
44286
44287  # Only process if variable expands to non-empty
44288
44289  if test "x$BUILD_AR" != x; then
44290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44291
44292  # First separate the path from the arguments. This will split at the first
44293  # space.
44294  complete="$BUILD_AR"
44295  path="${complete%% *}"
44296  tmp="$complete EOL"
44297  arguments="${tmp#* }"
44298
44299  # Input might be given as Windows format, start by converting to
44300  # unix format.
44301  new_path=`$CYGPATH -u "$path"`
44302
44303  # Now try to locate executable using which
44304  new_path=`$WHICH "$new_path" 2> /dev/null`
44305  # bat and cmd files are not always considered executable in cygwin causing which
44306  # to not find them
44307  if test "x$new_path" = x \
44308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44310    new_path=`$CYGPATH -u "$path"`
44311  fi
44312  if test "x$new_path" = x; then
44313    # Oops. Which didn't find the executable.
44314    # The splitting of arguments from the executable at a space might have been incorrect,
44315    # since paths with space are more likely in Windows. Give it another try with the whole
44316    # argument.
44317    path="$complete"
44318    arguments="EOL"
44319    new_path=`$CYGPATH -u "$path"`
44320    new_path=`$WHICH "$new_path" 2> /dev/null`
44321    # bat and cmd files are not always considered executable in cygwin causing which
44322    # to not find them
44323    if test "x$new_path" = x \
44324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44326      new_path=`$CYGPATH -u "$path"`
44327    fi
44328    if test "x$new_path" = x; then
44329      # It's still not found. Now this is an unrecoverable error.
44330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44331$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44332      has_space=`$ECHO "$complete" | $GREP " "`
44333      if test "x$has_space" != x; then
44334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44336      fi
44337      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44338    fi
44339  fi
44340
44341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44344  # "foo.exe" is OK but "foo" is an error.
44345  #
44346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44347  # It is also a way to make sure we got the proper file name for the real test later on.
44348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44349  if test "x$test_shortpath" = x; then
44350    # Short path failed, file does not exist as specified.
44351    # Try adding .exe or .cmd
44352    if test -f "${new_path}.exe"; then
44353      input_to_shortpath="${new_path}.exe"
44354    elif test -f "${new_path}.cmd"; then
44355      input_to_shortpath="${new_path}.cmd"
44356    else
44357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44358$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44361      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44362    fi
44363  else
44364    input_to_shortpath="$new_path"
44365  fi
44366
44367  # Call helper function which possibly converts this using DOS-style short mode.
44368  # If so, the updated path is stored in $new_path.
44369  new_path="$input_to_shortpath"
44370
44371  input_path="$input_to_shortpath"
44372  # Check if we need to convert this using DOS-style short mode. If the path
44373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44374  # take no chances and rewrite it.
44375  # Note: m4 eats our [], so we need to use [ and ] instead.
44376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44377  if test "x$has_forbidden_chars" != x; then
44378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44382      # Going to short mode and back again did indeed matter. Since short mode is
44383      # case insensitive, let's make it lowercase to improve readability.
44384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44385      # Now convert it back to Unix-style (cygpath)
44386      input_path=`$CYGPATH -u "$shortmode_path"`
44387      new_path="$input_path"
44388    fi
44389  fi
44390
44391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44392  if test "x$test_cygdrive_prefix" = x; then
44393    # As a simple fix, exclude /usr/bin since it's not a real path.
44394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44396      # a path prefixed by /cygdrive for fixpath to work.
44397      new_path="$CYGWIN_ROOT_PATH$input_path"
44398    fi
44399  fi
44400
44401  # remove trailing .exe if any
44402  new_path="${new_path/%.exe/}"
44403
44404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44405
44406  # First separate the path from the arguments. This will split at the first
44407  # space.
44408  complete="$BUILD_AR"
44409  path="${complete%% *}"
44410  tmp="$complete EOL"
44411  arguments="${tmp#* }"
44412
44413  # Input might be given as Windows format, start by converting to
44414  # unix format.
44415  new_path="$path"
44416
44417  windows_path="$new_path"
44418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44419    unix_path=`$CYGPATH -u "$windows_path"`
44420    new_path="$unix_path"
44421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44423    new_path="$unix_path"
44424  fi
44425
44426
44427  # Now try to locate executable using which
44428  new_path=`$WHICH "$new_path" 2> /dev/null`
44429
44430  if test "x$new_path" = x; then
44431    # Oops. Which didn't find the executable.
44432    # The splitting of arguments from the executable at a space might have been incorrect,
44433    # since paths with space are more likely in Windows. Give it another try with the whole
44434    # argument.
44435    path="$complete"
44436    arguments="EOL"
44437    new_path="$path"
44438
44439  windows_path="$new_path"
44440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44441    unix_path=`$CYGPATH -u "$windows_path"`
44442    new_path="$unix_path"
44443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44445    new_path="$unix_path"
44446  fi
44447
44448
44449    new_path=`$WHICH "$new_path" 2> /dev/null`
44450    # bat and cmd files are not always considered executable in MSYS causing which
44451    # to not find them
44452    if test "x$new_path" = x \
44453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44455      new_path="$path"
44456
44457  windows_path="$new_path"
44458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44459    unix_path=`$CYGPATH -u "$windows_path"`
44460    new_path="$unix_path"
44461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44463    new_path="$unix_path"
44464  fi
44465
44466    fi
44467
44468    if test "x$new_path" = x; then
44469      # It's still not found. Now this is an unrecoverable error.
44470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44471$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44472      has_space=`$ECHO "$complete" | $GREP " "`
44473      if test "x$has_space" != x; then
44474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44476      fi
44477      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44478    fi
44479  fi
44480
44481  # Now new_path has a complete unix path to the binary
44482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44483    # Keep paths in /bin as-is, but remove trailing .exe if any
44484    new_path="${new_path/%.exe/}"
44485    # Do not save /bin paths to all_fixpath_prefixes!
44486  else
44487    # Not in mixed or Windows style, start by that.
44488    new_path=`cmd //c echo $new_path`
44489
44490  input_path="$new_path"
44491  # Check if we need to convert this using DOS-style short mode. If the path
44492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44493  # take no chances and rewrite it.
44494  # Note: m4 eats our [], so we need to use [ and ] instead.
44495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44496  if test "x$has_forbidden_chars" != x; then
44497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44499  fi
44500
44501    # Output is in $new_path
44502
44503  windows_path="$new_path"
44504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44505    unix_path=`$CYGPATH -u "$windows_path"`
44506    new_path="$unix_path"
44507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44509    new_path="$unix_path"
44510  fi
44511
44512    # remove trailing .exe if any
44513    new_path="${new_path/%.exe/}"
44514
44515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44517  fi
44518
44519    else
44520      # We're on a unix platform. Hooray! :)
44521      # First separate the path from the arguments. This will split at the first
44522      # space.
44523      complete="$BUILD_AR"
44524      path="${complete%% *}"
44525      tmp="$complete EOL"
44526      arguments="${tmp#* }"
44527
44528      # Cannot rely on the command "which" here since it doesn't always work.
44529      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44530      if test -z "$is_absolute_path"; then
44531        # Path to executable is not absolute. Find it.
44532        IFS_save="$IFS"
44533        IFS=:
44534        for p in $PATH; do
44535          if test -f "$p/$path" && test -x "$p/$path"; then
44536            new_path="$p/$path"
44537            break
44538          fi
44539        done
44540        IFS="$IFS_save"
44541      else
44542        # This is an absolute path, we can use it without further modifications.
44543        new_path="$path"
44544      fi
44545
44546      if test "x$new_path" = x; then
44547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44548$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44549        has_space=`$ECHO "$complete" | $GREP " "`
44550        if test "x$has_space" != x; then
44551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44553        fi
44554        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44555      fi
44556    fi
44557
44558    # Now join together the path and the arguments once again
44559    if test "x$arguments" != xEOL; then
44560      new_complete="$new_path ${arguments% *}"
44561    else
44562      new_complete="$new_path"
44563    fi
44564
44565    if test "x$complete" != "x$new_complete"; then
44566      BUILD_AR="$new_complete"
44567      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44568$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44569    fi
44570  fi
44571
44572    # Assume the C compiler is the assembler
44573    BUILD_AS="$BUILD_CC -c"
44574    # Just like for the target compiler, use the compiler as linker
44575    BUILD_LD="$BUILD_CC"
44576
44577    PATH="$OLDPATH"
44578  else
44579    # If we are not cross compiling, use the normal target compilers for
44580    # building the build platform executables.
44581    BUILD_CC="$CC"
44582    BUILD_CXX="$CXX"
44583    BUILD_LD="$LD"
44584    BUILD_NM="$NM"
44585    BUILD_AS="$AS"
44586    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44587    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44588    BUILD_AR="$AR"
44589  fi
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44602    # For hotspot, we need these in Windows mixed path,
44603    # so rewrite them all. Need added .exe suffix.
44604    HOTSPOT_CXX="$CXX.exe"
44605    HOTSPOT_LD="$LD.exe"
44606    HOTSPOT_MT="$MT.exe"
44607    HOTSPOT_RC="$RC.exe"
44608
44609  unix_path="$HOTSPOT_CXX"
44610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44611    windows_path=`$CYGPATH -m "$unix_path"`
44612    HOTSPOT_CXX="$windows_path"
44613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44614    windows_path=`cmd //c echo $unix_path`
44615    HOTSPOT_CXX="$windows_path"
44616  fi
44617
44618
44619  unix_path="$HOTSPOT_LD"
44620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44621    windows_path=`$CYGPATH -m "$unix_path"`
44622    HOTSPOT_LD="$windows_path"
44623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44624    windows_path=`cmd //c echo $unix_path`
44625    HOTSPOT_LD="$windows_path"
44626  fi
44627
44628
44629  unix_path="$HOTSPOT_MT"
44630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44631    windows_path=`$CYGPATH -m "$unix_path"`
44632    HOTSPOT_MT="$windows_path"
44633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44634    windows_path=`cmd //c echo $unix_path`
44635    HOTSPOT_MT="$windows_path"
44636  fi
44637
44638
44639  unix_path="$HOTSPOT_RC"
44640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44641    windows_path=`$CYGPATH -m "$unix_path"`
44642    HOTSPOT_RC="$windows_path"
44643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44644    windows_path=`cmd //c echo $unix_path`
44645    HOTSPOT_RC="$windows_path"
44646  fi
44647
44648
44649
44650  else
44651    HOTSPOT_CXX="$CXX"
44652    HOTSPOT_LD="$LD"
44653  fi
44654
44655
44656
44657  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44658    USE_CLANG=true
44659  fi
44660
44661
44662
44663
44664
44665  # The package path is used only on macosx?
44666  # FIXME: clean this up, and/or move it elsewhere.
44667  PACKAGE_PATH=/opt/local
44668
44669
44670  # Check for extra potential brokenness.
44671  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44672    # On Windows, double-check that we got the right compiler.
44673    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44674    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44675    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44676      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44677        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
44678      fi
44679    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44680      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44681        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44682      fi
44683    fi
44684  fi
44685
44686  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44687    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44688    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44689    # This is later checked when setting flags.
44690
44691    # "-Og" suppported for GCC 4.8 and later
44692    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44693
44694  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44695$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44696  supports=yes
44697
44698  saved_cflags="$CFLAGS"
44699  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44700  ac_ext=c
44701ac_cpp='$CPP $CPPFLAGS'
44702ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44703ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44704ac_compiler_gnu=$ac_cv_c_compiler_gnu
44705
44706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44707/* end confdefs.h.  */
44708int i;
44709_ACEOF
44710if ac_fn_c_try_compile "$LINENO"; then :
44711
44712else
44713  supports=no
44714fi
44715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44716  ac_ext=cpp
44717ac_cpp='$CXXCPP $CPPFLAGS'
44718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44721
44722  CFLAGS="$saved_cflags"
44723
44724  saved_cxxflags="$CXXFLAGS"
44725  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44726  ac_ext=cpp
44727ac_cpp='$CXXCPP $CPPFLAGS'
44728ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44729ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44730ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44731
44732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44733/* end confdefs.h.  */
44734int i;
44735_ACEOF
44736if ac_fn_cxx_try_compile "$LINENO"; then :
44737
44738else
44739  supports=no
44740fi
44741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44742  ac_ext=cpp
44743ac_cpp='$CXXCPP $CPPFLAGS'
44744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44747
44748  CXXFLAGS="$saved_cxxflags"
44749
44750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44751$as_echo "$supports" >&6; }
44752  if test "x$supports" = "xyes" ; then
44753    HAS_CFLAG_OPTIMIZE_DEBUG=true
44754  else
44755    HAS_CFLAG_OPTIMIZE_DEBUG=false
44756  fi
44757
44758
44759    # "-z relro" supported in GNU binutils 2.17 and later
44760    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
44761
44762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44763$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44764  supports=yes
44765
44766  saved_ldflags="$LDFLAGS"
44767  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44768  ac_ext=c
44769ac_cpp='$CPP $CPPFLAGS'
44770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44772ac_compiler_gnu=$ac_cv_c_compiler_gnu
44773
44774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44775/* end confdefs.h.  */
44776
44777int
44778main ()
44779{
44780
44781  ;
44782  return 0;
44783}
44784_ACEOF
44785if ac_fn_c_try_link "$LINENO"; then :
44786
44787else
44788  supports=no
44789fi
44790rm -f core conftest.err conftest.$ac_objext \
44791    conftest$ac_exeext conftest.$ac_ext
44792  ac_ext=cpp
44793ac_cpp='$CXXCPP $CPPFLAGS'
44794ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44795ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44796ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44797
44798  LDFLAGS="$saved_ldflags"
44799
44800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44801$as_echo "$supports" >&6; }
44802  if test "x$supports" = "xyes" ; then
44803    HAS_LINKER_RELRO=true
44804  else
44805    HAS_LINKER_RELRO=false
44806  fi
44807
44808
44809    # "-z now" supported in GNU binutils 2.11 and later
44810    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
44811
44812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44813$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44814  supports=yes
44815
44816  saved_ldflags="$LDFLAGS"
44817  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44818  ac_ext=c
44819ac_cpp='$CPP $CPPFLAGS'
44820ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44821ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44822ac_compiler_gnu=$ac_cv_c_compiler_gnu
44823
44824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44825/* end confdefs.h.  */
44826
44827int
44828main ()
44829{
44830
44831  ;
44832  return 0;
44833}
44834_ACEOF
44835if ac_fn_c_try_link "$LINENO"; then :
44836
44837else
44838  supports=no
44839fi
44840rm -f core conftest.err conftest.$ac_objext \
44841    conftest$ac_exeext conftest.$ac_ext
44842  ac_ext=cpp
44843ac_cpp='$CXXCPP $CPPFLAGS'
44844ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44845ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44846ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44847
44848  LDFLAGS="$saved_ldflags"
44849
44850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44851$as_echo "$supports" >&6; }
44852  if test "x$supports" = "xyes" ; then
44853    HAS_LINKER_NOW=true
44854  else
44855    HAS_LINKER_NOW=false
44856  fi
44857
44858  fi
44859
44860  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44861  # in executable.'
44862  USING_BROKEN_SUSE_LD=no
44863  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44865$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44866    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44867    $ECHO "int main() { }" > main.c
44868    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
44869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44870$as_echo "no" >&6; }
44871      USING_BROKEN_SUSE_LD=no
44872    else
44873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44874$as_echo "yes" >&6; }
44875      USING_BROKEN_SUSE_LD=yes
44876    fi
44877    rm -rf version-script.map main.c a.out
44878  fi
44879
44880
44881
44882# Setup the JTReg Regression Test Harness.
44883
44884
44885# Check whether --with-jtreg was given.
44886if test "${with_jtreg+set}" = set; then :
44887  withval=$with_jtreg;
44888else
44889  with_jtreg=no
44890fi
44891
44892
44893  if test "x$with_jtreg" = xno; then
44894    # jtreg disabled
44895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44896$as_echo_n "checking for jtreg... " >&6; }
44897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44898$as_echo "no" >&6; }
44899  else
44900    if test "x$with_jtreg" != xyes; then
44901      # with path specified.
44902      JT_HOME="$with_jtreg"
44903    fi
44904
44905    if test "x$JT_HOME" != x; then
44906      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44907$as_echo_n "checking for jtreg... " >&6; }
44908
44909      # use JT_HOME enviroment var.
44910
44911  # Only process if variable expands to non-empty
44912
44913  if test "x$JT_HOME" != x; then
44914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44915
44916  # Input might be given as Windows format, start by converting to
44917  # unix format.
44918  path="$JT_HOME"
44919  new_path=`$CYGPATH -u "$path"`
44920
44921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44924  # "foo.exe" is OK but "foo" is an error.
44925  #
44926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44927  # It is also a way to make sure we got the proper file name for the real test later on.
44928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44929  if test "x$test_shortpath" = x; then
44930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44931$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44932    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44933  fi
44934
44935  # Call helper function which possibly converts this using DOS-style short mode.
44936  # If so, the updated path is stored in $new_path.
44937
44938  input_path="$new_path"
44939  # Check if we need to convert this using DOS-style short mode. If the path
44940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44941  # take no chances and rewrite it.
44942  # Note: m4 eats our [], so we need to use [ and ] instead.
44943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44944  if test "x$has_forbidden_chars" != x; then
44945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44949      # Going to short mode and back again did indeed matter. Since short mode is
44950      # case insensitive, let's make it lowercase to improve readability.
44951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952      # Now convert it back to Unix-style (cygpath)
44953      input_path=`$CYGPATH -u "$shortmode_path"`
44954      new_path="$input_path"
44955    fi
44956  fi
44957
44958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44959  if test "x$test_cygdrive_prefix" = x; then
44960    # As a simple fix, exclude /usr/bin since it's not a real path.
44961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44963      # a path prefixed by /cygdrive for fixpath to work.
44964      new_path="$CYGWIN_ROOT_PATH$input_path"
44965    fi
44966  fi
44967
44968
44969  if test "x$path" != "x$new_path"; then
44970    JT_HOME="$new_path"
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44972$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44973  fi
44974
44975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44976
44977  path="$JT_HOME"
44978  has_colon=`$ECHO $path | $GREP ^.:`
44979  new_path="$path"
44980  if test "x$has_colon" = x; then
44981    # Not in mixed or Windows style, start by that.
44982    new_path=`cmd //c echo $path`
44983  fi
44984
44985
44986  input_path="$new_path"
44987  # Check if we need to convert this using DOS-style short mode. If the path
44988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44989  # take no chances and rewrite it.
44990  # Note: m4 eats our [], so we need to use [ and ] instead.
44991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44992  if test "x$has_forbidden_chars" != x; then
44993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44995  fi
44996
44997
44998  windows_path="$new_path"
44999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45000    unix_path=`$CYGPATH -u "$windows_path"`
45001    new_path="$unix_path"
45002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45004    new_path="$unix_path"
45005  fi
45006
45007  if test "x$path" != "x$new_path"; then
45008    JT_HOME="$new_path"
45009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45010$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45011  fi
45012
45013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45015
45016    else
45017      # We're on a unix platform. Hooray! :)
45018      path="$JT_HOME"
45019      has_space=`$ECHO "$path" | $GREP " "`
45020      if test "x$has_space" != x; then
45021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45022$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45024      fi
45025
45026      # Use eval to expand a potential ~
45027      eval path="$path"
45028      if test ! -f "$path" && test ! -d "$path"; then
45029        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45030      fi
45031
45032      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45033    fi
45034  fi
45035
45036
45037      # jtreg win32 script works for everybody
45038      JTREGEXE="$JT_HOME/bin/jtreg"
45039
45040      if test ! -f "$JTREGEXE"; then
45041        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45042      fi
45043
45044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45045$as_echo "$JTREGEXE" >&6; }
45046    else
45047      # try to find jtreg on path
45048
45049
45050
45051  # Publish this variable in the help.
45052
45053
45054  if [ -z "${JTREGEXE+x}" ]; then
45055    # The variable is not set by user, try to locate tool using the code snippet
45056    for ac_prog in jtreg
45057do
45058  # Extract the first word of "$ac_prog", so it can be a program name with args.
45059set dummy $ac_prog; ac_word=$2
45060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45061$as_echo_n "checking for $ac_word... " >&6; }
45062if ${ac_cv_path_JTREGEXE+:} false; then :
45063  $as_echo_n "(cached) " >&6
45064else
45065  case $JTREGEXE in
45066  [\\/]* | ?:[\\/]*)
45067  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45068  ;;
45069  *)
45070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45071for as_dir in $PATH
45072do
45073  IFS=$as_save_IFS
45074  test -z "$as_dir" && as_dir=.
45075    for ac_exec_ext in '' $ac_executable_extensions; do
45076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45077    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45079    break 2
45080  fi
45081done
45082  done
45083IFS=$as_save_IFS
45084
45085  ;;
45086esac
45087fi
45088JTREGEXE=$ac_cv_path_JTREGEXE
45089if test -n "$JTREGEXE"; then
45090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45091$as_echo "$JTREGEXE" >&6; }
45092else
45093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45094$as_echo "no" >&6; }
45095fi
45096
45097
45098  test -n "$JTREGEXE" && break
45099done
45100
45101  else
45102    # The variable is set, but is it from the command line or the environment?
45103
45104    # Try to remove the string !JTREGEXE! from our list.
45105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45107      # If it failed, the variable was not from the command line. Ignore it,
45108      # but warn the user (except for BASH, which is always set by the calling BASH).
45109      if test "xJTREGEXE" != xBASH; then
45110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45111$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45112      fi
45113      # Try to locate tool using the code snippet
45114      for ac_prog in jtreg
45115do
45116  # Extract the first word of "$ac_prog", so it can be a program name with args.
45117set dummy $ac_prog; ac_word=$2
45118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45119$as_echo_n "checking for $ac_word... " >&6; }
45120if ${ac_cv_path_JTREGEXE+:} false; then :
45121  $as_echo_n "(cached) " >&6
45122else
45123  case $JTREGEXE in
45124  [\\/]* | ?:[\\/]*)
45125  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45126  ;;
45127  *)
45128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45129for as_dir in $PATH
45130do
45131  IFS=$as_save_IFS
45132  test -z "$as_dir" && as_dir=.
45133    for ac_exec_ext in '' $ac_executable_extensions; do
45134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45135    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45137    break 2
45138  fi
45139done
45140  done
45141IFS=$as_save_IFS
45142
45143  ;;
45144esac
45145fi
45146JTREGEXE=$ac_cv_path_JTREGEXE
45147if test -n "$JTREGEXE"; then
45148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45149$as_echo "$JTREGEXE" >&6; }
45150else
45151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45152$as_echo "no" >&6; }
45153fi
45154
45155
45156  test -n "$JTREGEXE" && break
45157done
45158
45159    else
45160      # If it succeeded, then it was overridden by the user. We will use it
45161      # for the tool.
45162
45163      # First remove it from the list of overridden variables, so we can test
45164      # for unknown variables in the end.
45165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45166
45167      # Check if we try to supply an empty value
45168      if test "x$JTREGEXE" = x; then
45169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45170$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45172$as_echo_n "checking for JTREGEXE... " >&6; }
45173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45174$as_echo "disabled" >&6; }
45175      else
45176        # Check if the provided tool contains a complete path.
45177        tool_specified="$JTREGEXE"
45178        tool_basename="${tool_specified##*/}"
45179        if test "x$tool_basename" = "x$tool_specified"; then
45180          # A command without a complete path is provided, search $PATH.
45181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45182$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45183          # Extract the first word of "$tool_basename", so it can be a program name with args.
45184set dummy $tool_basename; ac_word=$2
45185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45186$as_echo_n "checking for $ac_word... " >&6; }
45187if ${ac_cv_path_JTREGEXE+:} false; then :
45188  $as_echo_n "(cached) " >&6
45189else
45190  case $JTREGEXE in
45191  [\\/]* | ?:[\\/]*)
45192  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45193  ;;
45194  *)
45195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45196for as_dir in $PATH
45197do
45198  IFS=$as_save_IFS
45199  test -z "$as_dir" && as_dir=.
45200    for ac_exec_ext in '' $ac_executable_extensions; do
45201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45202    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45204    break 2
45205  fi
45206done
45207  done
45208IFS=$as_save_IFS
45209
45210  ;;
45211esac
45212fi
45213JTREGEXE=$ac_cv_path_JTREGEXE
45214if test -n "$JTREGEXE"; then
45215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45216$as_echo "$JTREGEXE" >&6; }
45217else
45218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45219$as_echo "no" >&6; }
45220fi
45221
45222
45223          if test "x$JTREGEXE" = x; then
45224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45225          fi
45226        else
45227          # Otherwise we believe it is a complete path. Use it as it is.
45228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45229$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45231$as_echo_n "checking for JTREGEXE... " >&6; }
45232          if test ! -x "$tool_specified"; then
45233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45234$as_echo "not found" >&6; }
45235            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45236          fi
45237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45238$as_echo "$tool_specified" >&6; }
45239        fi
45240      fi
45241    fi
45242
45243  fi
45244
45245
45246
45247  if test "x$JTREGEXE" = x; then
45248    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45249  fi
45250
45251
45252      JT_HOME="`$DIRNAME $JTREGEXE`"
45253    fi
45254  fi
45255
45256
45257
45258
45259
45260
45261  # Option used to tell the compiler whether to create 32- or 64-bit executables
45262  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45263    COMPILER_TARGET_BITS_FLAG="-q"
45264  else
45265    COMPILER_TARGET_BITS_FLAG="-m"
45266  fi
45267
45268
45269  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45270  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45271    ARFLAGS="-r"
45272  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45273    ARFLAGS="-X64"
45274  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45275    # lib.exe is used as AR to create static libraries.
45276    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45277  else
45278    ARFLAGS=""
45279  fi
45280
45281
45282  ## Setup strip.
45283  # FIXME: should this really be per platform, or should it be per toolchain type?
45284  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45285  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45286  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45287    STRIPFLAGS="-g"
45288  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45289    STRIPFLAGS="-x"
45290  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45291    STRIPFLAGS="-S"
45292  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45293    STRIPFLAGS="-X32_64"
45294  fi
45295
45296
45297
45298  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45299    CC_OUT_OPTION=-Fo
45300    EXE_OUT_OPTION=-out:
45301    LD_OUT_OPTION=-out:
45302    AR_OUT_OPTION=-out:
45303  else
45304    # The option used to specify the target .o,.a or .so file.
45305    # When compiling, how to specify the to be created object file.
45306    CC_OUT_OPTION='-o$(SPACE)'
45307    # When linking, how to specify the to be created executable.
45308    EXE_OUT_OPTION='-o$(SPACE)'
45309    # When linking, how to specify the to be created dynamically linkable library.
45310    LD_OUT_OPTION='-o$(SPACE)'
45311    # When archiving, how to specify the to be create static archive for object files.
45312    AR_OUT_OPTION='rcs$(SPACE)'
45313  fi
45314
45315
45316
45317
45318
45319  # On Windows, we need to set RC flags.
45320  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45321    RC_FLAGS="-nologo -l0x409"
45322    if test "x$VARIANT" = xOPT; then
45323      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45324    fi
45325
45326    # The version variables used to create RC_FLAGS may be overridden
45327    # in a custom configure script, or possibly the command line.
45328    # Let those variables be expanded at make time in spec.gmk.
45329    # The \$ are escaped to the shell, and the $(...) variables
45330    # are evaluated by make.
45331    RC_FLAGS="$RC_FLAGS \
45332        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
45333        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45334        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45335        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
45336        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45337        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
45338        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
45339  fi
45340
45341
45342  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45343    # silence copyright notice and other headers.
45344    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45345  fi
45346
45347
45348# FIXME: Currently we must test this after toolchain but before flags. Fix!
45349
45350# Now we can test some aspects on the target using configure macros.
45351
45352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45353$as_echo_n "checking for ANSI C header files... " >&6; }
45354if ${ac_cv_header_stdc+:} false; then :
45355  $as_echo_n "(cached) " >&6
45356else
45357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45358/* end confdefs.h.  */
45359#include <stdlib.h>
45360#include <stdarg.h>
45361#include <string.h>
45362#include <float.h>
45363
45364int
45365main ()
45366{
45367
45368  ;
45369  return 0;
45370}
45371_ACEOF
45372if ac_fn_cxx_try_compile "$LINENO"; then :
45373  ac_cv_header_stdc=yes
45374else
45375  ac_cv_header_stdc=no
45376fi
45377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45378
45379if test $ac_cv_header_stdc = yes; then
45380  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45382/* end confdefs.h.  */
45383#include <string.h>
45384
45385_ACEOF
45386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45387  $EGREP "memchr" >/dev/null 2>&1; then :
45388
45389else
45390  ac_cv_header_stdc=no
45391fi
45392rm -f conftest*
45393
45394fi
45395
45396if test $ac_cv_header_stdc = yes; then
45397  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45399/* end confdefs.h.  */
45400#include <stdlib.h>
45401
45402_ACEOF
45403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45404  $EGREP "free" >/dev/null 2>&1; then :
45405
45406else
45407  ac_cv_header_stdc=no
45408fi
45409rm -f conftest*
45410
45411fi
45412
45413if test $ac_cv_header_stdc = yes; then
45414  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45415  if test "$cross_compiling" = yes; then :
45416  :
45417else
45418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45419/* end confdefs.h.  */
45420#include <ctype.h>
45421#include <stdlib.h>
45422#if ((' ' & 0x0FF) == 0x020)
45423# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45424# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45425#else
45426# define ISLOWER(c) \
45427		   (('a' <= (c) && (c) <= 'i') \
45428		     || ('j' <= (c) && (c) <= 'r') \
45429		     || ('s' <= (c) && (c) <= 'z'))
45430# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45431#endif
45432
45433#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45434int
45435main ()
45436{
45437  int i;
45438  for (i = 0; i < 256; i++)
45439    if (XOR (islower (i), ISLOWER (i))
45440	|| toupper (i) != TOUPPER (i))
45441      return 2;
45442  return 0;
45443}
45444_ACEOF
45445if ac_fn_cxx_try_run "$LINENO"; then :
45446
45447else
45448  ac_cv_header_stdc=no
45449fi
45450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45451  conftest.$ac_objext conftest.beam conftest.$ac_ext
45452fi
45453
45454fi
45455fi
45456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45457$as_echo "$ac_cv_header_stdc" >&6; }
45458if test $ac_cv_header_stdc = yes; then
45459
45460$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45461
45462fi
45463
45464# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45465for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45466		  inttypes.h stdint.h unistd.h
45467do :
45468  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45469ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45470"
45471if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45472  cat >>confdefs.h <<_ACEOF
45473#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45474_ACEOF
45475
45476fi
45477
45478done
45479
45480
45481
45482  ###############################################################################
45483  #
45484  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45485  # (The JVM can use 32 or 64 bit Java pointers but that decision
45486  # is made at runtime.)
45487  #
45488
45489  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45490    # Always specify -m flag on Solaris
45491    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45492
45493  # When we add flags to the "official" CFLAGS etc, we need to
45494  # keep track of these additions in ADDED_CFLAGS etc. These
45495  # will later be checked to make sure only controlled additions
45496  # have been made to CFLAGS etc.
45497  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45498  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45499  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45500
45501  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45502  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45503  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45504
45505  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45506  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45507  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45508
45509  elif test "x$COMPILE_TYPE" = xreduced; then
45510    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45511      # Specify -m if running reduced on unix platforms
45512
45513  # When we add flags to the "official" CFLAGS etc, we need to
45514  # keep track of these additions in ADDED_CFLAGS etc. These
45515  # will later be checked to make sure only controlled additions
45516  # have been made to CFLAGS etc.
45517  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45518  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45519  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45520
45521  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45522  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45523  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45524
45525  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45526  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45527  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45528
45529    fi
45530  fi
45531
45532  # Make compilation sanity check
45533  for ac_header in stdio.h
45534do :
45535  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45536if test "x$ac_cv_header_stdio_h" = xyes; then :
45537  cat >>confdefs.h <<_ACEOF
45538#define HAVE_STDIO_H 1
45539_ACEOF
45540
45541else
45542
45543    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45544$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45545    if test "x$COMPILE_TYPE" = xreduced; then
45546
45547  # Print a helpful message on how to acquire the necessary build dependency.
45548  # reduced is the help tag: freetype, cups, alsa etc
45549  MISSING_DEPENDENCY=reduced
45550
45551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45552    cygwin_help $MISSING_DEPENDENCY
45553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45554    msys_help $MISSING_DEPENDENCY
45555  else
45556    PKGHANDLER_COMMAND=
45557
45558    case $PKGHANDLER in
45559      apt-get)
45560        apt_help     $MISSING_DEPENDENCY ;;
45561      yum)
45562        yum_help     $MISSING_DEPENDENCY ;;
45563      port)
45564        port_help    $MISSING_DEPENDENCY ;;
45565      pkgutil)
45566        pkgutil_help $MISSING_DEPENDENCY ;;
45567      pkgadd)
45568        pkgadd_help  $MISSING_DEPENDENCY ;;
45569    esac
45570
45571    if test "x$PKGHANDLER_COMMAND" != x; then
45572      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45573    fi
45574  fi
45575
45576      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45577$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45578    elif test "x$COMPILE_TYPE" = xcross; then
45579      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45580$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45581    fi
45582    as_fn_error $? "Cannot continue." "$LINENO" 5
45583
45584fi
45585
45586done
45587
45588
45589  # The cast to long int works around a bug in the HP C Compiler
45590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45592# This bug is HP SR number 8606223364.
45593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45594$as_echo_n "checking size of int *... " >&6; }
45595if ${ac_cv_sizeof_int_p+:} false; then :
45596  $as_echo_n "(cached) " >&6
45597else
45598  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45599
45600else
45601  if test "$ac_cv_type_int_p" = yes; then
45602     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45604as_fn_error 77 "cannot compute sizeof (int *)
45605See \`config.log' for more details" "$LINENO" 5; }
45606   else
45607     ac_cv_sizeof_int_p=0
45608   fi
45609fi
45610
45611fi
45612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45613$as_echo "$ac_cv_sizeof_int_p" >&6; }
45614
45615
45616
45617cat >>confdefs.h <<_ACEOF
45618#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45619_ACEOF
45620
45621
45622
45623  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45624  if test "x$ac_cv_sizeof_int_p" = x; then
45625    # The test failed, lets stick to the assumed value.
45626    { $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
45627$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45628  else
45629    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45630
45631    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45632      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45633      # Let's try to implicitely set the compilers target architecture and retry the test
45634      { $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
45635$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;}
45636      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45637$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45638
45639  # When we add flags to the "official" CFLAGS etc, we need to
45640  # keep track of these additions in ADDED_CFLAGS etc. These
45641  # will later be checked to make sure only controlled additions
45642  # have been made to CFLAGS etc.
45643  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45644  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45645  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45646
45647  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45648  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45649  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45650
45651  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45652  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45653  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45654
45655
45656      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45657      unset ac_cv_sizeof_int_p
45658      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45659      cat >>confdefs.h <<_ACEOF
45660#undef SIZEOF_INT_P
45661_ACEOF
45662
45663      # The cast to long int works around a bug in the HP C Compiler
45664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45666# This bug is HP SR number 8606223364.
45667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45668$as_echo_n "checking size of int *... " >&6; }
45669if ${ac_cv_sizeof_int_p+:} false; then :
45670  $as_echo_n "(cached) " >&6
45671else
45672  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45673
45674else
45675  if test "$ac_cv_type_int_p" = yes; then
45676     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45678as_fn_error 77 "cannot compute sizeof (int *)
45679See \`config.log' for more details" "$LINENO" 5; }
45680   else
45681     ac_cv_sizeof_int_p=0
45682   fi
45683fi
45684
45685fi
45686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45687$as_echo "$ac_cv_sizeof_int_p" >&6; }
45688
45689
45690
45691cat >>confdefs.h <<_ACEOF
45692#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45693_ACEOF
45694
45695
45696
45697      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45698
45699      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45700        { $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
45701$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;}
45702        if test "x$COMPILE_TYPE" = xreduced; then
45703
45704  # Print a helpful message on how to acquire the necessary build dependency.
45705  # reduced is the help tag: freetype, cups, alsa etc
45706  MISSING_DEPENDENCY=reduced
45707
45708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45709    cygwin_help $MISSING_DEPENDENCY
45710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45711    msys_help $MISSING_DEPENDENCY
45712  else
45713    PKGHANDLER_COMMAND=
45714
45715    case $PKGHANDLER in
45716      apt-get)
45717        apt_help     $MISSING_DEPENDENCY ;;
45718      yum)
45719        yum_help     $MISSING_DEPENDENCY ;;
45720      port)
45721        port_help    $MISSING_DEPENDENCY ;;
45722      pkgutil)
45723        pkgutil_help $MISSING_DEPENDENCY ;;
45724      pkgadd)
45725        pkgadd_help  $MISSING_DEPENDENCY ;;
45726    esac
45727
45728    if test "x$PKGHANDLER_COMMAND" != x; then
45729      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45730    fi
45731  fi
45732
45733          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45734$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45735        elif test "x$COMPILE_TYPE" = xcross; then
45736          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45737$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45738        fi
45739        as_fn_error $? "Cannot continue." "$LINENO" 5
45740      fi
45741    fi
45742  fi
45743
45744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45745$as_echo_n "checking for target address size... " >&6; }
45746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45747$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45748
45749
45750  ###############################################################################
45751  #
45752  # Is the target little of big endian?
45753  #
45754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45755$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45756if ${ac_cv_c_bigendian+:} false; then :
45757  $as_echo_n "(cached) " >&6
45758else
45759  ac_cv_c_bigendian=unknown
45760    # See if we're dealing with a universal compiler.
45761    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45762/* end confdefs.h.  */
45763#ifndef __APPLE_CC__
45764	       not a universal capable compiler
45765	     #endif
45766	     typedef int dummy;
45767
45768_ACEOF
45769if ac_fn_cxx_try_compile "$LINENO"; then :
45770
45771	# Check for potential -arch flags.  It is not universal unless
45772	# there are at least two -arch flags with different values.
45773	ac_arch=
45774	ac_prev=
45775	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45776	 if test -n "$ac_prev"; then
45777	   case $ac_word in
45778	     i?86 | x86_64 | ppc | ppc64)
45779	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45780		 ac_arch=$ac_word
45781	       else
45782		 ac_cv_c_bigendian=universal
45783		 break
45784	       fi
45785	       ;;
45786	   esac
45787	   ac_prev=
45788	 elif test "x$ac_word" = "x-arch"; then
45789	   ac_prev=arch
45790	 fi
45791       done
45792fi
45793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45794    if test $ac_cv_c_bigendian = unknown; then
45795      # See if sys/param.h defines the BYTE_ORDER macro.
45796      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45797/* end confdefs.h.  */
45798#include <sys/types.h>
45799	     #include <sys/param.h>
45800
45801int
45802main ()
45803{
45804#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45805		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45806		     && LITTLE_ENDIAN)
45807	      bogus endian macros
45808	     #endif
45809
45810  ;
45811  return 0;
45812}
45813_ACEOF
45814if ac_fn_cxx_try_compile "$LINENO"; then :
45815  # It does; now see whether it defined to BIG_ENDIAN or not.
45816	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45817/* end confdefs.h.  */
45818#include <sys/types.h>
45819		#include <sys/param.h>
45820
45821int
45822main ()
45823{
45824#if BYTE_ORDER != BIG_ENDIAN
45825		 not big endian
45826		#endif
45827
45828  ;
45829  return 0;
45830}
45831_ACEOF
45832if ac_fn_cxx_try_compile "$LINENO"; then :
45833  ac_cv_c_bigendian=yes
45834else
45835  ac_cv_c_bigendian=no
45836fi
45837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45838fi
45839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45840    fi
45841    if test $ac_cv_c_bigendian = unknown; then
45842      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45843      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45844/* end confdefs.h.  */
45845#include <limits.h>
45846
45847int
45848main ()
45849{
45850#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45851	      bogus endian macros
45852	     #endif
45853
45854  ;
45855  return 0;
45856}
45857_ACEOF
45858if ac_fn_cxx_try_compile "$LINENO"; then :
45859  # It does; now see whether it defined to _BIG_ENDIAN or not.
45860	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45861/* end confdefs.h.  */
45862#include <limits.h>
45863
45864int
45865main ()
45866{
45867#ifndef _BIG_ENDIAN
45868		 not big endian
45869		#endif
45870
45871  ;
45872  return 0;
45873}
45874_ACEOF
45875if ac_fn_cxx_try_compile "$LINENO"; then :
45876  ac_cv_c_bigendian=yes
45877else
45878  ac_cv_c_bigendian=no
45879fi
45880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45881fi
45882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45883    fi
45884    if test $ac_cv_c_bigendian = unknown; then
45885      # Compile a test program.
45886      if test "$cross_compiling" = yes; then :
45887  # Try to guess by grepping values from an object file.
45888	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45889/* end confdefs.h.  */
45890short int ascii_mm[] =
45891		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45892		short int ascii_ii[] =
45893		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45894		int use_ascii (int i) {
45895		  return ascii_mm[i] + ascii_ii[i];
45896		}
45897		short int ebcdic_ii[] =
45898		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45899		short int ebcdic_mm[] =
45900		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45901		int use_ebcdic (int i) {
45902		  return ebcdic_mm[i] + ebcdic_ii[i];
45903		}
45904		extern int foo;
45905
45906int
45907main ()
45908{
45909return use_ascii (foo) == use_ebcdic (foo);
45910  ;
45911  return 0;
45912}
45913_ACEOF
45914if ac_fn_cxx_try_compile "$LINENO"; then :
45915  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45916	      ac_cv_c_bigendian=yes
45917	    fi
45918	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45919	      if test "$ac_cv_c_bigendian" = unknown; then
45920		ac_cv_c_bigendian=no
45921	      else
45922		# finding both strings is unlikely to happen, but who knows?
45923		ac_cv_c_bigendian=unknown
45924	      fi
45925	    fi
45926fi
45927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45928else
45929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45930/* end confdefs.h.  */
45931$ac_includes_default
45932int
45933main ()
45934{
45935
45936	     /* Are we little or big endian?  From Harbison&Steele.  */
45937	     union
45938	     {
45939	       long int l;
45940	       char c[sizeof (long int)];
45941	     } u;
45942	     u.l = 1;
45943	     return u.c[sizeof (long int) - 1] == 1;
45944
45945  ;
45946  return 0;
45947}
45948_ACEOF
45949if ac_fn_cxx_try_run "$LINENO"; then :
45950  ac_cv_c_bigendian=no
45951else
45952  ac_cv_c_bigendian=yes
45953fi
45954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45955  conftest.$ac_objext conftest.beam conftest.$ac_ext
45956fi
45957
45958    fi
45959fi
45960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45961$as_echo "$ac_cv_c_bigendian" >&6; }
45962 case $ac_cv_c_bigendian in #(
45963   yes)
45964     ENDIAN="big";; #(
45965   no)
45966     ENDIAN="little" ;; #(
45967   universal)
45968     ENDIAN="universal_endianness"
45969     ;; #(
45970   *)
45971     ENDIAN="unknown" ;;
45972 esac
45973
45974
45975  if test "x$ENDIAN" = xuniversal_endianness; then
45976    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45977  fi
45978  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45979    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
45980  fi
45981
45982
45983# Configure flags for the tools
45984
45985  ###############################################################################
45986  #
45987  # How to compile shared libraries.
45988  #
45989
45990  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45991    PICFLAG="-fPIC"
45992    C_FLAG_REORDER=''
45993    CXX_FLAG_REORDER=''
45994
45995    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45996      # Linking is different on MacOSX
45997      if test "x$STATIC_BUILD" = xtrue; then
45998        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
45999      else
46000        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46001      fi
46002      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46003      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46004      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46005      SET_SHARED_LIBRARY_MAPFILE=''
46006    else
46007      # Default works for linux, might work on other platforms as well.
46008      SHARED_LIBRARY_FLAGS='-shared'
46009      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46010      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46011      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46012      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46013    fi
46014  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46015    PICFLAG=''
46016    C_FLAG_REORDER=''
46017    CXX_FLAG_REORDER=''
46018
46019    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46020      # Linking is different on MacOSX
46021      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46022      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46023      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46024      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46025      SET_SHARED_LIBRARY_MAPFILE=''
46026    else
46027      # Default works for linux, might work on other platforms as well.
46028      SHARED_LIBRARY_FLAGS='-shared'
46029      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46030      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46031      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46032      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46033    fi
46034  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46035    PICFLAG="-KPIC"
46036    C_FLAG_REORDER='-xF'
46037    CXX_FLAG_REORDER='-xF'
46038    SHARED_LIBRARY_FLAGS="-G"
46039    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46040    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46041    SET_SHARED_LIBRARY_NAME=''
46042    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46043  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46044    PICFLAG="-qpic=large"
46045    C_FLAG_REORDER=''
46046    CXX_FLAG_REORDER=''
46047    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46048    SET_EXECUTABLE_ORIGIN=""
46049    SET_SHARED_LIBRARY_ORIGIN=''
46050    SET_SHARED_LIBRARY_NAME=''
46051    SET_SHARED_LIBRARY_MAPFILE=''
46052  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46053    PICFLAG=""
46054    C_FLAG_REORDER=''
46055    CXX_FLAG_REORDER=''
46056    SHARED_LIBRARY_FLAGS="-LD"
46057    SET_EXECUTABLE_ORIGIN=''
46058    SET_SHARED_LIBRARY_ORIGIN=''
46059    SET_SHARED_LIBRARY_NAME=''
46060    SET_SHARED_LIBRARY_MAPFILE=''
46061  fi
46062
46063
46064
46065
46066
46067
46068
46069
46070  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46071    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46072    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46073    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46074  fi
46075  # The (cross) compiler is now configured, we can now test capabilities
46076  # of the target platform.
46077
46078
46079
46080  ###############################################################################
46081  #
46082  # Setup the opt flags for different compilers
46083  # and different operating systems.
46084  #
46085
46086  # FIXME: this was indirectly the old default, but just inherited.
46087  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46088  #   C_FLAG_DEPS="-MMD -MF"
46089  # fi
46090
46091  # Generate make dependency files
46092  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46093    C_FLAG_DEPS="-MMD -MF"
46094  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46095    C_FLAG_DEPS="-MMD -MF"
46096  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46097    C_FLAG_DEPS="-xMMD -xMF"
46098  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46099    C_FLAG_DEPS="-qmakedep=gcc -MF"
46100  fi
46101  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46102
46103
46104
46105  # Debug symbols
46106  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46107    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46108      # reduce from default "-g2" option to save space
46109      CFLAGS_DEBUG_SYMBOLS="-g1"
46110      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46111    else
46112      CFLAGS_DEBUG_SYMBOLS="-g"
46113      CXXFLAGS_DEBUG_SYMBOLS="-g"
46114    fi
46115  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46116    CFLAGS_DEBUG_SYMBOLS="-g"
46117    CXXFLAGS_DEBUG_SYMBOLS="-g"
46118  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46119    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46120    # FIXME: likely a bug, this disables debug symbols rather than enables them
46121    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46122  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46123    CFLAGS_DEBUG_SYMBOLS="-g"
46124    CXXFLAGS_DEBUG_SYMBOLS="-g"
46125  fi
46126
46127
46128
46129  # bounds, memory and behavior checking options
46130  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46131    case $DEBUG_LEVEL in
46132    release )
46133      # no adjustment
46134      ;;
46135    fastdebug )
46136      # no adjustment
46137      ;;
46138    slowdebug )
46139      # Add runtime stack smashing and undefined behavior checks.
46140      # Not all versions of gcc support -fstack-protector
46141      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46142
46143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46144$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46145  supports=yes
46146
46147  saved_cflags="$CFLAGS"
46148  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46149  ac_ext=c
46150ac_cpp='$CPP $CPPFLAGS'
46151ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46152ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46153ac_compiler_gnu=$ac_cv_c_compiler_gnu
46154
46155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46156/* end confdefs.h.  */
46157int i;
46158_ACEOF
46159if ac_fn_c_try_compile "$LINENO"; then :
46160
46161else
46162  supports=no
46163fi
46164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46165  ac_ext=cpp
46166ac_cpp='$CXXCPP $CPPFLAGS'
46167ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46168ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46169ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46170
46171  CFLAGS="$saved_cflags"
46172
46173  saved_cxxflags="$CXXFLAGS"
46174  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46175  ac_ext=cpp
46176ac_cpp='$CXXCPP $CPPFLAGS'
46177ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46178ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46179ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46180
46181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46182/* end confdefs.h.  */
46183int i;
46184_ACEOF
46185if ac_fn_cxx_try_compile "$LINENO"; then :
46186
46187else
46188  supports=no
46189fi
46190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46191  ac_ext=cpp
46192ac_cpp='$CXXCPP $CPPFLAGS'
46193ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46194ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46195ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46196
46197  CXXFLAGS="$saved_cxxflags"
46198
46199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46200$as_echo "$supports" >&6; }
46201  if test "x$supports" = "xyes" ; then
46202    :
46203  else
46204    STACK_PROTECTOR_CFLAG=""
46205  fi
46206
46207
46208      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46209      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46210      ;;
46211    esac
46212  fi
46213
46214  # Optimization levels
46215  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46216    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46217
46218    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46219      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46220      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46221      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46222      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46223      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46224      C_O_FLAG_NONE="-xregs=no%frameptr"
46225      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46226      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46227      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46228      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46229      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46230      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46231        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46232        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46233      fi
46234    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46235      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46236      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46237      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46238      C_O_FLAG_DEBUG=""
46239      C_O_FLAG_NONE=""
46240      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46241      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46242      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46243      C_O_FLAG_DEBUG=""
46244      CXX_O_FLAG_NONE=""
46245    fi
46246  else
46247    # The remaining toolchains share opt flags between CC and CXX;
46248    # setup for C and duplicate afterwards.
46249    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46250      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46251        # On MacOSX we optimize for size, something
46252        # we should do for all platforms?
46253        C_O_FLAG_HIGHEST="-Os"
46254        C_O_FLAG_HI="-Os"
46255        C_O_FLAG_NORM="-Os"
46256      else
46257        C_O_FLAG_HIGHEST="-O3"
46258        C_O_FLAG_HI="-O3"
46259        C_O_FLAG_NORM="-O2"
46260      fi
46261      C_O_FLAG_DEBUG="-O0"
46262      C_O_FLAG_NONE="-O0"
46263    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46264      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46265        # On MacOSX we optimize for size, something
46266        # we should do for all platforms?
46267        C_O_FLAG_HIGHEST="-Os"
46268        C_O_FLAG_HI="-Os"
46269        C_O_FLAG_NORM="-Os"
46270      else
46271        C_O_FLAG_HIGHEST="-O3"
46272        C_O_FLAG_HI="-O3"
46273        C_O_FLAG_NORM="-O2"
46274      fi
46275      C_O_FLAG_DEBUG="-O0"
46276      C_O_FLAG_NONE="-O0"
46277    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46278      C_O_FLAG_HIGHEST="-O3"
46279      C_O_FLAG_HI="-O3 -qstrict"
46280      C_O_FLAG_NORM="-O2"
46281      C_O_FLAG_DEBUG="-qnoopt"
46282      C_O_FLAG_NONE="-qnoop"
46283    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46284      C_O_FLAG_HIGHEST="-O2"
46285      C_O_FLAG_HI="-O1"
46286      C_O_FLAG_NORM="-O1"
46287      C_O_FLAG_DEBUG="-Od"
46288      C_O_FLAG_NONE="-Od"
46289    fi
46290    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46291    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46292    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46293    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46294    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46295  fi
46296
46297  # Adjust optimization flags according to debug level.
46298  case $DEBUG_LEVEL in
46299    release )
46300      # no adjustment
46301      ;;
46302    fastdebug )
46303      # Not quite so much optimization
46304      C_O_FLAG_HI="$C_O_FLAG_NORM"
46305      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46306      ;;
46307    slowdebug )
46308      # Disable optimization
46309      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46310      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46311      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46312      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46313      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46314      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46315      ;;
46316  esac
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330  # Special extras...
46331  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46332    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46333      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46334      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46335    fi
46336    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46337    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46338  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46339    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46340    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46341  fi
46342
46343  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46344  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46345  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46346
46347  ###############################################################################
46348  #
46349  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46350  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46351  #
46352
46353  # Setup compiler/platform specific flags into
46354  #    CFLAGS_JDK    - C Compiler flags
46355  #    CXXFLAGS_JDK  - C++ Compiler flags
46356  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46357  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46358    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46359      # Force compatibility with i586 on 32 bit intel platforms.
46360      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46361    fi
46362    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46363        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46364    case $OPENJDK_TARGET_CPU_ARCH in
46365      arm )
46366        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46367        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46368        ;;
46369      ppc )
46370        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46371        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46372        ;;
46373      * )
46374        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46375        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46376        ;;
46377    esac
46378  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46379    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46380    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46381      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46382    fi
46383
46384    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46385    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46386  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46387    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46388    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46389  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46390    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46391        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46392        -DWIN32_LEAN_AND_MEAN \
46393        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46394        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46395        -DWIN32 -DIAL"
46396    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46397      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46398    else
46399      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46400    fi
46401    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46402    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46403    # studio.
46404    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46405      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46406          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46407    fi
46408  fi
46409
46410  ###############################################################################
46411
46412  # Adjust flags according to debug level.
46413  case $DEBUG_LEVEL in
46414    fastdebug | slowdebug )
46415      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46416      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46417      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46418      ;;
46419    release )
46420      ;;
46421    * )
46422      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46423      ;;
46424  esac
46425
46426  # Setup LP64
46427  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46428
46429  # Set some common defines. These works for all compilers, but assume
46430  # -D is universally accepted.
46431
46432  # Setup endianness
46433  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46434    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46435    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46436    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46437    #   Note: -Dmacro         is the same as    #define macro 1
46438    #         -Dmacro=        is the same as    #define macro
46439    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46440      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46441    else
46442      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46443    fi
46444  else
46445    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46446    # are defined in the system?
46447    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46448      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46449    else
46450      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46451    fi
46452  fi
46453
46454  # Setup target OS define. Use OS target name but in upper case.
46455  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46456  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46457
46458  # Setup target CPU
46459  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46460
46461  # Setup debug/release defines
46462  if test "x$DEBUG_LEVEL" = xrelease; then
46463    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46464    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46465      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46466    fi
46467  else
46468    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46469  fi
46470
46471  # Setup release name
46472  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
46473
46474
46475  # Set some additional per-OS defines.
46476  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46477    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46478  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46479    # FIXME: PPC64 should not be here.
46480    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46481  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46482    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46483  fi
46484
46485  # Additional macosx handling
46486  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46487    # Setting these parameters makes it an error to link to macosx APIs that are
46488    # newer than the given OS version and makes the linked binaries compatible
46489    # even if built on a newer version of the OS.
46490    # The expected format is X.Y.Z
46491    MACOSX_VERSION_MIN=10.7.0
46492
46493
46494    # The macro takes the version with no dots, ex: 1070
46495    # Let the flags variables get resolved in make for easier override on make
46496    # command line.
46497    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46498    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46499  fi
46500
46501  # Setup some hard coded includes
46502  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46503      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46504      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46505      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46506      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46507      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46508
46509  # The shared libraries are compiled using the picflag.
46510  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46511  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46512
46513  # Executable flags
46514  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46515  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46516
46517
46518
46519
46520
46521
46522  # Flags for compiling test libraries
46523  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46524  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46525
46526  # Flags for compiling test executables
46527  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46528  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46529
46530
46531
46532
46533
46534
46535  # Setup LDFLAGS et al.
46536  #
46537
46538  # Now this is odd. The JDK native libraries have to link against libjvm.so
46539  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46540  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46541  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46542  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46543  # libraries will link to whatever is in memory. Yuck.
46544  #
46545  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46546  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46547    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46548    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46549      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46550    fi
46551    # TODO: make -debug optional "--disable-full-debug-symbols"
46552    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46553  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46554    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46555    # We have previously set HAS_GNU_HASH if this is the case
46556    if test -n "$HAS_GNU_HASH"; then
46557      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
46558    fi
46559    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46560      # And since we now know that the linker is gnu, then add -z defs, to forbid
46561      # undefined symbols in object files.
46562      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
46563      case $DEBUG_LEVEL in
46564        release )
46565          # tell linker to optimize libraries.
46566          # Should this be supplied to the OSS linker as well?
46567          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
46568          ;;
46569        slowdebug )
46570          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46571            # do relocations at load
46572            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46573            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46574          fi
46575          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46576            # mark relocations read only
46577            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46578            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46579          fi
46580          ;;
46581        fastdebug )
46582          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46583            # mark relocations read only
46584            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46585            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46586          fi
46587          ;;
46588        * )
46589          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46590          ;;
46591        esac
46592    fi
46593  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46594    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
46595    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46596  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46597    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46598  fi
46599
46600  # Customize LDFLAGS for executables
46601
46602  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46603
46604  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46605    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46606      LDFLAGS_STACK_SIZE=1048576
46607    else
46608      LDFLAGS_STACK_SIZE=327680
46609    fi
46610    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46611  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46612    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
46613  fi
46614
46615  # Customize LDFLAGS for libs
46616  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46617
46618  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46619    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46620    JDKLIB_LIBS=""
46621  else
46622    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
46623        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46624
46625    # On some platforms (mac) the linker warns about non existing -L dirs.
46626    # Add server first if available. Linking aginst client does not always produce the same results.
46627    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46628    # Default to server for other variants.
46629    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46630      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46631    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46632      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46633    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46634      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46635    else
46636      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46637    fi
46638
46639    JDKLIB_LIBS="-ljava -ljvm"
46640    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46641      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46642    fi
46643  fi
46644
46645
46646
46647
46648
46649
46650
46651  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46652  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46653
46654
46655
46656
46657
46658  # Some Zero and Shark settings.
46659  # ZERO_ARCHFLAG tells the compiler which mode to build for
46660  case "${OPENJDK_TARGET_CPU}" in
46661    s390)
46662      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46663      ;;
46664    *)
46665      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46666  esac
46667
46668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46669$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46670  supports=yes
46671
46672  saved_cflags="$CFLAGS"
46673  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46674  ac_ext=c
46675ac_cpp='$CPP $CPPFLAGS'
46676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46678ac_compiler_gnu=$ac_cv_c_compiler_gnu
46679
46680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46681/* end confdefs.h.  */
46682int i;
46683_ACEOF
46684if ac_fn_c_try_compile "$LINENO"; then :
46685
46686else
46687  supports=no
46688fi
46689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46690  ac_ext=cpp
46691ac_cpp='$CXXCPP $CPPFLAGS'
46692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46695
46696  CFLAGS="$saved_cflags"
46697
46698  saved_cxxflags="$CXXFLAGS"
46699  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46700  ac_ext=cpp
46701ac_cpp='$CXXCPP $CPPFLAGS'
46702ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46703ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46704ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46705
46706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46707/* end confdefs.h.  */
46708int i;
46709_ACEOF
46710if ac_fn_cxx_try_compile "$LINENO"; then :
46711
46712else
46713  supports=no
46714fi
46715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46716  ac_ext=cpp
46717ac_cpp='$CXXCPP $CPPFLAGS'
46718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46721
46722  CXXFLAGS="$saved_cxxflags"
46723
46724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46725$as_echo "$supports" >&6; }
46726  if test "x$supports" = "xyes" ; then
46727    :
46728  else
46729    ZERO_ARCHFLAG=""
46730  fi
46731
46732
46733
46734  # Check that the compiler supports -mX (or -qX on AIX) flags
46735  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46736
46737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46738$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46739  supports=yes
46740
46741  saved_cflags="$CFLAGS"
46742  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46743  ac_ext=c
46744ac_cpp='$CPP $CPPFLAGS'
46745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46747ac_compiler_gnu=$ac_cv_c_compiler_gnu
46748
46749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46750/* end confdefs.h.  */
46751int i;
46752_ACEOF
46753if ac_fn_c_try_compile "$LINENO"; then :
46754
46755else
46756  supports=no
46757fi
46758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46759  ac_ext=cpp
46760ac_cpp='$CXXCPP $CPPFLAGS'
46761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46764
46765  CFLAGS="$saved_cflags"
46766
46767  saved_cxxflags="$CXXFLAGS"
46768  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46769  ac_ext=cpp
46770ac_cpp='$CXXCPP $CPPFLAGS'
46771ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46772ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46773ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46774
46775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46776/* end confdefs.h.  */
46777int i;
46778_ACEOF
46779if ac_fn_cxx_try_compile "$LINENO"; then :
46780
46781else
46782  supports=no
46783fi
46784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46785  ac_ext=cpp
46786ac_cpp='$CXXCPP $CPPFLAGS'
46787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46790
46791  CXXFLAGS="$saved_cxxflags"
46792
46793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46794$as_echo "$supports" >&6; }
46795  if test "x$supports" = "xyes" ; then
46796    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46797  else
46798    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46799  fi
46800
46801
46802
46803  # Check whether --enable-warnings-as-errors was given.
46804if test "${enable_warnings_as_errors+set}" = set; then :
46805  enableval=$enable_warnings_as_errors;
46806fi
46807
46808
46809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
46810$as_echo_n "checking if native warnings are errors... " >&6; }
46811  if test "x$enable_warnings_as_errors" = "xyes"; then
46812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
46813$as_echo "yes (explicitely set)" >&6; }
46814    WARNINGS_AS_ERRORS=true
46815  elif test "x$enable_warnings_as_errors" = "xno"; then
46816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46817$as_echo "no" >&6; }
46818    WARNINGS_AS_ERRORS=false
46819  elif test "x$enable_warnings_as_errors" = "x"; then
46820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
46821$as_echo "yes (default)" >&6; }
46822    WARNINGS_AS_ERRORS=true
46823  else
46824    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
46825  fi
46826
46827  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
46828    # Set legacy hotspot variable
46829    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
46830  else
46831    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
46832  fi
46833
46834
46835
46836
46837  case "${TOOLCHAIN_TYPE}" in
46838    microsoft)
46839      DISABLE_WARNING_PREFIX="-wd"
46840      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
46841      ;;
46842    solstudio)
46843      DISABLE_WARNING_PREFIX="-erroff="
46844      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
46845      ;;
46846    gcc)
46847      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
46848
46849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46850$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46851  supports=yes
46852
46853  saved_cflags="$CFLAGS"
46854  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46855  ac_ext=c
46856ac_cpp='$CPP $CPPFLAGS'
46857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46859ac_compiler_gnu=$ac_cv_c_compiler_gnu
46860
46861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46862/* end confdefs.h.  */
46863int i;
46864_ACEOF
46865if ac_fn_c_try_compile "$LINENO"; then :
46866
46867else
46868  supports=no
46869fi
46870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46871  ac_ext=cpp
46872ac_cpp='$CXXCPP $CPPFLAGS'
46873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46876
46877  CFLAGS="$saved_cflags"
46878
46879  saved_cxxflags="$CXXFLAGS"
46880  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46881  ac_ext=cpp
46882ac_cpp='$CXXCPP $CPPFLAGS'
46883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46886
46887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46888/* end confdefs.h.  */
46889int i;
46890_ACEOF
46891if ac_fn_cxx_try_compile "$LINENO"; then :
46892
46893else
46894  supports=no
46895fi
46896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46897  ac_ext=cpp
46898ac_cpp='$CXXCPP $CPPFLAGS'
46899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46902
46903  CXXFLAGS="$saved_cxxflags"
46904
46905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46906$as_echo "$supports" >&6; }
46907  if test "x$supports" = "xyes" ; then
46908    GCC_CAN_DISABLE_WARNINGS=true
46909  else
46910    GCC_CAN_DISABLE_WARNINGS=false
46911
46912  fi
46913
46914      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46915        DISABLE_WARNING_PREFIX="-Wno-"
46916      else
46917        DISABLE_WARNING_PREFIX=
46918      fi
46919      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
46920      # Repeate the check for the BUILD_CC
46921      CC_OLD="$CC"
46922      CC="$BUILD_CC"
46923
46924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46925$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46926  supports=yes
46927
46928  saved_cflags="$CFLAGS"
46929  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46930  ac_ext=c
46931ac_cpp='$CPP $CPPFLAGS'
46932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46934ac_compiler_gnu=$ac_cv_c_compiler_gnu
46935
46936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46937/* end confdefs.h.  */
46938int i;
46939_ACEOF
46940if ac_fn_c_try_compile "$LINENO"; then :
46941
46942else
46943  supports=no
46944fi
46945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46946  ac_ext=cpp
46947ac_cpp='$CXXCPP $CPPFLAGS'
46948ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46949ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46950ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46951
46952  CFLAGS="$saved_cflags"
46953
46954  saved_cxxflags="$CXXFLAGS"
46955  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46956  ac_ext=cpp
46957ac_cpp='$CXXCPP $CPPFLAGS'
46958ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46959ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46960ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46961
46962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46963/* end confdefs.h.  */
46964int i;
46965_ACEOF
46966if ac_fn_cxx_try_compile "$LINENO"; then :
46967
46968else
46969  supports=no
46970fi
46971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46972  ac_ext=cpp
46973ac_cpp='$CXXCPP $CPPFLAGS'
46974ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46975ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46976ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46977
46978  CXXFLAGS="$saved_cxxflags"
46979
46980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46981$as_echo "$supports" >&6; }
46982  if test "x$supports" = "xyes" ; then
46983    BUILD_CC_CAN_DISABLE_WARNINGS=true
46984  else
46985    BUILD_CC_CAN_DISABLE_WARNINGS=false
46986
46987  fi
46988
46989      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46990        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
46991      else
46992        BUILD_CC_DISABLE_WARNING_PREFIX=
46993      fi
46994      CC="$CC_OLD"
46995      ;;
46996    clang)
46997      DISABLE_WARNING_PREFIX="-Wno-"
46998      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
46999      ;;
47000  esac
47001
47002
47003
47004
47005# Setup debug symbols (need objcopy from the toolchain for that)
47006
47007  #
47008  # ENABLE_DEBUG_SYMBOLS
47009  # This must be done after the toolchain is setup, since we're looking at objcopy.
47010  #
47011  # Check whether --enable-debug-symbols was given.
47012if test "${enable_debug_symbols+set}" = set; then :
47013  enableval=$enable_debug_symbols;
47014fi
47015
47016
47017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
47018$as_echo_n "checking if we should generate debug symbols... " >&6; }
47019
47020  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
47021    # explicit enabling of enable-debug-symbols and can't find objcopy
47022    #   this is an error
47023    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47024  fi
47025
47026  if test "x$enable_debug_symbols" = "xyes"; then
47027    ENABLE_DEBUG_SYMBOLS=true
47028  elif test "x$enable_debug_symbols" = "xno"; then
47029    ENABLE_DEBUG_SYMBOLS=false
47030  else
47031    # Default is on if objcopy is found
47032    if test "x$OBJCOPY" != x; then
47033      ENABLE_DEBUG_SYMBOLS=true
47034    # MacOS X and Windows don't use objcopy but default is on for those OSes
47035    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
47036      ENABLE_DEBUG_SYMBOLS=true
47037    else
47038      ENABLE_DEBUG_SYMBOLS=false
47039    fi
47040  fi
47041
47042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
47043$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
47044
47045  #
47046  # ZIP_DEBUGINFO_FILES
47047  #
47048  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
47049$as_echo_n "checking if we should zip debug-info files... " >&6; }
47050  # Check whether --enable-zip-debug-info was given.
47051if test "${enable_zip_debug_info+set}" = set; then :
47052  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
47053else
47054  enable_zip_debug_info="yes"
47055fi
47056
47057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
47058$as_echo "${enable_zip_debug_info}" >&6; }
47059
47060  if test "x${enable_zip_debug_info}" = "xno"; then
47061    ZIP_DEBUGINFO_FILES=false
47062  else
47063    ZIP_DEBUGINFO_FILES=true
47064  fi
47065
47066
47067
47068
47069
47070  # Check whether --enable-native-coverage was given.
47071if test "${enable_native_coverage+set}" = set; then :
47072  enableval=$enable_native_coverage;
47073fi
47074
47075  GCOV_ENABLED="false"
47076  if test "x$enable_native_coverage" = "xyes"; then
47077    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47078      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47079$as_echo_n "checking if native coverage is enabled... " >&6; }
47080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47081$as_echo "yes" >&6; }
47082      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47083      GCOV_LDFLAGS="-fprofile-arcs"
47084      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47085      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47086      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47087      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47088      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47089      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47090      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47091      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47092      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47093      GCOV_ENABLED="true"
47094    else
47095      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47096    fi
47097  elif test "x$enable_native_coverage" = "xno"; then
47098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47099$as_echo_n "checking if native coverage is enabled... " >&6; }
47100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47101$as_echo "no" >&6; }
47102  elif test "x$enable_native_coverage" != "x"; then
47103    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47104  fi
47105
47106
47107
47108
47109###############################################################################
47110#
47111# Check dependencies for external and internal libraries.
47112#
47113###############################################################################
47114
47115# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47116
47117  # When using cygwin or msys, we need a wrapper binary that renames
47118  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47119  # @files and rewrites these too! This wrapper binary is
47120  # called fixpath.
47121  FIXPATH=
47122  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47124$as_echo_n "checking if fixpath can be created... " >&6; }
47125    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47126    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47127    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47128    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47129      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47130      FIXPATH="$FIXPATH_BIN -c"
47131    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47132      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47133      # @ was chosen as separator to minimize risk of other tools messing around with it
47134      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47135          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47136      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47137      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47138    fi
47139    FIXPATH_SRC_W="$FIXPATH_SRC"
47140    FIXPATH_BIN_W="$FIXPATH_BIN"
47141
47142  unix_path="$FIXPATH_SRC_W"
47143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47144    windows_path=`$CYGPATH -m "$unix_path"`
47145    FIXPATH_SRC_W="$windows_path"
47146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47147    windows_path=`cmd //c echo $unix_path`
47148    FIXPATH_SRC_W="$windows_path"
47149  fi
47150
47151
47152  unix_path="$FIXPATH_BIN_W"
47153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47154    windows_path=`$CYGPATH -m "$unix_path"`
47155    FIXPATH_BIN_W="$windows_path"
47156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47157    windows_path=`cmd //c echo $unix_path`
47158    FIXPATH_BIN_W="$windows_path"
47159  fi
47160
47161    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47162    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47163    cd $FIXPATH_DIR
47164    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47165    cd $CURDIR
47166
47167    if test ! -x $FIXPATH_BIN; then
47168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47169$as_echo "no" >&6; }
47170      cat $FIXPATH_DIR/fixpath1.log
47171      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47172    fi
47173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47174$as_echo "yes" >&6; }
47175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47176$as_echo_n "checking if fixpath.exe works... " >&6; }
47177    cd $FIXPATH_DIR
47178    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47179        > $FIXPATH_DIR/fixpath2.log 2>&1
47180    cd $CURDIR
47181    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47183$as_echo "no" >&6; }
47184      cat $FIXPATH_DIR/fixpath2.log
47185      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47186    fi
47187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47188$as_echo "yes" >&6; }
47189
47190    FIXPATH_DETACH_FLAG="--detach"
47191  fi
47192
47193
47194
47195
47196
47197
47198  # Check if X11 is needed
47199  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47200    # No X11 support on windows or macosx
47201    NEEDS_LIB_X11=false
47202  else
47203    if test "x$SUPPORT_HEADFUL" = xno; then
47204      # No X11 support if building headless-only
47205      NEEDS_LIB_X11=false
47206    else
47207      # All other instances need X11
47208      NEEDS_LIB_X11=true
47209    fi
47210  fi
47211
47212  # Check if cups is needed
47213  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47214    # Windows have a separate print system
47215    NEEDS_LIB_CUPS=false
47216  else
47217    NEEDS_LIB_CUPS=true
47218  fi
47219
47220  # Check if freetype is needed
47221  if test "x$OPENJDK" = "xtrue"; then
47222    NEEDS_LIB_FREETYPE=true
47223  else
47224    NEEDS_LIB_FREETYPE=false
47225  fi
47226
47227  # Check if alsa is needed
47228  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47229    NEEDS_LIB_ALSA=true
47230  else
47231    NEEDS_LIB_ALSA=false
47232  fi
47233
47234  # Check if ffi is needed
47235  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47236    NEEDS_LIB_FFI=true
47237  else
47238    NEEDS_LIB_FFI=false
47239  fi
47240
47241
47242  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47243  # dynamic build is configured on command line.
47244
47245# Check whether --with-stdc++lib was given.
47246if test "${with_stdc__lib+set}" = set; then :
47247  withval=$with_stdc__lib;
47248        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47249                && test "x$with_stdc__lib" != xdefault; then
47250          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47251        fi
47252
47253else
47254  with_stdc__lib=default
47255
47256fi
47257
47258
47259  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47260    # Test if -lstdc++ works.
47261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47262$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47263    ac_ext=cpp
47264ac_cpp='$CXXCPP $CPPFLAGS'
47265ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47266ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47267ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47268
47269    OLD_CXXFLAGS="$CXXFLAGS"
47270    CXXFLAGS="$CXXFLAGS -lstdc++"
47271    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47272/* end confdefs.h.  */
47273
47274int
47275main ()
47276{
47277return 0;
47278  ;
47279  return 0;
47280}
47281_ACEOF
47282if ac_fn_cxx_try_link "$LINENO"; then :
47283  has_dynamic_libstdcxx=yes
47284else
47285  has_dynamic_libstdcxx=no
47286fi
47287rm -f core conftest.err conftest.$ac_objext \
47288    conftest$ac_exeext conftest.$ac_ext
47289    CXXFLAGS="$OLD_CXXFLAGS"
47290    ac_ext=cpp
47291ac_cpp='$CXXCPP $CPPFLAGS'
47292ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47293ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47294ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47295
47296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47297$as_echo "$has_dynamic_libstdcxx" >&6; }
47298
47299    # Test if stdc++ can be linked statically.
47300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47301$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47302    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47303    ac_ext=cpp
47304ac_cpp='$CXXCPP $CPPFLAGS'
47305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47308
47309    OLD_LIBS="$LIBS"
47310    OLD_CXX="$CXX"
47311    LIBS="$STATIC_STDCXX_FLAGS"
47312    CXX="$CC"
47313    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47314/* end confdefs.h.  */
47315
47316int
47317main ()
47318{
47319return 0;
47320  ;
47321  return 0;
47322}
47323_ACEOF
47324if ac_fn_cxx_try_link "$LINENO"; then :
47325  has_static_libstdcxx=yes
47326else
47327  has_static_libstdcxx=no
47328fi
47329rm -f core conftest.err conftest.$ac_objext \
47330    conftest$ac_exeext conftest.$ac_ext
47331    LIBS="$OLD_LIBS"
47332    CXX="$OLD_CXX"
47333    ac_ext=cpp
47334ac_cpp='$CXXCPP $CPPFLAGS'
47335ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47336ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47337ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47338
47339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47340$as_echo "$has_static_libstdcxx" >&6; }
47341
47342    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47343      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47344    fi
47345
47346    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47347      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47348    fi
47349
47350    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47351      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47352    fi
47353
47354    # If dynamic was requested, it's available since it would fail above otherwise.
47355    # If dynamic wasn't requested, go with static unless it isn't available.
47356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47357$as_echo_n "checking how to link with libstdc++... " >&6; }
47358    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47359      LIBCXX="$LIBCXX -lstdc++"
47360      LDCXX="$CXX"
47361      STATIC_CXX_SETTING="STATIC_CXX=false"
47362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47363$as_echo "dynamic" >&6; }
47364    else
47365      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47366      LDCXX="$CC"
47367      STATIC_CXX_SETTING="STATIC_CXX=true"
47368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47369$as_echo "static" >&6; }
47370    fi
47371  fi
47372
47373
47374  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47375  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47376    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47377  fi
47378
47379  # TODO better (platform agnostic) test
47380  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47381    LIBCXX="-lstdc++"
47382  fi
47383
47384
47385  # Setup Windows runtime dlls
47386  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47387
47388
47389# Check whether --with-msvcr-dll was given.
47390if test "${with_msvcr_dll+set}" = set; then :
47391  withval=$with_msvcr_dll;
47392fi
47393
47394
47395  if test "x$with_msvcr_dll" != x; then
47396    # If given explicitely by user, do not probe. If not present, fail directly.
47397
47398  DLL_NAME="$MSVCR_NAME"
47399  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47400  METHOD="--with-msvcr-dll"
47401  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47402    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47403$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47404
47405    # Need to check if the found msvcr is correct architecture
47406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47407$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47408    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47410      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47411      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47412      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47413        CORRECT_MSVCR_ARCH="PE32 executable"
47414      else
47415        CORRECT_MSVCR_ARCH="PE32+ executable"
47416      fi
47417    else
47418      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47419        CORRECT_MSVCR_ARCH=386
47420      else
47421        CORRECT_MSVCR_ARCH=x86-64
47422      fi
47423    fi
47424    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47425      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47426$as_echo "ok" >&6; }
47427      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47428
47429  # Only process if variable expands to non-empty
47430
47431  if test "x$MSVC_DLL" != x; then
47432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47433
47434  # Input might be given as Windows format, start by converting to
47435  # unix format.
47436  path="$MSVC_DLL"
47437  new_path=`$CYGPATH -u "$path"`
47438
47439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47442  # "foo.exe" is OK but "foo" is an error.
47443  #
47444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47445  # It is also a way to make sure we got the proper file name for the real test later on.
47446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47447  if test "x$test_shortpath" = x; then
47448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47449$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47450    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47451  fi
47452
47453  # Call helper function which possibly converts this using DOS-style short mode.
47454  # If so, the updated path is stored in $new_path.
47455
47456  input_path="$new_path"
47457  # Check if we need to convert this using DOS-style short mode. If the path
47458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47459  # take no chances and rewrite it.
47460  # Note: m4 eats our [], so we need to use [ and ] instead.
47461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47462  if test "x$has_forbidden_chars" != x; then
47463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47467      # Going to short mode and back again did indeed matter. Since short mode is
47468      # case insensitive, let's make it lowercase to improve readability.
47469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47470      # Now convert it back to Unix-style (cygpath)
47471      input_path=`$CYGPATH -u "$shortmode_path"`
47472      new_path="$input_path"
47473    fi
47474  fi
47475
47476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47477  if test "x$test_cygdrive_prefix" = x; then
47478    # As a simple fix, exclude /usr/bin since it's not a real path.
47479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47481      # a path prefixed by /cygdrive for fixpath to work.
47482      new_path="$CYGWIN_ROOT_PATH$input_path"
47483    fi
47484  fi
47485
47486
47487  if test "x$path" != "x$new_path"; then
47488    MSVC_DLL="$new_path"
47489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47490$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47491  fi
47492
47493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47494
47495  path="$MSVC_DLL"
47496  has_colon=`$ECHO $path | $GREP ^.:`
47497  new_path="$path"
47498  if test "x$has_colon" = x; then
47499    # Not in mixed or Windows style, start by that.
47500    new_path=`cmd //c echo $path`
47501  fi
47502
47503
47504  input_path="$new_path"
47505  # Check if we need to convert this using DOS-style short mode. If the path
47506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47507  # take no chances and rewrite it.
47508  # Note: m4 eats our [], so we need to use [ and ] instead.
47509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47510  if test "x$has_forbidden_chars" != x; then
47511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47513  fi
47514
47515
47516  windows_path="$new_path"
47517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47518    unix_path=`$CYGPATH -u "$windows_path"`
47519    new_path="$unix_path"
47520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47522    new_path="$unix_path"
47523  fi
47524
47525  if test "x$path" != "x$new_path"; then
47526    MSVC_DLL="$new_path"
47527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47529  fi
47530
47531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47533
47534    else
47535      # We're on a unix platform. Hooray! :)
47536      path="$MSVC_DLL"
47537      has_space=`$ECHO "$path" | $GREP " "`
47538      if test "x$has_space" != x; then
47539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47540$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47542      fi
47543
47544      # Use eval to expand a potential ~
47545      eval path="$path"
47546      if test ! -f "$path" && test ! -d "$path"; then
47547        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47548      fi
47549
47550      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47551    fi
47552  fi
47553
47554      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47555$as_echo_n "checking for $DLL_NAME... " >&6; }
47556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47557$as_echo "$MSVC_DLL" >&6; }
47558    else
47559      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47560$as_echo "incorrect, ignoring" >&6; }
47561      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47562$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47563    fi
47564  fi
47565
47566    if test "x$MSVC_DLL" = x; then
47567      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47568    fi
47569    MSVCR_DLL="$MSVC_DLL"
47570  elif test "x$DEVKIT_MSVCR_DLL" != x; then
47571
47572  DLL_NAME="$MSVCR_NAME"
47573  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47574  METHOD="devkit"
47575  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47576    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47577$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47578
47579    # Need to check if the found msvcr is correct architecture
47580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47581$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47582    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47584      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47585      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47586      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47587        CORRECT_MSVCR_ARCH="PE32 executable"
47588      else
47589        CORRECT_MSVCR_ARCH="PE32+ executable"
47590      fi
47591    else
47592      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47593        CORRECT_MSVCR_ARCH=386
47594      else
47595        CORRECT_MSVCR_ARCH=x86-64
47596      fi
47597    fi
47598    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47600$as_echo "ok" >&6; }
47601      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47602
47603  # Only process if variable expands to non-empty
47604
47605  if test "x$MSVC_DLL" != x; then
47606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47607
47608  # Input might be given as Windows format, start by converting to
47609  # unix format.
47610  path="$MSVC_DLL"
47611  new_path=`$CYGPATH -u "$path"`
47612
47613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47616  # "foo.exe" is OK but "foo" is an error.
47617  #
47618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47619  # It is also a way to make sure we got the proper file name for the real test later on.
47620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47621  if test "x$test_shortpath" = x; then
47622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47623$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47624    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47625  fi
47626
47627  # Call helper function which possibly converts this using DOS-style short mode.
47628  # If so, the updated path is stored in $new_path.
47629
47630  input_path="$new_path"
47631  # Check if we need to convert this using DOS-style short mode. If the path
47632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47633  # take no chances and rewrite it.
47634  # Note: m4 eats our [], so we need to use [ and ] instead.
47635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47636  if test "x$has_forbidden_chars" != x; then
47637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47641      # Going to short mode and back again did indeed matter. Since short mode is
47642      # case insensitive, let's make it lowercase to improve readability.
47643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47644      # Now convert it back to Unix-style (cygpath)
47645      input_path=`$CYGPATH -u "$shortmode_path"`
47646      new_path="$input_path"
47647    fi
47648  fi
47649
47650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47651  if test "x$test_cygdrive_prefix" = x; then
47652    # As a simple fix, exclude /usr/bin since it's not a real path.
47653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47655      # a path prefixed by /cygdrive for fixpath to work.
47656      new_path="$CYGWIN_ROOT_PATH$input_path"
47657    fi
47658  fi
47659
47660
47661  if test "x$path" != "x$new_path"; then
47662    MSVC_DLL="$new_path"
47663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47664$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47665  fi
47666
47667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47668
47669  path="$MSVC_DLL"
47670  has_colon=`$ECHO $path | $GREP ^.:`
47671  new_path="$path"
47672  if test "x$has_colon" = x; then
47673    # Not in mixed or Windows style, start by that.
47674    new_path=`cmd //c echo $path`
47675  fi
47676
47677
47678  input_path="$new_path"
47679  # Check if we need to convert this using DOS-style short mode. If the path
47680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47681  # take no chances and rewrite it.
47682  # Note: m4 eats our [], so we need to use [ and ] instead.
47683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47684  if test "x$has_forbidden_chars" != x; then
47685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47687  fi
47688
47689
47690  windows_path="$new_path"
47691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47692    unix_path=`$CYGPATH -u "$windows_path"`
47693    new_path="$unix_path"
47694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47696    new_path="$unix_path"
47697  fi
47698
47699  if test "x$path" != "x$new_path"; then
47700    MSVC_DLL="$new_path"
47701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47702$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47703  fi
47704
47705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47707
47708    else
47709      # We're on a unix platform. Hooray! :)
47710      path="$MSVC_DLL"
47711      has_space=`$ECHO "$path" | $GREP " "`
47712      if test "x$has_space" != x; then
47713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47714$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47716      fi
47717
47718      # Use eval to expand a potential ~
47719      eval path="$path"
47720      if test ! -f "$path" && test ! -d "$path"; then
47721        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47722      fi
47723
47724      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47725    fi
47726  fi
47727
47728      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47729$as_echo_n "checking for $DLL_NAME... " >&6; }
47730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47731$as_echo "$MSVC_DLL" >&6; }
47732    else
47733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47734$as_echo "incorrect, ignoring" >&6; }
47735      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47736$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47737    fi
47738  fi
47739
47740    if test "x$MSVC_DLL" = x; then
47741      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
47742    fi
47743    MSVCR_DLL="$MSVC_DLL"
47744  else
47745
47746  DLL_NAME="${MSVCR_NAME}"
47747  MSVC_DLL=
47748
47749  if test "x$MSVC_DLL" = x; then
47750    # Probe: Using well-known location from Visual Studio 10.0
47751    if test "x$VCINSTALLDIR" != x; then
47752      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47753
47754  windows_path="$CYGWIN_VC_INSTALL_DIR"
47755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47756    unix_path=`$CYGPATH -u "$windows_path"`
47757    CYGWIN_VC_INSTALL_DIR="$unix_path"
47758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47760    CYGWIN_VC_INSTALL_DIR="$unix_path"
47761  fi
47762
47763      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47764        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47765      else
47766        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47767      fi
47768      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47769
47770  DLL_NAME="$DLL_NAME"
47771  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47772  METHOD="well-known location in VCINSTALLDIR"
47773  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47775$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47776
47777    # Need to check if the found msvcr is correct architecture
47778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47779$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47780    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47782      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47783      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47784      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47785        CORRECT_MSVCR_ARCH="PE32 executable"
47786      else
47787        CORRECT_MSVCR_ARCH="PE32+ executable"
47788      fi
47789    else
47790      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47791        CORRECT_MSVCR_ARCH=386
47792      else
47793        CORRECT_MSVCR_ARCH=x86-64
47794      fi
47795    fi
47796    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47798$as_echo "ok" >&6; }
47799      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47800
47801  # Only process if variable expands to non-empty
47802
47803  if test "x$MSVC_DLL" != x; then
47804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47805
47806  # Input might be given as Windows format, start by converting to
47807  # unix format.
47808  path="$MSVC_DLL"
47809  new_path=`$CYGPATH -u "$path"`
47810
47811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47814  # "foo.exe" is OK but "foo" is an error.
47815  #
47816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47817  # It is also a way to make sure we got the proper file name for the real test later on.
47818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47819  if test "x$test_shortpath" = x; then
47820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47821$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47822    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47823  fi
47824
47825  # Call helper function which possibly converts this using DOS-style short mode.
47826  # If so, the updated path is stored in $new_path.
47827
47828  input_path="$new_path"
47829  # Check if we need to convert this using DOS-style short mode. If the path
47830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47831  # take no chances and rewrite it.
47832  # Note: m4 eats our [], so we need to use [ and ] instead.
47833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47834  if test "x$has_forbidden_chars" != x; then
47835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47839      # Going to short mode and back again did indeed matter. Since short mode is
47840      # case insensitive, let's make it lowercase to improve readability.
47841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47842      # Now convert it back to Unix-style (cygpath)
47843      input_path=`$CYGPATH -u "$shortmode_path"`
47844      new_path="$input_path"
47845    fi
47846  fi
47847
47848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47849  if test "x$test_cygdrive_prefix" = x; then
47850    # As a simple fix, exclude /usr/bin since it's not a real path.
47851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47853      # a path prefixed by /cygdrive for fixpath to work.
47854      new_path="$CYGWIN_ROOT_PATH$input_path"
47855    fi
47856  fi
47857
47858
47859  if test "x$path" != "x$new_path"; then
47860    MSVC_DLL="$new_path"
47861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47862$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47863  fi
47864
47865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47866
47867  path="$MSVC_DLL"
47868  has_colon=`$ECHO $path | $GREP ^.:`
47869  new_path="$path"
47870  if test "x$has_colon" = x; then
47871    # Not in mixed or Windows style, start by that.
47872    new_path=`cmd //c echo $path`
47873  fi
47874
47875
47876  input_path="$new_path"
47877  # Check if we need to convert this using DOS-style short mode. If the path
47878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47879  # take no chances and rewrite it.
47880  # Note: m4 eats our [], so we need to use [ and ] instead.
47881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47882  if test "x$has_forbidden_chars" != x; then
47883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47885  fi
47886
47887
47888  windows_path="$new_path"
47889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47890    unix_path=`$CYGPATH -u "$windows_path"`
47891    new_path="$unix_path"
47892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47894    new_path="$unix_path"
47895  fi
47896
47897  if test "x$path" != "x$new_path"; then
47898    MSVC_DLL="$new_path"
47899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47900$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47901  fi
47902
47903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47905
47906    else
47907      # We're on a unix platform. Hooray! :)
47908      path="$MSVC_DLL"
47909      has_space=`$ECHO "$path" | $GREP " "`
47910      if test "x$has_space" != x; then
47911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47912$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47914      fi
47915
47916      # Use eval to expand a potential ~
47917      eval path="$path"
47918      if test ! -f "$path" && test ! -d "$path"; then
47919        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47920      fi
47921
47922      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47923    fi
47924  fi
47925
47926      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47927$as_echo_n "checking for $DLL_NAME... " >&6; }
47928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47929$as_echo "$MSVC_DLL" >&6; }
47930    else
47931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47932$as_echo "incorrect, ignoring" >&6; }
47933      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47934$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47935    fi
47936  fi
47937
47938    fi
47939  fi
47940
47941  if test "x$MSVC_DLL" = x; then
47942    # Probe: Check in the Boot JDK directory.
47943    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47944
47945  DLL_NAME="$DLL_NAME"
47946  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47947  METHOD="well-known location in Boot JDK"
47948  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47949    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47950$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47951
47952    # Need to check if the found msvcr is correct architecture
47953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47954$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47955    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47957      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47958      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47959      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47960        CORRECT_MSVCR_ARCH="PE32 executable"
47961      else
47962        CORRECT_MSVCR_ARCH="PE32+ executable"
47963      fi
47964    else
47965      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47966        CORRECT_MSVCR_ARCH=386
47967      else
47968        CORRECT_MSVCR_ARCH=x86-64
47969      fi
47970    fi
47971    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47973$as_echo "ok" >&6; }
47974      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47975
47976  # Only process if variable expands to non-empty
47977
47978  if test "x$MSVC_DLL" != x; then
47979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47980
47981  # Input might be given as Windows format, start by converting to
47982  # unix format.
47983  path="$MSVC_DLL"
47984  new_path=`$CYGPATH -u "$path"`
47985
47986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47989  # "foo.exe" is OK but "foo" is an error.
47990  #
47991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47992  # It is also a way to make sure we got the proper file name for the real test later on.
47993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47994  if test "x$test_shortpath" = x; then
47995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47996$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47997    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47998  fi
47999
48000  # Call helper function which possibly converts this using DOS-style short mode.
48001  # If so, the updated path is stored in $new_path.
48002
48003  input_path="$new_path"
48004  # Check if we need to convert this using DOS-style short mode. If the path
48005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48006  # take no chances and rewrite it.
48007  # Note: m4 eats our [], so we need to use [ and ] instead.
48008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48009  if test "x$has_forbidden_chars" != x; then
48010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48014      # Going to short mode and back again did indeed matter. Since short mode is
48015      # case insensitive, let's make it lowercase to improve readability.
48016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48017      # Now convert it back to Unix-style (cygpath)
48018      input_path=`$CYGPATH -u "$shortmode_path"`
48019      new_path="$input_path"
48020    fi
48021  fi
48022
48023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48024  if test "x$test_cygdrive_prefix" = x; then
48025    # As a simple fix, exclude /usr/bin since it's not a real path.
48026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48028      # a path prefixed by /cygdrive for fixpath to work.
48029      new_path="$CYGWIN_ROOT_PATH$input_path"
48030    fi
48031  fi
48032
48033
48034  if test "x$path" != "x$new_path"; then
48035    MSVC_DLL="$new_path"
48036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48037$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48038  fi
48039
48040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48041
48042  path="$MSVC_DLL"
48043  has_colon=`$ECHO $path | $GREP ^.:`
48044  new_path="$path"
48045  if test "x$has_colon" = x; then
48046    # Not in mixed or Windows style, start by that.
48047    new_path=`cmd //c echo $path`
48048  fi
48049
48050
48051  input_path="$new_path"
48052  # Check if we need to convert this using DOS-style short mode. If the path
48053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48054  # take no chances and rewrite it.
48055  # Note: m4 eats our [], so we need to use [ and ] instead.
48056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48057  if test "x$has_forbidden_chars" != x; then
48058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48060  fi
48061
48062
48063  windows_path="$new_path"
48064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48065    unix_path=`$CYGPATH -u "$windows_path"`
48066    new_path="$unix_path"
48067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48069    new_path="$unix_path"
48070  fi
48071
48072  if test "x$path" != "x$new_path"; then
48073    MSVC_DLL="$new_path"
48074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48076  fi
48077
48078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48080
48081    else
48082      # We're on a unix platform. Hooray! :)
48083      path="$MSVC_DLL"
48084      has_space=`$ECHO "$path" | $GREP " "`
48085      if test "x$has_space" != x; then
48086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48087$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48089      fi
48090
48091      # Use eval to expand a potential ~
48092      eval path="$path"
48093      if test ! -f "$path" && test ! -d "$path"; then
48094        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48095      fi
48096
48097      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48098    fi
48099  fi
48100
48101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48102$as_echo_n "checking for $DLL_NAME... " >&6; }
48103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48104$as_echo "$MSVC_DLL" >&6; }
48105    else
48106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48107$as_echo "incorrect, ignoring" >&6; }
48108      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48109$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48110    fi
48111  fi
48112
48113  fi
48114
48115  if test "x$MSVC_DLL" = x; then
48116    # Probe: Look in the Windows system32 directory
48117    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48118
48119  windows_path="$CYGWIN_SYSTEMROOT"
48120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48121    unix_path=`$CYGPATH -u "$windows_path"`
48122    CYGWIN_SYSTEMROOT="$unix_path"
48123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48125    CYGWIN_SYSTEMROOT="$unix_path"
48126  fi
48127
48128    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48129
48130  DLL_NAME="$DLL_NAME"
48131  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48132  METHOD="well-known location in SYSTEMROOT"
48133  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48134    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48135$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48136
48137    # Need to check if the found msvcr is correct architecture
48138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48139$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48140    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48142      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48143      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48144      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48145        CORRECT_MSVCR_ARCH="PE32 executable"
48146      else
48147        CORRECT_MSVCR_ARCH="PE32+ executable"
48148      fi
48149    else
48150      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48151        CORRECT_MSVCR_ARCH=386
48152      else
48153        CORRECT_MSVCR_ARCH=x86-64
48154      fi
48155    fi
48156    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48158$as_echo "ok" >&6; }
48159      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48160
48161  # Only process if variable expands to non-empty
48162
48163  if test "x$MSVC_DLL" != x; then
48164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48165
48166  # Input might be given as Windows format, start by converting to
48167  # unix format.
48168  path="$MSVC_DLL"
48169  new_path=`$CYGPATH -u "$path"`
48170
48171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48174  # "foo.exe" is OK but "foo" is an error.
48175  #
48176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48177  # It is also a way to make sure we got the proper file name for the real test later on.
48178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48179  if test "x$test_shortpath" = x; then
48180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48181$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48182    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48183  fi
48184
48185  # Call helper function which possibly converts this using DOS-style short mode.
48186  # If so, the updated path is stored in $new_path.
48187
48188  input_path="$new_path"
48189  # Check if we need to convert this using DOS-style short mode. If the path
48190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48191  # take no chances and rewrite it.
48192  # Note: m4 eats our [], so we need to use [ and ] instead.
48193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48194  if test "x$has_forbidden_chars" != x; then
48195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48199      # Going to short mode and back again did indeed matter. Since short mode is
48200      # case insensitive, let's make it lowercase to improve readability.
48201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48202      # Now convert it back to Unix-style (cygpath)
48203      input_path=`$CYGPATH -u "$shortmode_path"`
48204      new_path="$input_path"
48205    fi
48206  fi
48207
48208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48209  if test "x$test_cygdrive_prefix" = x; then
48210    # As a simple fix, exclude /usr/bin since it's not a real path.
48211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48213      # a path prefixed by /cygdrive for fixpath to work.
48214      new_path="$CYGWIN_ROOT_PATH$input_path"
48215    fi
48216  fi
48217
48218
48219  if test "x$path" != "x$new_path"; then
48220    MSVC_DLL="$new_path"
48221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48222$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48223  fi
48224
48225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48226
48227  path="$MSVC_DLL"
48228  has_colon=`$ECHO $path | $GREP ^.:`
48229  new_path="$path"
48230  if test "x$has_colon" = x; then
48231    # Not in mixed or Windows style, start by that.
48232    new_path=`cmd //c echo $path`
48233  fi
48234
48235
48236  input_path="$new_path"
48237  # Check if we need to convert this using DOS-style short mode. If the path
48238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48239  # take no chances and rewrite it.
48240  # Note: m4 eats our [], so we need to use [ and ] instead.
48241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48242  if test "x$has_forbidden_chars" != x; then
48243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48245  fi
48246
48247
48248  windows_path="$new_path"
48249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48250    unix_path=`$CYGPATH -u "$windows_path"`
48251    new_path="$unix_path"
48252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48254    new_path="$unix_path"
48255  fi
48256
48257  if test "x$path" != "x$new_path"; then
48258    MSVC_DLL="$new_path"
48259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48260$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48261  fi
48262
48263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48265
48266    else
48267      # We're on a unix platform. Hooray! :)
48268      path="$MSVC_DLL"
48269      has_space=`$ECHO "$path" | $GREP " "`
48270      if test "x$has_space" != x; then
48271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48272$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48274      fi
48275
48276      # Use eval to expand a potential ~
48277      eval path="$path"
48278      if test ! -f "$path" && test ! -d "$path"; then
48279        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48280      fi
48281
48282      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48283    fi
48284  fi
48285
48286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48287$as_echo_n "checking for $DLL_NAME... " >&6; }
48288      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48289$as_echo "$MSVC_DLL" >&6; }
48290    else
48291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48292$as_echo "incorrect, ignoring" >&6; }
48293      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48294$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48295    fi
48296  fi
48297
48298  fi
48299
48300  if test "x$MSVC_DLL" = x; then
48301    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48302    if test "x$VS100COMNTOOLS" != x; then
48303      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48304
48305  windows_path="$CYGWIN_VS_TOOLS_DIR"
48306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48307    unix_path=`$CYGPATH -u "$windows_path"`
48308    CYGWIN_VS_TOOLS_DIR="$unix_path"
48309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48311    CYGWIN_VS_TOOLS_DIR="$unix_path"
48312  fi
48313
48314      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48315        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48316	    | $GREP -i /x64/ | $HEAD --lines 1`
48317      else
48318        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48319	    | $GREP -i /x86/ | $HEAD --lines 1`
48320      fi
48321
48322  DLL_NAME="$DLL_NAME"
48323  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48324  METHOD="search of VS100COMNTOOLS"
48325  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48326    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48327$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48328
48329    # Need to check if the found msvcr is correct architecture
48330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48331$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48332    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48334      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48335      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48336      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48337        CORRECT_MSVCR_ARCH="PE32 executable"
48338      else
48339        CORRECT_MSVCR_ARCH="PE32+ executable"
48340      fi
48341    else
48342      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48343        CORRECT_MSVCR_ARCH=386
48344      else
48345        CORRECT_MSVCR_ARCH=x86-64
48346      fi
48347    fi
48348    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48350$as_echo "ok" >&6; }
48351      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48352
48353  # Only process if variable expands to non-empty
48354
48355  if test "x$MSVC_DLL" != x; then
48356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48357
48358  # Input might be given as Windows format, start by converting to
48359  # unix format.
48360  path="$MSVC_DLL"
48361  new_path=`$CYGPATH -u "$path"`
48362
48363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48366  # "foo.exe" is OK but "foo" is an error.
48367  #
48368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48369  # It is also a way to make sure we got the proper file name for the real test later on.
48370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48371  if test "x$test_shortpath" = x; then
48372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48373$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48374    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48375  fi
48376
48377  # Call helper function which possibly converts this using DOS-style short mode.
48378  # If so, the updated path is stored in $new_path.
48379
48380  input_path="$new_path"
48381  # Check if we need to convert this using DOS-style short mode. If the path
48382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48383  # take no chances and rewrite it.
48384  # Note: m4 eats our [], so we need to use [ and ] instead.
48385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48386  if test "x$has_forbidden_chars" != x; then
48387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48391      # Going to short mode and back again did indeed matter. Since short mode is
48392      # case insensitive, let's make it lowercase to improve readability.
48393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48394      # Now convert it back to Unix-style (cygpath)
48395      input_path=`$CYGPATH -u "$shortmode_path"`
48396      new_path="$input_path"
48397    fi
48398  fi
48399
48400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48401  if test "x$test_cygdrive_prefix" = x; then
48402    # As a simple fix, exclude /usr/bin since it's not a real path.
48403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48405      # a path prefixed by /cygdrive for fixpath to work.
48406      new_path="$CYGWIN_ROOT_PATH$input_path"
48407    fi
48408  fi
48409
48410
48411  if test "x$path" != "x$new_path"; then
48412    MSVC_DLL="$new_path"
48413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48414$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48415  fi
48416
48417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48418
48419  path="$MSVC_DLL"
48420  has_colon=`$ECHO $path | $GREP ^.:`
48421  new_path="$path"
48422  if test "x$has_colon" = x; then
48423    # Not in mixed or Windows style, start by that.
48424    new_path=`cmd //c echo $path`
48425  fi
48426
48427
48428  input_path="$new_path"
48429  # Check if we need to convert this using DOS-style short mode. If the path
48430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48431  # take no chances and rewrite it.
48432  # Note: m4 eats our [], so we need to use [ and ] instead.
48433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48434  if test "x$has_forbidden_chars" != x; then
48435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48437  fi
48438
48439
48440  windows_path="$new_path"
48441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48442    unix_path=`$CYGPATH -u "$windows_path"`
48443    new_path="$unix_path"
48444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48446    new_path="$unix_path"
48447  fi
48448
48449  if test "x$path" != "x$new_path"; then
48450    MSVC_DLL="$new_path"
48451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48452$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48453  fi
48454
48455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48457
48458    else
48459      # We're on a unix platform. Hooray! :)
48460      path="$MSVC_DLL"
48461      has_space=`$ECHO "$path" | $GREP " "`
48462      if test "x$has_space" != x; then
48463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48464$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48465        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48466      fi
48467
48468      # Use eval to expand a potential ~
48469      eval path="$path"
48470      if test ! -f "$path" && test ! -d "$path"; then
48471        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48472      fi
48473
48474      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48475    fi
48476  fi
48477
48478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48479$as_echo_n "checking for $DLL_NAME... " >&6; }
48480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48481$as_echo "$MSVC_DLL" >&6; }
48482    else
48483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48484$as_echo "incorrect, ignoring" >&6; }
48485      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48486$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48487    fi
48488  fi
48489
48490    fi
48491  fi
48492
48493  if test "x$MSVC_DLL" = x; then
48494    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48495    # (This was the original behaviour; kept since it might turn something up)
48496    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48497      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48498        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48499	    | $GREP x64 | $HEAD --lines 1`
48500      else
48501        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48502	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48503        if test "x$POSSIBLE_MSVC_DLL" = x; then
48504          # We're grasping at straws now...
48505          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48506	      | $HEAD --lines 1`
48507        fi
48508      fi
48509
48510
48511  DLL_NAME="$DLL_NAME"
48512  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48513  METHOD="search of VCINSTALLDIR"
48514  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48516$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48517
48518    # Need to check if the found msvcr is correct architecture
48519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48520$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48521    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48523      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48524      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48525      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48526        CORRECT_MSVCR_ARCH="PE32 executable"
48527      else
48528        CORRECT_MSVCR_ARCH="PE32+ executable"
48529      fi
48530    else
48531      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48532        CORRECT_MSVCR_ARCH=386
48533      else
48534        CORRECT_MSVCR_ARCH=x86-64
48535      fi
48536    fi
48537    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48539$as_echo "ok" >&6; }
48540      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48541
48542  # Only process if variable expands to non-empty
48543
48544  if test "x$MSVC_DLL" != x; then
48545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48546
48547  # Input might be given as Windows format, start by converting to
48548  # unix format.
48549  path="$MSVC_DLL"
48550  new_path=`$CYGPATH -u "$path"`
48551
48552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48555  # "foo.exe" is OK but "foo" is an error.
48556  #
48557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48558  # It is also a way to make sure we got the proper file name for the real test later on.
48559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48560  if test "x$test_shortpath" = x; then
48561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48562$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48563    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48564  fi
48565
48566  # Call helper function which possibly converts this using DOS-style short mode.
48567  # If so, the updated path is stored in $new_path.
48568
48569  input_path="$new_path"
48570  # Check if we need to convert this using DOS-style short mode. If the path
48571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48572  # take no chances and rewrite it.
48573  # Note: m4 eats our [], so we need to use [ and ] instead.
48574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48575  if test "x$has_forbidden_chars" != x; then
48576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48580      # Going to short mode and back again did indeed matter. Since short mode is
48581      # case insensitive, let's make it lowercase to improve readability.
48582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48583      # Now convert it back to Unix-style (cygpath)
48584      input_path=`$CYGPATH -u "$shortmode_path"`
48585      new_path="$input_path"
48586    fi
48587  fi
48588
48589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48590  if test "x$test_cygdrive_prefix" = x; then
48591    # As a simple fix, exclude /usr/bin since it's not a real path.
48592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48594      # a path prefixed by /cygdrive for fixpath to work.
48595      new_path="$CYGWIN_ROOT_PATH$input_path"
48596    fi
48597  fi
48598
48599
48600  if test "x$path" != "x$new_path"; then
48601    MSVC_DLL="$new_path"
48602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48603$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48604  fi
48605
48606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48607
48608  path="$MSVC_DLL"
48609  has_colon=`$ECHO $path | $GREP ^.:`
48610  new_path="$path"
48611  if test "x$has_colon" = x; then
48612    # Not in mixed or Windows style, start by that.
48613    new_path=`cmd //c echo $path`
48614  fi
48615
48616
48617  input_path="$new_path"
48618  # Check if we need to convert this using DOS-style short mode. If the path
48619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48620  # take no chances and rewrite it.
48621  # Note: m4 eats our [], so we need to use [ and ] instead.
48622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48623  if test "x$has_forbidden_chars" != x; then
48624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48626  fi
48627
48628
48629  windows_path="$new_path"
48630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48631    unix_path=`$CYGPATH -u "$windows_path"`
48632    new_path="$unix_path"
48633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48635    new_path="$unix_path"
48636  fi
48637
48638  if test "x$path" != "x$new_path"; then
48639    MSVC_DLL="$new_path"
48640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48641$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48642  fi
48643
48644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48646
48647    else
48648      # We're on a unix platform. Hooray! :)
48649      path="$MSVC_DLL"
48650      has_space=`$ECHO "$path" | $GREP " "`
48651      if test "x$has_space" != x; then
48652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48653$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48655      fi
48656
48657      # Use eval to expand a potential ~
48658      eval path="$path"
48659      if test ! -f "$path" && test ! -d "$path"; then
48660        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48661      fi
48662
48663      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48664    fi
48665  fi
48666
48667      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48668$as_echo_n "checking for $DLL_NAME... " >&6; }
48669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48670$as_echo "$MSVC_DLL" >&6; }
48671    else
48672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48673$as_echo "incorrect, ignoring" >&6; }
48674      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48675$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48676    fi
48677  fi
48678
48679    fi
48680  fi
48681
48682  if test "x$MSVC_DLL" = x; then
48683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48684$as_echo_n "checking for $DLL_NAME... " >&6; }
48685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48686$as_echo "no" >&6; }
48687    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48688  fi
48689
48690    MSVCR_DLL="$MSVC_DLL"
48691  fi
48692
48693
48694
48695# Check whether --with-msvcp-dll was given.
48696if test "${with_msvcp_dll+set}" = set; then :
48697  withval=$with_msvcp_dll;
48698fi
48699
48700
48701  if test "x$MSVCP_NAME" != "x"; then
48702    if test "x$with_msvcp_dll" != x; then
48703      # If given explicitely by user, do not probe. If not present, fail directly.
48704
48705  DLL_NAME="$MSVCP_NAME"
48706  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
48707  METHOD="--with-msvcp-dll"
48708  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48710$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48711
48712    # Need to check if the found msvcr is correct architecture
48713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48714$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48715    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48717      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48718      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48719      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48720        CORRECT_MSVCR_ARCH="PE32 executable"
48721      else
48722        CORRECT_MSVCR_ARCH="PE32+ executable"
48723      fi
48724    else
48725      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48726        CORRECT_MSVCR_ARCH=386
48727      else
48728        CORRECT_MSVCR_ARCH=x86-64
48729      fi
48730    fi
48731    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48733$as_echo "ok" >&6; }
48734      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48735
48736  # Only process if variable expands to non-empty
48737
48738  if test "x$MSVC_DLL" != x; then
48739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48740
48741  # Input might be given as Windows format, start by converting to
48742  # unix format.
48743  path="$MSVC_DLL"
48744  new_path=`$CYGPATH -u "$path"`
48745
48746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48749  # "foo.exe" is OK but "foo" is an error.
48750  #
48751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48752  # It is also a way to make sure we got the proper file name for the real test later on.
48753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48754  if test "x$test_shortpath" = x; then
48755    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48756$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48757    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48758  fi
48759
48760  # Call helper function which possibly converts this using DOS-style short mode.
48761  # If so, the updated path is stored in $new_path.
48762
48763  input_path="$new_path"
48764  # Check if we need to convert this using DOS-style short mode. If the path
48765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48766  # take no chances and rewrite it.
48767  # Note: m4 eats our [], so we need to use [ and ] instead.
48768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48769  if test "x$has_forbidden_chars" != x; then
48770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48771    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48772    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48773    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48774      # Going to short mode and back again did indeed matter. Since short mode is
48775      # case insensitive, let's make it lowercase to improve readability.
48776      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48777      # Now convert it back to Unix-style (cygpath)
48778      input_path=`$CYGPATH -u "$shortmode_path"`
48779      new_path="$input_path"
48780    fi
48781  fi
48782
48783  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48784  if test "x$test_cygdrive_prefix" = x; then
48785    # As a simple fix, exclude /usr/bin since it's not a real path.
48786    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48787      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48788      # a path prefixed by /cygdrive for fixpath to work.
48789      new_path="$CYGWIN_ROOT_PATH$input_path"
48790    fi
48791  fi
48792
48793
48794  if test "x$path" != "x$new_path"; then
48795    MSVC_DLL="$new_path"
48796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48797$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48798  fi
48799
48800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48801
48802  path="$MSVC_DLL"
48803  has_colon=`$ECHO $path | $GREP ^.:`
48804  new_path="$path"
48805  if test "x$has_colon" = x; then
48806    # Not in mixed or Windows style, start by that.
48807    new_path=`cmd //c echo $path`
48808  fi
48809
48810
48811  input_path="$new_path"
48812  # Check if we need to convert this using DOS-style short mode. If the path
48813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48814  # take no chances and rewrite it.
48815  # Note: m4 eats our [], so we need to use [ and ] instead.
48816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48817  if test "x$has_forbidden_chars" != x; then
48818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48820  fi
48821
48822
48823  windows_path="$new_path"
48824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48825    unix_path=`$CYGPATH -u "$windows_path"`
48826    new_path="$unix_path"
48827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48829    new_path="$unix_path"
48830  fi
48831
48832  if test "x$path" != "x$new_path"; then
48833    MSVC_DLL="$new_path"
48834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48835$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48836  fi
48837
48838  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48839  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48840
48841    else
48842      # We're on a unix platform. Hooray! :)
48843      path="$MSVC_DLL"
48844      has_space=`$ECHO "$path" | $GREP " "`
48845      if test "x$has_space" != x; then
48846        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48847$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48848        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48849      fi
48850
48851      # Use eval to expand a potential ~
48852      eval path="$path"
48853      if test ! -f "$path" && test ! -d "$path"; then
48854        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48855      fi
48856
48857      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48858    fi
48859  fi
48860
48861      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48862$as_echo_n "checking for $DLL_NAME... " >&6; }
48863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48864$as_echo "$MSVC_DLL" >&6; }
48865    else
48866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48867$as_echo "incorrect, ignoring" >&6; }
48868      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48869$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48870    fi
48871  fi
48872
48873      if test "x$MSVC_DLL" = x; then
48874        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
48875      fi
48876      MSVCP_DLL="$MSVC_DLL"
48877    elif test "x$DEVKIT_MSVCP_DLL" != x; then
48878
48879  DLL_NAME="$MSVCP_NAME"
48880  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
48881  METHOD="devkit"
48882  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48883    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48884$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48885
48886    # Need to check if the found msvcr is correct architecture
48887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48888$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48889    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48891      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48892      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48893      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48894        CORRECT_MSVCR_ARCH="PE32 executable"
48895      else
48896        CORRECT_MSVCR_ARCH="PE32+ executable"
48897      fi
48898    else
48899      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48900        CORRECT_MSVCR_ARCH=386
48901      else
48902        CORRECT_MSVCR_ARCH=x86-64
48903      fi
48904    fi
48905    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48907$as_echo "ok" >&6; }
48908      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48909
48910  # Only process if variable expands to non-empty
48911
48912  if test "x$MSVC_DLL" != x; then
48913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48914
48915  # Input might be given as Windows format, start by converting to
48916  # unix format.
48917  path="$MSVC_DLL"
48918  new_path=`$CYGPATH -u "$path"`
48919
48920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48923  # "foo.exe" is OK but "foo" is an error.
48924  #
48925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48926  # It is also a way to make sure we got the proper file name for the real test later on.
48927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48928  if test "x$test_shortpath" = x; then
48929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48930$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48931    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48932  fi
48933
48934  # Call helper function which possibly converts this using DOS-style short mode.
48935  # If so, the updated path is stored in $new_path.
48936
48937  input_path="$new_path"
48938  # Check if we need to convert this using DOS-style short mode. If the path
48939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48940  # take no chances and rewrite it.
48941  # Note: m4 eats our [], so we need to use [ and ] instead.
48942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48943  if test "x$has_forbidden_chars" != x; then
48944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48948      # Going to short mode and back again did indeed matter. Since short mode is
48949      # case insensitive, let's make it lowercase to improve readability.
48950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48951      # Now convert it back to Unix-style (cygpath)
48952      input_path=`$CYGPATH -u "$shortmode_path"`
48953      new_path="$input_path"
48954    fi
48955  fi
48956
48957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48958  if test "x$test_cygdrive_prefix" = x; then
48959    # As a simple fix, exclude /usr/bin since it's not a real path.
48960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48962      # a path prefixed by /cygdrive for fixpath to work.
48963      new_path="$CYGWIN_ROOT_PATH$input_path"
48964    fi
48965  fi
48966
48967
48968  if test "x$path" != "x$new_path"; then
48969    MSVC_DLL="$new_path"
48970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48971$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48972  fi
48973
48974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48975
48976  path="$MSVC_DLL"
48977  has_colon=`$ECHO $path | $GREP ^.:`
48978  new_path="$path"
48979  if test "x$has_colon" = x; then
48980    # Not in mixed or Windows style, start by that.
48981    new_path=`cmd //c echo $path`
48982  fi
48983
48984
48985  input_path="$new_path"
48986  # Check if we need to convert this using DOS-style short mode. If the path
48987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48988  # take no chances and rewrite it.
48989  # Note: m4 eats our [], so we need to use [ and ] instead.
48990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48991  if test "x$has_forbidden_chars" != x; then
48992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48994  fi
48995
48996
48997  windows_path="$new_path"
48998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48999    unix_path=`$CYGPATH -u "$windows_path"`
49000    new_path="$unix_path"
49001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49003    new_path="$unix_path"
49004  fi
49005
49006  if test "x$path" != "x$new_path"; then
49007    MSVC_DLL="$new_path"
49008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49009$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49010  fi
49011
49012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49014
49015    else
49016      # We're on a unix platform. Hooray! :)
49017      path="$MSVC_DLL"
49018      has_space=`$ECHO "$path" | $GREP " "`
49019      if test "x$has_space" != x; then
49020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49021$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49023      fi
49024
49025      # Use eval to expand a potential ~
49026      eval path="$path"
49027      if test ! -f "$path" && test ! -d "$path"; then
49028        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49029      fi
49030
49031      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49032    fi
49033  fi
49034
49035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49036$as_echo_n "checking for $DLL_NAME... " >&6; }
49037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49038$as_echo "$MSVC_DLL" >&6; }
49039    else
49040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49041$as_echo "incorrect, ignoring" >&6; }
49042      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49043$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49044    fi
49045  fi
49046
49047      if test "x$MSVC_DLL" = x; then
49048        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49049      fi
49050      MSVCP_DLL="$MSVC_DLL"
49051    else
49052
49053  DLL_NAME="${MSVCP_NAME}"
49054  MSVC_DLL=
49055
49056  if test "x$MSVC_DLL" = x; then
49057    # Probe: Using well-known location from Visual Studio 10.0
49058    if test "x$VCINSTALLDIR" != x; then
49059      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49060
49061  windows_path="$CYGWIN_VC_INSTALL_DIR"
49062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49063    unix_path=`$CYGPATH -u "$windows_path"`
49064    CYGWIN_VC_INSTALL_DIR="$unix_path"
49065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49067    CYGWIN_VC_INSTALL_DIR="$unix_path"
49068  fi
49069
49070      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49071        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49072      else
49073        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49074      fi
49075      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49076
49077  DLL_NAME="$DLL_NAME"
49078  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49079  METHOD="well-known location in VCINSTALLDIR"
49080  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49081    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49082$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49083
49084    # Need to check if the found msvcr is correct architecture
49085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49086$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49087    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49089      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49090      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49091      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49092        CORRECT_MSVCR_ARCH="PE32 executable"
49093      else
49094        CORRECT_MSVCR_ARCH="PE32+ executable"
49095      fi
49096    else
49097      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49098        CORRECT_MSVCR_ARCH=386
49099      else
49100        CORRECT_MSVCR_ARCH=x86-64
49101      fi
49102    fi
49103    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49105$as_echo "ok" >&6; }
49106      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49107
49108  # Only process if variable expands to non-empty
49109
49110  if test "x$MSVC_DLL" != x; then
49111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49112
49113  # Input might be given as Windows format, start by converting to
49114  # unix format.
49115  path="$MSVC_DLL"
49116  new_path=`$CYGPATH -u "$path"`
49117
49118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49121  # "foo.exe" is OK but "foo" is an error.
49122  #
49123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49124  # It is also a way to make sure we got the proper file name for the real test later on.
49125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49126  if test "x$test_shortpath" = x; then
49127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49129    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49130  fi
49131
49132  # Call helper function which possibly converts this using DOS-style short mode.
49133  # If so, the updated path is stored in $new_path.
49134
49135  input_path="$new_path"
49136  # Check if we need to convert this using DOS-style short mode. If the path
49137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49138  # take no chances and rewrite it.
49139  # Note: m4 eats our [], so we need to use [ and ] instead.
49140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49141  if test "x$has_forbidden_chars" != x; then
49142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49146      # Going to short mode and back again did indeed matter. Since short mode is
49147      # case insensitive, let's make it lowercase to improve readability.
49148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49149      # Now convert it back to Unix-style (cygpath)
49150      input_path=`$CYGPATH -u "$shortmode_path"`
49151      new_path="$input_path"
49152    fi
49153  fi
49154
49155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49156  if test "x$test_cygdrive_prefix" = x; then
49157    # As a simple fix, exclude /usr/bin since it's not a real path.
49158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49160      # a path prefixed by /cygdrive for fixpath to work.
49161      new_path="$CYGWIN_ROOT_PATH$input_path"
49162    fi
49163  fi
49164
49165
49166  if test "x$path" != "x$new_path"; then
49167    MSVC_DLL="$new_path"
49168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49169$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49170  fi
49171
49172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49173
49174  path="$MSVC_DLL"
49175  has_colon=`$ECHO $path | $GREP ^.:`
49176  new_path="$path"
49177  if test "x$has_colon" = x; then
49178    # Not in mixed or Windows style, start by that.
49179    new_path=`cmd //c echo $path`
49180  fi
49181
49182
49183  input_path="$new_path"
49184  # Check if we need to convert this using DOS-style short mode. If the path
49185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49186  # take no chances and rewrite it.
49187  # Note: m4 eats our [], so we need to use [ and ] instead.
49188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49189  if test "x$has_forbidden_chars" != x; then
49190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49192  fi
49193
49194
49195  windows_path="$new_path"
49196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49197    unix_path=`$CYGPATH -u "$windows_path"`
49198    new_path="$unix_path"
49199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49201    new_path="$unix_path"
49202  fi
49203
49204  if test "x$path" != "x$new_path"; then
49205    MSVC_DLL="$new_path"
49206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49207$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49208  fi
49209
49210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49212
49213    else
49214      # We're on a unix platform. Hooray! :)
49215      path="$MSVC_DLL"
49216      has_space=`$ECHO "$path" | $GREP " "`
49217      if test "x$has_space" != x; then
49218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49219$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49221      fi
49222
49223      # Use eval to expand a potential ~
49224      eval path="$path"
49225      if test ! -f "$path" && test ! -d "$path"; then
49226        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49227      fi
49228
49229      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49230    fi
49231  fi
49232
49233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49234$as_echo_n "checking for $DLL_NAME... " >&6; }
49235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49236$as_echo "$MSVC_DLL" >&6; }
49237    else
49238      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49239$as_echo "incorrect, ignoring" >&6; }
49240      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49241$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49242    fi
49243  fi
49244
49245    fi
49246  fi
49247
49248  if test "x$MSVC_DLL" = x; then
49249    # Probe: Check in the Boot JDK directory.
49250    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49251
49252  DLL_NAME="$DLL_NAME"
49253  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49254  METHOD="well-known location in Boot JDK"
49255  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49256    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49257$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49258
49259    # Need to check if the found msvcr is correct architecture
49260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49261$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49262    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49264      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49265      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49266      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49267        CORRECT_MSVCR_ARCH="PE32 executable"
49268      else
49269        CORRECT_MSVCR_ARCH="PE32+ executable"
49270      fi
49271    else
49272      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49273        CORRECT_MSVCR_ARCH=386
49274      else
49275        CORRECT_MSVCR_ARCH=x86-64
49276      fi
49277    fi
49278    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49280$as_echo "ok" >&6; }
49281      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49282
49283  # Only process if variable expands to non-empty
49284
49285  if test "x$MSVC_DLL" != x; then
49286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49287
49288  # Input might be given as Windows format, start by converting to
49289  # unix format.
49290  path="$MSVC_DLL"
49291  new_path=`$CYGPATH -u "$path"`
49292
49293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49296  # "foo.exe" is OK but "foo" is an error.
49297  #
49298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49299  # It is also a way to make sure we got the proper file name for the real test later on.
49300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49301  if test "x$test_shortpath" = x; then
49302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49303$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49304    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49305  fi
49306
49307  # Call helper function which possibly converts this using DOS-style short mode.
49308  # If so, the updated path is stored in $new_path.
49309
49310  input_path="$new_path"
49311  # Check if we need to convert this using DOS-style short mode. If the path
49312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49313  # take no chances and rewrite it.
49314  # Note: m4 eats our [], so we need to use [ and ] instead.
49315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49316  if test "x$has_forbidden_chars" != x; then
49317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49321      # Going to short mode and back again did indeed matter. Since short mode is
49322      # case insensitive, let's make it lowercase to improve readability.
49323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49324      # Now convert it back to Unix-style (cygpath)
49325      input_path=`$CYGPATH -u "$shortmode_path"`
49326      new_path="$input_path"
49327    fi
49328  fi
49329
49330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49331  if test "x$test_cygdrive_prefix" = x; then
49332    # As a simple fix, exclude /usr/bin since it's not a real path.
49333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49335      # a path prefixed by /cygdrive for fixpath to work.
49336      new_path="$CYGWIN_ROOT_PATH$input_path"
49337    fi
49338  fi
49339
49340
49341  if test "x$path" != "x$new_path"; then
49342    MSVC_DLL="$new_path"
49343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49344$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49345  fi
49346
49347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49348
49349  path="$MSVC_DLL"
49350  has_colon=`$ECHO $path | $GREP ^.:`
49351  new_path="$path"
49352  if test "x$has_colon" = x; then
49353    # Not in mixed or Windows style, start by that.
49354    new_path=`cmd //c echo $path`
49355  fi
49356
49357
49358  input_path="$new_path"
49359  # Check if we need to convert this using DOS-style short mode. If the path
49360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49361  # take no chances and rewrite it.
49362  # Note: m4 eats our [], so we need to use [ and ] instead.
49363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49364  if test "x$has_forbidden_chars" != x; then
49365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49367  fi
49368
49369
49370  windows_path="$new_path"
49371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49372    unix_path=`$CYGPATH -u "$windows_path"`
49373    new_path="$unix_path"
49374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49376    new_path="$unix_path"
49377  fi
49378
49379  if test "x$path" != "x$new_path"; then
49380    MSVC_DLL="$new_path"
49381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49382$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49383  fi
49384
49385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49387
49388    else
49389      # We're on a unix platform. Hooray! :)
49390      path="$MSVC_DLL"
49391      has_space=`$ECHO "$path" | $GREP " "`
49392      if test "x$has_space" != x; then
49393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49394$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49396      fi
49397
49398      # Use eval to expand a potential ~
49399      eval path="$path"
49400      if test ! -f "$path" && test ! -d "$path"; then
49401        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49402      fi
49403
49404      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49405    fi
49406  fi
49407
49408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49409$as_echo_n "checking for $DLL_NAME... " >&6; }
49410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49411$as_echo "$MSVC_DLL" >&6; }
49412    else
49413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49414$as_echo "incorrect, ignoring" >&6; }
49415      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49416$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49417    fi
49418  fi
49419
49420  fi
49421
49422  if test "x$MSVC_DLL" = x; then
49423    # Probe: Look in the Windows system32 directory
49424    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49425
49426  windows_path="$CYGWIN_SYSTEMROOT"
49427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49428    unix_path=`$CYGPATH -u "$windows_path"`
49429    CYGWIN_SYSTEMROOT="$unix_path"
49430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49432    CYGWIN_SYSTEMROOT="$unix_path"
49433  fi
49434
49435    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49436
49437  DLL_NAME="$DLL_NAME"
49438  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49439  METHOD="well-known location in SYSTEMROOT"
49440  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49441    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49442$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49443
49444    # Need to check if the found msvcr is correct architecture
49445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49446$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49447    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49449      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49450      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49451      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49452        CORRECT_MSVCR_ARCH="PE32 executable"
49453      else
49454        CORRECT_MSVCR_ARCH="PE32+ executable"
49455      fi
49456    else
49457      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49458        CORRECT_MSVCR_ARCH=386
49459      else
49460        CORRECT_MSVCR_ARCH=x86-64
49461      fi
49462    fi
49463    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49465$as_echo "ok" >&6; }
49466      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49467
49468  # Only process if variable expands to non-empty
49469
49470  if test "x$MSVC_DLL" != x; then
49471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49472
49473  # Input might be given as Windows format, start by converting to
49474  # unix format.
49475  path="$MSVC_DLL"
49476  new_path=`$CYGPATH -u "$path"`
49477
49478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49481  # "foo.exe" is OK but "foo" is an error.
49482  #
49483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49484  # It is also a way to make sure we got the proper file name for the real test later on.
49485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49486  if test "x$test_shortpath" = x; then
49487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49488$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49489    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49490  fi
49491
49492  # Call helper function which possibly converts this using DOS-style short mode.
49493  # If so, the updated path is stored in $new_path.
49494
49495  input_path="$new_path"
49496  # Check if we need to convert this using DOS-style short mode. If the path
49497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49498  # take no chances and rewrite it.
49499  # Note: m4 eats our [], so we need to use [ and ] instead.
49500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49501  if test "x$has_forbidden_chars" != x; then
49502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49506      # Going to short mode and back again did indeed matter. Since short mode is
49507      # case insensitive, let's make it lowercase to improve readability.
49508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49509      # Now convert it back to Unix-style (cygpath)
49510      input_path=`$CYGPATH -u "$shortmode_path"`
49511      new_path="$input_path"
49512    fi
49513  fi
49514
49515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49516  if test "x$test_cygdrive_prefix" = x; then
49517    # As a simple fix, exclude /usr/bin since it's not a real path.
49518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49520      # a path prefixed by /cygdrive for fixpath to work.
49521      new_path="$CYGWIN_ROOT_PATH$input_path"
49522    fi
49523  fi
49524
49525
49526  if test "x$path" != "x$new_path"; then
49527    MSVC_DLL="$new_path"
49528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49529$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49530  fi
49531
49532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49533
49534  path="$MSVC_DLL"
49535  has_colon=`$ECHO $path | $GREP ^.:`
49536  new_path="$path"
49537  if test "x$has_colon" = x; then
49538    # Not in mixed or Windows style, start by that.
49539    new_path=`cmd //c echo $path`
49540  fi
49541
49542
49543  input_path="$new_path"
49544  # Check if we need to convert this using DOS-style short mode. If the path
49545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49546  # take no chances and rewrite it.
49547  # Note: m4 eats our [], so we need to use [ and ] instead.
49548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49549  if test "x$has_forbidden_chars" != x; then
49550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49552  fi
49553
49554
49555  windows_path="$new_path"
49556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49557    unix_path=`$CYGPATH -u "$windows_path"`
49558    new_path="$unix_path"
49559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49561    new_path="$unix_path"
49562  fi
49563
49564  if test "x$path" != "x$new_path"; then
49565    MSVC_DLL="$new_path"
49566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49567$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49568  fi
49569
49570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49572
49573    else
49574      # We're on a unix platform. Hooray! :)
49575      path="$MSVC_DLL"
49576      has_space=`$ECHO "$path" | $GREP " "`
49577      if test "x$has_space" != x; then
49578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49579$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49581      fi
49582
49583      # Use eval to expand a potential ~
49584      eval path="$path"
49585      if test ! -f "$path" && test ! -d "$path"; then
49586        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49587      fi
49588
49589      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49590    fi
49591  fi
49592
49593      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49594$as_echo_n "checking for $DLL_NAME... " >&6; }
49595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49596$as_echo "$MSVC_DLL" >&6; }
49597    else
49598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49599$as_echo "incorrect, ignoring" >&6; }
49600      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49601$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49602    fi
49603  fi
49604
49605  fi
49606
49607  if test "x$MSVC_DLL" = x; then
49608    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49609    if test "x$VS100COMNTOOLS" != x; then
49610      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49611
49612  windows_path="$CYGWIN_VS_TOOLS_DIR"
49613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49614    unix_path=`$CYGPATH -u "$windows_path"`
49615    CYGWIN_VS_TOOLS_DIR="$unix_path"
49616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49618    CYGWIN_VS_TOOLS_DIR="$unix_path"
49619  fi
49620
49621      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49622        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49623	    | $GREP -i /x64/ | $HEAD --lines 1`
49624      else
49625        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49626	    | $GREP -i /x86/ | $HEAD --lines 1`
49627      fi
49628
49629  DLL_NAME="$DLL_NAME"
49630  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49631  METHOD="search of VS100COMNTOOLS"
49632  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49633    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49634$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49635
49636    # Need to check if the found msvcr is correct architecture
49637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49638$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49639    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49641      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49642      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49643      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49644        CORRECT_MSVCR_ARCH="PE32 executable"
49645      else
49646        CORRECT_MSVCR_ARCH="PE32+ executable"
49647      fi
49648    else
49649      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49650        CORRECT_MSVCR_ARCH=386
49651      else
49652        CORRECT_MSVCR_ARCH=x86-64
49653      fi
49654    fi
49655    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49657$as_echo "ok" >&6; }
49658      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49659
49660  # Only process if variable expands to non-empty
49661
49662  if test "x$MSVC_DLL" != x; then
49663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49664
49665  # Input might be given as Windows format, start by converting to
49666  # unix format.
49667  path="$MSVC_DLL"
49668  new_path=`$CYGPATH -u "$path"`
49669
49670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49673  # "foo.exe" is OK but "foo" is an error.
49674  #
49675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49676  # It is also a way to make sure we got the proper file name for the real test later on.
49677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49678  if test "x$test_shortpath" = x; then
49679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49680$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49681    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49682  fi
49683
49684  # Call helper function which possibly converts this using DOS-style short mode.
49685  # If so, the updated path is stored in $new_path.
49686
49687  input_path="$new_path"
49688  # Check if we need to convert this using DOS-style short mode. If the path
49689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49690  # take no chances and rewrite it.
49691  # Note: m4 eats our [], so we need to use [ and ] instead.
49692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49693  if test "x$has_forbidden_chars" != x; then
49694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49698      # Going to short mode and back again did indeed matter. Since short mode is
49699      # case insensitive, let's make it lowercase to improve readability.
49700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49701      # Now convert it back to Unix-style (cygpath)
49702      input_path=`$CYGPATH -u "$shortmode_path"`
49703      new_path="$input_path"
49704    fi
49705  fi
49706
49707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49708  if test "x$test_cygdrive_prefix" = x; then
49709    # As a simple fix, exclude /usr/bin since it's not a real path.
49710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49712      # a path prefixed by /cygdrive for fixpath to work.
49713      new_path="$CYGWIN_ROOT_PATH$input_path"
49714    fi
49715  fi
49716
49717
49718  if test "x$path" != "x$new_path"; then
49719    MSVC_DLL="$new_path"
49720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49721$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49722  fi
49723
49724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49725
49726  path="$MSVC_DLL"
49727  has_colon=`$ECHO $path | $GREP ^.:`
49728  new_path="$path"
49729  if test "x$has_colon" = x; then
49730    # Not in mixed or Windows style, start by that.
49731    new_path=`cmd //c echo $path`
49732  fi
49733
49734
49735  input_path="$new_path"
49736  # Check if we need to convert this using DOS-style short mode. If the path
49737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49738  # take no chances and rewrite it.
49739  # Note: m4 eats our [], so we need to use [ and ] instead.
49740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49741  if test "x$has_forbidden_chars" != x; then
49742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49744  fi
49745
49746
49747  windows_path="$new_path"
49748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49749    unix_path=`$CYGPATH -u "$windows_path"`
49750    new_path="$unix_path"
49751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49753    new_path="$unix_path"
49754  fi
49755
49756  if test "x$path" != "x$new_path"; then
49757    MSVC_DLL="$new_path"
49758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49759$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49760  fi
49761
49762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49764
49765    else
49766      # We're on a unix platform. Hooray! :)
49767      path="$MSVC_DLL"
49768      has_space=`$ECHO "$path" | $GREP " "`
49769      if test "x$has_space" != x; then
49770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49771$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49773      fi
49774
49775      # Use eval to expand a potential ~
49776      eval path="$path"
49777      if test ! -f "$path" && test ! -d "$path"; then
49778        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49779      fi
49780
49781      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49782    fi
49783  fi
49784
49785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49786$as_echo_n "checking for $DLL_NAME... " >&6; }
49787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49788$as_echo "$MSVC_DLL" >&6; }
49789    else
49790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49791$as_echo "incorrect, ignoring" >&6; }
49792      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49793$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49794    fi
49795  fi
49796
49797    fi
49798  fi
49799
49800  if test "x$MSVC_DLL" = x; then
49801    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49802    # (This was the original behaviour; kept since it might turn something up)
49803    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49804      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49805        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49806	    | $GREP x64 | $HEAD --lines 1`
49807      else
49808        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49809	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49810        if test "x$POSSIBLE_MSVC_DLL" = x; then
49811          # We're grasping at straws now...
49812          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49813	      | $HEAD --lines 1`
49814        fi
49815      fi
49816
49817
49818  DLL_NAME="$DLL_NAME"
49819  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49820  METHOD="search of VCINSTALLDIR"
49821  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49823$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49824
49825    # Need to check if the found msvcr is correct architecture
49826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49827$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49828    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49830      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49831      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49833        CORRECT_MSVCR_ARCH="PE32 executable"
49834      else
49835        CORRECT_MSVCR_ARCH="PE32+ executable"
49836      fi
49837    else
49838      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49839        CORRECT_MSVCR_ARCH=386
49840      else
49841        CORRECT_MSVCR_ARCH=x86-64
49842      fi
49843    fi
49844    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49846$as_echo "ok" >&6; }
49847      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49848
49849  # Only process if variable expands to non-empty
49850
49851  if test "x$MSVC_DLL" != x; then
49852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49853
49854  # Input might be given as Windows format, start by converting to
49855  # unix format.
49856  path="$MSVC_DLL"
49857  new_path=`$CYGPATH -u "$path"`
49858
49859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49862  # "foo.exe" is OK but "foo" is an error.
49863  #
49864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49865  # It is also a way to make sure we got the proper file name for the real test later on.
49866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49867  if test "x$test_shortpath" = x; then
49868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49869$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49870    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49871  fi
49872
49873  # Call helper function which possibly converts this using DOS-style short mode.
49874  # If so, the updated path is stored in $new_path.
49875
49876  input_path="$new_path"
49877  # Check if we need to convert this using DOS-style short mode. If the path
49878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49879  # take no chances and rewrite it.
49880  # Note: m4 eats our [], so we need to use [ and ] instead.
49881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49882  if test "x$has_forbidden_chars" != x; then
49883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49887      # Going to short mode and back again did indeed matter. Since short mode is
49888      # case insensitive, let's make it lowercase to improve readability.
49889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49890      # Now convert it back to Unix-style (cygpath)
49891      input_path=`$CYGPATH -u "$shortmode_path"`
49892      new_path="$input_path"
49893    fi
49894  fi
49895
49896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49897  if test "x$test_cygdrive_prefix" = x; then
49898    # As a simple fix, exclude /usr/bin since it's not a real path.
49899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49901      # a path prefixed by /cygdrive for fixpath to work.
49902      new_path="$CYGWIN_ROOT_PATH$input_path"
49903    fi
49904  fi
49905
49906
49907  if test "x$path" != "x$new_path"; then
49908    MSVC_DLL="$new_path"
49909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49910$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49911  fi
49912
49913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49914
49915  path="$MSVC_DLL"
49916  has_colon=`$ECHO $path | $GREP ^.:`
49917  new_path="$path"
49918  if test "x$has_colon" = x; then
49919    # Not in mixed or Windows style, start by that.
49920    new_path=`cmd //c echo $path`
49921  fi
49922
49923
49924  input_path="$new_path"
49925  # Check if we need to convert this using DOS-style short mode. If the path
49926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49927  # take no chances and rewrite it.
49928  # Note: m4 eats our [], so we need to use [ and ] instead.
49929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49930  if test "x$has_forbidden_chars" != x; then
49931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49933  fi
49934
49935
49936  windows_path="$new_path"
49937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49938    unix_path=`$CYGPATH -u "$windows_path"`
49939    new_path="$unix_path"
49940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49942    new_path="$unix_path"
49943  fi
49944
49945  if test "x$path" != "x$new_path"; then
49946    MSVC_DLL="$new_path"
49947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49949  fi
49950
49951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49953
49954    else
49955      # We're on a unix platform. Hooray! :)
49956      path="$MSVC_DLL"
49957      has_space=`$ECHO "$path" | $GREP " "`
49958      if test "x$has_space" != x; then
49959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49960$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49962      fi
49963
49964      # Use eval to expand a potential ~
49965      eval path="$path"
49966      if test ! -f "$path" && test ! -d "$path"; then
49967        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49968      fi
49969
49970      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49971    fi
49972  fi
49973
49974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49975$as_echo_n "checking for $DLL_NAME... " >&6; }
49976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49977$as_echo "$MSVC_DLL" >&6; }
49978    else
49979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49980$as_echo "incorrect, ignoring" >&6; }
49981      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49982$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49983    fi
49984  fi
49985
49986    fi
49987  fi
49988
49989  if test "x$MSVC_DLL" = x; then
49990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49991$as_echo_n "checking for $DLL_NAME... " >&6; }
49992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49993$as_echo "no" >&6; }
49994    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49995  fi
49996
49997      MSVCP_DLL="$MSVC_DLL"
49998    fi
49999
50000  fi
50001
50002  fi
50003
50004
50005  if test "x$NEEDS_LIB_X11" = xfalse; then
50006    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50007      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50008$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50009    fi
50010    X_CFLAGS=
50011    X_LIBS=
50012  else
50013
50014    if test "x${with_x}" = xno; then
50015      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50016    fi
50017
50018    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50019      # The user has specified a X11 base directory. Use it for includes and
50020      # libraries, unless explicitely overridden.
50021      if test "x$x_includes" = xNONE; then
50022        x_includes="${with_x}/include"
50023      fi
50024      if test "x$x_libraries" = xNONE; then
50025        x_libraries="${with_x}/lib"
50026      fi
50027    else
50028      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50029      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50030      # --x-libraries for the sysroot, if that seems to be correct.
50031      if test "x$SYSROOT" != "x"; then
50032        if test "x$x_includes" = xNONE; then
50033          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50034            x_includes="$SYSROOT/usr/X11R6/include"
50035          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50036            x_includes="$SYSROOT/usr/include"
50037          fi
50038        fi
50039        if test "x$x_libraries" = xNONE; then
50040          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50041            x_libraries="$SYSROOT/usr/X11R6/lib"
50042          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50043            x_libraries="$SYSROOT/usr/lib64"
50044          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50045            x_libraries="$SYSROOT/usr/lib"
50046          fi
50047        fi
50048      fi
50049    fi
50050
50051    # Now let autoconf do it's magic
50052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50053$as_echo_n "checking for X... " >&6; }
50054
50055
50056# Check whether --with-x was given.
50057if test "${with_x+set}" = set; then :
50058  withval=$with_x;
50059fi
50060
50061# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50062if test "x$with_x" = xno; then
50063  # The user explicitly disabled X.
50064  have_x=disabled
50065else
50066  case $x_includes,$x_libraries in #(
50067    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50068    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50069  $as_echo_n "(cached) " >&6
50070else
50071  # One or both of the vars are not set, and there is no cached value.
50072ac_x_includes=no ac_x_libraries=no
50073rm -f -r conftest.dir
50074if mkdir conftest.dir; then
50075  cd conftest.dir
50076  cat >Imakefile <<'_ACEOF'
50077incroot:
50078	@echo incroot='${INCROOT}'
50079usrlibdir:
50080	@echo usrlibdir='${USRLIBDIR}'
50081libdir:
50082	@echo libdir='${LIBDIR}'
50083_ACEOF
50084  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50085    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50086    for ac_var in incroot usrlibdir libdir; do
50087      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50088    done
50089    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50090    for ac_extension in a so sl dylib la dll; do
50091      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50092	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50093	ac_im_usrlibdir=$ac_im_libdir; break
50094      fi
50095    done
50096    # Screen out bogus values from the imake configuration.  They are
50097    # bogus both because they are the default anyway, and because
50098    # using them would break gcc on systems where it needs fixed includes.
50099    case $ac_im_incroot in
50100	/usr/include) ac_x_includes= ;;
50101	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50102    esac
50103    case $ac_im_usrlibdir in
50104	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50105	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50106    esac
50107  fi
50108  cd ..
50109  rm -f -r conftest.dir
50110fi
50111
50112# Standard set of common directories for X headers.
50113# Check X11 before X11Rn because it is often a symlink to the current release.
50114ac_x_header_dirs='
50115/usr/X11/include
50116/usr/X11R7/include
50117/usr/X11R6/include
50118/usr/X11R5/include
50119/usr/X11R4/include
50120
50121/usr/include/X11
50122/usr/include/X11R7
50123/usr/include/X11R6
50124/usr/include/X11R5
50125/usr/include/X11R4
50126
50127/usr/local/X11/include
50128/usr/local/X11R7/include
50129/usr/local/X11R6/include
50130/usr/local/X11R5/include
50131/usr/local/X11R4/include
50132
50133/usr/local/include/X11
50134/usr/local/include/X11R7
50135/usr/local/include/X11R6
50136/usr/local/include/X11R5
50137/usr/local/include/X11R4
50138
50139/usr/X386/include
50140/usr/x386/include
50141/usr/XFree86/include/X11
50142
50143/usr/include
50144/usr/local/include
50145/usr/unsupported/include
50146/usr/athena/include
50147/usr/local/x11r5/include
50148/usr/lpp/Xamples/include
50149
50150/usr/openwin/include
50151/usr/openwin/share/include'
50152
50153if test "$ac_x_includes" = no; then
50154  # Guess where to find include files, by looking for Xlib.h.
50155  # First, try using that file with no special directory specified.
50156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50157/* end confdefs.h.  */
50158#include <X11/Xlib.h>
50159_ACEOF
50160if ac_fn_cxx_try_cpp "$LINENO"; then :
50161  # We can compile using X headers with no special include directory.
50162ac_x_includes=
50163else
50164  for ac_dir in $ac_x_header_dirs; do
50165  if test -r "$ac_dir/X11/Xlib.h"; then
50166    ac_x_includes=$ac_dir
50167    break
50168  fi
50169done
50170fi
50171rm -f conftest.err conftest.i conftest.$ac_ext
50172fi # $ac_x_includes = no
50173
50174if test "$ac_x_libraries" = no; then
50175  # Check for the libraries.
50176  # See if we find them without any special options.
50177  # Don't add to $LIBS permanently.
50178  ac_save_LIBS=$LIBS
50179  LIBS="-lX11 $LIBS"
50180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50181/* end confdefs.h.  */
50182#include <X11/Xlib.h>
50183int
50184main ()
50185{
50186XrmInitialize ()
50187  ;
50188  return 0;
50189}
50190_ACEOF
50191if ac_fn_cxx_try_link "$LINENO"; then :
50192  LIBS=$ac_save_LIBS
50193# We can link X programs with no special library path.
50194ac_x_libraries=
50195else
50196  LIBS=$ac_save_LIBS
50197for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50198do
50199  # Don't even attempt the hair of trying to link an X program!
50200  for ac_extension in a so sl dylib la dll; do
50201    if test -r "$ac_dir/libX11.$ac_extension"; then
50202      ac_x_libraries=$ac_dir
50203      break 2
50204    fi
50205  done
50206done
50207fi
50208rm -f core conftest.err conftest.$ac_objext \
50209    conftest$ac_exeext conftest.$ac_ext
50210fi # $ac_x_libraries = no
50211
50212case $ac_x_includes,$ac_x_libraries in #(
50213  no,* | *,no | *\'*)
50214    # Didn't find X, or a directory has "'" in its name.
50215    ac_cv_have_x="have_x=no";; #(
50216  *)
50217    # Record where we found X for the cache.
50218    ac_cv_have_x="have_x=yes\
50219	ac_x_includes='$ac_x_includes'\
50220	ac_x_libraries='$ac_x_libraries'"
50221esac
50222fi
50223;; #(
50224    *) have_x=yes;;
50225  esac
50226  eval "$ac_cv_have_x"
50227fi # $with_x != no
50228
50229if test "$have_x" != yes; then
50230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50231$as_echo "$have_x" >&6; }
50232  no_x=yes
50233else
50234  # If each of the values was on the command line, it overrides each guess.
50235  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50236  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50237  # Update the cache value to reflect the command line values.
50238  ac_cv_have_x="have_x=yes\
50239	ac_x_includes='$x_includes'\
50240	ac_x_libraries='$x_libraries'"
50241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50242$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50243fi
50244
50245    if test "$no_x" = yes; then
50246  # Not all programs may use this symbol, but it does not hurt to define it.
50247
50248$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50249
50250  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50251else
50252  if test -n "$x_includes"; then
50253    X_CFLAGS="$X_CFLAGS -I$x_includes"
50254  fi
50255
50256  # It would also be nice to do this for all -L options, not just this one.
50257  if test -n "$x_libraries"; then
50258    X_LIBS="$X_LIBS -L$x_libraries"
50259    # For Solaris; some versions of Sun CC require a space after -R and
50260    # others require no space.  Words are not sufficient . . . .
50261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50262$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50263    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50264    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50265    ac_cxx_werror_flag=yes
50266    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50267/* end confdefs.h.  */
50268
50269int
50270main ()
50271{
50272
50273  ;
50274  return 0;
50275}
50276_ACEOF
50277if ac_fn_cxx_try_link "$LINENO"; then :
50278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50279$as_echo "no" >&6; }
50280       X_LIBS="$X_LIBS -R$x_libraries"
50281else
50282  LIBS="$ac_xsave_LIBS -R $x_libraries"
50283       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50284/* end confdefs.h.  */
50285
50286int
50287main ()
50288{
50289
50290  ;
50291  return 0;
50292}
50293_ACEOF
50294if ac_fn_cxx_try_link "$LINENO"; then :
50295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50296$as_echo "yes" >&6; }
50297	  X_LIBS="$X_LIBS -R $x_libraries"
50298else
50299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50300$as_echo "neither works" >&6; }
50301fi
50302rm -f core conftest.err conftest.$ac_objext \
50303    conftest$ac_exeext conftest.$ac_ext
50304fi
50305rm -f core conftest.err conftest.$ac_objext \
50306    conftest$ac_exeext conftest.$ac_ext
50307    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50308    LIBS=$ac_xsave_LIBS
50309  fi
50310
50311  # Check for system-dependent libraries X programs must link with.
50312  # Do this before checking for the system-independent R6 libraries
50313  # (-lICE), since we may need -lsocket or whatever for X linking.
50314
50315  if test "$ISC" = yes; then
50316    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50317  else
50318    # Martyn Johnson says this is needed for Ultrix, if the X
50319    # libraries were built with DECnet support.  And Karl Berry says
50320    # the Alpha needs dnet_stub (dnet does not exist).
50321    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50323/* end confdefs.h.  */
50324
50325/* Override any GCC internal prototype to avoid an error.
50326   Use char because int might match the return type of a GCC
50327   builtin and then its argument prototype would still apply.  */
50328#ifdef __cplusplus
50329extern "C"
50330#endif
50331char XOpenDisplay ();
50332int
50333main ()
50334{
50335return XOpenDisplay ();
50336  ;
50337  return 0;
50338}
50339_ACEOF
50340if ac_fn_cxx_try_link "$LINENO"; then :
50341
50342else
50343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50344$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50345if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50346  $as_echo_n "(cached) " >&6
50347else
50348  ac_check_lib_save_LIBS=$LIBS
50349LIBS="-ldnet  $LIBS"
50350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50351/* end confdefs.h.  */
50352
50353/* Override any GCC internal prototype to avoid an error.
50354   Use char because int might match the return type of a GCC
50355   builtin and then its argument prototype would still apply.  */
50356#ifdef __cplusplus
50357extern "C"
50358#endif
50359char dnet_ntoa ();
50360int
50361main ()
50362{
50363return dnet_ntoa ();
50364  ;
50365  return 0;
50366}
50367_ACEOF
50368if ac_fn_cxx_try_link "$LINENO"; then :
50369  ac_cv_lib_dnet_dnet_ntoa=yes
50370else
50371  ac_cv_lib_dnet_dnet_ntoa=no
50372fi
50373rm -f core conftest.err conftest.$ac_objext \
50374    conftest$ac_exeext conftest.$ac_ext
50375LIBS=$ac_check_lib_save_LIBS
50376fi
50377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50378$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50379if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50380  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50381fi
50382
50383    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50385$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50386if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50387  $as_echo_n "(cached) " >&6
50388else
50389  ac_check_lib_save_LIBS=$LIBS
50390LIBS="-ldnet_stub  $LIBS"
50391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50392/* end confdefs.h.  */
50393
50394/* Override any GCC internal prototype to avoid an error.
50395   Use char because int might match the return type of a GCC
50396   builtin and then its argument prototype would still apply.  */
50397#ifdef __cplusplus
50398extern "C"
50399#endif
50400char dnet_ntoa ();
50401int
50402main ()
50403{
50404return dnet_ntoa ();
50405  ;
50406  return 0;
50407}
50408_ACEOF
50409if ac_fn_cxx_try_link "$LINENO"; then :
50410  ac_cv_lib_dnet_stub_dnet_ntoa=yes
50411else
50412  ac_cv_lib_dnet_stub_dnet_ntoa=no
50413fi
50414rm -f core conftest.err conftest.$ac_objext \
50415    conftest$ac_exeext conftest.$ac_ext
50416LIBS=$ac_check_lib_save_LIBS
50417fi
50418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50419$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50420if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50421  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50422fi
50423
50424    fi
50425fi
50426rm -f core conftest.err conftest.$ac_objext \
50427    conftest$ac_exeext conftest.$ac_ext
50428    LIBS="$ac_xsave_LIBS"
50429
50430    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50431    # to get the SysV transport functions.
50432    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50433    # needs -lnsl.
50434    # The nsl library prevents programs from opening the X display
50435    # on Irix 5.2, according to T.E. Dickey.
50436    # The functions gethostbyname, getservbyname, and inet_addr are
50437    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50438    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50439if test "x$ac_cv_func_gethostbyname" = xyes; then :
50440
50441fi
50442
50443    if test $ac_cv_func_gethostbyname = no; then
50444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50445$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50446if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50447  $as_echo_n "(cached) " >&6
50448else
50449  ac_check_lib_save_LIBS=$LIBS
50450LIBS="-lnsl  $LIBS"
50451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50452/* end confdefs.h.  */
50453
50454/* Override any GCC internal prototype to avoid an error.
50455   Use char because int might match the return type of a GCC
50456   builtin and then its argument prototype would still apply.  */
50457#ifdef __cplusplus
50458extern "C"
50459#endif
50460char gethostbyname ();
50461int
50462main ()
50463{
50464return gethostbyname ();
50465  ;
50466  return 0;
50467}
50468_ACEOF
50469if ac_fn_cxx_try_link "$LINENO"; then :
50470  ac_cv_lib_nsl_gethostbyname=yes
50471else
50472  ac_cv_lib_nsl_gethostbyname=no
50473fi
50474rm -f core conftest.err conftest.$ac_objext \
50475    conftest$ac_exeext conftest.$ac_ext
50476LIBS=$ac_check_lib_save_LIBS
50477fi
50478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50479$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50480if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50481  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50482fi
50483
50484      if test $ac_cv_lib_nsl_gethostbyname = no; then
50485	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50486$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50487if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50488  $as_echo_n "(cached) " >&6
50489else
50490  ac_check_lib_save_LIBS=$LIBS
50491LIBS="-lbsd  $LIBS"
50492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50493/* end confdefs.h.  */
50494
50495/* Override any GCC internal prototype to avoid an error.
50496   Use char because int might match the return type of a GCC
50497   builtin and then its argument prototype would still apply.  */
50498#ifdef __cplusplus
50499extern "C"
50500#endif
50501char gethostbyname ();
50502int
50503main ()
50504{
50505return gethostbyname ();
50506  ;
50507  return 0;
50508}
50509_ACEOF
50510if ac_fn_cxx_try_link "$LINENO"; then :
50511  ac_cv_lib_bsd_gethostbyname=yes
50512else
50513  ac_cv_lib_bsd_gethostbyname=no
50514fi
50515rm -f core conftest.err conftest.$ac_objext \
50516    conftest$ac_exeext conftest.$ac_ext
50517LIBS=$ac_check_lib_save_LIBS
50518fi
50519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50520$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50521if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50522  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
50523fi
50524
50525      fi
50526    fi
50527
50528    # lieder@skyler.mavd.honeywell.com says without -lsocket,
50529    # socket/setsockopt and other routines are undefined under SCO ODT
50530    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
50531    # on later versions), says Simon Leinen: it contains gethostby*
50532    # variants that don't use the name server (or something).  -lsocket
50533    # must be given before -lnsl if both are needed.  We assume that
50534    # if connect needs -lnsl, so does gethostbyname.
50535    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
50536if test "x$ac_cv_func_connect" = xyes; then :
50537
50538fi
50539
50540    if test $ac_cv_func_connect = no; then
50541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
50542$as_echo_n "checking for connect in -lsocket... " >&6; }
50543if ${ac_cv_lib_socket_connect+:} false; then :
50544  $as_echo_n "(cached) " >&6
50545else
50546  ac_check_lib_save_LIBS=$LIBS
50547LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
50548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50549/* end confdefs.h.  */
50550
50551/* Override any GCC internal prototype to avoid an error.
50552   Use char because int might match the return type of a GCC
50553   builtin and then its argument prototype would still apply.  */
50554#ifdef __cplusplus
50555extern "C"
50556#endif
50557char connect ();
50558int
50559main ()
50560{
50561return connect ();
50562  ;
50563  return 0;
50564}
50565_ACEOF
50566if ac_fn_cxx_try_link "$LINENO"; then :
50567  ac_cv_lib_socket_connect=yes
50568else
50569  ac_cv_lib_socket_connect=no
50570fi
50571rm -f core conftest.err conftest.$ac_objext \
50572    conftest$ac_exeext conftest.$ac_ext
50573LIBS=$ac_check_lib_save_LIBS
50574fi
50575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
50576$as_echo "$ac_cv_lib_socket_connect" >&6; }
50577if test "x$ac_cv_lib_socket_connect" = xyes; then :
50578  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
50579fi
50580
50581    fi
50582
50583    # Guillermo Gomez says -lposix is necessary on A/UX.
50584    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
50585if test "x$ac_cv_func_remove" = xyes; then :
50586
50587fi
50588
50589    if test $ac_cv_func_remove = no; then
50590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
50591$as_echo_n "checking for remove in -lposix... " >&6; }
50592if ${ac_cv_lib_posix_remove+:} false; then :
50593  $as_echo_n "(cached) " >&6
50594else
50595  ac_check_lib_save_LIBS=$LIBS
50596LIBS="-lposix  $LIBS"
50597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50598/* end confdefs.h.  */
50599
50600/* Override any GCC internal prototype to avoid an error.
50601   Use char because int might match the return type of a GCC
50602   builtin and then its argument prototype would still apply.  */
50603#ifdef __cplusplus
50604extern "C"
50605#endif
50606char remove ();
50607int
50608main ()
50609{
50610return remove ();
50611  ;
50612  return 0;
50613}
50614_ACEOF
50615if ac_fn_cxx_try_link "$LINENO"; then :
50616  ac_cv_lib_posix_remove=yes
50617else
50618  ac_cv_lib_posix_remove=no
50619fi
50620rm -f core conftest.err conftest.$ac_objext \
50621    conftest$ac_exeext conftest.$ac_ext
50622LIBS=$ac_check_lib_save_LIBS
50623fi
50624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
50625$as_echo "$ac_cv_lib_posix_remove" >&6; }
50626if test "x$ac_cv_lib_posix_remove" = xyes; then :
50627  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
50628fi
50629
50630    fi
50631
50632    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
50633    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
50634if test "x$ac_cv_func_shmat" = xyes; then :
50635
50636fi
50637
50638    if test $ac_cv_func_shmat = no; then
50639      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
50640$as_echo_n "checking for shmat in -lipc... " >&6; }
50641if ${ac_cv_lib_ipc_shmat+:} false; then :
50642  $as_echo_n "(cached) " >&6
50643else
50644  ac_check_lib_save_LIBS=$LIBS
50645LIBS="-lipc  $LIBS"
50646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50647/* end confdefs.h.  */
50648
50649/* Override any GCC internal prototype to avoid an error.
50650   Use char because int might match the return type of a GCC
50651   builtin and then its argument prototype would still apply.  */
50652#ifdef __cplusplus
50653extern "C"
50654#endif
50655char shmat ();
50656int
50657main ()
50658{
50659return shmat ();
50660  ;
50661  return 0;
50662}
50663_ACEOF
50664if ac_fn_cxx_try_link "$LINENO"; then :
50665  ac_cv_lib_ipc_shmat=yes
50666else
50667  ac_cv_lib_ipc_shmat=no
50668fi
50669rm -f core conftest.err conftest.$ac_objext \
50670    conftest$ac_exeext conftest.$ac_ext
50671LIBS=$ac_check_lib_save_LIBS
50672fi
50673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
50674$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
50675if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
50676  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
50677fi
50678
50679    fi
50680  fi
50681
50682  # Check for libraries that X11R6 Xt/Xaw programs need.
50683  ac_save_LDFLAGS=$LDFLAGS
50684  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
50685  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
50686  # check for ICE first), but we must link in the order -lSM -lICE or
50687  # we get undefined symbols.  So assume we have SM if we have ICE.
50688  # These have to be linked with before -lX11, unlike the other
50689  # libraries we check for below, so use a different variable.
50690  # John Interrante, Karl Berry
50691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
50692$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
50693if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
50694  $as_echo_n "(cached) " >&6
50695else
50696  ac_check_lib_save_LIBS=$LIBS
50697LIBS="-lICE $X_EXTRA_LIBS $LIBS"
50698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50699/* end confdefs.h.  */
50700
50701/* Override any GCC internal prototype to avoid an error.
50702   Use char because int might match the return type of a GCC
50703   builtin and then its argument prototype would still apply.  */
50704#ifdef __cplusplus
50705extern "C"
50706#endif
50707char IceConnectionNumber ();
50708int
50709main ()
50710{
50711return IceConnectionNumber ();
50712  ;
50713  return 0;
50714}
50715_ACEOF
50716if ac_fn_cxx_try_link "$LINENO"; then :
50717  ac_cv_lib_ICE_IceConnectionNumber=yes
50718else
50719  ac_cv_lib_ICE_IceConnectionNumber=no
50720fi
50721rm -f core conftest.err conftest.$ac_objext \
50722    conftest$ac_exeext conftest.$ac_ext
50723LIBS=$ac_check_lib_save_LIBS
50724fi
50725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
50726$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
50727if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
50728  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
50729fi
50730
50731  LDFLAGS=$ac_save_LDFLAGS
50732
50733fi
50734
50735
50736    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
50737    # this doesn't make sense so we remove it.
50738    if test "x$COMPILE_TYPE" = xcross; then
50739      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
50740    fi
50741
50742    if test "x$no_x" = xyes; then
50743
50744  # Print a helpful message on how to acquire the necessary build dependency.
50745  # x11 is the help tag: freetype, cups, alsa etc
50746  MISSING_DEPENDENCY=x11
50747
50748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50749    cygwin_help $MISSING_DEPENDENCY
50750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50751    msys_help $MISSING_DEPENDENCY
50752  else
50753    PKGHANDLER_COMMAND=
50754
50755    case $PKGHANDLER in
50756      apt-get)
50757        apt_help     $MISSING_DEPENDENCY ;;
50758      yum)
50759        yum_help     $MISSING_DEPENDENCY ;;
50760      port)
50761        port_help    $MISSING_DEPENDENCY ;;
50762      pkgutil)
50763        pkgutil_help $MISSING_DEPENDENCY ;;
50764      pkgadd)
50765        pkgadd_help  $MISSING_DEPENDENCY ;;
50766    esac
50767
50768    if test "x$PKGHANDLER_COMMAND" != x; then
50769      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50770    fi
50771  fi
50772
50773      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
50774    fi
50775
50776    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50777      OPENWIN_HOME="/usr/openwin"
50778      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
50779      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50780          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
50781          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50782          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
50783    fi
50784
50785    ac_ext=c
50786ac_cpp='$CPP $CPPFLAGS'
50787ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50788ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50789ac_compiler_gnu=$ac_cv_c_compiler_gnu
50790
50791    OLD_CFLAGS="$CFLAGS"
50792    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
50793
50794    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
50795    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
50796do :
50797  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50798ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
50799          # include <X11/Xlib.h>
50800          # include <X11/Xutil.h>
50801
50802
50803"
50804if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50805  cat >>confdefs.h <<_ACEOF
50806#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50807_ACEOF
50808 X11_HEADERS_OK=yes
50809else
50810  X11_HEADERS_OK=no; break
50811fi
50812
50813done
50814
50815
50816    if test "x$X11_HEADERS_OK" = xno; then
50817
50818  # Print a helpful message on how to acquire the necessary build dependency.
50819  # x11 is the help tag: freetype, cups, alsa etc
50820  MISSING_DEPENDENCY=x11
50821
50822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50823    cygwin_help $MISSING_DEPENDENCY
50824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50825    msys_help $MISSING_DEPENDENCY
50826  else
50827    PKGHANDLER_COMMAND=
50828
50829    case $PKGHANDLER in
50830      apt-get)
50831        apt_help     $MISSING_DEPENDENCY ;;
50832      yum)
50833        yum_help     $MISSING_DEPENDENCY ;;
50834      port)
50835        port_help    $MISSING_DEPENDENCY ;;
50836      pkgutil)
50837        pkgutil_help $MISSING_DEPENDENCY ;;
50838      pkgadd)
50839        pkgadd_help  $MISSING_DEPENDENCY ;;
50840    esac
50841
50842    if test "x$PKGHANDLER_COMMAND" != x; then
50843      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50844    fi
50845  fi
50846
50847      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
50848    fi
50849
50850    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
50851    # defined in libawt_xawt.
50852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
50853$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
50854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50855/* end confdefs.h.  */
50856#include <X11/extensions/Xrender.h>
50857int
50858main ()
50859{
50860XLinearGradient x;
50861  ;
50862  return 0;
50863}
50864_ACEOF
50865if ac_fn_c_try_compile "$LINENO"; then :
50866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50867$as_echo "yes" >&6; }
50868else
50869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50870$as_echo "no" >&6; }
50871         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
50872fi
50873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50874
50875    CFLAGS="$OLD_CFLAGS"
50876    ac_ext=cpp
50877ac_cpp='$CXXCPP $CPPFLAGS'
50878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50881
50882  fi # NEEDS_LIB_X11
50883
50884
50885
50886
50887
50888
50889# Check whether --with-cups was given.
50890if test "${with_cups+set}" = set; then :
50891  withval=$with_cups;
50892fi
50893
50894
50895# Check whether --with-cups-include was given.
50896if test "${with_cups_include+set}" = set; then :
50897  withval=$with_cups_include;
50898fi
50899
50900
50901  if test "x$NEEDS_LIB_CUPS" = xfalse; then
50902    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
50903        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
50904      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
50905$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
50906    fi
50907    CUPS_CFLAGS=
50908  else
50909    CUPS_FOUND=no
50910
50911    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
50912      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
50913    fi
50914
50915    if test "x${with_cups}" != x; then
50916      CUPS_CFLAGS="-I${with_cups}/include"
50917      CUPS_FOUND=yes
50918    fi
50919    if test "x${with_cups_include}" != x; then
50920      CUPS_CFLAGS="-I${with_cups_include}"
50921      CUPS_FOUND=yes
50922    fi
50923    if test "x$CUPS_FOUND" = xno; then
50924      # Are the cups headers installed in the default /usr/include location?
50925      for ac_header in cups/cups.h cups/ppd.h
50926do :
50927  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50928ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
50929if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50930  cat >>confdefs.h <<_ACEOF
50931#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50932_ACEOF
50933
50934          CUPS_FOUND=yes
50935          CUPS_CFLAGS=
50936          DEFAULT_CUPS=yes
50937
50938fi
50939
50940done
50941
50942    fi
50943    if test "x$CUPS_FOUND" = xno; then
50944      # Getting nervous now? Lets poke around for standard Solaris third-party
50945      # package installation locations.
50946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
50947$as_echo_n "checking for cups headers... " >&6; }
50948      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
50949        # An SFW package seems to be installed!
50950        CUPS_FOUND=yes
50951        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
50952      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
50953        # A CSW package seems to be installed!
50954        CUPS_FOUND=yes
50955        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
50956      fi
50957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
50958$as_echo "$CUPS_FOUND" >&6; }
50959    fi
50960    if test "x$CUPS_FOUND" = xno; then
50961
50962  # Print a helpful message on how to acquire the necessary build dependency.
50963  # cups is the help tag: freetype, cups, alsa etc
50964  MISSING_DEPENDENCY=cups
50965
50966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50967    cygwin_help $MISSING_DEPENDENCY
50968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50969    msys_help $MISSING_DEPENDENCY
50970  else
50971    PKGHANDLER_COMMAND=
50972
50973    case $PKGHANDLER in
50974      apt-get)
50975        apt_help     $MISSING_DEPENDENCY ;;
50976      yum)
50977        yum_help     $MISSING_DEPENDENCY ;;
50978      port)
50979        port_help    $MISSING_DEPENDENCY ;;
50980      pkgutil)
50981        pkgutil_help $MISSING_DEPENDENCY ;;
50982      pkgadd)
50983        pkgadd_help  $MISSING_DEPENDENCY ;;
50984    esac
50985
50986    if test "x$PKGHANDLER_COMMAND" != x; then
50987      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50988    fi
50989  fi
50990
50991      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
50992    fi
50993  fi
50994
50995
50996
50997
50998
50999# Check whether --with-freetype was given.
51000if test "${with_freetype+set}" = set; then :
51001  withval=$with_freetype;
51002fi
51003
51004
51005# Check whether --with-freetype-include was given.
51006if test "${with_freetype_include+set}" = set; then :
51007  withval=$with_freetype_include;
51008fi
51009
51010
51011# Check whether --with-freetype-lib was given.
51012if test "${with_freetype_lib+set}" = set; then :
51013  withval=$with_freetype_lib;
51014fi
51015
51016
51017# Check whether --with-freetype-src was given.
51018if test "${with_freetype_src+set}" = set; then :
51019  withval=$with_freetype_src;
51020fi
51021
51022  # Check whether --enable-freetype-bundling was given.
51023if test "${enable_freetype_bundling+set}" = set; then :
51024  enableval=$enable_freetype_bundling;
51025fi
51026
51027
51028  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51029  FREETYPE_BASE_NAME=freetype
51030  FREETYPE_CFLAGS=
51031  FREETYPE_LIBS=
51032  FREETYPE_BUNDLE_LIB_PATH=
51033
51034  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51035    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51036        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51037        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51038        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51039      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51040$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51041    fi
51042    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51043      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51044$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51045    fi
51046  else
51047    # freetype is needed to build; go get it!
51048
51049    BUNDLE_FREETYPE="$enable_freetype_bundling"
51050
51051    if  test "x$with_freetype_src" != x; then
51052      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51053        # Try to build freetype if --with-freetype-src was given on Windows
51054
51055  FREETYPE_SRC_PATH="$with_freetype_src"
51056  BUILD_FREETYPE=yes
51057
51058  # Check if the freetype sources are acessible..
51059  if ! test -d $FREETYPE_SRC_PATH; then
51060    { $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
51061$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51062    BUILD_FREETYPE=no
51063  fi
51064  # ..and contain a vc2010 project file
51065  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51066  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51067    { $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
51068$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51069    BUILD_FREETYPE=no
51070  fi
51071  # Now check if configure found a version of 'msbuild.exe'
51072  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51073    { $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
51074$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;}
51075    BUILD_FREETYPE=no
51076  fi
51077
51078  # Ready to go..
51079  if test "x$BUILD_FREETYPE" = xyes; then
51080    # msbuild requires trailing slashes for output directories
51081    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51082    freetype_lib_path_unix="$freetype_lib_path"
51083    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51084
51085  unix_path="$vcxproj_path"
51086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51087    windows_path=`$CYGPATH -m "$unix_path"`
51088    vcxproj_path="$windows_path"
51089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51090    windows_path=`cmd //c echo $unix_path`
51091    vcxproj_path="$windows_path"
51092  fi
51093
51094
51095  unix_path="$freetype_lib_path"
51096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51097    windows_path=`$CYGPATH -m "$unix_path"`
51098    freetype_lib_path="$windows_path"
51099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51100    windows_path=`cmd //c echo $unix_path`
51101    freetype_lib_path="$windows_path"
51102  fi
51103
51104
51105  unix_path="$freetype_obj_path"
51106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51107    windows_path=`$CYGPATH -m "$unix_path"`
51108    freetype_obj_path="$windows_path"
51109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51110    windows_path=`cmd //c echo $unix_path`
51111    freetype_obj_path="$windows_path"
51112  fi
51113
51114    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51115      freetype_platform=x64
51116    else
51117      freetype_platform=win32
51118    fi
51119
51120    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51121    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51122    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51123    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51124    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51125$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51126
51127    # First we try to build the freetype.dll
51128    $ECHO -e "@echo off\n"\
51129        "$MSBUILD $vcxproj_path "\
51130        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51131        "/p:Configuration=\"Release Multithreaded\" "\
51132        "/p:Platform=$freetype_platform "\
51133        "/p:ConfigurationType=DynamicLibrary "\
51134        "/p:TargetName=freetype "\
51135        "/p:OutDir=\"$freetype_lib_path\" "\
51136        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51137    cmd /c freetype.bat
51138
51139    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51140      # If that succeeds we also build freetype.lib
51141      $ECHO -e "@echo off\n"\
51142          "$MSBUILD $vcxproj_path "\
51143          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51144          "/p:Configuration=\"Release Multithreaded\" "\
51145          "/p:Platform=$freetype_platform "\
51146          "/p:ConfigurationType=StaticLibrary "\
51147          "/p:TargetName=freetype "\
51148          "/p:OutDir=\"$freetype_lib_path\" "\
51149          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51150      cmd /c freetype.bat
51151
51152      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51153        # Once we build both, lib and dll, set freetype lib and include path appropriately
51154        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51155        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51156        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51157$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51158      else
51159        BUILD_FREETYPE=no
51160      fi
51161    else
51162      BUILD_FREETYPE=no
51163    fi
51164  fi
51165
51166        if test "x$BUILD_FREETYPE" = xyes; then
51167          # Okay, we built it. Check that it works.
51168
51169  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51170  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51171  METHOD="--with-freetype-src"
51172
51173  # Let's start with an optimistic view of the world :-)
51174  FOUND_FREETYPE=yes
51175
51176  # First look for the canonical freetype main include file ft2build.h.
51177  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51178    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51179    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51180    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51181      # Fail.
51182      FOUND_FREETYPE=no
51183    fi
51184  fi
51185
51186  if test "x$FOUND_FREETYPE" = xyes; then
51187    # Include file found, let's continue the sanity check.
51188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51189$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51190
51191    # Reset to default value
51192    FREETYPE_BASE_NAME=freetype
51193    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51194    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51195      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51196          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51197        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51198        # for the .6 version explicitly.
51199        FREETYPE_BASE_NAME=freetype.6
51200        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51201        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51202$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51203      else
51204        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51205$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51206        FOUND_FREETYPE=no
51207      fi
51208    else
51209      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51210        # On Windows, we will need both .lib and .dll file.
51211        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51212          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51213$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51214          FOUND_FREETYPE=no
51215        fi
51216      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51217          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51218        # Found lib in isa dir, use that instead.
51219        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51220        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51221$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51222      fi
51223    fi
51224  fi
51225
51226  if test "x$FOUND_FREETYPE" = xyes; then
51227
51228  # Only process if variable expands to non-empty
51229
51230  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51232
51233  # Input might be given as Windows format, start by converting to
51234  # unix format.
51235  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51236  new_path=`$CYGPATH -u "$path"`
51237
51238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51241  # "foo.exe" is OK but "foo" is an error.
51242  #
51243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51244  # It is also a way to make sure we got the proper file name for the real test later on.
51245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51246  if test "x$test_shortpath" = x; then
51247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51248$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51249    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51250  fi
51251
51252  # Call helper function which possibly converts this using DOS-style short mode.
51253  # If so, the updated path is stored in $new_path.
51254
51255  input_path="$new_path"
51256  # Check if we need to convert this using DOS-style short mode. If the path
51257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51258  # take no chances and rewrite it.
51259  # Note: m4 eats our [], so we need to use [ and ] instead.
51260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51261  if test "x$has_forbidden_chars" != x; then
51262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51266      # Going to short mode and back again did indeed matter. Since short mode is
51267      # case insensitive, let's make it lowercase to improve readability.
51268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51269      # Now convert it back to Unix-style (cygpath)
51270      input_path=`$CYGPATH -u "$shortmode_path"`
51271      new_path="$input_path"
51272    fi
51273  fi
51274
51275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51276  if test "x$test_cygdrive_prefix" = x; then
51277    # As a simple fix, exclude /usr/bin since it's not a real path.
51278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51280      # a path prefixed by /cygdrive for fixpath to work.
51281      new_path="$CYGWIN_ROOT_PATH$input_path"
51282    fi
51283  fi
51284
51285
51286  if test "x$path" != "x$new_path"; then
51287    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51289$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51290  fi
51291
51292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51293
51294  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51295  has_colon=`$ECHO $path | $GREP ^.:`
51296  new_path="$path"
51297  if test "x$has_colon" = x; then
51298    # Not in mixed or Windows style, start by that.
51299    new_path=`cmd //c echo $path`
51300  fi
51301
51302
51303  input_path="$new_path"
51304  # Check if we need to convert this using DOS-style short mode. If the path
51305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51306  # take no chances and rewrite it.
51307  # Note: m4 eats our [], so we need to use [ and ] instead.
51308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51309  if test "x$has_forbidden_chars" != x; then
51310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51312  fi
51313
51314
51315  windows_path="$new_path"
51316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51317    unix_path=`$CYGPATH -u "$windows_path"`
51318    new_path="$unix_path"
51319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51321    new_path="$unix_path"
51322  fi
51323
51324  if test "x$path" != "x$new_path"; then
51325    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51327$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51328  fi
51329
51330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51332
51333    else
51334      # We're on a unix platform. Hooray! :)
51335      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51336      has_space=`$ECHO "$path" | $GREP " "`
51337      if test "x$has_space" != x; then
51338        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51339$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51340        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51341      fi
51342
51343      # Use eval to expand a potential ~
51344      eval path="$path"
51345      if test ! -f "$path" && test ! -d "$path"; then
51346        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51347      fi
51348
51349      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51350    fi
51351  fi
51352
51353
51354  # Only process if variable expands to non-empty
51355
51356  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51358
51359  # Input might be given as Windows format, start by converting to
51360  # unix format.
51361  path="$POTENTIAL_FREETYPE_LIB_PATH"
51362  new_path=`$CYGPATH -u "$path"`
51363
51364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51367  # "foo.exe" is OK but "foo" is an error.
51368  #
51369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51370  # It is also a way to make sure we got the proper file name for the real test later on.
51371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51372  if test "x$test_shortpath" = x; then
51373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51376  fi
51377
51378  # Call helper function which possibly converts this using DOS-style short mode.
51379  # If so, the updated path is stored in $new_path.
51380
51381  input_path="$new_path"
51382  # Check if we need to convert this using DOS-style short mode. If the path
51383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51384  # take no chances and rewrite it.
51385  # Note: m4 eats our [], so we need to use [ and ] instead.
51386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51387  if test "x$has_forbidden_chars" != x; then
51388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51392      # Going to short mode and back again did indeed matter. Since short mode is
51393      # case insensitive, let's make it lowercase to improve readability.
51394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51395      # Now convert it back to Unix-style (cygpath)
51396      input_path=`$CYGPATH -u "$shortmode_path"`
51397      new_path="$input_path"
51398    fi
51399  fi
51400
51401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51402  if test "x$test_cygdrive_prefix" = x; then
51403    # As a simple fix, exclude /usr/bin since it's not a real path.
51404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51406      # a path prefixed by /cygdrive for fixpath to work.
51407      new_path="$CYGWIN_ROOT_PATH$input_path"
51408    fi
51409  fi
51410
51411
51412  if test "x$path" != "x$new_path"; then
51413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51416  fi
51417
51418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51419
51420  path="$POTENTIAL_FREETYPE_LIB_PATH"
51421  has_colon=`$ECHO $path | $GREP ^.:`
51422  new_path="$path"
51423  if test "x$has_colon" = x; then
51424    # Not in mixed or Windows style, start by that.
51425    new_path=`cmd //c echo $path`
51426  fi
51427
51428
51429  input_path="$new_path"
51430  # Check if we need to convert this using DOS-style short mode. If the path
51431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51432  # take no chances and rewrite it.
51433  # Note: m4 eats our [], so we need to use [ and ] instead.
51434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51435  if test "x$has_forbidden_chars" != x; then
51436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51438  fi
51439
51440
51441  windows_path="$new_path"
51442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51443    unix_path=`$CYGPATH -u "$windows_path"`
51444    new_path="$unix_path"
51445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51447    new_path="$unix_path"
51448  fi
51449
51450  if test "x$path" != "x$new_path"; then
51451    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51454  fi
51455
51456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51458
51459    else
51460      # We're on a unix platform. Hooray! :)
51461      path="$POTENTIAL_FREETYPE_LIB_PATH"
51462      has_space=`$ECHO "$path" | $GREP " "`
51463      if test "x$has_space" != x; then
51464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51467      fi
51468
51469      # Use eval to expand a potential ~
51470      eval path="$path"
51471      if test ! -f "$path" && test ! -d "$path"; then
51472        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51473      fi
51474
51475      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51476    fi
51477  fi
51478
51479
51480    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51482$as_echo_n "checking for freetype includes... " >&6; }
51483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51484$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51485    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51487$as_echo_n "checking for freetype libraries... " >&6; }
51488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51489$as_echo "$FREETYPE_LIB_PATH" >&6; }
51490  fi
51491
51492          if test "x$FOUND_FREETYPE" != xyes; then
51493            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51494          fi
51495        else
51496          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
51497$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
51498          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
51499        fi
51500      else
51501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
51502$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
51503      fi
51504    fi
51505
51506    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
51507      # User has specified settings
51508
51509      if test "x$BUNDLE_FREETYPE" = x; then
51510        # If not specified, default is to bundle freetype
51511        BUNDLE_FREETYPE=yes
51512      fi
51513
51514      if test "x$with_freetype" != x; then
51515        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
51516        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
51517      fi
51518
51519      # Allow --with-freetype-lib and --with-freetype-include to override
51520      if test "x$with_freetype_include" != x; then
51521        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
51522      fi
51523      if test "x$with_freetype_lib" != x; then
51524        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
51525      fi
51526
51527      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51528        # Okay, we got it. Check that it works.
51529
51530  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51531  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51532  METHOD="--with-freetype"
51533
51534  # Let's start with an optimistic view of the world :-)
51535  FOUND_FREETYPE=yes
51536
51537  # First look for the canonical freetype main include file ft2build.h.
51538  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51539    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51540    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51541    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51542      # Fail.
51543      FOUND_FREETYPE=no
51544    fi
51545  fi
51546
51547  if test "x$FOUND_FREETYPE" = xyes; then
51548    # Include file found, let's continue the sanity check.
51549    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51550$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51551
51552    # Reset to default value
51553    FREETYPE_BASE_NAME=freetype
51554    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51555    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51556      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51557          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51558        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51559        # for the .6 version explicitly.
51560        FREETYPE_BASE_NAME=freetype.6
51561        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51562        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51563$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51564      else
51565        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51566$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51567        FOUND_FREETYPE=no
51568      fi
51569    else
51570      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51571        # On Windows, we will need both .lib and .dll file.
51572        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51573          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51574$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51575          FOUND_FREETYPE=no
51576        fi
51577      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51578          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51579        # Found lib in isa dir, use that instead.
51580        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51581        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51582$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51583      fi
51584    fi
51585  fi
51586
51587  if test "x$FOUND_FREETYPE" = xyes; then
51588
51589  # Only process if variable expands to non-empty
51590
51591  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51593
51594  # Input might be given as Windows format, start by converting to
51595  # unix format.
51596  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51597  new_path=`$CYGPATH -u "$path"`
51598
51599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51602  # "foo.exe" is OK but "foo" is an error.
51603  #
51604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51605  # It is also a way to make sure we got the proper file name for the real test later on.
51606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51607  if test "x$test_shortpath" = x; then
51608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51610    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51611  fi
51612
51613  # Call helper function which possibly converts this using DOS-style short mode.
51614  # If so, the updated path is stored in $new_path.
51615
51616  input_path="$new_path"
51617  # Check if we need to convert this using DOS-style short mode. If the path
51618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51619  # take no chances and rewrite it.
51620  # Note: m4 eats our [], so we need to use [ and ] instead.
51621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51622  if test "x$has_forbidden_chars" != x; then
51623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51627      # Going to short mode and back again did indeed matter. Since short mode is
51628      # case insensitive, let's make it lowercase to improve readability.
51629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51630      # Now convert it back to Unix-style (cygpath)
51631      input_path=`$CYGPATH -u "$shortmode_path"`
51632      new_path="$input_path"
51633    fi
51634  fi
51635
51636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51637  if test "x$test_cygdrive_prefix" = x; then
51638    # As a simple fix, exclude /usr/bin since it's not a real path.
51639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51641      # a path prefixed by /cygdrive for fixpath to work.
51642      new_path="$CYGWIN_ROOT_PATH$input_path"
51643    fi
51644  fi
51645
51646
51647  if test "x$path" != "x$new_path"; then
51648    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51650$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51651  fi
51652
51653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51654
51655  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51656  has_colon=`$ECHO $path | $GREP ^.:`
51657  new_path="$path"
51658  if test "x$has_colon" = x; then
51659    # Not in mixed or Windows style, start by that.
51660    new_path=`cmd //c echo $path`
51661  fi
51662
51663
51664  input_path="$new_path"
51665  # Check if we need to convert this using DOS-style short mode. If the path
51666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51667  # take no chances and rewrite it.
51668  # Note: m4 eats our [], so we need to use [ and ] instead.
51669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51670  if test "x$has_forbidden_chars" != x; then
51671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51673  fi
51674
51675
51676  windows_path="$new_path"
51677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51678    unix_path=`$CYGPATH -u "$windows_path"`
51679    new_path="$unix_path"
51680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51682    new_path="$unix_path"
51683  fi
51684
51685  if test "x$path" != "x$new_path"; then
51686    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51688$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51689  fi
51690
51691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51693
51694    else
51695      # We're on a unix platform. Hooray! :)
51696      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51697      has_space=`$ECHO "$path" | $GREP " "`
51698      if test "x$has_space" != x; then
51699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51700$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51702      fi
51703
51704      # Use eval to expand a potential ~
51705      eval path="$path"
51706      if test ! -f "$path" && test ! -d "$path"; then
51707        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51708      fi
51709
51710      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51711    fi
51712  fi
51713
51714
51715  # Only process if variable expands to non-empty
51716
51717  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51719
51720  # Input might be given as Windows format, start by converting to
51721  # unix format.
51722  path="$POTENTIAL_FREETYPE_LIB_PATH"
51723  new_path=`$CYGPATH -u "$path"`
51724
51725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51728  # "foo.exe" is OK but "foo" is an error.
51729  #
51730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51731  # It is also a way to make sure we got the proper file name for the real test later on.
51732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51733  if test "x$test_shortpath" = x; then
51734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51736    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51737  fi
51738
51739  # Call helper function which possibly converts this using DOS-style short mode.
51740  # If so, the updated path is stored in $new_path.
51741
51742  input_path="$new_path"
51743  # Check if we need to convert this using DOS-style short mode. If the path
51744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51745  # take no chances and rewrite it.
51746  # Note: m4 eats our [], so we need to use [ and ] instead.
51747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51748  if test "x$has_forbidden_chars" != x; then
51749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51753      # Going to short mode and back again did indeed matter. Since short mode is
51754      # case insensitive, let's make it lowercase to improve readability.
51755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51756      # Now convert it back to Unix-style (cygpath)
51757      input_path=`$CYGPATH -u "$shortmode_path"`
51758      new_path="$input_path"
51759    fi
51760  fi
51761
51762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51763  if test "x$test_cygdrive_prefix" = x; then
51764    # As a simple fix, exclude /usr/bin since it's not a real path.
51765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51767      # a path prefixed by /cygdrive for fixpath to work.
51768      new_path="$CYGWIN_ROOT_PATH$input_path"
51769    fi
51770  fi
51771
51772
51773  if test "x$path" != "x$new_path"; then
51774    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51776$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51777  fi
51778
51779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51780
51781  path="$POTENTIAL_FREETYPE_LIB_PATH"
51782  has_colon=`$ECHO $path | $GREP ^.:`
51783  new_path="$path"
51784  if test "x$has_colon" = x; then
51785    # Not in mixed or Windows style, start by that.
51786    new_path=`cmd //c echo $path`
51787  fi
51788
51789
51790  input_path="$new_path"
51791  # Check if we need to convert this using DOS-style short mode. If the path
51792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51793  # take no chances and rewrite it.
51794  # Note: m4 eats our [], so we need to use [ and ] instead.
51795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51796  if test "x$has_forbidden_chars" != x; then
51797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51799  fi
51800
51801
51802  windows_path="$new_path"
51803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51804    unix_path=`$CYGPATH -u "$windows_path"`
51805    new_path="$unix_path"
51806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51808    new_path="$unix_path"
51809  fi
51810
51811  if test "x$path" != "x$new_path"; then
51812    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51814$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51815  fi
51816
51817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51819
51820    else
51821      # We're on a unix platform. Hooray! :)
51822      path="$POTENTIAL_FREETYPE_LIB_PATH"
51823      has_space=`$ECHO "$path" | $GREP " "`
51824      if test "x$has_space" != x; then
51825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51828      fi
51829
51830      # Use eval to expand a potential ~
51831      eval path="$path"
51832      if test ! -f "$path" && test ! -d "$path"; then
51833        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51834      fi
51835
51836      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51837    fi
51838  fi
51839
51840
51841    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51843$as_echo_n "checking for freetype includes... " >&6; }
51844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51845$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51846    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51848$as_echo_n "checking for freetype libraries... " >&6; }
51849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51850$as_echo "$FREETYPE_LIB_PATH" >&6; }
51851  fi
51852
51853        if test "x$FOUND_FREETYPE" != xyes; then
51854          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
51855        fi
51856      else
51857        # User specified only one of lib or include. This is an error.
51858        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
51859          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
51860$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
51861          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51862        else
51863          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
51864$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
51865          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51866        fi
51867      fi
51868    else
51869      # User did not specify settings, but we need freetype. Try to locate it.
51870
51871      if test "x$BUNDLE_FREETYPE" = x; then
51872        # If not specified, default is to bundle freetype only on windows
51873        if test "x$OPENJDK_TARGET_OS" = xwindows; then
51874          BUNDLE_FREETYPE=yes
51875        else
51876          BUNDLE_FREETYPE=no
51877        fi
51878      fi
51879
51880      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
51881      if test "x$SYSROOT" = x; then
51882        if test "x$FOUND_FREETYPE" != xyes; then
51883          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
51884          if test "x$PKG_CONFIG" != x; then
51885
51886pkg_failed=no
51887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
51888$as_echo_n "checking for FREETYPE... " >&6; }
51889
51890if test -n "$FREETYPE_CFLAGS"; then
51891    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
51892 elif test -n "$PKG_CONFIG"; then
51893    if test -n "$PKG_CONFIG" && \
51894    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51895  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51896  ac_status=$?
51897  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51898  test $ac_status = 0; }; then
51899  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
51900else
51901  pkg_failed=yes
51902fi
51903 else
51904    pkg_failed=untried
51905fi
51906if test -n "$FREETYPE_LIBS"; then
51907    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
51908 elif test -n "$PKG_CONFIG"; then
51909    if test -n "$PKG_CONFIG" && \
51910    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51911  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51912  ac_status=$?
51913  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51914  test $ac_status = 0; }; then
51915  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
51916else
51917  pkg_failed=yes
51918fi
51919 else
51920    pkg_failed=untried
51921fi
51922
51923
51924
51925if test $pkg_failed = yes; then
51926
51927if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51928        _pkg_short_errors_supported=yes
51929else
51930        _pkg_short_errors_supported=no
51931fi
51932        if test $_pkg_short_errors_supported = yes; then
51933	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
51934        else
51935	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
51936        fi
51937	# Put the nasty error message in config.log where it belongs
51938	echo "$FREETYPE_PKG_ERRORS" >&5
51939
51940	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51941$as_echo "no" >&6; }
51942                FOUND_FREETYPE=no
51943elif test $pkg_failed = untried; then
51944	FOUND_FREETYPE=no
51945else
51946	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
51947	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
51948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51949$as_echo "yes" >&6; }
51950	FOUND_FREETYPE=yes
51951fi
51952            if test "x$FOUND_FREETYPE" = xyes; then
51953              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
51954              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
51955              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
51956              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51957                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
51958              fi
51959              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
51960              if test "x$BUNDLE_FREETYPE" = xyes; then
51961                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
51962$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
51963                FOUND_FREETYPE=no
51964              else
51965                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
51966$as_echo_n "checking for freetype... " >&6; }
51967                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
51968$as_echo "yes (using pkg-config)" >&6; }
51969              fi
51970            fi
51971          fi
51972        fi
51973      fi
51974
51975      if test "x$FOUND_FREETYPE" != xyes; then
51976        # Check in well-known locations
51977        if test "x$OPENJDK_TARGET_OS" = xwindows; then
51978          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
51979
51980  windows_path="$FREETYPE_BASE_DIR"
51981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51982    unix_path=`$CYGPATH -u "$windows_path"`
51983    FREETYPE_BASE_DIR="$unix_path"
51984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51986    FREETYPE_BASE_DIR="$unix_path"
51987  fi
51988
51989
51990  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51991  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51992  METHOD="well-known location"
51993
51994  # Let's start with an optimistic view of the world :-)
51995  FOUND_FREETYPE=yes
51996
51997  # First look for the canonical freetype main include file ft2build.h.
51998  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51999    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52000    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52001    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52002      # Fail.
52003      FOUND_FREETYPE=no
52004    fi
52005  fi
52006
52007  if test "x$FOUND_FREETYPE" = xyes; then
52008    # Include file found, let's continue the sanity check.
52009    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52010$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52011
52012    # Reset to default value
52013    FREETYPE_BASE_NAME=freetype
52014    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52015    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52016      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52017          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52018        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52019        # for the .6 version explicitly.
52020        FREETYPE_BASE_NAME=freetype.6
52021        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52022        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52023$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52024      else
52025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52026$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52027        FOUND_FREETYPE=no
52028      fi
52029    else
52030      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52031        # On Windows, we will need both .lib and .dll file.
52032        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52033          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52034$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52035          FOUND_FREETYPE=no
52036        fi
52037      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52038          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52039        # Found lib in isa dir, use that instead.
52040        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52041        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52042$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52043      fi
52044    fi
52045  fi
52046
52047  if test "x$FOUND_FREETYPE" = xyes; then
52048
52049  # Only process if variable expands to non-empty
52050
52051  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52053
52054  # Input might be given as Windows format, start by converting to
52055  # unix format.
52056  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52057  new_path=`$CYGPATH -u "$path"`
52058
52059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52062  # "foo.exe" is OK but "foo" is an error.
52063  #
52064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52065  # It is also a way to make sure we got the proper file name for the real test later on.
52066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52067  if test "x$test_shortpath" = x; then
52068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52070    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52071  fi
52072
52073  # Call helper function which possibly converts this using DOS-style short mode.
52074  # If so, the updated path is stored in $new_path.
52075
52076  input_path="$new_path"
52077  # Check if we need to convert this using DOS-style short mode. If the path
52078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52079  # take no chances and rewrite it.
52080  # Note: m4 eats our [], so we need to use [ and ] instead.
52081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52082  if test "x$has_forbidden_chars" != x; then
52083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52087      # Going to short mode and back again did indeed matter. Since short mode is
52088      # case insensitive, let's make it lowercase to improve readability.
52089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52090      # Now convert it back to Unix-style (cygpath)
52091      input_path=`$CYGPATH -u "$shortmode_path"`
52092      new_path="$input_path"
52093    fi
52094  fi
52095
52096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52097  if test "x$test_cygdrive_prefix" = x; then
52098    # As a simple fix, exclude /usr/bin since it's not a real path.
52099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52101      # a path prefixed by /cygdrive for fixpath to work.
52102      new_path="$CYGWIN_ROOT_PATH$input_path"
52103    fi
52104  fi
52105
52106
52107  if test "x$path" != "x$new_path"; then
52108    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52111  fi
52112
52113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52114
52115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52116  has_colon=`$ECHO $path | $GREP ^.:`
52117  new_path="$path"
52118  if test "x$has_colon" = x; then
52119    # Not in mixed or Windows style, start by that.
52120    new_path=`cmd //c echo $path`
52121  fi
52122
52123
52124  input_path="$new_path"
52125  # Check if we need to convert this using DOS-style short mode. If the path
52126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52127  # take no chances and rewrite it.
52128  # Note: m4 eats our [], so we need to use [ and ] instead.
52129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52130  if test "x$has_forbidden_chars" != x; then
52131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52133  fi
52134
52135
52136  windows_path="$new_path"
52137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52138    unix_path=`$CYGPATH -u "$windows_path"`
52139    new_path="$unix_path"
52140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52142    new_path="$unix_path"
52143  fi
52144
52145  if test "x$path" != "x$new_path"; then
52146    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52149  fi
52150
52151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52153
52154    else
52155      # We're on a unix platform. Hooray! :)
52156      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52157      has_space=`$ECHO "$path" | $GREP " "`
52158      if test "x$has_space" != x; then
52159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52162      fi
52163
52164      # Use eval to expand a potential ~
52165      eval path="$path"
52166      if test ! -f "$path" && test ! -d "$path"; then
52167        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52168      fi
52169
52170      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52171    fi
52172  fi
52173
52174
52175  # Only process if variable expands to non-empty
52176
52177  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52179
52180  # Input might be given as Windows format, start by converting to
52181  # unix format.
52182  path="$POTENTIAL_FREETYPE_LIB_PATH"
52183  new_path=`$CYGPATH -u "$path"`
52184
52185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52188  # "foo.exe" is OK but "foo" is an error.
52189  #
52190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52191  # It is also a way to make sure we got the proper file name for the real test later on.
52192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52193  if test "x$test_shortpath" = x; then
52194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52196    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52197  fi
52198
52199  # Call helper function which possibly converts this using DOS-style short mode.
52200  # If so, the updated path is stored in $new_path.
52201
52202  input_path="$new_path"
52203  # Check if we need to convert this using DOS-style short mode. If the path
52204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52205  # take no chances and rewrite it.
52206  # Note: m4 eats our [], so we need to use [ and ] instead.
52207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52208  if test "x$has_forbidden_chars" != x; then
52209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52213      # Going to short mode and back again did indeed matter. Since short mode is
52214      # case insensitive, let's make it lowercase to improve readability.
52215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52216      # Now convert it back to Unix-style (cygpath)
52217      input_path=`$CYGPATH -u "$shortmode_path"`
52218      new_path="$input_path"
52219    fi
52220  fi
52221
52222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52223  if test "x$test_cygdrive_prefix" = x; then
52224    # As a simple fix, exclude /usr/bin since it's not a real path.
52225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52227      # a path prefixed by /cygdrive for fixpath to work.
52228      new_path="$CYGWIN_ROOT_PATH$input_path"
52229    fi
52230  fi
52231
52232
52233  if test "x$path" != "x$new_path"; then
52234    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52237  fi
52238
52239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52240
52241  path="$POTENTIAL_FREETYPE_LIB_PATH"
52242  has_colon=`$ECHO $path | $GREP ^.:`
52243  new_path="$path"
52244  if test "x$has_colon" = x; then
52245    # Not in mixed or Windows style, start by that.
52246    new_path=`cmd //c echo $path`
52247  fi
52248
52249
52250  input_path="$new_path"
52251  # Check if we need to convert this using DOS-style short mode. If the path
52252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52253  # take no chances and rewrite it.
52254  # Note: m4 eats our [], so we need to use [ and ] instead.
52255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52256  if test "x$has_forbidden_chars" != x; then
52257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52259  fi
52260
52261
52262  windows_path="$new_path"
52263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52264    unix_path=`$CYGPATH -u "$windows_path"`
52265    new_path="$unix_path"
52266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52268    new_path="$unix_path"
52269  fi
52270
52271  if test "x$path" != "x$new_path"; then
52272    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52275  fi
52276
52277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52279
52280    else
52281      # We're on a unix platform. Hooray! :)
52282      path="$POTENTIAL_FREETYPE_LIB_PATH"
52283      has_space=`$ECHO "$path" | $GREP " "`
52284      if test "x$has_space" != x; then
52285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52286$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52288      fi
52289
52290      # Use eval to expand a potential ~
52291      eval path="$path"
52292      if test ! -f "$path" && test ! -d "$path"; then
52293        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52294      fi
52295
52296      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52297    fi
52298  fi
52299
52300
52301    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52303$as_echo_n "checking for freetype includes... " >&6; }
52304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52305$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52306    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52308$as_echo_n "checking for freetype libraries... " >&6; }
52309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52310$as_echo "$FREETYPE_LIB_PATH" >&6; }
52311  fi
52312
52313          if test "x$FOUND_FREETYPE" != xyes; then
52314            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52315
52316  windows_path="$FREETYPE_BASE_DIR"
52317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52318    unix_path=`$CYGPATH -u "$windows_path"`
52319    FREETYPE_BASE_DIR="$unix_path"
52320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52322    FREETYPE_BASE_DIR="$unix_path"
52323  fi
52324
52325
52326  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52327  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52328  METHOD="well-known location"
52329
52330  # Let's start with an optimistic view of the world :-)
52331  FOUND_FREETYPE=yes
52332
52333  # First look for the canonical freetype main include file ft2build.h.
52334  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52335    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52336    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52337    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52338      # Fail.
52339      FOUND_FREETYPE=no
52340    fi
52341  fi
52342
52343  if test "x$FOUND_FREETYPE" = xyes; then
52344    # Include file found, let's continue the sanity check.
52345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52346$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52347
52348    # Reset to default value
52349    FREETYPE_BASE_NAME=freetype
52350    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52351    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52352      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52353          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52354        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52355        # for the .6 version explicitly.
52356        FREETYPE_BASE_NAME=freetype.6
52357        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52358        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52359$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52360      else
52361        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52362$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52363        FOUND_FREETYPE=no
52364      fi
52365    else
52366      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52367        # On Windows, we will need both .lib and .dll file.
52368        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52369          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52370$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52371          FOUND_FREETYPE=no
52372        fi
52373      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52374          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52375        # Found lib in isa dir, use that instead.
52376        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52377        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52378$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52379      fi
52380    fi
52381  fi
52382
52383  if test "x$FOUND_FREETYPE" = xyes; then
52384
52385  # Only process if variable expands to non-empty
52386
52387  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52389
52390  # Input might be given as Windows format, start by converting to
52391  # unix format.
52392  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52393  new_path=`$CYGPATH -u "$path"`
52394
52395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52398  # "foo.exe" is OK but "foo" is an error.
52399  #
52400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52401  # It is also a way to make sure we got the proper file name for the real test later on.
52402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52403  if test "x$test_shortpath" = x; then
52404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52405$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52406    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52407  fi
52408
52409  # Call helper function which possibly converts this using DOS-style short mode.
52410  # If so, the updated path is stored in $new_path.
52411
52412  input_path="$new_path"
52413  # Check if we need to convert this using DOS-style short mode. If the path
52414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52415  # take no chances and rewrite it.
52416  # Note: m4 eats our [], so we need to use [ and ] instead.
52417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52418  if test "x$has_forbidden_chars" != x; then
52419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52423      # Going to short mode and back again did indeed matter. Since short mode is
52424      # case insensitive, let's make it lowercase to improve readability.
52425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52426      # Now convert it back to Unix-style (cygpath)
52427      input_path=`$CYGPATH -u "$shortmode_path"`
52428      new_path="$input_path"
52429    fi
52430  fi
52431
52432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52433  if test "x$test_cygdrive_prefix" = x; then
52434    # As a simple fix, exclude /usr/bin since it's not a real path.
52435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52437      # a path prefixed by /cygdrive for fixpath to work.
52438      new_path="$CYGWIN_ROOT_PATH$input_path"
52439    fi
52440  fi
52441
52442
52443  if test "x$path" != "x$new_path"; then
52444    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52447  fi
52448
52449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52450
52451  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52452  has_colon=`$ECHO $path | $GREP ^.:`
52453  new_path="$path"
52454  if test "x$has_colon" = x; then
52455    # Not in mixed or Windows style, start by that.
52456    new_path=`cmd //c echo $path`
52457  fi
52458
52459
52460  input_path="$new_path"
52461  # Check if we need to convert this using DOS-style short mode. If the path
52462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52463  # take no chances and rewrite it.
52464  # Note: m4 eats our [], so we need to use [ and ] instead.
52465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52466  if test "x$has_forbidden_chars" != x; then
52467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52469  fi
52470
52471
52472  windows_path="$new_path"
52473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52474    unix_path=`$CYGPATH -u "$windows_path"`
52475    new_path="$unix_path"
52476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52478    new_path="$unix_path"
52479  fi
52480
52481  if test "x$path" != "x$new_path"; then
52482    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52485  fi
52486
52487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52489
52490    else
52491      # We're on a unix platform. Hooray! :)
52492      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52493      has_space=`$ECHO "$path" | $GREP " "`
52494      if test "x$has_space" != x; then
52495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52498      fi
52499
52500      # Use eval to expand a potential ~
52501      eval path="$path"
52502      if test ! -f "$path" && test ! -d "$path"; then
52503        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52504      fi
52505
52506      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52507    fi
52508  fi
52509
52510
52511  # Only process if variable expands to non-empty
52512
52513  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52515
52516  # Input might be given as Windows format, start by converting to
52517  # unix format.
52518  path="$POTENTIAL_FREETYPE_LIB_PATH"
52519  new_path=`$CYGPATH -u "$path"`
52520
52521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52524  # "foo.exe" is OK but "foo" is an error.
52525  #
52526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52527  # It is also a way to make sure we got the proper file name for the real test later on.
52528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52529  if test "x$test_shortpath" = x; then
52530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52533  fi
52534
52535  # Call helper function which possibly converts this using DOS-style short mode.
52536  # If so, the updated path is stored in $new_path.
52537
52538  input_path="$new_path"
52539  # Check if we need to convert this using DOS-style short mode. If the path
52540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52541  # take no chances and rewrite it.
52542  # Note: m4 eats our [], so we need to use [ and ] instead.
52543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52544  if test "x$has_forbidden_chars" != x; then
52545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52549      # Going to short mode and back again did indeed matter. Since short mode is
52550      # case insensitive, let's make it lowercase to improve readability.
52551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52552      # Now convert it back to Unix-style (cygpath)
52553      input_path=`$CYGPATH -u "$shortmode_path"`
52554      new_path="$input_path"
52555    fi
52556  fi
52557
52558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52559  if test "x$test_cygdrive_prefix" = x; then
52560    # As a simple fix, exclude /usr/bin since it's not a real path.
52561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52563      # a path prefixed by /cygdrive for fixpath to work.
52564      new_path="$CYGWIN_ROOT_PATH$input_path"
52565    fi
52566  fi
52567
52568
52569  if test "x$path" != "x$new_path"; then
52570    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52573  fi
52574
52575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52576
52577  path="$POTENTIAL_FREETYPE_LIB_PATH"
52578  has_colon=`$ECHO $path | $GREP ^.:`
52579  new_path="$path"
52580  if test "x$has_colon" = x; then
52581    # Not in mixed or Windows style, start by that.
52582    new_path=`cmd //c echo $path`
52583  fi
52584
52585
52586  input_path="$new_path"
52587  # Check if we need to convert this using DOS-style short mode. If the path
52588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52589  # take no chances and rewrite it.
52590  # Note: m4 eats our [], so we need to use [ and ] instead.
52591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52592  if test "x$has_forbidden_chars" != x; then
52593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52595  fi
52596
52597
52598  windows_path="$new_path"
52599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52600    unix_path=`$CYGPATH -u "$windows_path"`
52601    new_path="$unix_path"
52602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52604    new_path="$unix_path"
52605  fi
52606
52607  if test "x$path" != "x$new_path"; then
52608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52611  fi
52612
52613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52615
52616    else
52617      # We're on a unix platform. Hooray! :)
52618      path="$POTENTIAL_FREETYPE_LIB_PATH"
52619      has_space=`$ECHO "$path" | $GREP " "`
52620      if test "x$has_space" != x; then
52621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52624      fi
52625
52626      # Use eval to expand a potential ~
52627      eval path="$path"
52628      if test ! -f "$path" && test ! -d "$path"; then
52629        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52630      fi
52631
52632      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52633    fi
52634  fi
52635
52636
52637    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52639$as_echo_n "checking for freetype includes... " >&6; }
52640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52641$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52642    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52644$as_echo_n "checking for freetype libraries... " >&6; }
52645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52646$as_echo "$FREETYPE_LIB_PATH" >&6; }
52647  fi
52648
52649          fi
52650        else
52651          FREETYPE_BASE_DIR="$SYSROOT/usr"
52652
52653  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52654  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52655  METHOD="well-known location"
52656
52657  # Let's start with an optimistic view of the world :-)
52658  FOUND_FREETYPE=yes
52659
52660  # First look for the canonical freetype main include file ft2build.h.
52661  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52662    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52663    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52664    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52665      # Fail.
52666      FOUND_FREETYPE=no
52667    fi
52668  fi
52669
52670  if test "x$FOUND_FREETYPE" = xyes; then
52671    # Include file found, let's continue the sanity check.
52672    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52673$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52674
52675    # Reset to default value
52676    FREETYPE_BASE_NAME=freetype
52677    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52678    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52679      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52680          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52681        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52682        # for the .6 version explicitly.
52683        FREETYPE_BASE_NAME=freetype.6
52684        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52685        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52686$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52687      else
52688        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52689$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52690        FOUND_FREETYPE=no
52691      fi
52692    else
52693      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52694        # On Windows, we will need both .lib and .dll file.
52695        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52696          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52697$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52698          FOUND_FREETYPE=no
52699        fi
52700      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52701          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52702        # Found lib in isa dir, use that instead.
52703        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52704        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52705$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52706      fi
52707    fi
52708  fi
52709
52710  if test "x$FOUND_FREETYPE" = xyes; then
52711
52712  # Only process if variable expands to non-empty
52713
52714  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52716
52717  # Input might be given as Windows format, start by converting to
52718  # unix format.
52719  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52720  new_path=`$CYGPATH -u "$path"`
52721
52722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52725  # "foo.exe" is OK but "foo" is an error.
52726  #
52727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52728  # It is also a way to make sure we got the proper file name for the real test later on.
52729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52730  if test "x$test_shortpath" = x; then
52731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52732$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52733    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52734  fi
52735
52736  # Call helper function which possibly converts this using DOS-style short mode.
52737  # If so, the updated path is stored in $new_path.
52738
52739  input_path="$new_path"
52740  # Check if we need to convert this using DOS-style short mode. If the path
52741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52742  # take no chances and rewrite it.
52743  # Note: m4 eats our [], so we need to use [ and ] instead.
52744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52745  if test "x$has_forbidden_chars" != x; then
52746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52750      # Going to short mode and back again did indeed matter. Since short mode is
52751      # case insensitive, let's make it lowercase to improve readability.
52752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52753      # Now convert it back to Unix-style (cygpath)
52754      input_path=`$CYGPATH -u "$shortmode_path"`
52755      new_path="$input_path"
52756    fi
52757  fi
52758
52759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52760  if test "x$test_cygdrive_prefix" = x; then
52761    # As a simple fix, exclude /usr/bin since it's not a real path.
52762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52764      # a path prefixed by /cygdrive for fixpath to work.
52765      new_path="$CYGWIN_ROOT_PATH$input_path"
52766    fi
52767  fi
52768
52769
52770  if test "x$path" != "x$new_path"; then
52771    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52773$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52774  fi
52775
52776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52777
52778  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52779  has_colon=`$ECHO $path | $GREP ^.:`
52780  new_path="$path"
52781  if test "x$has_colon" = x; then
52782    # Not in mixed or Windows style, start by that.
52783    new_path=`cmd //c echo $path`
52784  fi
52785
52786
52787  input_path="$new_path"
52788  # Check if we need to convert this using DOS-style short mode. If the path
52789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52790  # take no chances and rewrite it.
52791  # Note: m4 eats our [], so we need to use [ and ] instead.
52792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52793  if test "x$has_forbidden_chars" != x; then
52794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52796  fi
52797
52798
52799  windows_path="$new_path"
52800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52801    unix_path=`$CYGPATH -u "$windows_path"`
52802    new_path="$unix_path"
52803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52805    new_path="$unix_path"
52806  fi
52807
52808  if test "x$path" != "x$new_path"; then
52809    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52811$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52812  fi
52813
52814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52816
52817    else
52818      # We're on a unix platform. Hooray! :)
52819      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52820      has_space=`$ECHO "$path" | $GREP " "`
52821      if test "x$has_space" != x; then
52822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52825      fi
52826
52827      # Use eval to expand a potential ~
52828      eval path="$path"
52829      if test ! -f "$path" && test ! -d "$path"; then
52830        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52831      fi
52832
52833      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52834    fi
52835  fi
52836
52837
52838  # Only process if variable expands to non-empty
52839
52840  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52842
52843  # Input might be given as Windows format, start by converting to
52844  # unix format.
52845  path="$POTENTIAL_FREETYPE_LIB_PATH"
52846  new_path=`$CYGPATH -u "$path"`
52847
52848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52851  # "foo.exe" is OK but "foo" is an error.
52852  #
52853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52854  # It is also a way to make sure we got the proper file name for the real test later on.
52855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52856  if test "x$test_shortpath" = x; then
52857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52858$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52859    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52860  fi
52861
52862  # Call helper function which possibly converts this using DOS-style short mode.
52863  # If so, the updated path is stored in $new_path.
52864
52865  input_path="$new_path"
52866  # Check if we need to convert this using DOS-style short mode. If the path
52867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52868  # take no chances and rewrite it.
52869  # Note: m4 eats our [], so we need to use [ and ] instead.
52870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52871  if test "x$has_forbidden_chars" != x; then
52872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52876      # Going to short mode and back again did indeed matter. Since short mode is
52877      # case insensitive, let's make it lowercase to improve readability.
52878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52879      # Now convert it back to Unix-style (cygpath)
52880      input_path=`$CYGPATH -u "$shortmode_path"`
52881      new_path="$input_path"
52882    fi
52883  fi
52884
52885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52886  if test "x$test_cygdrive_prefix" = x; then
52887    # As a simple fix, exclude /usr/bin since it's not a real path.
52888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52890      # a path prefixed by /cygdrive for fixpath to work.
52891      new_path="$CYGWIN_ROOT_PATH$input_path"
52892    fi
52893  fi
52894
52895
52896  if test "x$path" != "x$new_path"; then
52897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52900  fi
52901
52902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52903
52904  path="$POTENTIAL_FREETYPE_LIB_PATH"
52905  has_colon=`$ECHO $path | $GREP ^.:`
52906  new_path="$path"
52907  if test "x$has_colon" = x; then
52908    # Not in mixed or Windows style, start by that.
52909    new_path=`cmd //c echo $path`
52910  fi
52911
52912
52913  input_path="$new_path"
52914  # Check if we need to convert this using DOS-style short mode. If the path
52915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52916  # take no chances and rewrite it.
52917  # Note: m4 eats our [], so we need to use [ and ] instead.
52918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52919  if test "x$has_forbidden_chars" != x; then
52920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52922  fi
52923
52924
52925  windows_path="$new_path"
52926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52927    unix_path=`$CYGPATH -u "$windows_path"`
52928    new_path="$unix_path"
52929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52931    new_path="$unix_path"
52932  fi
52933
52934  if test "x$path" != "x$new_path"; then
52935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52938  fi
52939
52940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52942
52943    else
52944      # We're on a unix platform. Hooray! :)
52945      path="$POTENTIAL_FREETYPE_LIB_PATH"
52946      has_space=`$ECHO "$path" | $GREP " "`
52947      if test "x$has_space" != x; then
52948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52951      fi
52952
52953      # Use eval to expand a potential ~
52954      eval path="$path"
52955      if test ! -f "$path" && test ! -d "$path"; then
52956        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52957      fi
52958
52959      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52960    fi
52961  fi
52962
52963
52964    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52966$as_echo_n "checking for freetype includes... " >&6; }
52967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52968$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52969    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52971$as_echo_n "checking for freetype libraries... " >&6; }
52972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52973$as_echo "$FREETYPE_LIB_PATH" >&6; }
52974  fi
52975
52976
52977          if test "x$FOUND_FREETYPE" != xyes; then
52978            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
52979
52980  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52981  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52982  METHOD="well-known location"
52983
52984  # Let's start with an optimistic view of the world :-)
52985  FOUND_FREETYPE=yes
52986
52987  # First look for the canonical freetype main include file ft2build.h.
52988  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52989    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52990    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52991    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52992      # Fail.
52993      FOUND_FREETYPE=no
52994    fi
52995  fi
52996
52997  if test "x$FOUND_FREETYPE" = xyes; then
52998    # Include file found, let's continue the sanity check.
52999    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53000$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53001
53002    # Reset to default value
53003    FREETYPE_BASE_NAME=freetype
53004    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53005    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53006      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53007          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53008        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53009        # for the .6 version explicitly.
53010        FREETYPE_BASE_NAME=freetype.6
53011        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53012        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53013$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53014      else
53015        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53016$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53017        FOUND_FREETYPE=no
53018      fi
53019    else
53020      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53021        # On Windows, we will need both .lib and .dll file.
53022        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53023          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53024$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53025          FOUND_FREETYPE=no
53026        fi
53027      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53028          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53029        # Found lib in isa dir, use that instead.
53030        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53031        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53032$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53033      fi
53034    fi
53035  fi
53036
53037  if test "x$FOUND_FREETYPE" = xyes; then
53038
53039  # Only process if variable expands to non-empty
53040
53041  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53043
53044  # Input might be given as Windows format, start by converting to
53045  # unix format.
53046  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53047  new_path=`$CYGPATH -u "$path"`
53048
53049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53052  # "foo.exe" is OK but "foo" is an error.
53053  #
53054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53055  # It is also a way to make sure we got the proper file name for the real test later on.
53056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53057  if test "x$test_shortpath" = x; then
53058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53059$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53060    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53061  fi
53062
53063  # Call helper function which possibly converts this using DOS-style short mode.
53064  # If so, the updated path is stored in $new_path.
53065
53066  input_path="$new_path"
53067  # Check if we need to convert this using DOS-style short mode. If the path
53068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53069  # take no chances and rewrite it.
53070  # Note: m4 eats our [], so we need to use [ and ] instead.
53071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53072  if test "x$has_forbidden_chars" != x; then
53073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53077      # Going to short mode and back again did indeed matter. Since short mode is
53078      # case insensitive, let's make it lowercase to improve readability.
53079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53080      # Now convert it back to Unix-style (cygpath)
53081      input_path=`$CYGPATH -u "$shortmode_path"`
53082      new_path="$input_path"
53083    fi
53084  fi
53085
53086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53087  if test "x$test_cygdrive_prefix" = x; then
53088    # As a simple fix, exclude /usr/bin since it's not a real path.
53089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53091      # a path prefixed by /cygdrive for fixpath to work.
53092      new_path="$CYGWIN_ROOT_PATH$input_path"
53093    fi
53094  fi
53095
53096
53097  if test "x$path" != "x$new_path"; then
53098    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53101  fi
53102
53103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53104
53105  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53106  has_colon=`$ECHO $path | $GREP ^.:`
53107  new_path="$path"
53108  if test "x$has_colon" = x; then
53109    # Not in mixed or Windows style, start by that.
53110    new_path=`cmd //c echo $path`
53111  fi
53112
53113
53114  input_path="$new_path"
53115  # Check if we need to convert this using DOS-style short mode. If the path
53116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53117  # take no chances and rewrite it.
53118  # Note: m4 eats our [], so we need to use [ and ] instead.
53119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53120  if test "x$has_forbidden_chars" != x; then
53121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53123  fi
53124
53125
53126  windows_path="$new_path"
53127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53128    unix_path=`$CYGPATH -u "$windows_path"`
53129    new_path="$unix_path"
53130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53132    new_path="$unix_path"
53133  fi
53134
53135  if test "x$path" != "x$new_path"; then
53136    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53138$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53139  fi
53140
53141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53143
53144    else
53145      # We're on a unix platform. Hooray! :)
53146      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53147      has_space=`$ECHO "$path" | $GREP " "`
53148      if test "x$has_space" != x; then
53149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53150$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53152      fi
53153
53154      # Use eval to expand a potential ~
53155      eval path="$path"
53156      if test ! -f "$path" && test ! -d "$path"; then
53157        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53158      fi
53159
53160      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53161    fi
53162  fi
53163
53164
53165  # Only process if variable expands to non-empty
53166
53167  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53168    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53169
53170  # Input might be given as Windows format, start by converting to
53171  # unix format.
53172  path="$POTENTIAL_FREETYPE_LIB_PATH"
53173  new_path=`$CYGPATH -u "$path"`
53174
53175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53178  # "foo.exe" is OK but "foo" is an error.
53179  #
53180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53181  # It is also a way to make sure we got the proper file name for the real test later on.
53182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53183  if test "x$test_shortpath" = x; then
53184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53186    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53187  fi
53188
53189  # Call helper function which possibly converts this using DOS-style short mode.
53190  # If so, the updated path is stored in $new_path.
53191
53192  input_path="$new_path"
53193  # Check if we need to convert this using DOS-style short mode. If the path
53194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53195  # take no chances and rewrite it.
53196  # Note: m4 eats our [], so we need to use [ and ] instead.
53197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53198  if test "x$has_forbidden_chars" != x; then
53199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53203      # Going to short mode and back again did indeed matter. Since short mode is
53204      # case insensitive, let's make it lowercase to improve readability.
53205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53206      # Now convert it back to Unix-style (cygpath)
53207      input_path=`$CYGPATH -u "$shortmode_path"`
53208      new_path="$input_path"
53209    fi
53210  fi
53211
53212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53213  if test "x$test_cygdrive_prefix" = x; then
53214    # As a simple fix, exclude /usr/bin since it's not a real path.
53215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53217      # a path prefixed by /cygdrive for fixpath to work.
53218      new_path="$CYGWIN_ROOT_PATH$input_path"
53219    fi
53220  fi
53221
53222
53223  if test "x$path" != "x$new_path"; then
53224    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53226$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53227  fi
53228
53229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53230
53231  path="$POTENTIAL_FREETYPE_LIB_PATH"
53232  has_colon=`$ECHO $path | $GREP ^.:`
53233  new_path="$path"
53234  if test "x$has_colon" = x; then
53235    # Not in mixed or Windows style, start by that.
53236    new_path=`cmd //c echo $path`
53237  fi
53238
53239
53240  input_path="$new_path"
53241  # Check if we need to convert this using DOS-style short mode. If the path
53242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53243  # take no chances and rewrite it.
53244  # Note: m4 eats our [], so we need to use [ and ] instead.
53245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53246  if test "x$has_forbidden_chars" != x; then
53247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53249  fi
53250
53251
53252  windows_path="$new_path"
53253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53254    unix_path=`$CYGPATH -u "$windows_path"`
53255    new_path="$unix_path"
53256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53258    new_path="$unix_path"
53259  fi
53260
53261  if test "x$path" != "x$new_path"; then
53262    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53265  fi
53266
53267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53269
53270    else
53271      # We're on a unix platform. Hooray! :)
53272      path="$POTENTIAL_FREETYPE_LIB_PATH"
53273      has_space=`$ECHO "$path" | $GREP " "`
53274      if test "x$has_space" != x; then
53275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53276$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53277        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53278      fi
53279
53280      # Use eval to expand a potential ~
53281      eval path="$path"
53282      if test ! -f "$path" && test ! -d "$path"; then
53283        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53284      fi
53285
53286      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53287    fi
53288  fi
53289
53290
53291    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53293$as_echo_n "checking for freetype includes... " >&6; }
53294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53295$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53296    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53298$as_echo_n "checking for freetype libraries... " >&6; }
53299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53300$as_echo "$FREETYPE_LIB_PATH" >&6; }
53301  fi
53302
53303          fi
53304
53305          if test "x$FOUND_FREETYPE" != xyes; then
53306            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
53307
53308  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53309  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53310  METHOD="well-known location"
53311
53312  # Let's start with an optimistic view of the world :-)
53313  FOUND_FREETYPE=yes
53314
53315  # First look for the canonical freetype main include file ft2build.h.
53316  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53317    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53318    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53319    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53320      # Fail.
53321      FOUND_FREETYPE=no
53322    fi
53323  fi
53324
53325  if test "x$FOUND_FREETYPE" = xyes; then
53326    # Include file found, let's continue the sanity check.
53327    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53328$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53329
53330    # Reset to default value
53331    FREETYPE_BASE_NAME=freetype
53332    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53333    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53334      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53335          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53336        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53337        # for the .6 version explicitly.
53338        FREETYPE_BASE_NAME=freetype.6
53339        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53340        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53341$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53342      else
53343        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53344$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53345        FOUND_FREETYPE=no
53346      fi
53347    else
53348      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53349        # On Windows, we will need both .lib and .dll file.
53350        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53351          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53352$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53353          FOUND_FREETYPE=no
53354        fi
53355      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53356          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53357        # Found lib in isa dir, use that instead.
53358        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53359        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53360$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53361      fi
53362    fi
53363  fi
53364
53365  if test "x$FOUND_FREETYPE" = xyes; then
53366
53367  # Only process if variable expands to non-empty
53368
53369  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53371
53372  # Input might be given as Windows format, start by converting to
53373  # unix format.
53374  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53375  new_path=`$CYGPATH -u "$path"`
53376
53377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53380  # "foo.exe" is OK but "foo" is an error.
53381  #
53382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53383  # It is also a way to make sure we got the proper file name for the real test later on.
53384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53385  if test "x$test_shortpath" = x; then
53386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53388    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53389  fi
53390
53391  # Call helper function which possibly converts this using DOS-style short mode.
53392  # If so, the updated path is stored in $new_path.
53393
53394  input_path="$new_path"
53395  # Check if we need to convert this using DOS-style short mode. If the path
53396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53397  # take no chances and rewrite it.
53398  # Note: m4 eats our [], so we need to use [ and ] instead.
53399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53400  if test "x$has_forbidden_chars" != x; then
53401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53405      # Going to short mode and back again did indeed matter. Since short mode is
53406      # case insensitive, let's make it lowercase to improve readability.
53407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53408      # Now convert it back to Unix-style (cygpath)
53409      input_path=`$CYGPATH -u "$shortmode_path"`
53410      new_path="$input_path"
53411    fi
53412  fi
53413
53414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53415  if test "x$test_cygdrive_prefix" = x; then
53416    # As a simple fix, exclude /usr/bin since it's not a real path.
53417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53419      # a path prefixed by /cygdrive for fixpath to work.
53420      new_path="$CYGWIN_ROOT_PATH$input_path"
53421    fi
53422  fi
53423
53424
53425  if test "x$path" != "x$new_path"; then
53426    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53429  fi
53430
53431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53432
53433  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53434  has_colon=`$ECHO $path | $GREP ^.:`
53435  new_path="$path"
53436  if test "x$has_colon" = x; then
53437    # Not in mixed or Windows style, start by that.
53438    new_path=`cmd //c echo $path`
53439  fi
53440
53441
53442  input_path="$new_path"
53443  # Check if we need to convert this using DOS-style short mode. If the path
53444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53445  # take no chances and rewrite it.
53446  # Note: m4 eats our [], so we need to use [ and ] instead.
53447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53448  if test "x$has_forbidden_chars" != x; then
53449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53451  fi
53452
53453
53454  windows_path="$new_path"
53455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53456    unix_path=`$CYGPATH -u "$windows_path"`
53457    new_path="$unix_path"
53458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53460    new_path="$unix_path"
53461  fi
53462
53463  if test "x$path" != "x$new_path"; then
53464    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53467  fi
53468
53469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53471
53472    else
53473      # We're on a unix platform. Hooray! :)
53474      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53475      has_space=`$ECHO "$path" | $GREP " "`
53476      if test "x$has_space" != x; then
53477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53480      fi
53481
53482      # Use eval to expand a potential ~
53483      eval path="$path"
53484      if test ! -f "$path" && test ! -d "$path"; then
53485        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53486      fi
53487
53488      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53489    fi
53490  fi
53491
53492
53493  # Only process if variable expands to non-empty
53494
53495  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53497
53498  # Input might be given as Windows format, start by converting to
53499  # unix format.
53500  path="$POTENTIAL_FREETYPE_LIB_PATH"
53501  new_path=`$CYGPATH -u "$path"`
53502
53503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53506  # "foo.exe" is OK but "foo" is an error.
53507  #
53508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53509  # It is also a way to make sure we got the proper file name for the real test later on.
53510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53511  if test "x$test_shortpath" = x; then
53512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53514    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53515  fi
53516
53517  # Call helper function which possibly converts this using DOS-style short mode.
53518  # If so, the updated path is stored in $new_path.
53519
53520  input_path="$new_path"
53521  # Check if we need to convert this using DOS-style short mode. If the path
53522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53523  # take no chances and rewrite it.
53524  # Note: m4 eats our [], so we need to use [ and ] instead.
53525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53526  if test "x$has_forbidden_chars" != x; then
53527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53531      # Going to short mode and back again did indeed matter. Since short mode is
53532      # case insensitive, let's make it lowercase to improve readability.
53533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53534      # Now convert it back to Unix-style (cygpath)
53535      input_path=`$CYGPATH -u "$shortmode_path"`
53536      new_path="$input_path"
53537    fi
53538  fi
53539
53540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53541  if test "x$test_cygdrive_prefix" = x; then
53542    # As a simple fix, exclude /usr/bin since it's not a real path.
53543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53545      # a path prefixed by /cygdrive for fixpath to work.
53546      new_path="$CYGWIN_ROOT_PATH$input_path"
53547    fi
53548  fi
53549
53550
53551  if test "x$path" != "x$new_path"; then
53552    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53554$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53555  fi
53556
53557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53558
53559  path="$POTENTIAL_FREETYPE_LIB_PATH"
53560  has_colon=`$ECHO $path | $GREP ^.:`
53561  new_path="$path"
53562  if test "x$has_colon" = x; then
53563    # Not in mixed or Windows style, start by that.
53564    new_path=`cmd //c echo $path`
53565  fi
53566
53567
53568  input_path="$new_path"
53569  # Check if we need to convert this using DOS-style short mode. If the path
53570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53571  # take no chances and rewrite it.
53572  # Note: m4 eats our [], so we need to use [ and ] instead.
53573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53574  if test "x$has_forbidden_chars" != x; then
53575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53577  fi
53578
53579
53580  windows_path="$new_path"
53581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53582    unix_path=`$CYGPATH -u "$windows_path"`
53583    new_path="$unix_path"
53584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53586    new_path="$unix_path"
53587  fi
53588
53589  if test "x$path" != "x$new_path"; then
53590    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53592$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53593  fi
53594
53595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53597
53598    else
53599      # We're on a unix platform. Hooray! :)
53600      path="$POTENTIAL_FREETYPE_LIB_PATH"
53601      has_space=`$ECHO "$path" | $GREP " "`
53602      if test "x$has_space" != x; then
53603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53606      fi
53607
53608      # Use eval to expand a potential ~
53609      eval path="$path"
53610      if test ! -f "$path" && test ! -d "$path"; then
53611        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53612      fi
53613
53614      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53615    fi
53616  fi
53617
53618
53619    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53621$as_echo_n "checking for freetype includes... " >&6; }
53622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53623$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53624    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53626$as_echo_n "checking for freetype libraries... " >&6; }
53627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53628$as_echo "$FREETYPE_LIB_PATH" >&6; }
53629  fi
53630
53631          fi
53632
53633          if test "x$FOUND_FREETYPE" != xyes; then
53634            FREETYPE_BASE_DIR="$SYSROOT/usr"
53635            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53636
53637  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53638  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
53639  METHOD="well-known location"
53640
53641  # Let's start with an optimistic view of the world :-)
53642  FOUND_FREETYPE=yes
53643
53644  # First look for the canonical freetype main include file ft2build.h.
53645  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53646    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53647    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53648    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53649      # Fail.
53650      FOUND_FREETYPE=no
53651    fi
53652  fi
53653
53654  if test "x$FOUND_FREETYPE" = xyes; then
53655    # Include file found, let's continue the sanity check.
53656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53657$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53658
53659    # Reset to default value
53660    FREETYPE_BASE_NAME=freetype
53661    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53662    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53663      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53664          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53665        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53666        # for the .6 version explicitly.
53667        FREETYPE_BASE_NAME=freetype.6
53668        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53669        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53670$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53671      else
53672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53673$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53674        FOUND_FREETYPE=no
53675      fi
53676    else
53677      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53678        # On Windows, we will need both .lib and .dll file.
53679        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53680          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53681$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53682          FOUND_FREETYPE=no
53683        fi
53684      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53685          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53686        # Found lib in isa dir, use that instead.
53687        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53688        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53689$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53690      fi
53691    fi
53692  fi
53693
53694  if test "x$FOUND_FREETYPE" = xyes; then
53695
53696  # Only process if variable expands to non-empty
53697
53698  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53700
53701  # Input might be given as Windows format, start by converting to
53702  # unix format.
53703  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53704  new_path=`$CYGPATH -u "$path"`
53705
53706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53709  # "foo.exe" is OK but "foo" is an error.
53710  #
53711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53712  # It is also a way to make sure we got the proper file name for the real test later on.
53713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53714  if test "x$test_shortpath" = x; then
53715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53717    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53718  fi
53719
53720  # Call helper function which possibly converts this using DOS-style short mode.
53721  # If so, the updated path is stored in $new_path.
53722
53723  input_path="$new_path"
53724  # Check if we need to convert this using DOS-style short mode. If the path
53725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53726  # take no chances and rewrite it.
53727  # Note: m4 eats our [], so we need to use [ and ] instead.
53728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53729  if test "x$has_forbidden_chars" != x; then
53730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53734      # Going to short mode and back again did indeed matter. Since short mode is
53735      # case insensitive, let's make it lowercase to improve readability.
53736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53737      # Now convert it back to Unix-style (cygpath)
53738      input_path=`$CYGPATH -u "$shortmode_path"`
53739      new_path="$input_path"
53740    fi
53741  fi
53742
53743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53744  if test "x$test_cygdrive_prefix" = x; then
53745    # As a simple fix, exclude /usr/bin since it's not a real path.
53746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53748      # a path prefixed by /cygdrive for fixpath to work.
53749      new_path="$CYGWIN_ROOT_PATH$input_path"
53750    fi
53751  fi
53752
53753
53754  if test "x$path" != "x$new_path"; then
53755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53758  fi
53759
53760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53761
53762  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53763  has_colon=`$ECHO $path | $GREP ^.:`
53764  new_path="$path"
53765  if test "x$has_colon" = x; then
53766    # Not in mixed or Windows style, start by that.
53767    new_path=`cmd //c echo $path`
53768  fi
53769
53770
53771  input_path="$new_path"
53772  # Check if we need to convert this using DOS-style short mode. If the path
53773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53774  # take no chances and rewrite it.
53775  # Note: m4 eats our [], so we need to use [ and ] instead.
53776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53777  if test "x$has_forbidden_chars" != x; then
53778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53780  fi
53781
53782
53783  windows_path="$new_path"
53784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53785    unix_path=`$CYGPATH -u "$windows_path"`
53786    new_path="$unix_path"
53787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53789    new_path="$unix_path"
53790  fi
53791
53792  if test "x$path" != "x$new_path"; then
53793    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53796  fi
53797
53798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53800
53801    else
53802      # We're on a unix platform. Hooray! :)
53803      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53804      has_space=`$ECHO "$path" | $GREP " "`
53805      if test "x$has_space" != x; then
53806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53809      fi
53810
53811      # Use eval to expand a potential ~
53812      eval path="$path"
53813      if test ! -f "$path" && test ! -d "$path"; then
53814        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53815      fi
53816
53817      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53818    fi
53819  fi
53820
53821
53822  # Only process if variable expands to non-empty
53823
53824  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53826
53827  # Input might be given as Windows format, start by converting to
53828  # unix format.
53829  path="$POTENTIAL_FREETYPE_LIB_PATH"
53830  new_path=`$CYGPATH -u "$path"`
53831
53832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53835  # "foo.exe" is OK but "foo" is an error.
53836  #
53837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53838  # It is also a way to make sure we got the proper file name for the real test later on.
53839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53840  if test "x$test_shortpath" = x; then
53841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53843    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53844  fi
53845
53846  # Call helper function which possibly converts this using DOS-style short mode.
53847  # If so, the updated path is stored in $new_path.
53848
53849  input_path="$new_path"
53850  # Check if we need to convert this using DOS-style short mode. If the path
53851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53852  # take no chances and rewrite it.
53853  # Note: m4 eats our [], so we need to use [ and ] instead.
53854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53855  if test "x$has_forbidden_chars" != x; then
53856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53860      # Going to short mode and back again did indeed matter. Since short mode is
53861      # case insensitive, let's make it lowercase to improve readability.
53862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53863      # Now convert it back to Unix-style (cygpath)
53864      input_path=`$CYGPATH -u "$shortmode_path"`
53865      new_path="$input_path"
53866    fi
53867  fi
53868
53869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53870  if test "x$test_cygdrive_prefix" = x; then
53871    # As a simple fix, exclude /usr/bin since it's not a real path.
53872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53874      # a path prefixed by /cygdrive for fixpath to work.
53875      new_path="$CYGWIN_ROOT_PATH$input_path"
53876    fi
53877  fi
53878
53879
53880  if test "x$path" != "x$new_path"; then
53881    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53883$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53884  fi
53885
53886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53887
53888  path="$POTENTIAL_FREETYPE_LIB_PATH"
53889  has_colon=`$ECHO $path | $GREP ^.:`
53890  new_path="$path"
53891  if test "x$has_colon" = x; then
53892    # Not in mixed or Windows style, start by that.
53893    new_path=`cmd //c echo $path`
53894  fi
53895
53896
53897  input_path="$new_path"
53898  # Check if we need to convert this using DOS-style short mode. If the path
53899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53900  # take no chances and rewrite it.
53901  # Note: m4 eats our [], so we need to use [ and ] instead.
53902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53903  if test "x$has_forbidden_chars" != x; then
53904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53906  fi
53907
53908
53909  windows_path="$new_path"
53910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53911    unix_path=`$CYGPATH -u "$windows_path"`
53912    new_path="$unix_path"
53913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53915    new_path="$unix_path"
53916  fi
53917
53918  if test "x$path" != "x$new_path"; then
53919    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53922  fi
53923
53924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53926
53927    else
53928      # We're on a unix platform. Hooray! :)
53929      path="$POTENTIAL_FREETYPE_LIB_PATH"
53930      has_space=`$ECHO "$path" | $GREP " "`
53931      if test "x$has_space" != x; then
53932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53935      fi
53936
53937      # Use eval to expand a potential ~
53938      eval path="$path"
53939      if test ! -f "$path" && test ! -d "$path"; then
53940        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53941      fi
53942
53943      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53944    fi
53945  fi
53946
53947
53948    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53950$as_echo_n "checking for freetype includes... " >&6; }
53951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53952$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53953    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53955$as_echo_n "checking for freetype libraries... " >&6; }
53956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53957$as_echo "$FREETYPE_LIB_PATH" >&6; }
53958  fi
53959
53960            else
53961
53962  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53963  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
53964  METHOD="well-known location"
53965
53966  # Let's start with an optimistic view of the world :-)
53967  FOUND_FREETYPE=yes
53968
53969  # First look for the canonical freetype main include file ft2build.h.
53970  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53971    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53972    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53973    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53974      # Fail.
53975      FOUND_FREETYPE=no
53976    fi
53977  fi
53978
53979  if test "x$FOUND_FREETYPE" = xyes; then
53980    # Include file found, let's continue the sanity check.
53981    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53982$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53983
53984    # Reset to default value
53985    FREETYPE_BASE_NAME=freetype
53986    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53987    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53988      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53990        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53991        # for the .6 version explicitly.
53992        FREETYPE_BASE_NAME=freetype.6
53993        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53994        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53995$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53996      else
53997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53998$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53999        FOUND_FREETYPE=no
54000      fi
54001    else
54002      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54003        # On Windows, we will need both .lib and .dll file.
54004        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54005          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54006$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54007          FOUND_FREETYPE=no
54008        fi
54009      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54010          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54011        # Found lib in isa dir, use that instead.
54012        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54013        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54014$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54015      fi
54016    fi
54017  fi
54018
54019  if test "x$FOUND_FREETYPE" = xyes; then
54020
54021  # Only process if variable expands to non-empty
54022
54023  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54025
54026  # Input might be given as Windows format, start by converting to
54027  # unix format.
54028  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54029  new_path=`$CYGPATH -u "$path"`
54030
54031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54034  # "foo.exe" is OK but "foo" is an error.
54035  #
54036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54037  # It is also a way to make sure we got the proper file name for the real test later on.
54038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54039  if test "x$test_shortpath" = x; then
54040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54042    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54043  fi
54044
54045  # Call helper function which possibly converts this using DOS-style short mode.
54046  # If so, the updated path is stored in $new_path.
54047
54048  input_path="$new_path"
54049  # Check if we need to convert this using DOS-style short mode. If the path
54050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54051  # take no chances and rewrite it.
54052  # Note: m4 eats our [], so we need to use [ and ] instead.
54053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54054  if test "x$has_forbidden_chars" != x; then
54055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54059      # Going to short mode and back again did indeed matter. Since short mode is
54060      # case insensitive, let's make it lowercase to improve readability.
54061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54062      # Now convert it back to Unix-style (cygpath)
54063      input_path=`$CYGPATH -u "$shortmode_path"`
54064      new_path="$input_path"
54065    fi
54066  fi
54067
54068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54069  if test "x$test_cygdrive_prefix" = x; then
54070    # As a simple fix, exclude /usr/bin since it's not a real path.
54071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54073      # a path prefixed by /cygdrive for fixpath to work.
54074      new_path="$CYGWIN_ROOT_PATH$input_path"
54075    fi
54076  fi
54077
54078
54079  if test "x$path" != "x$new_path"; then
54080    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54083  fi
54084
54085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54086
54087  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54088  has_colon=`$ECHO $path | $GREP ^.:`
54089  new_path="$path"
54090  if test "x$has_colon" = x; then
54091    # Not in mixed or Windows style, start by that.
54092    new_path=`cmd //c echo $path`
54093  fi
54094
54095
54096  input_path="$new_path"
54097  # Check if we need to convert this using DOS-style short mode. If the path
54098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54099  # take no chances and rewrite it.
54100  # Note: m4 eats our [], so we need to use [ and ] instead.
54101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54102  if test "x$has_forbidden_chars" != x; then
54103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54105  fi
54106
54107
54108  windows_path="$new_path"
54109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54110    unix_path=`$CYGPATH -u "$windows_path"`
54111    new_path="$unix_path"
54112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54114    new_path="$unix_path"
54115  fi
54116
54117  if test "x$path" != "x$new_path"; then
54118    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54121  fi
54122
54123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54125
54126    else
54127      # We're on a unix platform. Hooray! :)
54128      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54129      has_space=`$ECHO "$path" | $GREP " "`
54130      if test "x$has_space" != x; then
54131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54134      fi
54135
54136      # Use eval to expand a potential ~
54137      eval path="$path"
54138      if test ! -f "$path" && test ! -d "$path"; then
54139        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54140      fi
54141
54142      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54143    fi
54144  fi
54145
54146
54147  # Only process if variable expands to non-empty
54148
54149  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54151
54152  # Input might be given as Windows format, start by converting to
54153  # unix format.
54154  path="$POTENTIAL_FREETYPE_LIB_PATH"
54155  new_path=`$CYGPATH -u "$path"`
54156
54157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54160  # "foo.exe" is OK but "foo" is an error.
54161  #
54162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54163  # It is also a way to make sure we got the proper file name for the real test later on.
54164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54165  if test "x$test_shortpath" = x; then
54166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54167$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54168    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54169  fi
54170
54171  # Call helper function which possibly converts this using DOS-style short mode.
54172  # If so, the updated path is stored in $new_path.
54173
54174  input_path="$new_path"
54175  # Check if we need to convert this using DOS-style short mode. If the path
54176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54177  # take no chances and rewrite it.
54178  # Note: m4 eats our [], so we need to use [ and ] instead.
54179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54180  if test "x$has_forbidden_chars" != x; then
54181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54185      # Going to short mode and back again did indeed matter. Since short mode is
54186      # case insensitive, let's make it lowercase to improve readability.
54187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54188      # Now convert it back to Unix-style (cygpath)
54189      input_path=`$CYGPATH -u "$shortmode_path"`
54190      new_path="$input_path"
54191    fi
54192  fi
54193
54194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54195  if test "x$test_cygdrive_prefix" = x; then
54196    # As a simple fix, exclude /usr/bin since it's not a real path.
54197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54199      # a path prefixed by /cygdrive for fixpath to work.
54200      new_path="$CYGWIN_ROOT_PATH$input_path"
54201    fi
54202  fi
54203
54204
54205  if test "x$path" != "x$new_path"; then
54206    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54208$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54209  fi
54210
54211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54212
54213  path="$POTENTIAL_FREETYPE_LIB_PATH"
54214  has_colon=`$ECHO $path | $GREP ^.:`
54215  new_path="$path"
54216  if test "x$has_colon" = x; then
54217    # Not in mixed or Windows style, start by that.
54218    new_path=`cmd //c echo $path`
54219  fi
54220
54221
54222  input_path="$new_path"
54223  # Check if we need to convert this using DOS-style short mode. If the path
54224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54225  # take no chances and rewrite it.
54226  # Note: m4 eats our [], so we need to use [ and ] instead.
54227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54228  if test "x$has_forbidden_chars" != x; then
54229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54231  fi
54232
54233
54234  windows_path="$new_path"
54235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54236    unix_path=`$CYGPATH -u "$windows_path"`
54237    new_path="$unix_path"
54238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54240    new_path="$unix_path"
54241  fi
54242
54243  if test "x$path" != "x$new_path"; then
54244    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54247  fi
54248
54249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54251
54252    else
54253      # We're on a unix platform. Hooray! :)
54254      path="$POTENTIAL_FREETYPE_LIB_PATH"
54255      has_space=`$ECHO "$path" | $GREP " "`
54256      if test "x$has_space" != x; then
54257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54260      fi
54261
54262      # Use eval to expand a potential ~
54263      eval path="$path"
54264      if test ! -f "$path" && test ! -d "$path"; then
54265        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54266      fi
54267
54268      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54269    fi
54270  fi
54271
54272
54273    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54275$as_echo_n "checking for freetype includes... " >&6; }
54276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54277$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54278    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54280$as_echo_n "checking for freetype libraries... " >&6; }
54281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54282$as_echo "$FREETYPE_LIB_PATH" >&6; }
54283  fi
54284
54285              if test "x$FOUND_FREETYPE" != xyes; then
54286
54287  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54288  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54289  METHOD="well-known location"
54290
54291  # Let's start with an optimistic view of the world :-)
54292  FOUND_FREETYPE=yes
54293
54294  # First look for the canonical freetype main include file ft2build.h.
54295  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54296    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54297    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54298    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54299      # Fail.
54300      FOUND_FREETYPE=no
54301    fi
54302  fi
54303
54304  if test "x$FOUND_FREETYPE" = xyes; then
54305    # Include file found, let's continue the sanity check.
54306    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54307$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54308
54309    # Reset to default value
54310    FREETYPE_BASE_NAME=freetype
54311    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54312    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54313      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54315        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54316        # for the .6 version explicitly.
54317        FREETYPE_BASE_NAME=freetype.6
54318        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54319        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54320$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54321      else
54322        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54323$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54324        FOUND_FREETYPE=no
54325      fi
54326    else
54327      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54328        # On Windows, we will need both .lib and .dll file.
54329        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54330          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54332          FOUND_FREETYPE=no
54333        fi
54334      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54335          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54336        # Found lib in isa dir, use that instead.
54337        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54338        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54339$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54340      fi
54341    fi
54342  fi
54343
54344  if test "x$FOUND_FREETYPE" = xyes; then
54345
54346  # Only process if variable expands to non-empty
54347
54348  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54350
54351  # Input might be given as Windows format, start by converting to
54352  # unix format.
54353  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54354  new_path=`$CYGPATH -u "$path"`
54355
54356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54359  # "foo.exe" is OK but "foo" is an error.
54360  #
54361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54362  # It is also a way to make sure we got the proper file name for the real test later on.
54363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54364  if test "x$test_shortpath" = x; then
54365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54367    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54368  fi
54369
54370  # Call helper function which possibly converts this using DOS-style short mode.
54371  # If so, the updated path is stored in $new_path.
54372
54373  input_path="$new_path"
54374  # Check if we need to convert this using DOS-style short mode. If the path
54375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54376  # take no chances and rewrite it.
54377  # Note: m4 eats our [], so we need to use [ and ] instead.
54378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54379  if test "x$has_forbidden_chars" != x; then
54380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54384      # Going to short mode and back again did indeed matter. Since short mode is
54385      # case insensitive, let's make it lowercase to improve readability.
54386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54387      # Now convert it back to Unix-style (cygpath)
54388      input_path=`$CYGPATH -u "$shortmode_path"`
54389      new_path="$input_path"
54390    fi
54391  fi
54392
54393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54394  if test "x$test_cygdrive_prefix" = x; then
54395    # As a simple fix, exclude /usr/bin since it's not a real path.
54396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54398      # a path prefixed by /cygdrive for fixpath to work.
54399      new_path="$CYGWIN_ROOT_PATH$input_path"
54400    fi
54401  fi
54402
54403
54404  if test "x$path" != "x$new_path"; then
54405    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54408  fi
54409
54410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54411
54412  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54413  has_colon=`$ECHO $path | $GREP ^.:`
54414  new_path="$path"
54415  if test "x$has_colon" = x; then
54416    # Not in mixed or Windows style, start by that.
54417    new_path=`cmd //c echo $path`
54418  fi
54419
54420
54421  input_path="$new_path"
54422  # Check if we need to convert this using DOS-style short mode. If the path
54423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54424  # take no chances and rewrite it.
54425  # Note: m4 eats our [], so we need to use [ and ] instead.
54426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54427  if test "x$has_forbidden_chars" != x; then
54428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54430  fi
54431
54432
54433  windows_path="$new_path"
54434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54435    unix_path=`$CYGPATH -u "$windows_path"`
54436    new_path="$unix_path"
54437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54439    new_path="$unix_path"
54440  fi
54441
54442  if test "x$path" != "x$new_path"; then
54443    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54446  fi
54447
54448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54450
54451    else
54452      # We're on a unix platform. Hooray! :)
54453      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54454      has_space=`$ECHO "$path" | $GREP " "`
54455      if test "x$has_space" != x; then
54456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54459      fi
54460
54461      # Use eval to expand a potential ~
54462      eval path="$path"
54463      if test ! -f "$path" && test ! -d "$path"; then
54464        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54465      fi
54466
54467      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54468    fi
54469  fi
54470
54471
54472  # Only process if variable expands to non-empty
54473
54474  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54476
54477  # Input might be given as Windows format, start by converting to
54478  # unix format.
54479  path="$POTENTIAL_FREETYPE_LIB_PATH"
54480  new_path=`$CYGPATH -u "$path"`
54481
54482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54485  # "foo.exe" is OK but "foo" is an error.
54486  #
54487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54488  # It is also a way to make sure we got the proper file name for the real test later on.
54489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54490  if test "x$test_shortpath" = x; then
54491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54492$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54493    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54494  fi
54495
54496  # Call helper function which possibly converts this using DOS-style short mode.
54497  # If so, the updated path is stored in $new_path.
54498
54499  input_path="$new_path"
54500  # Check if we need to convert this using DOS-style short mode. If the path
54501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54502  # take no chances and rewrite it.
54503  # Note: m4 eats our [], so we need to use [ and ] instead.
54504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54505  if test "x$has_forbidden_chars" != x; then
54506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54510      # Going to short mode and back again did indeed matter. Since short mode is
54511      # case insensitive, let's make it lowercase to improve readability.
54512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54513      # Now convert it back to Unix-style (cygpath)
54514      input_path=`$CYGPATH -u "$shortmode_path"`
54515      new_path="$input_path"
54516    fi
54517  fi
54518
54519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54520  if test "x$test_cygdrive_prefix" = x; then
54521    # As a simple fix, exclude /usr/bin since it's not a real path.
54522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54524      # a path prefixed by /cygdrive for fixpath to work.
54525      new_path="$CYGWIN_ROOT_PATH$input_path"
54526    fi
54527  fi
54528
54529
54530  if test "x$path" != "x$new_path"; then
54531    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54533$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54534  fi
54535
54536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54537
54538  path="$POTENTIAL_FREETYPE_LIB_PATH"
54539  has_colon=`$ECHO $path | $GREP ^.:`
54540  new_path="$path"
54541  if test "x$has_colon" = x; then
54542    # Not in mixed or Windows style, start by that.
54543    new_path=`cmd //c echo $path`
54544  fi
54545
54546
54547  input_path="$new_path"
54548  # Check if we need to convert this using DOS-style short mode. If the path
54549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54550  # take no chances and rewrite it.
54551  # Note: m4 eats our [], so we need to use [ and ] instead.
54552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54553  if test "x$has_forbidden_chars" != x; then
54554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54556  fi
54557
54558
54559  windows_path="$new_path"
54560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54561    unix_path=`$CYGPATH -u "$windows_path"`
54562    new_path="$unix_path"
54563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54565    new_path="$unix_path"
54566  fi
54567
54568  if test "x$path" != "x$new_path"; then
54569    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54571$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54572  fi
54573
54574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54576
54577    else
54578      # We're on a unix platform. Hooray! :)
54579      path="$POTENTIAL_FREETYPE_LIB_PATH"
54580      has_space=`$ECHO "$path" | $GREP " "`
54581      if test "x$has_space" != x; then
54582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54583$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54585      fi
54586
54587      # Use eval to expand a potential ~
54588      eval path="$path"
54589      if test ! -f "$path" && test ! -d "$path"; then
54590        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54591      fi
54592
54593      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54594    fi
54595  fi
54596
54597
54598    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54600$as_echo_n "checking for freetype includes... " >&6; }
54601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54602$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54603    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54605$as_echo_n "checking for freetype libraries... " >&6; }
54606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54607$as_echo "$FREETYPE_LIB_PATH" >&6; }
54608  fi
54609
54610              fi
54611            fi
54612          fi
54613        fi
54614      fi # end check in well-known locations
54615
54616      if test "x$FOUND_FREETYPE" != xyes; then
54617
54618  # Print a helpful message on how to acquire the necessary build dependency.
54619  # freetype is the help tag: freetype, cups, alsa etc
54620  MISSING_DEPENDENCY=freetype
54621
54622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54623    cygwin_help $MISSING_DEPENDENCY
54624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54625    msys_help $MISSING_DEPENDENCY
54626  else
54627    PKGHANDLER_COMMAND=
54628
54629    case $PKGHANDLER in
54630      apt-get)
54631        apt_help     $MISSING_DEPENDENCY ;;
54632      yum)
54633        yum_help     $MISSING_DEPENDENCY ;;
54634      port)
54635        port_help    $MISSING_DEPENDENCY ;;
54636      pkgutil)
54637        pkgutil_help $MISSING_DEPENDENCY ;;
54638      pkgadd)
54639        pkgadd_help  $MISSING_DEPENDENCY ;;
54640    esac
54641
54642    if test "x$PKGHANDLER_COMMAND" != x; then
54643      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54644    fi
54645  fi
54646
54647        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
54648      fi
54649    fi # end user specified settings
54650
54651    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
54652    if test "x$FREETYPE_CFLAGS" = x; then
54653
54654  # Only process if variable expands to non-empty
54655
54656  if test "x$FREETYPE_INCLUDE_PATH" != x; then
54657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54658
54659  # Input might be given as Windows format, start by converting to
54660  # unix format.
54661  path="$FREETYPE_INCLUDE_PATH"
54662  new_path=`$CYGPATH -u "$path"`
54663
54664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54667  # "foo.exe" is OK but "foo" is an error.
54668  #
54669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54670  # It is also a way to make sure we got the proper file name for the real test later on.
54671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54672  if test "x$test_shortpath" = x; then
54673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54674$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54675    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
54676  fi
54677
54678  # Call helper function which possibly converts this using DOS-style short mode.
54679  # If so, the updated path is stored in $new_path.
54680
54681  input_path="$new_path"
54682  # Check if we need to convert this using DOS-style short mode. If the path
54683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54684  # take no chances and rewrite it.
54685  # Note: m4 eats our [], so we need to use [ and ] instead.
54686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54687  if test "x$has_forbidden_chars" != x; then
54688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54692      # Going to short mode and back again did indeed matter. Since short mode is
54693      # case insensitive, let's make it lowercase to improve readability.
54694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54695      # Now convert it back to Unix-style (cygpath)
54696      input_path=`$CYGPATH -u "$shortmode_path"`
54697      new_path="$input_path"
54698    fi
54699  fi
54700
54701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54702  if test "x$test_cygdrive_prefix" = x; then
54703    # As a simple fix, exclude /usr/bin since it's not a real path.
54704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54706      # a path prefixed by /cygdrive for fixpath to work.
54707      new_path="$CYGWIN_ROOT_PATH$input_path"
54708    fi
54709  fi
54710
54711
54712  if test "x$path" != "x$new_path"; then
54713    FREETYPE_INCLUDE_PATH="$new_path"
54714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54715$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54716  fi
54717
54718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54719
54720  path="$FREETYPE_INCLUDE_PATH"
54721  has_colon=`$ECHO $path | $GREP ^.:`
54722  new_path="$path"
54723  if test "x$has_colon" = x; then
54724    # Not in mixed or Windows style, start by that.
54725    new_path=`cmd //c echo $path`
54726  fi
54727
54728
54729  input_path="$new_path"
54730  # Check if we need to convert this using DOS-style short mode. If the path
54731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54732  # take no chances and rewrite it.
54733  # Note: m4 eats our [], so we need to use [ and ] instead.
54734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54735  if test "x$has_forbidden_chars" != x; then
54736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54738  fi
54739
54740
54741  windows_path="$new_path"
54742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54743    unix_path=`$CYGPATH -u "$windows_path"`
54744    new_path="$unix_path"
54745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54747    new_path="$unix_path"
54748  fi
54749
54750  if test "x$path" != "x$new_path"; then
54751    FREETYPE_INCLUDE_PATH="$new_path"
54752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54753$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54754  fi
54755
54756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54758
54759    else
54760      # We're on a unix platform. Hooray! :)
54761      path="$FREETYPE_INCLUDE_PATH"
54762      has_space=`$ECHO "$path" | $GREP " "`
54763      if test "x$has_space" != x; then
54764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54765$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54767      fi
54768
54769      # Use eval to expand a potential ~
54770      eval path="$path"
54771      if test ! -f "$path" && test ! -d "$path"; then
54772        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54773      fi
54774
54775      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54776    fi
54777  fi
54778
54779      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
54780        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
54781      else
54782        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
54783      fi
54784    fi
54785
54786    if test "x$FREETYPE_LIBS" = x; then
54787
54788  # Only process if variable expands to non-empty
54789
54790  if test "x$FREETYPE_LIB_PATH" != x; then
54791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54792
54793  # Input might be given as Windows format, start by converting to
54794  # unix format.
54795  path="$FREETYPE_LIB_PATH"
54796  new_path=`$CYGPATH -u "$path"`
54797
54798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54801  # "foo.exe" is OK but "foo" is an error.
54802  #
54803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54804  # It is also a way to make sure we got the proper file name for the real test later on.
54805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54806  if test "x$test_shortpath" = x; then
54807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54808$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54809    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
54810  fi
54811
54812  # Call helper function which possibly converts this using DOS-style short mode.
54813  # If so, the updated path is stored in $new_path.
54814
54815  input_path="$new_path"
54816  # Check if we need to convert this using DOS-style short mode. If the path
54817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54818  # take no chances and rewrite it.
54819  # Note: m4 eats our [], so we need to use [ and ] instead.
54820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54821  if test "x$has_forbidden_chars" != x; then
54822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54826      # Going to short mode and back again did indeed matter. Since short mode is
54827      # case insensitive, let's make it lowercase to improve readability.
54828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54829      # Now convert it back to Unix-style (cygpath)
54830      input_path=`$CYGPATH -u "$shortmode_path"`
54831      new_path="$input_path"
54832    fi
54833  fi
54834
54835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54836  if test "x$test_cygdrive_prefix" = x; then
54837    # As a simple fix, exclude /usr/bin since it's not a real path.
54838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54840      # a path prefixed by /cygdrive for fixpath to work.
54841      new_path="$CYGWIN_ROOT_PATH$input_path"
54842    fi
54843  fi
54844
54845
54846  if test "x$path" != "x$new_path"; then
54847    FREETYPE_LIB_PATH="$new_path"
54848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54849$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54850  fi
54851
54852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54853
54854  path="$FREETYPE_LIB_PATH"
54855  has_colon=`$ECHO $path | $GREP ^.:`
54856  new_path="$path"
54857  if test "x$has_colon" = x; then
54858    # Not in mixed or Windows style, start by that.
54859    new_path=`cmd //c echo $path`
54860  fi
54861
54862
54863  input_path="$new_path"
54864  # Check if we need to convert this using DOS-style short mode. If the path
54865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54866  # take no chances and rewrite it.
54867  # Note: m4 eats our [], so we need to use [ and ] instead.
54868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54869  if test "x$has_forbidden_chars" != x; then
54870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54872  fi
54873
54874
54875  windows_path="$new_path"
54876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54877    unix_path=`$CYGPATH -u "$windows_path"`
54878    new_path="$unix_path"
54879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54881    new_path="$unix_path"
54882  fi
54883
54884  if test "x$path" != "x$new_path"; then
54885    FREETYPE_LIB_PATH="$new_path"
54886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54887$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54888  fi
54889
54890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54892
54893    else
54894      # We're on a unix platform. Hooray! :)
54895      path="$FREETYPE_LIB_PATH"
54896      has_space=`$ECHO "$path" | $GREP " "`
54897      if test "x$has_space" != x; then
54898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54899$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54901      fi
54902
54903      # Use eval to expand a potential ~
54904      eval path="$path"
54905      if test ! -f "$path" && test ! -d "$path"; then
54906        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54907      fi
54908
54909      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54910    fi
54911  fi
54912
54913      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54914        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
54915      else
54916        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
54917      fi
54918    fi
54919
54920    # Try to compile it
54921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
54922$as_echo_n "checking if we can compile and link with freetype... " >&6; }
54923    ac_ext=cpp
54924ac_cpp='$CXXCPP $CPPFLAGS'
54925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54928
54929    PREV_CXXCFLAGS="$CXXFLAGS"
54930    PREV_LIBS="$LIBS"
54931    PREV_CXX="$CXX"
54932    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
54933    LIBS="$LIBS $FREETYPE_LIBS"
54934    CXX="$FIXPATH $CXX"
54935    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54936/* end confdefs.h.  */
54937
54938          #include<ft2build.h>
54939          #include FT_FREETYPE_H
54940          int main () {
54941            FT_Init_FreeType(NULL);
54942            return 0;
54943          }
54944
54945_ACEOF
54946if ac_fn_cxx_try_link "$LINENO"; then :
54947
54948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54949$as_echo "yes" >&6; }
54950
54951else
54952
54953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54954$as_echo "no" >&6; }
54955          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
54956$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
54957          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
54958$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
54959
54960
54961  # Print a helpful message on how to acquire the necessary build dependency.
54962  # freetype is the help tag: freetype, cups, alsa etc
54963  MISSING_DEPENDENCY=freetype
54964
54965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54966    cygwin_help $MISSING_DEPENDENCY
54967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54968    msys_help $MISSING_DEPENDENCY
54969  else
54970    PKGHANDLER_COMMAND=
54971
54972    case $PKGHANDLER in
54973      apt-get)
54974        apt_help     $MISSING_DEPENDENCY ;;
54975      yum)
54976        yum_help     $MISSING_DEPENDENCY ;;
54977      port)
54978        port_help    $MISSING_DEPENDENCY ;;
54979      pkgutil)
54980        pkgutil_help $MISSING_DEPENDENCY ;;
54981      pkgadd)
54982        pkgadd_help  $MISSING_DEPENDENCY ;;
54983    esac
54984
54985    if test "x$PKGHANDLER_COMMAND" != x; then
54986      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54987    fi
54988  fi
54989
54990
54991          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
54992
54993
54994fi
54995rm -f core conftest.err conftest.$ac_objext \
54996    conftest$ac_exeext conftest.$ac_ext
54997    CXXCFLAGS="$PREV_CXXFLAGS"
54998    LIBS="$PREV_LIBS"
54999    CXX="$PREV_CXX"
55000    ac_ext=cpp
55001ac_cpp='$CXXCPP $CPPFLAGS'
55002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55005
55006
55007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55008$as_echo_n "checking if we should bundle freetype... " >&6; }
55009    if test "x$BUNDLE_FREETYPE" = xyes; then
55010      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55011    fi
55012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55013$as_echo "$BUNDLE_FREETYPE" >&6; }
55014
55015  fi # end freetype needed
55016
55017
55018
55019
55020
55021
55022
55023# Check whether --with-alsa was given.
55024if test "${with_alsa+set}" = set; then :
55025  withval=$with_alsa;
55026fi
55027
55028
55029# Check whether --with-alsa-include was given.
55030if test "${with_alsa_include+set}" = set; then :
55031  withval=$with_alsa_include;
55032fi
55033
55034
55035# Check whether --with-alsa-lib was given.
55036if test "${with_alsa_lib+set}" = set; then :
55037  withval=$with_alsa_lib;
55038fi
55039
55040
55041  if test "x$NEEDS_LIB_ALSA" = xfalse; then
55042    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55043        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55044        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55045      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55046$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55047    fi
55048    ALSA_CFLAGS=
55049    ALSA_LIBS=
55050  else
55051    ALSA_FOUND=no
55052
55053    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55054      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55055    fi
55056
55057    if test "x${with_alsa}" != x; then
55058      ALSA_LIBS="-L${with_alsa}/lib -lasound"
55059      ALSA_CFLAGS="-I${with_alsa}/include"
55060      ALSA_FOUND=yes
55061    fi
55062    if test "x${with_alsa_include}" != x; then
55063      ALSA_CFLAGS="-I${with_alsa_include}"
55064      ALSA_FOUND=yes
55065    fi
55066    if test "x${with_alsa_lib}" != x; then
55067      ALSA_LIBS="-L${with_alsa_lib} -lasound"
55068      ALSA_FOUND=yes
55069    fi
55070    # Do not try pkg-config if we have a sysroot set.
55071    if test "x$SYSROOT" = x; then
55072      if test "x$ALSA_FOUND" = xno; then
55073
55074pkg_failed=no
55075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55076$as_echo_n "checking for ALSA... " >&6; }
55077
55078if test -n "$ALSA_CFLAGS"; then
55079    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55080 elif test -n "$PKG_CONFIG"; then
55081    if test -n "$PKG_CONFIG" && \
55082    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55083  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55084  ac_status=$?
55085  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55086  test $ac_status = 0; }; then
55087  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55088else
55089  pkg_failed=yes
55090fi
55091 else
55092    pkg_failed=untried
55093fi
55094if test -n "$ALSA_LIBS"; then
55095    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55096 elif test -n "$PKG_CONFIG"; then
55097    if test -n "$PKG_CONFIG" && \
55098    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55099  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55100  ac_status=$?
55101  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55102  test $ac_status = 0; }; then
55103  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55104else
55105  pkg_failed=yes
55106fi
55107 else
55108    pkg_failed=untried
55109fi
55110
55111
55112
55113if test $pkg_failed = yes; then
55114
55115if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55116        _pkg_short_errors_supported=yes
55117else
55118        _pkg_short_errors_supported=no
55119fi
55120        if test $_pkg_short_errors_supported = yes; then
55121	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55122        else
55123	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55124        fi
55125	# Put the nasty error message in config.log where it belongs
55126	echo "$ALSA_PKG_ERRORS" >&5
55127
55128	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55129$as_echo "no" >&6; }
55130                ALSA_FOUND=no
55131elif test $pkg_failed = untried; then
55132	ALSA_FOUND=no
55133else
55134	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55135	ALSA_LIBS=$pkg_cv_ALSA_LIBS
55136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55137$as_echo "yes" >&6; }
55138	ALSA_FOUND=yes
55139fi
55140      fi
55141    fi
55142    if test "x$ALSA_FOUND" = xno; then
55143      for ac_header in alsa/asoundlib.h
55144do :
55145  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55146if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55147  cat >>confdefs.h <<_ACEOF
55148#define HAVE_ALSA_ASOUNDLIB_H 1
55149_ACEOF
55150
55151            ALSA_FOUND=yes
55152            ALSA_CFLAGS=-Iignoreme
55153            ALSA_LIBS=-lasound
55154            DEFAULT_ALSA=yes
55155
55156else
55157  ALSA_FOUND=no
55158
55159fi
55160
55161done
55162
55163    fi
55164    if test "x$ALSA_FOUND" = xno; then
55165
55166  # Print a helpful message on how to acquire the necessary build dependency.
55167  # alsa is the help tag: freetype, cups, alsa etc
55168  MISSING_DEPENDENCY=alsa
55169
55170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55171    cygwin_help $MISSING_DEPENDENCY
55172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55173    msys_help $MISSING_DEPENDENCY
55174  else
55175    PKGHANDLER_COMMAND=
55176
55177    case $PKGHANDLER in
55178      apt-get)
55179        apt_help     $MISSING_DEPENDENCY ;;
55180      yum)
55181        yum_help     $MISSING_DEPENDENCY ;;
55182      port)
55183        port_help    $MISSING_DEPENDENCY ;;
55184      pkgutil)
55185        pkgutil_help $MISSING_DEPENDENCY ;;
55186      pkgadd)
55187        pkgadd_help  $MISSING_DEPENDENCY ;;
55188    esac
55189
55190    if test "x$PKGHANDLER_COMMAND" != x; then
55191      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55192    fi
55193  fi
55194
55195      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
55196    fi
55197  fi
55198
55199
55200
55201
55202
55203
55204# Check whether --with-libffi was given.
55205if test "${with_libffi+set}" = set; then :
55206  withval=$with_libffi;
55207fi
55208
55209
55210# Check whether --with-libffi-include was given.
55211if test "${with_libffi_include+set}" = set; then :
55212  withval=$with_libffi_include;
55213fi
55214
55215
55216# Check whether --with-libffi-lib was given.
55217if test "${with_libffi_lib+set}" = set; then :
55218  withval=$with_libffi_lib;
55219fi
55220
55221
55222  if test "x$NEEDS_LIB_FFI" = xfalse; then
55223    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
55224        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
55225        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
55226      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
55227$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
55228    fi
55229    LIBFFI_CFLAGS=
55230    LIBFFI_LIBS=
55231  else
55232    LIBFFI_FOUND=no
55233
55234    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
55235      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
55236    fi
55237
55238    if test "x${with_libffi}" != x; then
55239      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
55240      LIBFFI_CFLAGS="-I${with_libffi}/include"
55241      LIBFFI_FOUND=yes
55242    fi
55243    if test "x${with_libffi_include}" != x; then
55244      LIBFFI_CFLAGS="-I${with_libffi_include}"
55245      LIBFFI_FOUND=yes
55246    fi
55247    if test "x${with_libffi_lib}" != x; then
55248      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
55249      LIBFFI_FOUND=yes
55250    fi
55251    # Do not try pkg-config if we have a sysroot set.
55252    if test "x$SYSROOT" = x; then
55253      if test "x$LIBFFI_FOUND" = xno; then
55254        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
55255
55256pkg_failed=no
55257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
55258$as_echo_n "checking for LIBFFI... " >&6; }
55259
55260if test -n "$LIBFFI_CFLAGS"; then
55261    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
55262 elif test -n "$PKG_CONFIG"; then
55263    if test -n "$PKG_CONFIG" && \
55264    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55265  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55266  ac_status=$?
55267  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55268  test $ac_status = 0; }; then
55269  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
55270else
55271  pkg_failed=yes
55272fi
55273 else
55274    pkg_failed=untried
55275fi
55276if test -n "$LIBFFI_LIBS"; then
55277    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
55278 elif test -n "$PKG_CONFIG"; then
55279    if test -n "$PKG_CONFIG" && \
55280    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55281  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55282  ac_status=$?
55283  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55284  test $ac_status = 0; }; then
55285  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
55286else
55287  pkg_failed=yes
55288fi
55289 else
55290    pkg_failed=untried
55291fi
55292
55293
55294
55295if test $pkg_failed = yes; then
55296
55297if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55298        _pkg_short_errors_supported=yes
55299else
55300        _pkg_short_errors_supported=no
55301fi
55302        if test $_pkg_short_errors_supported = yes; then
55303	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
55304        else
55305	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
55306        fi
55307	# Put the nasty error message in config.log where it belongs
55308	echo "$LIBFFI_PKG_ERRORS" >&5
55309
55310	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55311$as_echo "no" >&6; }
55312                LIBFFI_FOUND=no
55313elif test $pkg_failed = untried; then
55314	LIBFFI_FOUND=no
55315else
55316	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
55317	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
55318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55319$as_echo "yes" >&6; }
55320	LIBFFI_FOUND=yes
55321fi
55322      fi
55323    fi
55324    if test "x$LIBFFI_FOUND" = xno; then
55325      for ac_header in ffi.h
55326do :
55327  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
55328if test "x$ac_cv_header_ffi_h" = xyes; then :
55329  cat >>confdefs.h <<_ACEOF
55330#define HAVE_FFI_H 1
55331_ACEOF
55332
55333            LIBFFI_FOUND=yes
55334            LIBFFI_CFLAGS=
55335            LIBFFI_LIBS=-lffi
55336
55337else
55338  LIBFFI_FOUND=no
55339
55340fi
55341
55342done
55343
55344    fi
55345    if test "x$LIBFFI_FOUND" = xno; then
55346
55347  # Print a helpful message on how to acquire the necessary build dependency.
55348  # ffi is the help tag: freetype, cups, alsa etc
55349  MISSING_DEPENDENCY=ffi
55350
55351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55352    cygwin_help $MISSING_DEPENDENCY
55353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55354    msys_help $MISSING_DEPENDENCY
55355  else
55356    PKGHANDLER_COMMAND=
55357
55358    case $PKGHANDLER in
55359      apt-get)
55360        apt_help     $MISSING_DEPENDENCY ;;
55361      yum)
55362        yum_help     $MISSING_DEPENDENCY ;;
55363      port)
55364        port_help    $MISSING_DEPENDENCY ;;
55365      pkgutil)
55366        pkgutil_help $MISSING_DEPENDENCY ;;
55367      pkgadd)
55368        pkgadd_help  $MISSING_DEPENDENCY ;;
55369    esac
55370
55371    if test "x$PKGHANDLER_COMMAND" != x; then
55372      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55373    fi
55374  fi
55375
55376      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
55377    fi
55378
55379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
55380$as_echo_n "checking if libffi works... " >&6; }
55381    ac_ext=c
55382ac_cpp='$CPP $CPPFLAGS'
55383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55385ac_compiler_gnu=$ac_cv_c_compiler_gnu
55386
55387    OLD_CFLAGS="$CFLAGS"
55388    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
55389    OLD_LIBS="$LIBS"
55390    LIBS="$LIBS $LIBFFI_LIBS"
55391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55392/* end confdefs.h.  */
55393#include <ffi.h>
55394int
55395main ()
55396{
55397
55398          ffi_call(NULL, NULL, NULL, NULL);
55399          return 0;
55400
55401  ;
55402  return 0;
55403}
55404_ACEOF
55405if ac_fn_c_try_link "$LINENO"; then :
55406  LIBFFI_WORKS=yes
55407else
55408  LIBFFI_WORKS=no
55409
55410fi
55411rm -f core conftest.err conftest.$ac_objext \
55412    conftest$ac_exeext conftest.$ac_ext
55413    CFLAGS="$OLD_CFLAGS"
55414    LIBS="$OLD_LIBS"
55415    ac_ext=cpp
55416ac_cpp='$CXXCPP $CPPFLAGS'
55417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55420
55421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
55422$as_echo "$LIBFFI_WORKS" >&6; }
55423
55424    if test "x$LIBFFI_WORKS" = xno; then
55425
55426  # Print a helpful message on how to acquire the necessary build dependency.
55427  # ffi is the help tag: freetype, cups, alsa etc
55428  MISSING_DEPENDENCY=ffi
55429
55430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55431    cygwin_help $MISSING_DEPENDENCY
55432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55433    msys_help $MISSING_DEPENDENCY
55434  else
55435    PKGHANDLER_COMMAND=
55436
55437    case $PKGHANDLER in
55438      apt-get)
55439        apt_help     $MISSING_DEPENDENCY ;;
55440      yum)
55441        yum_help     $MISSING_DEPENDENCY ;;
55442      port)
55443        port_help    $MISSING_DEPENDENCY ;;
55444      pkgutil)
55445        pkgutil_help $MISSING_DEPENDENCY ;;
55446      pkgadd)
55447        pkgadd_help  $MISSING_DEPENDENCY ;;
55448    esac
55449
55450    if test "x$PKGHANDLER_COMMAND" != x; then
55451      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55452    fi
55453  fi
55454
55455      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
55456    fi
55457  fi
55458
55459
55460
55461
55462
55463  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
55464    # Extract the first word of "llvm-config", so it can be a program name with args.
55465set dummy llvm-config; ac_word=$2
55466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55467$as_echo_n "checking for $ac_word... " >&6; }
55468if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
55469  $as_echo_n "(cached) " >&6
55470else
55471  if test -n "$LLVM_CONFIG"; then
55472  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
55473else
55474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55475for as_dir in $PATH
55476do
55477  IFS=$as_save_IFS
55478  test -z "$as_dir" && as_dir=.
55479    for ac_exec_ext in '' $ac_executable_extensions; do
55480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55481    ac_cv_prog_LLVM_CONFIG="llvm-config"
55482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55483    break 2
55484  fi
55485done
55486  done
55487IFS=$as_save_IFS
55488
55489fi
55490fi
55491LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
55492if test -n "$LLVM_CONFIG"; then
55493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
55494$as_echo "$LLVM_CONFIG" >&6; }
55495else
55496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55497$as_echo "no" >&6; }
55498fi
55499
55500
55501
55502    if test "x$LLVM_CONFIG" != xllvm-config; then
55503      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
55504    fi
55505
55506    llvm_components="jit mcjit engine nativecodegen native"
55507    unset LLVM_CFLAGS
55508    for flag in $("$LLVM_CONFIG" --cxxflags); do
55509      if echo "${flag}" | grep -q '^-[ID]'; then
55510        if test "${flag}" != "-D_DEBUG" ; then
55511          if test "${LLVM_CFLAGS}" != "" ; then
55512            LLVM_CFLAGS="${LLVM_CFLAGS} "
55513          fi
55514          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
55515        fi
55516      fi
55517    done
55518    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
55519    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
55520
55521    unset LLVM_LDFLAGS
55522    for flag in $("${LLVM_CONFIG}" --ldflags); do
55523      if echo "${flag}" | grep -q '^-L'; then
55524        if test "${LLVM_LDFLAGS}" != ""; then
55525          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
55526        fi
55527        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
55528      fi
55529    done
55530
55531    unset LLVM_LIBS
55532    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
55533      if echo "${flag}" | grep -q '^-l'; then
55534        if test "${LLVM_LIBS}" != ""; then
55535          LLVM_LIBS="${LLVM_LIBS} "
55536        fi
55537        LLVM_LIBS="${LLVM_LIBS}${flag}"
55538      fi
55539    done
55540
55541
55542
55543
55544  fi
55545
55546
55547
55548# Check whether --with-libjpeg was given.
55549if test "${with_libjpeg+set}" = set; then :
55550  withval=$with_libjpeg;
55551fi
55552
55553
55554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
55555$as_echo_n "checking for which libjpeg to use... " >&6; }
55556  # default is bundled
55557  DEFAULT_LIBJPEG=bundled
55558  # if user didn't specify, use DEFAULT_LIBJPEG
55559  if test "x${with_libjpeg}" = "x"; then
55560    with_libjpeg=${DEFAULT_LIBJPEG}
55561  fi
55562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
55563$as_echo "${with_libjpeg}" >&6; }
55564
55565  if test "x${with_libjpeg}" = "xbundled"; then
55566    USE_EXTERNAL_LIBJPEG=false
55567  elif test "x${with_libjpeg}" = "xsystem"; then
55568    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
55569if test "x$ac_cv_header_jpeglib_h" = xyes; then :
55570
55571else
55572   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
55573fi
55574
55575
55576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
55577$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
55578if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
55579  $as_echo_n "(cached) " >&6
55580else
55581  ac_check_lib_save_LIBS=$LIBS
55582LIBS="-ljpeg  $LIBS"
55583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55584/* end confdefs.h.  */
55585
55586/* Override any GCC internal prototype to avoid an error.
55587   Use char because int might match the return type of a GCC
55588   builtin and then its argument prototype would still apply.  */
55589#ifdef __cplusplus
55590extern "C"
55591#endif
55592char jpeg_CreateDecompress ();
55593int
55594main ()
55595{
55596return jpeg_CreateDecompress ();
55597  ;
55598  return 0;
55599}
55600_ACEOF
55601if ac_fn_cxx_try_link "$LINENO"; then :
55602  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
55603else
55604  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
55605fi
55606rm -f core conftest.err conftest.$ac_objext \
55607    conftest$ac_exeext conftest.$ac_ext
55608LIBS=$ac_check_lib_save_LIBS
55609fi
55610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
55611$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
55612if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
55613  cat >>confdefs.h <<_ACEOF
55614#define HAVE_LIBJPEG 1
55615_ACEOF
55616
55617  LIBS="-ljpeg $LIBS"
55618
55619else
55620   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
55621fi
55622
55623
55624    USE_EXTERNAL_LIBJPEG=true
55625  else
55626    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
55627  fi
55628
55629
55630
55631
55632
55633# Check whether --with-giflib was given.
55634if test "${with_giflib+set}" = set; then :
55635  withval=$with_giflib;
55636fi
55637
55638
55639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
55640$as_echo_n "checking for which giflib to use... " >&6; }
55641  # default is bundled
55642  DEFAULT_GIFLIB=bundled
55643  # if user didn't specify, use DEFAULT_GIFLIB
55644  if test "x${with_giflib}" = "x"; then
55645    with_giflib=${DEFAULT_GIFLIB}
55646  fi
55647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
55648$as_echo "${with_giflib}" >&6; }
55649
55650  if test "x${with_giflib}" = "xbundled"; then
55651    USE_EXTERNAL_LIBGIF=false
55652  elif test "x${with_giflib}" = "xsystem"; then
55653    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
55654if test "x$ac_cv_header_gif_lib_h" = xyes; then :
55655
55656else
55657   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
55658fi
55659
55660
55661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
55662$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
55663if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
55664  $as_echo_n "(cached) " >&6
55665else
55666  ac_check_lib_save_LIBS=$LIBS
55667LIBS="-lgif  $LIBS"
55668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55669/* end confdefs.h.  */
55670
55671/* Override any GCC internal prototype to avoid an error.
55672   Use char because int might match the return type of a GCC
55673   builtin and then its argument prototype would still apply.  */
55674#ifdef __cplusplus
55675extern "C"
55676#endif
55677char DGifGetCode ();
55678int
55679main ()
55680{
55681return DGifGetCode ();
55682  ;
55683  return 0;
55684}
55685_ACEOF
55686if ac_fn_cxx_try_link "$LINENO"; then :
55687  ac_cv_lib_gif_DGifGetCode=yes
55688else
55689  ac_cv_lib_gif_DGifGetCode=no
55690fi
55691rm -f core conftest.err conftest.$ac_objext \
55692    conftest$ac_exeext conftest.$ac_ext
55693LIBS=$ac_check_lib_save_LIBS
55694fi
55695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
55696$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
55697if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
55698  cat >>confdefs.h <<_ACEOF
55699#define HAVE_LIBGIF 1
55700_ACEOF
55701
55702  LIBS="-lgif $LIBS"
55703
55704else
55705   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
55706fi
55707
55708
55709    USE_EXTERNAL_LIBGIF=true
55710  else
55711    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
55712  fi
55713
55714
55715
55716
55717
55718# Check whether --with-libpng was given.
55719if test "${with_libpng+set}" = set; then :
55720  withval=$with_libpng;
55721fi
55722
55723
55724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
55725$as_echo_n "checking for which libpng to use... " >&6; }
55726
55727  # default is bundled
55728  DEFAULT_LIBPNG=bundled
55729  # if user didn't specify, use DEFAULT_LIBPNG
55730  if test "x${with_libpng}" = "x"; then
55731      with_libpng=${DEFAULT_LIBPNG}
55732  fi
55733
55734  if test "x${with_libpng}" = "xbundled"; then
55735      USE_EXTERNAL_LIBPNG=false
55736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55737$as_echo "bundled" >&6; }
55738  elif test "x${with_libpng}" = "xsystem"; then
55739
55740pkg_failed=no
55741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
55742$as_echo_n "checking for PNG... " >&6; }
55743
55744if test -n "$PNG_CFLAGS"; then
55745    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
55746 elif test -n "$PKG_CONFIG"; then
55747    if test -n "$PKG_CONFIG" && \
55748    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55749  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55750  ac_status=$?
55751  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55752  test $ac_status = 0; }; then
55753  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
55754else
55755  pkg_failed=yes
55756fi
55757 else
55758    pkg_failed=untried
55759fi
55760if test -n "$PNG_LIBS"; then
55761    pkg_cv_PNG_LIBS="$PNG_LIBS"
55762 elif test -n "$PKG_CONFIG"; then
55763    if test -n "$PKG_CONFIG" && \
55764    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55765  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55766  ac_status=$?
55767  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55768  test $ac_status = 0; }; then
55769  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
55770else
55771  pkg_failed=yes
55772fi
55773 else
55774    pkg_failed=untried
55775fi
55776
55777
55778
55779if test $pkg_failed = yes; then
55780
55781if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55782        _pkg_short_errors_supported=yes
55783else
55784        _pkg_short_errors_supported=no
55785fi
55786        if test $_pkg_short_errors_supported = yes; then
55787	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
55788        else
55789	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
55790        fi
55791	# Put the nasty error message in config.log where it belongs
55792	echo "$PNG_PKG_ERRORS" >&5
55793
55794	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55795$as_echo "no" >&6; }
55796                 LIBPNG_FOUND=no
55797elif test $pkg_failed = untried; then
55798	 LIBPNG_FOUND=no
55799else
55800	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
55801	PNG_LIBS=$pkg_cv_PNG_LIBS
55802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55803$as_echo "yes" >&6; }
55804	 LIBPNG_FOUND=yes
55805fi
55806      if test "x${LIBPNG_FOUND}" = "xyes"; then
55807          USE_EXTERNAL_LIBPNG=true
55808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55809$as_echo "system" >&6; }
55810      else
55811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55812$as_echo "system not found" >&6; }
55813          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
55814      fi
55815  else
55816      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
55817  fi
55818
55819
55820
55821
55822
55823# Check whether --with-zlib was given.
55824if test "${with_zlib+set}" = set; then :
55825  withval=$with_zlib;
55826fi
55827
55828
55829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
55830$as_echo_n "checking for compress in -lz... " >&6; }
55831if ${ac_cv_lib_z_compress+:} false; then :
55832  $as_echo_n "(cached) " >&6
55833else
55834  ac_check_lib_save_LIBS=$LIBS
55835LIBS="-lz  $LIBS"
55836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55837/* end confdefs.h.  */
55838
55839/* Override any GCC internal prototype to avoid an error.
55840   Use char because int might match the return type of a GCC
55841   builtin and then its argument prototype would still apply.  */
55842#ifdef __cplusplus
55843extern "C"
55844#endif
55845char compress ();
55846int
55847main ()
55848{
55849return compress ();
55850  ;
55851  return 0;
55852}
55853_ACEOF
55854if ac_fn_cxx_try_link "$LINENO"; then :
55855  ac_cv_lib_z_compress=yes
55856else
55857  ac_cv_lib_z_compress=no
55858fi
55859rm -f core conftest.err conftest.$ac_objext \
55860    conftest$ac_exeext conftest.$ac_ext
55861LIBS=$ac_check_lib_save_LIBS
55862fi
55863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
55864$as_echo "$ac_cv_lib_z_compress" >&6; }
55865if test "x$ac_cv_lib_z_compress" = xyes; then :
55866   ZLIB_FOUND=yes
55867else
55868   ZLIB_FOUND=no
55869fi
55870
55871
55872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
55873$as_echo_n "checking for which zlib to use... " >&6; }
55874
55875  DEFAULT_ZLIB=bundled
55876  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55877    # On macosx default is system...on others default is bundled
55878    DEFAULT_ZLIB=system
55879  fi
55880
55881  if test "x${ZLIB_FOUND}" != "xyes"; then
55882    # If we don't find any system...set default to bundled
55883    DEFAULT_ZLIB=bundled
55884  fi
55885
55886  # If user didn't specify, use DEFAULT_ZLIB
55887  if test "x${with_zlib}" = "x"; then
55888    with_zlib=${DEFAULT_ZLIB}
55889  fi
55890
55891  if test "x${with_zlib}" = "xbundled"; then
55892    USE_EXTERNAL_LIBZ=false
55893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55894$as_echo "bundled" >&6; }
55895  elif test "x${with_zlib}" = "xsystem"; then
55896    if test "x${ZLIB_FOUND}" = "xyes"; then
55897      USE_EXTERNAL_LIBZ=true
55898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55899$as_echo "system" >&6; }
55900    else
55901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55902$as_echo "system not found" >&6; }
55903      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
55904    fi
55905  else
55906    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
55907  fi
55908
55909
55910
55911
55912
55913# Check whether --with-lcms was given.
55914if test "${with_lcms+set}" = set; then :
55915  withval=$with_lcms;
55916fi
55917
55918
55919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
55920$as_echo_n "checking for which lcms to use... " >&6; }
55921
55922  DEFAULT_LCMS=bundled
55923  # If user didn't specify, use DEFAULT_LCMS
55924  if test "x${with_lcms}" = "x"; then
55925      with_lcms=${DEFAULT_LCMS}
55926  fi
55927
55928  if test "x${with_lcms}" = "xbundled"; then
55929    USE_EXTERNAL_LCMS=false
55930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55931$as_echo "bundled" >&6; }
55932  elif test "x${with_lcms}" = "xsystem"; then
55933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55934$as_echo "system" >&6; }
55935
55936pkg_failed=no
55937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
55938$as_echo_n "checking for LCMS... " >&6; }
55939
55940if test -n "$LCMS_CFLAGS"; then
55941    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
55942 elif test -n "$PKG_CONFIG"; then
55943    if test -n "$PKG_CONFIG" && \
55944    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
55945  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
55946  ac_status=$?
55947  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55948  test $ac_status = 0; }; then
55949  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
55950else
55951  pkg_failed=yes
55952fi
55953 else
55954    pkg_failed=untried
55955fi
55956if test -n "$LCMS_LIBS"; then
55957    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
55958 elif test -n "$PKG_CONFIG"; then
55959    if test -n "$PKG_CONFIG" && \
55960    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
55961  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
55962  ac_status=$?
55963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55964  test $ac_status = 0; }; then
55965  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
55966else
55967  pkg_failed=yes
55968fi
55969 else
55970    pkg_failed=untried
55971fi
55972
55973
55974
55975if test $pkg_failed = yes; then
55976
55977if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55978        _pkg_short_errors_supported=yes
55979else
55980        _pkg_short_errors_supported=no
55981fi
55982        if test $_pkg_short_errors_supported = yes; then
55983	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
55984        else
55985	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
55986        fi
55987	# Put the nasty error message in config.log where it belongs
55988	echo "$LCMS_PKG_ERRORS" >&5
55989
55990	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55991$as_echo "no" >&6; }
55992                LCMS_FOUND=no
55993elif test $pkg_failed = untried; then
55994	LCMS_FOUND=no
55995else
55996	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
55997	LCMS_LIBS=$pkg_cv_LCMS_LIBS
55998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55999$as_echo "yes" >&6; }
56000	LCMS_FOUND=yes
56001fi
56002    if test "x${LCMS_FOUND}" = "xyes"; then
56003      USE_EXTERNAL_LCMS=true
56004    else
56005      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56006    fi
56007  else
56008    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56009  fi
56010
56011
56012
56013
56014
56015
56016
56017
56018
56019
56020
56021  # Setup libm (the maths library)
56022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56023$as_echo_n "checking for cos in -lm... " >&6; }
56024if ${ac_cv_lib_m_cos+:} false; then :
56025  $as_echo_n "(cached) " >&6
56026else
56027  ac_check_lib_save_LIBS=$LIBS
56028LIBS="-lm  $LIBS"
56029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56030/* end confdefs.h.  */
56031
56032/* Override any GCC internal prototype to avoid an error.
56033   Use char because int might match the return type of a GCC
56034   builtin and then its argument prototype would still apply.  */
56035#ifdef __cplusplus
56036extern "C"
56037#endif
56038char cos ();
56039int
56040main ()
56041{
56042return cos ();
56043  ;
56044  return 0;
56045}
56046_ACEOF
56047if ac_fn_cxx_try_link "$LINENO"; then :
56048  ac_cv_lib_m_cos=yes
56049else
56050  ac_cv_lib_m_cos=no
56051fi
56052rm -f core conftest.err conftest.$ac_objext \
56053    conftest$ac_exeext conftest.$ac_ext
56054LIBS=$ac_check_lib_save_LIBS
56055fi
56056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56057$as_echo "$ac_cv_lib_m_cos" >&6; }
56058if test "x$ac_cv_lib_m_cos" = xyes; then :
56059  cat >>confdefs.h <<_ACEOF
56060#define HAVE_LIBM 1
56061_ACEOF
56062
56063  LIBS="-lm $LIBS"
56064
56065else
56066
56067      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56068$as_echo "$as_me: Maths library was not found" >&6;}
56069
56070fi
56071
56072  LIBM=-lm
56073
56074
56075  # Setup libdl (for dynamic library loading)
56076  save_LIBS="$LIBS"
56077  LIBS=""
56078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56079$as_echo_n "checking for dlopen in -ldl... " >&6; }
56080if ${ac_cv_lib_dl_dlopen+:} false; then :
56081  $as_echo_n "(cached) " >&6
56082else
56083  ac_check_lib_save_LIBS=$LIBS
56084LIBS="-ldl  $LIBS"
56085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56086/* end confdefs.h.  */
56087
56088/* Override any GCC internal prototype to avoid an error.
56089   Use char because int might match the return type of a GCC
56090   builtin and then its argument prototype would still apply.  */
56091#ifdef __cplusplus
56092extern "C"
56093#endif
56094char dlopen ();
56095int
56096main ()
56097{
56098return dlopen ();
56099  ;
56100  return 0;
56101}
56102_ACEOF
56103if ac_fn_cxx_try_link "$LINENO"; then :
56104  ac_cv_lib_dl_dlopen=yes
56105else
56106  ac_cv_lib_dl_dlopen=no
56107fi
56108rm -f core conftest.err conftest.$ac_objext \
56109    conftest$ac_exeext conftest.$ac_ext
56110LIBS=$ac_check_lib_save_LIBS
56111fi
56112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56113$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56114if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56115  cat >>confdefs.h <<_ACEOF
56116#define HAVE_LIBDL 1
56117_ACEOF
56118
56119  LIBS="-ldl $LIBS"
56120
56121fi
56122
56123  LIBDL="$LIBS"
56124
56125  LIBS="$save_LIBS"
56126
56127  # Deprecated libraries, keep the flags for backwards compatibility
56128  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56129
56130
56131# Check whether --with-dxsdk was given.
56132if test "${with_dxsdk+set}" = set; then :
56133  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56134$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56135fi
56136
56137
56138
56139
56140# Check whether --with-dxsdk-lib was given.
56141if test "${with_dxsdk_lib+set}" = set; then :
56142  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56143$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56144fi
56145
56146
56147
56148
56149# Check whether --with-dxsdk-include was given.
56150if test "${with_dxsdk_include+set}" = set; then :
56151  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
56152$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
56153fi
56154
56155
56156  fi
56157
56158  # Control if libzip can use mmap. Available for purposes of overriding.
56159  LIBZIP_CAN_USE_MMAP=true
56160
56161
56162
56163
56164
56165
56166
56167
56168
56169
56170
56171
56172
56173
56174###############################################################################
56175#
56176# We need to do some final tweaking, when everything else is done.
56177#
56178###############################################################################
56179
56180
56181  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
56182
56183
56184  # The name of the Service Agent jar.
56185  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
56186  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56187    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
56188  fi
56189
56190
56191
56192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
56193$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
56194
56195    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
56196      ENABLE_INTREE_EC=yes
56197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56198$as_echo "yes" >&6; }
56199    else
56200      ENABLE_INTREE_EC=no
56201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56202$as_echo "no" >&6; }
56203    fi
56204
56205
56206
56207
56208###############################################################################
56209#
56210# Configure parts of the build that only affect the build performance,
56211# not the result.
56212#
56213###############################################################################
56214
56215
56216  # How many cores do we have on this build system?
56217
56218# Check whether --with-num-cores was given.
56219if test "${with_num_cores+set}" = set; then :
56220  withval=$with_num_cores;
56221fi
56222
56223  if test "x$with_num_cores" = x; then
56224    # The number of cores were not specified, try to probe them.
56225
56226  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
56227$as_echo_n "checking for number of cores... " >&6; }
56228  NUM_CORES=1
56229  FOUND_CORES=no
56230
56231  if test -f /proc/cpuinfo; then
56232    # Looks like a Linux (or cygwin) system
56233    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
56234    FOUND_CORES=yes
56235  elif test -x /usr/sbin/psrinfo; then
56236    # Looks like a Solaris system
56237    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
56238    FOUND_CORES=yes
56239  elif test -x /usr/sbin/system_profiler; then
56240    # Looks like a MacOSX system
56241    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
56242    FOUND_CORES=yes
56243  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
56244    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
56245    FOUND_CORES=yes
56246  elif test -n "$NUMBER_OF_PROCESSORS"; then
56247    # On windows, look in the env
56248    NUM_CORES=$NUMBER_OF_PROCESSORS
56249    FOUND_CORES=yes
56250  fi
56251
56252  if test "x$FOUND_CORES" = xyes; then
56253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
56254$as_echo "$NUM_CORES" >&6; }
56255  else
56256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
56257$as_echo "could not detect number of cores, defaulting to 1" >&6; }
56258    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
56259$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
56260  fi
56261
56262  else
56263    NUM_CORES=$with_num_cores
56264  fi
56265
56266
56267
56268  # How much memory do we have on this build system?
56269
56270# Check whether --with-memory-size was given.
56271if test "${with_memory_size+set}" = set; then :
56272  withval=$with_memory_size;
56273fi
56274
56275  if test "x$with_memory_size" = x; then
56276    # The memory size was not specified, try to probe it.
56277
56278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
56279$as_echo_n "checking for memory size... " >&6; }
56280  # Default to 1024 MB
56281  MEMORY_SIZE=1024
56282  FOUND_MEM=no
56283
56284  if test -f /proc/meminfo; then
56285    # Looks like a Linux (or cygwin) system
56286    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
56287    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
56288    FOUND_MEM=yes
56289  elif test -x /usr/sbin/prtconf; then
56290    # Looks like a Solaris or AIX system
56291    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
56292    FOUND_MEM=yes
56293  elif test -x /usr/sbin/system_profiler; then
56294    # Looks like a MacOSX system
56295    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
56296    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
56297    FOUND_MEM=yes
56298  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
56299    # Windows, but without cygwin
56300    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
56301    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
56302    FOUND_MEM=yes
56303  fi
56304
56305  if test "x$FOUND_MEM" = xyes; then
56306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
56307$as_echo "$MEMORY_SIZE MB" >&6; }
56308  else
56309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
56310$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
56311    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
56312$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
56313  fi
56314
56315  else
56316    MEMORY_SIZE=$with_memory_size
56317  fi
56318
56319
56320
56321  # Provide a decent default number of parallel jobs for make depending on
56322  # number of cores, amount of memory and machine architecture.
56323
56324# Check whether --with-jobs was given.
56325if test "${with_jobs+set}" = set; then :
56326  withval=$with_jobs;
56327fi
56328
56329  if test "x$with_jobs" = x; then
56330    # Number of jobs was not specified, calculate.
56331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
56332$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
56333    # Approximate memory in GB.
56334    memory_gb=`expr $MEMORY_SIZE / 1024`
56335    # Pick the lowest of memory in gb and number of cores.
56336    if test "$memory_gb" -lt "$NUM_CORES"; then
56337      JOBS="$memory_gb"
56338    else
56339      JOBS="$NUM_CORES"
56340      # On bigger machines, leave some room for other processes to run
56341      if test "$JOBS" -gt "4"; then
56342        JOBS=`expr $JOBS '*' 90 / 100`
56343      fi
56344    fi
56345    # Cap number of jobs to 16
56346    if test "$JOBS" -gt "16"; then
56347      JOBS=16
56348    fi
56349    if test "$JOBS" -eq "0"; then
56350      JOBS=1
56351    fi
56352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
56353$as_echo "$JOBS" >&6; }
56354  else
56355    JOBS=$with_jobs
56356  fi
56357
56358
56359
56360# Setup arguments for the boot jdk (after cores and memory have been setup)
56361
56362  ##############################################################################
56363  #
56364  # Specify jvm options for anything that is run with the Boot JDK.
56365  # Not all JVM:s accept the same arguments on the command line.
56366  #
56367
56368# Check whether --with-boot-jdk-jvmargs was given.
56369if test "${with_boot_jdk_jvmargs+set}" = set; then :
56370  withval=$with_boot_jdk_jvmargs;
56371fi
56372
56373
56374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
56375$as_echo_n "checking flags for boot jdk java command ... " >&6; }
56376
56377  # Disable special log output when a debug build is used as Boot JDK...
56378
56379  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
56380  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
56381  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
56382  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56383  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56384  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56385    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
56386    JVM_ARG_OK=true
56387  else
56388    $ECHO "Arg failed:" >&5
56389    $ECHO "$OUTPUT" >&5
56390    JVM_ARG_OK=false
56391  fi
56392
56393
56394  # Apply user provided options.
56395
56396  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
56397  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
56398  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
56399  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56400  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56401  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56402    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
56403    JVM_ARG_OK=true
56404  else
56405    $ECHO "Arg failed:" >&5
56406    $ECHO "$OUTPUT" >&5
56407    JVM_ARG_OK=false
56408  fi
56409
56410
56411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
56412$as_echo "$boot_jdk_jvmargs" >&6; }
56413
56414  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56415  JAVA_FLAGS=$boot_jdk_jvmargs
56416
56417
56418
56419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
56420$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
56421
56422  # Starting amount of heap memory.
56423
56424  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
56425  $ECHO "Command: $JAVA -Xms64M -version" >&5
56426  OUTPUT=`$JAVA -Xms64M -version 2>&1`
56427  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56428  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56429  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56430    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
56431    JVM_ARG_OK=true
56432  else
56433    $ECHO "Arg failed:" >&5
56434    $ECHO "$OUTPUT" >&5
56435    JVM_ARG_OK=false
56436  fi
56437
56438
56439  # Maximum amount of heap memory.
56440  # Maximum stack size.
56441  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
56442  if test "x$BOOT_JDK_BITS" = "x32"; then
56443    if test "$JVM_MAX_HEAP" -gt "1100"; then
56444      JVM_MAX_HEAP=1100
56445    elif test "$JVM_MAX_HEAP" -lt "512"; then
56446      JVM_MAX_HEAP=512
56447    fi
56448    STACK_SIZE=768
56449  else
56450    # Running a 64 bit JVM allows for and requires a bigger heap
56451    if test "$JVM_MAX_HEAP" -gt "1600"; then
56452      JVM_MAX_HEAP=1600
56453    elif test "$JVM_MAX_HEAP" -lt "512"; then
56454      JVM_MAX_HEAP=512
56455    fi
56456    STACK_SIZE=1536
56457  fi
56458
56459  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
56460  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
56461  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
56462  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56463  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56464  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56465    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
56466    JVM_ARG_OK=true
56467  else
56468    $ECHO "Arg failed:" >&5
56469    $ECHO "$OUTPUT" >&5
56470    JVM_ARG_OK=false
56471  fi
56472
56473
56474  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
56475  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
56476  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
56477  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56478  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56479  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56480    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
56481    JVM_ARG_OK=true
56482  else
56483    $ECHO "Arg failed:" >&5
56484    $ECHO "$OUTPUT" >&5
56485    JVM_ARG_OK=false
56486  fi
56487
56488
56489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
56490$as_echo "$boot_jdk_jvmargs_big" >&6; }
56491
56492  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56493
56494
56495  # By default, the main javac compilations use big
56496  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
56497
56498
56499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
56500$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
56501
56502  # Use serial gc for small short lived tools if possible
56503
56504  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
56505  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
56506  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
56507  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56508  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56509  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56510    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
56511    JVM_ARG_OK=true
56512  else
56513    $ECHO "Arg failed:" >&5
56514    $ECHO "$OUTPUT" >&5
56515    JVM_ARG_OK=false
56516  fi
56517
56518
56519  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
56520  $ECHO "Command: $JAVA -Xms32M -version" >&5
56521  OUTPUT=`$JAVA -Xms32M -version 2>&1`
56522  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56523  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56524  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56525    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
56526    JVM_ARG_OK=true
56527  else
56528    $ECHO "Arg failed:" >&5
56529    $ECHO "$OUTPUT" >&5
56530    JVM_ARG_OK=false
56531  fi
56532
56533
56534  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
56535  $ECHO "Command: $JAVA -Xmx512M -version" >&5
56536  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
56537  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56538  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56539  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56540    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
56541    JVM_ARG_OK=true
56542  else
56543    $ECHO "Arg failed:" >&5
56544    $ECHO "$OUTPUT" >&5
56545    JVM_ARG_OK=false
56546  fi
56547
56548
56549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
56550$as_echo "$boot_jdk_jvmargs_small" >&6; }
56551
56552  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56553
56554
56555  JAVA_TOOL_FLAGS_SMALL=""
56556  for f in $JAVA_FLAGS_SMALL; do
56557    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
56558  done
56559
56560
56561
56562# Setup smart javac (after cores and memory have been setup)
56563
56564
56565# Check whether --with-sjavac-server-java was given.
56566if test "${with_sjavac_server_java+set}" = set; then :
56567  withval=$with_sjavac_server_java;
56568fi
56569
56570
56571  if test "x$with_sjavac_server_java" != x; then
56572    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
56573    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
56574    if test "x$FOUND_VERSION" = x; then
56575      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
56576    fi
56577  else
56578    SJAVAC_SERVER_JAVA="$JAVA"
56579  fi
56580
56581
56582  if test "$MEMORY_SIZE" -gt "3000"; then
56583
56584  $ECHO "Check if jvm arg is ok: -d64" >&5
56585  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
56586  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
56587  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56588  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56589  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56590    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
56591    JVM_ARG_OK=true
56592  else
56593    $ECHO "Arg failed:" >&5
56594    $ECHO "$OUTPUT" >&5
56595    JVM_ARG_OK=false
56596  fi
56597
56598    if test "$JVM_ARG_OK" = true; then
56599      JVM_64BIT=true
56600      JVM_ARG_OK=false
56601    fi
56602  fi
56603
56604  MX_VALUE=`expr $MEMORY_SIZE / 2`
56605  if test "$JVM_64BIT" = true; then
56606    # Set ms lower than mx since more than one instance of the server might
56607    # get launched at the same time before they figure out which instance won.
56608    MS_VALUE=512
56609    if test "$MX_VALUE" -gt "2048"; then
56610      MX_VALUE=2048
56611    fi
56612  else
56613    MS_VALUE=256
56614    if test "$MX_VALUE" -gt "1500"; then
56615      MX_VALUE=1500
56616    fi
56617  fi
56618  if test "$MX_VALUE" -lt "512"; then
56619    MX_VALUE=512
56620  fi
56621
56622  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
56623  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
56624  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
56625  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56626  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56627  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56628    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
56629    JVM_ARG_OK=true
56630  else
56631    $ECHO "Arg failed:" >&5
56632    $ECHO "$OUTPUT" >&5
56633    JVM_ARG_OK=false
56634  fi
56635
56636
56637
56638  # Check whether --enable-sjavac was given.
56639if test "${enable_sjavac+set}" = set; then :
56640  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
56641else
56642  ENABLE_SJAVAC="no"
56643fi
56644
56645  if test "x$JVM_ARG_OK" = "xfalse"; then
56646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
56647$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
56648    ENABLE_SJAVAC="no"
56649  fi
56650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
56651$as_echo_n "checking whether to use sjavac... " >&6; }
56652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
56653$as_echo "$ENABLE_SJAVAC" >&6; }
56654
56655
56656  # Check whether --enable-javac-server was given.
56657if test "${enable_javac_server+set}" = set; then :
56658  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
56659else
56660  ENABLE_JAVAC_SERVER="yes"
56661fi
56662
56663  if test "x$JVM_ARG_OK" = "xfalse"; then
56664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
56665$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
56666    ENABLE_JAVAC_SERVER="no"
56667  fi
56668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
56669$as_echo_n "checking whether to use javac server... " >&6; }
56670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
56671$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
56672
56673
56674  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
56675    # When using a server javac, the small client instances do not need much
56676    # resources.
56677    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
56678  fi
56679
56680
56681# Setup use of icecc if requested
56682
56683  # Check whether --enable-icecc was given.
56684if test "${enable_icecc+set}" = set; then :
56685  enableval=$enable_icecc;
56686fi
56687
56688
56689  if test "x${enable_icecc}" = "xyes"; then
56690
56691
56692
56693  # Publish this variable in the help.
56694
56695
56696  if [ -z "${ICECC_CMD+x}" ]; then
56697    # The variable is not set by user, try to locate tool using the code snippet
56698    for ac_prog in icecc
56699do
56700  # Extract the first word of "$ac_prog", so it can be a program name with args.
56701set dummy $ac_prog; ac_word=$2
56702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56703$as_echo_n "checking for $ac_word... " >&6; }
56704if ${ac_cv_path_ICECC_CMD+:} false; then :
56705  $as_echo_n "(cached) " >&6
56706else
56707  case $ICECC_CMD in
56708  [\\/]* | ?:[\\/]*)
56709  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56710  ;;
56711  *)
56712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56713for as_dir in $PATH
56714do
56715  IFS=$as_save_IFS
56716  test -z "$as_dir" && as_dir=.
56717    for ac_exec_ext in '' $ac_executable_extensions; do
56718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56719    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56721    break 2
56722  fi
56723done
56724  done
56725IFS=$as_save_IFS
56726
56727  ;;
56728esac
56729fi
56730ICECC_CMD=$ac_cv_path_ICECC_CMD
56731if test -n "$ICECC_CMD"; then
56732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56733$as_echo "$ICECC_CMD" >&6; }
56734else
56735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56736$as_echo "no" >&6; }
56737fi
56738
56739
56740  test -n "$ICECC_CMD" && break
56741done
56742
56743  else
56744    # The variable is set, but is it from the command line or the environment?
56745
56746    # Try to remove the string !ICECC_CMD! from our list.
56747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
56748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56749      # If it failed, the variable was not from the command line. Ignore it,
56750      # but warn the user (except for BASH, which is always set by the calling BASH).
56751      if test "xICECC_CMD" != xBASH; then
56752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
56753$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
56754      fi
56755      # Try to locate tool using the code snippet
56756      for ac_prog in icecc
56757do
56758  # Extract the first word of "$ac_prog", so it can be a program name with args.
56759set dummy $ac_prog; ac_word=$2
56760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56761$as_echo_n "checking for $ac_word... " >&6; }
56762if ${ac_cv_path_ICECC_CMD+:} false; then :
56763  $as_echo_n "(cached) " >&6
56764else
56765  case $ICECC_CMD in
56766  [\\/]* | ?:[\\/]*)
56767  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56768  ;;
56769  *)
56770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56771for as_dir in $PATH
56772do
56773  IFS=$as_save_IFS
56774  test -z "$as_dir" && as_dir=.
56775    for ac_exec_ext in '' $ac_executable_extensions; do
56776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56777    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56779    break 2
56780  fi
56781done
56782  done
56783IFS=$as_save_IFS
56784
56785  ;;
56786esac
56787fi
56788ICECC_CMD=$ac_cv_path_ICECC_CMD
56789if test -n "$ICECC_CMD"; then
56790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56791$as_echo "$ICECC_CMD" >&6; }
56792else
56793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56794$as_echo "no" >&6; }
56795fi
56796
56797
56798  test -n "$ICECC_CMD" && break
56799done
56800
56801    else
56802      # If it succeeded, then it was overridden by the user. We will use it
56803      # for the tool.
56804
56805      # First remove it from the list of overridden variables, so we can test
56806      # for unknown variables in the end.
56807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
56808
56809      # Check if we try to supply an empty value
56810      if test "x$ICECC_CMD" = x; then
56811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
56812$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
56813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56814$as_echo_n "checking for ICECC_CMD... " >&6; }
56815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
56816$as_echo "disabled" >&6; }
56817      else
56818        # Check if the provided tool contains a complete path.
56819        tool_specified="$ICECC_CMD"
56820        tool_basename="${tool_specified##*/}"
56821        if test "x$tool_basename" = "x$tool_specified"; then
56822          # A command without a complete path is provided, search $PATH.
56823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
56824$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
56825          # Extract the first word of "$tool_basename", so it can be a program name with args.
56826set dummy $tool_basename; ac_word=$2
56827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56828$as_echo_n "checking for $ac_word... " >&6; }
56829if ${ac_cv_path_ICECC_CMD+:} false; then :
56830  $as_echo_n "(cached) " >&6
56831else
56832  case $ICECC_CMD in
56833  [\\/]* | ?:[\\/]*)
56834  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56835  ;;
56836  *)
56837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56838for as_dir in $PATH
56839do
56840  IFS=$as_save_IFS
56841  test -z "$as_dir" && as_dir=.
56842    for ac_exec_ext in '' $ac_executable_extensions; do
56843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56844    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56846    break 2
56847  fi
56848done
56849  done
56850IFS=$as_save_IFS
56851
56852  ;;
56853esac
56854fi
56855ICECC_CMD=$ac_cv_path_ICECC_CMD
56856if test -n "$ICECC_CMD"; then
56857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56858$as_echo "$ICECC_CMD" >&6; }
56859else
56860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56861$as_echo "no" >&6; }
56862fi
56863
56864
56865          if test "x$ICECC_CMD" = x; then
56866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
56867          fi
56868        else
56869          # Otherwise we believe it is a complete path. Use it as it is.
56870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
56871$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
56872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56873$as_echo_n "checking for ICECC_CMD... " >&6; }
56874          if test ! -x "$tool_specified"; then
56875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
56876$as_echo "not found" >&6; }
56877            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
56878          fi
56879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
56880$as_echo "$tool_specified" >&6; }
56881        fi
56882      fi
56883    fi
56884
56885  fi
56886
56887
56888
56889  if test "x$ICECC_CMD" = x; then
56890    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
56891  fi
56892
56893
56894    old_path="$PATH"
56895
56896    # Look for icecc-create-env in some known places
56897    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
56898
56899
56900
56901  # Publish this variable in the help.
56902
56903
56904  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
56905    # The variable is not set by user, try to locate tool using the code snippet
56906    for ac_prog in icecc-create-env
56907do
56908  # Extract the first word of "$ac_prog", so it can be a program name with args.
56909set dummy $ac_prog; ac_word=$2
56910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56911$as_echo_n "checking for $ac_word... " >&6; }
56912if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
56913  $as_echo_n "(cached) " >&6
56914else
56915  case $ICECC_CREATE_ENV in
56916  [\\/]* | ?:[\\/]*)
56917  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
56918  ;;
56919  *)
56920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56921for as_dir in $PATH
56922do
56923  IFS=$as_save_IFS
56924  test -z "$as_dir" && as_dir=.
56925    for ac_exec_ext in '' $ac_executable_extensions; do
56926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56927    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
56928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56929    break 2
56930  fi
56931done
56932  done
56933IFS=$as_save_IFS
56934
56935  ;;
56936esac
56937fi
56938ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
56939if test -n "$ICECC_CREATE_ENV"; then
56940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
56941$as_echo "$ICECC_CREATE_ENV" >&6; }
56942else
56943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56944$as_echo "no" >&6; }
56945fi
56946
56947
56948  test -n "$ICECC_CREATE_ENV" && break
56949done
56950
56951  else
56952    # The variable is set, but is it from the command line or the environment?
56953
56954    # Try to remove the string !ICECC_CREATE_ENV! from our list.
56955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
56956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56957      # If it failed, the variable was not from the command line. Ignore it,
56958      # but warn the user (except for BASH, which is always set by the calling BASH).
56959      if test "xICECC_CREATE_ENV" != xBASH; then
56960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
56961$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
56962      fi
56963      # Try to locate tool using the code snippet
56964      for ac_prog in icecc-create-env
56965do
56966  # Extract the first word of "$ac_prog", so it can be a program name with args.
56967set dummy $ac_prog; ac_word=$2
56968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56969$as_echo_n "checking for $ac_word... " >&6; }
56970if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
56971  $as_echo_n "(cached) " >&6
56972else
56973  case $ICECC_CREATE_ENV in
56974  [\\/]* | ?:[\\/]*)
56975  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
56976  ;;
56977  *)
56978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56979for as_dir in $PATH
56980do
56981  IFS=$as_save_IFS
56982  test -z "$as_dir" && as_dir=.
56983    for ac_exec_ext in '' $ac_executable_extensions; do
56984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56985    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
56986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56987    break 2
56988  fi
56989done
56990  done
56991IFS=$as_save_IFS
56992
56993  ;;
56994esac
56995fi
56996ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
56997if test -n "$ICECC_CREATE_ENV"; then
56998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
56999$as_echo "$ICECC_CREATE_ENV" >&6; }
57000else
57001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57002$as_echo "no" >&6; }
57003fi
57004
57005
57006  test -n "$ICECC_CREATE_ENV" && break
57007done
57008
57009    else
57010      # If it succeeded, then it was overridden by the user. We will use it
57011      # for the tool.
57012
57013      # First remove it from the list of overridden variables, so we can test
57014      # for unknown variables in the end.
57015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57016
57017      # Check if we try to supply an empty value
57018      if test "x$ICECC_CREATE_ENV" = x; then
57019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57020$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57022$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57024$as_echo "disabled" >&6; }
57025      else
57026        # Check if the provided tool contains a complete path.
57027        tool_specified="$ICECC_CREATE_ENV"
57028        tool_basename="${tool_specified##*/}"
57029        if test "x$tool_basename" = "x$tool_specified"; then
57030          # A command without a complete path is provided, search $PATH.
57031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57032$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57033          # Extract the first word of "$tool_basename", so it can be a program name with args.
57034set dummy $tool_basename; ac_word=$2
57035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57036$as_echo_n "checking for $ac_word... " >&6; }
57037if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57038  $as_echo_n "(cached) " >&6
57039else
57040  case $ICECC_CREATE_ENV in
57041  [\\/]* | ?:[\\/]*)
57042  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57043  ;;
57044  *)
57045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57046for as_dir in $PATH
57047do
57048  IFS=$as_save_IFS
57049  test -z "$as_dir" && as_dir=.
57050    for ac_exec_ext in '' $ac_executable_extensions; do
57051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57052    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57054    break 2
57055  fi
57056done
57057  done
57058IFS=$as_save_IFS
57059
57060  ;;
57061esac
57062fi
57063ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57064if test -n "$ICECC_CREATE_ENV"; then
57065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57066$as_echo "$ICECC_CREATE_ENV" >&6; }
57067else
57068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57069$as_echo "no" >&6; }
57070fi
57071
57072
57073          if test "x$ICECC_CREATE_ENV" = x; then
57074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57075          fi
57076        else
57077          # Otherwise we believe it is a complete path. Use it as it is.
57078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57079$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57081$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57082          if test ! -x "$tool_specified"; then
57083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57084$as_echo "not found" >&6; }
57085            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57086          fi
57087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57088$as_echo "$tool_specified" >&6; }
57089        fi
57090      fi
57091    fi
57092
57093  fi
57094
57095
57096
57097  if test "x$ICECC_CREATE_ENV" = x; then
57098    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57099  fi
57100
57101
57102    # Use icecc-create-env to create a minimal compilation environment that can
57103    # be sent to the other hosts in the icecream cluster.
57104    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57105    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57107$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57108    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57109      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57110          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57111    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57112      # For clang, the icecc compilerwrapper is needed. It usually resides next
57113      # to icecc-create-env.
57114
57115
57116
57117  # Publish this variable in the help.
57118
57119
57120  if [ -z "${ICECC_WRAPPER+x}" ]; then
57121    # The variable is not set by user, try to locate tool using the code snippet
57122    for ac_prog in compilerwrapper
57123do
57124  # Extract the first word of "$ac_prog", so it can be a program name with args.
57125set dummy $ac_prog; ac_word=$2
57126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57127$as_echo_n "checking for $ac_word... " >&6; }
57128if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57129  $as_echo_n "(cached) " >&6
57130else
57131  case $ICECC_WRAPPER in
57132  [\\/]* | ?:[\\/]*)
57133  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57134  ;;
57135  *)
57136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57137for as_dir in $PATH
57138do
57139  IFS=$as_save_IFS
57140  test -z "$as_dir" && as_dir=.
57141    for ac_exec_ext in '' $ac_executable_extensions; do
57142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57143    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57145    break 2
57146  fi
57147done
57148  done
57149IFS=$as_save_IFS
57150
57151  ;;
57152esac
57153fi
57154ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57155if test -n "$ICECC_WRAPPER"; then
57156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57157$as_echo "$ICECC_WRAPPER" >&6; }
57158else
57159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57160$as_echo "no" >&6; }
57161fi
57162
57163
57164  test -n "$ICECC_WRAPPER" && break
57165done
57166
57167  else
57168    # The variable is set, but is it from the command line or the environment?
57169
57170    # Try to remove the string !ICECC_WRAPPER! from our list.
57171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
57172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57173      # If it failed, the variable was not from the command line. Ignore it,
57174      # but warn the user (except for BASH, which is always set by the calling BASH).
57175      if test "xICECC_WRAPPER" != xBASH; then
57176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
57177$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
57178      fi
57179      # Try to locate tool using the code snippet
57180      for ac_prog in compilerwrapper
57181do
57182  # Extract the first word of "$ac_prog", so it can be a program name with args.
57183set dummy $ac_prog; ac_word=$2
57184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57185$as_echo_n "checking for $ac_word... " >&6; }
57186if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57187  $as_echo_n "(cached) " >&6
57188else
57189  case $ICECC_WRAPPER in
57190  [\\/]* | ?:[\\/]*)
57191  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57192  ;;
57193  *)
57194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57195for as_dir in $PATH
57196do
57197  IFS=$as_save_IFS
57198  test -z "$as_dir" && as_dir=.
57199    for ac_exec_ext in '' $ac_executable_extensions; do
57200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57201    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57203    break 2
57204  fi
57205done
57206  done
57207IFS=$as_save_IFS
57208
57209  ;;
57210esac
57211fi
57212ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57213if test -n "$ICECC_WRAPPER"; then
57214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57215$as_echo "$ICECC_WRAPPER" >&6; }
57216else
57217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57218$as_echo "no" >&6; }
57219fi
57220
57221
57222  test -n "$ICECC_WRAPPER" && break
57223done
57224
57225    else
57226      # If it succeeded, then it was overridden by the user. We will use it
57227      # for the tool.
57228
57229      # First remove it from the list of overridden variables, so we can test
57230      # for unknown variables in the end.
57231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57232
57233      # Check if we try to supply an empty value
57234      if test "x$ICECC_WRAPPER" = x; then
57235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
57236$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
57237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57238$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57240$as_echo "disabled" >&6; }
57241      else
57242        # Check if the provided tool contains a complete path.
57243        tool_specified="$ICECC_WRAPPER"
57244        tool_basename="${tool_specified##*/}"
57245        if test "x$tool_basename" = "x$tool_specified"; then
57246          # A command without a complete path is provided, search $PATH.
57247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
57248$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
57249          # Extract the first word of "$tool_basename", so it can be a program name with args.
57250set dummy $tool_basename; ac_word=$2
57251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57252$as_echo_n "checking for $ac_word... " >&6; }
57253if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57254  $as_echo_n "(cached) " >&6
57255else
57256  case $ICECC_WRAPPER in
57257  [\\/]* | ?:[\\/]*)
57258  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57259  ;;
57260  *)
57261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57262for as_dir in $PATH
57263do
57264  IFS=$as_save_IFS
57265  test -z "$as_dir" && as_dir=.
57266    for ac_exec_ext in '' $ac_executable_extensions; do
57267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57268    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57270    break 2
57271  fi
57272done
57273  done
57274IFS=$as_save_IFS
57275
57276  ;;
57277esac
57278fi
57279ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57280if test -n "$ICECC_WRAPPER"; then
57281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57282$as_echo "$ICECC_WRAPPER" >&6; }
57283else
57284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57285$as_echo "no" >&6; }
57286fi
57287
57288
57289          if test "x$ICECC_WRAPPER" = x; then
57290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57291          fi
57292        else
57293          # Otherwise we believe it is a complete path. Use it as it is.
57294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
57295$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
57296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57297$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57298          if test ! -x "$tool_specified"; then
57299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57300$as_echo "not found" >&6; }
57301            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
57302          fi
57303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57304$as_echo "$tool_specified" >&6; }
57305        fi
57306      fi
57307    fi
57308
57309  fi
57310
57311
57312
57313  if test "x$ICECC_WRAPPER" = x; then
57314    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
57315  fi
57316
57317
57318      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57319          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57320    else
57321      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
57322    fi
57323    PATH="$old_path"
57324    # The bundle with the compiler gets a name based on checksums. Parse log file
57325    # to find it.
57326    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57327    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57329$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57330    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
57331
57332    if test "x${COMPILE_TYPE}" = "xcross"; then
57333      # If cross compiling, create a separate env package for the build compiler
57334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
57335$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
57336      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
57337      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
57338        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57339            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
57340      elif test "x${BUILD_CC##*/}" = "xclang"; then
57341        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57342            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57343      else
57344        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
57345      fi
57346      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57347      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57349$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57350      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
57351          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
57352    else
57353      BUILD_ICECC="${ICECC}"
57354    fi
57355
57356
57357  fi
57358
57359
57360# Can the C/C++ compiler use precompiled headers?
57361
57362
57363  ###############################################################################
57364  #
57365  # Can the C/C++ compiler use precompiled headers?
57366  #
57367  # Check whether --enable-precompiled-headers was given.
57368if test "${enable_precompiled_headers+set}" = set; then :
57369  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
57370else
57371  ENABLE_PRECOMPH=yes
57372fi
57373
57374
57375  USE_PRECOMPILED_HEADER=1
57376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
57377$as_echo_n "checking If precompiled header is enabled... " >&6; }
57378  if test "x$ENABLE_PRECOMPH" = xno; then
57379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
57380$as_echo "no, forced" >&6; }
57381    USE_PRECOMPILED_HEADER=0
57382  elif test "x$ICECC" != "x"; then
57383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
57384$as_echo "no, does not work effectively with icecc" >&6; }
57385    USE_PRECOMPILED_HEADER=0
57386  else
57387    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57388$as_echo "yes" >&6; }
57389  fi
57390
57391  if test "x$ENABLE_PRECOMPH" = xyes; then
57392    # Check that the compiler actually supports precomp headers.
57393    if test "x$TOOLCHAIN_TYPE" = xgcc; then
57394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
57395$as_echo_n "checking that precompiled headers work... " >&6; }
57396      echo "int alfa();" > conftest.h
57397      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
57398      if test ! -f conftest.hpp.gch; then
57399        USE_PRECOMPILED_HEADER=0
57400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57401$as_echo "no" >&6; }
57402      else
57403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57404$as_echo "yes" >&6; }
57405      fi
57406      rm -f conftest.h conftest.hpp.gch
57407    fi
57408  fi
57409
57410
57411
57412
57413# Setup use of ccache, if available
57414
57415  # Check whether --enable-ccache was given.
57416if test "${enable_ccache+set}" = set; then :
57417  enableval=$enable_ccache;
57418fi
57419
57420
57421  CCACHE=
57422  CCACHE_STATUS=
57423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
57424$as_echo_n "checking is ccache enabled... " >&6; }
57425  if test "x$enable_ccache" = xyes; then
57426    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
57427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57428$as_echo "yes" >&6; }
57429      OLD_PATH="$PATH"
57430      if test "x$TOOLCHAIN_PATH" != x; then
57431        PATH=$TOOLCHAIN_PATH:$PATH
57432      fi
57433
57434
57435
57436  # Publish this variable in the help.
57437
57438
57439  if [ -z "${CCACHE+x}" ]; then
57440    # The variable is not set by user, try to locate tool using the code snippet
57441    for ac_prog in ccache
57442do
57443  # Extract the first word of "$ac_prog", so it can be a program name with args.
57444set dummy $ac_prog; ac_word=$2
57445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57446$as_echo_n "checking for $ac_word... " >&6; }
57447if ${ac_cv_path_CCACHE+:} false; then :
57448  $as_echo_n "(cached) " >&6
57449else
57450  case $CCACHE in
57451  [\\/]* | ?:[\\/]*)
57452  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57453  ;;
57454  *)
57455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57456for as_dir in $PATH
57457do
57458  IFS=$as_save_IFS
57459  test -z "$as_dir" && as_dir=.
57460    for ac_exec_ext in '' $ac_executable_extensions; do
57461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57462    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57464    break 2
57465  fi
57466done
57467  done
57468IFS=$as_save_IFS
57469
57470  ;;
57471esac
57472fi
57473CCACHE=$ac_cv_path_CCACHE
57474if test -n "$CCACHE"; then
57475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57476$as_echo "$CCACHE" >&6; }
57477else
57478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57479$as_echo "no" >&6; }
57480fi
57481
57482
57483  test -n "$CCACHE" && break
57484done
57485
57486  else
57487    # The variable is set, but is it from the command line or the environment?
57488
57489    # Try to remove the string !CCACHE! from our list.
57490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
57491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57492      # If it failed, the variable was not from the command line. Ignore it,
57493      # but warn the user (except for BASH, which is always set by the calling BASH).
57494      if test "xCCACHE" != xBASH; then
57495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
57496$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
57497      fi
57498      # Try to locate tool using the code snippet
57499      for ac_prog in ccache
57500do
57501  # Extract the first word of "$ac_prog", so it can be a program name with args.
57502set dummy $ac_prog; ac_word=$2
57503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57504$as_echo_n "checking for $ac_word... " >&6; }
57505if ${ac_cv_path_CCACHE+:} false; then :
57506  $as_echo_n "(cached) " >&6
57507else
57508  case $CCACHE in
57509  [\\/]* | ?:[\\/]*)
57510  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57511  ;;
57512  *)
57513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57514for as_dir in $PATH
57515do
57516  IFS=$as_save_IFS
57517  test -z "$as_dir" && as_dir=.
57518    for ac_exec_ext in '' $ac_executable_extensions; do
57519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57520    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57522    break 2
57523  fi
57524done
57525  done
57526IFS=$as_save_IFS
57527
57528  ;;
57529esac
57530fi
57531CCACHE=$ac_cv_path_CCACHE
57532if test -n "$CCACHE"; then
57533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57534$as_echo "$CCACHE" >&6; }
57535else
57536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57537$as_echo "no" >&6; }
57538fi
57539
57540
57541  test -n "$CCACHE" && break
57542done
57543
57544    else
57545      # If it succeeded, then it was overridden by the user. We will use it
57546      # for the tool.
57547
57548      # First remove it from the list of overridden variables, so we can test
57549      # for unknown variables in the end.
57550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57551
57552      # Check if we try to supply an empty value
57553      if test "x$CCACHE" = x; then
57554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
57555$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
57556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57557$as_echo_n "checking for CCACHE... " >&6; }
57558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57559$as_echo "disabled" >&6; }
57560      else
57561        # Check if the provided tool contains a complete path.
57562        tool_specified="$CCACHE"
57563        tool_basename="${tool_specified##*/}"
57564        if test "x$tool_basename" = "x$tool_specified"; then
57565          # A command without a complete path is provided, search $PATH.
57566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
57567$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
57568          # Extract the first word of "$tool_basename", so it can be a program name with args.
57569set dummy $tool_basename; ac_word=$2
57570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57571$as_echo_n "checking for $ac_word... " >&6; }
57572if ${ac_cv_path_CCACHE+:} false; then :
57573  $as_echo_n "(cached) " >&6
57574else
57575  case $CCACHE in
57576  [\\/]* | ?:[\\/]*)
57577  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57578  ;;
57579  *)
57580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57581for as_dir in $PATH
57582do
57583  IFS=$as_save_IFS
57584  test -z "$as_dir" && as_dir=.
57585    for ac_exec_ext in '' $ac_executable_extensions; do
57586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57587    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57589    break 2
57590  fi
57591done
57592  done
57593IFS=$as_save_IFS
57594
57595  ;;
57596esac
57597fi
57598CCACHE=$ac_cv_path_CCACHE
57599if test -n "$CCACHE"; then
57600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57601$as_echo "$CCACHE" >&6; }
57602else
57603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57604$as_echo "no" >&6; }
57605fi
57606
57607
57608          if test "x$CCACHE" = x; then
57609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57610          fi
57611        else
57612          # Otherwise we believe it is a complete path. Use it as it is.
57613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
57614$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
57615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57616$as_echo_n "checking for CCACHE... " >&6; }
57617          if test ! -x "$tool_specified"; then
57618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57619$as_echo "not found" >&6; }
57620            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
57621          fi
57622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57623$as_echo "$tool_specified" >&6; }
57624        fi
57625      fi
57626    fi
57627
57628  fi
57629
57630
57631
57632  if test "x$CCACHE" = x; then
57633    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
57634  fi
57635
57636
57637      PATH="$OLD_PATH"
57638      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
57639      CCACHE_STATUS="Active ($CCACHE_VERSION)"
57640    else
57641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57642$as_echo "no" >&6; }
57643      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
57644$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
57645    fi
57646  elif test "x$enable_ccache" = xno; then
57647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
57648$as_echo "no, explicitly disabled" >&6; }
57649    CCACHE_STATUS="Disabled"
57650  elif test "x$enable_ccache" = x; then
57651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57652$as_echo "no" >&6; }
57653  else
57654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
57655$as_echo "unknown" >&6; }
57656    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
57657  fi
57658
57659
57660
57661# Check whether --with-ccache-dir was given.
57662if test "${with_ccache_dir+set}" = set; then :
57663  withval=$with_ccache_dir;
57664fi
57665
57666
57667  if test "x$with_ccache_dir" != x; then
57668    # When using a non home ccache directory, assume the use is to share ccache files
57669    # with other users. Thus change the umask.
57670    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
57671    if test "x$CCACHE" = x; then
57672      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
57673$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
57674    fi
57675  fi
57676
57677  if test "x$CCACHE" != x; then
57678
57679  if test "x$CCACHE" != x; then
57680    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
57681      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
57682          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
57683      if test "x$HAS_BAD_CCACHE" != "x"; then
57684        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
57685      fi
57686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
57687$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
57688      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
57689      PUSHED_FLAGS="$CXXFLAGS"
57690      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
57691      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57692/* end confdefs.h.  */
57693
57694int
57695main ()
57696{
57697
57698  ;
57699  return 0;
57700}
57701_ACEOF
57702if ac_fn_cxx_try_compile "$LINENO"; then :
57703  CC_KNOWS_CCACHE_TRICK=yes
57704else
57705  CC_KNOWS_CCACHE_TRICK=no
57706fi
57707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57708      CXXFLAGS="$PUSHED_FLAGS"
57709      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
57710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57711$as_echo "yes" >&6; }
57712        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
57713
57714        CCACHE_SLOPPINESS=pch_defines,time_macros
57715      else
57716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57717$as_echo "no" >&6; }
57718        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
57719      fi
57720    fi
57721
57722    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
57723        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
57724
57725    if test "x$SET_CCACHE_DIR" != x; then
57726      mkdir -p $CCACHE_DIR > /dev/null 2>&1
57727      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
57728    fi
57729  fi
57730
57731  fi
57732
57733
57734###############################################################################
57735#
57736# And now the finish...
57737#
57738###############################################################################
57739
57740# Check for some common pitfalls
57741
57742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57743    file_to_test="$SRC_ROOT/LICENSE"
57744    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
57745      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
57746    fi
57747  fi
57748
57749
57750  # Did user specify any unknown variables?
57751
57752  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
57753    # Replace the separating ! with spaces before presenting for end user.
57754    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
57755    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
57756$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
57757  fi
57758
57759
57760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
57761$as_echo_n "checking if build directory is on local disk... " >&6; }
57762
57763  # df -l lists only local disks; if the given directory is not found then
57764  # a non-zero exit code is given
57765  if test "x$DF" = x; then
57766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57767      # msys does not have df; use Windows "net use" instead.
57768      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
57769      if test "x$IS_NETWORK_DISK" = x; then
57770        OUTPUT_DIR_IS_LOCAL="yes"
57771      else
57772        OUTPUT_DIR_IS_LOCAL="no"
57773      fi
57774    else
57775      # No df here, say it's local
57776      OUTPUT_DIR_IS_LOCAL="yes"
57777    fi
57778  else
57779    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
57780      OUTPUT_DIR_IS_LOCAL="yes"
57781    else
57782      OUTPUT_DIR_IS_LOCAL="no"
57783    fi
57784  fi
57785
57786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
57787$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
57788
57789
57790
57791  # Check if the user has any old-style ALT_ variables set.
57792  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
57793
57794  # Before generating output files, test if they exist. If they do, this is a reconfigure.
57795  # Since we can't properly handle the dependencies for this, warn the user about the situation
57796  if test -e $OUTPUT_ROOT/spec.gmk; then
57797    IS_RECONFIGURE=yes
57798  else
57799    IS_RECONFIGURE=no
57800  fi
57801
57802
57803# At the end, call the custom hook. (Dummy macro if no custom sources available)
57804
57805
57806# We're messing a bit with internal autoconf variables to put the config.status
57807# in the output directory instead of the current directory.
57808CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
57809
57810# Create the actual output files. Now the main work of configure is done.
57811cat >confcache <<\_ACEOF
57812# This file is a shell script that caches the results of configure
57813# tests run on this system so they can be shared between configure
57814# scripts and configure runs, see configure's option --config-cache.
57815# It is not useful on other systems.  If it contains results you don't
57816# want to keep, you may remove or edit it.
57817#
57818# config.status only pays attention to the cache file if you give it
57819# the --recheck option to rerun configure.
57820#
57821# `ac_cv_env_foo' variables (set or unset) will be overridden when
57822# loading this file, other *unset* `ac_cv_foo' will be assigned the
57823# following values.
57824
57825_ACEOF
57826
57827# The following way of writing the cache mishandles newlines in values,
57828# but we know of no workaround that is simple, portable, and efficient.
57829# So, we kill variables containing newlines.
57830# Ultrix sh set writes to stderr and can't be redirected directly,
57831# and sets the high bit in the cache file unless we assign to the vars.
57832(
57833  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
57834    eval ac_val=\$$ac_var
57835    case $ac_val in #(
57836    *${as_nl}*)
57837      case $ac_var in #(
57838      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
57839$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
57840      esac
57841      case $ac_var in #(
57842      _ | IFS | as_nl) ;; #(
57843      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
57844      *) { eval $ac_var=; unset $ac_var;} ;;
57845      esac ;;
57846    esac
57847  done
57848
57849  (set) 2>&1 |
57850    case $as_nl`(ac_space=' '; set) 2>&1` in #(
57851    *${as_nl}ac_space=\ *)
57852      # `set' does not quote correctly, so add quotes: double-quote
57853      # substitution turns \\\\ into \\, and sed turns \\ into \.
57854      sed -n \
57855	"s/'/'\\\\''/g;
57856	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
57857      ;; #(
57858    *)
57859      # `set' quotes correctly as required by POSIX, so do not add quotes.
57860      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
57861      ;;
57862    esac |
57863    sort
57864) |
57865  sed '
57866     /^ac_cv_env_/b end
57867     t clear
57868     :clear
57869     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
57870     t end
57871     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
57872     :end' >>confcache
57873if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
57874  if test -w "$cache_file"; then
57875    if test "x$cache_file" != "x/dev/null"; then
57876      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
57877$as_echo "$as_me: updating cache $cache_file" >&6;}
57878      if test ! -f "$cache_file" || test -h "$cache_file"; then
57879	cat confcache >"$cache_file"
57880      else
57881        case $cache_file in #(
57882        */* | ?:*)
57883	  mv -f confcache "$cache_file"$$ &&
57884	  mv -f "$cache_file"$$ "$cache_file" ;; #(
57885        *)
57886	  mv -f confcache "$cache_file" ;;
57887	esac
57888      fi
57889    fi
57890  else
57891    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
57892$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
57893  fi
57894fi
57895rm -f confcache
57896
57897test "x$prefix" = xNONE && prefix=$ac_default_prefix
57898# Let make expand exec_prefix.
57899test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
57900
57901# Transform confdefs.h into DEFS.
57902# Protect against shell expansion while executing Makefile rules.
57903# Protect against Makefile macro expansion.
57904#
57905# If the first sed substitution is executed (which looks for macros that
57906# take arguments), then branch to the quote section.  Otherwise,
57907# look for a macro that doesn't take arguments.
57908ac_script='
57909:mline
57910/\\$/{
57911 N
57912 s,\\\n,,
57913 b mline
57914}
57915t clear
57916:clear
57917s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
57918t quote
57919s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
57920t quote
57921b any
57922:quote
57923s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
57924s/\[/\\&/g
57925s/\]/\\&/g
57926s/\$/$$/g
57927H
57928:any
57929${
57930	g
57931	s/^\n//
57932	s/\n/ /g
57933	p
57934}
57935'
57936DEFS=`sed -n "$ac_script" confdefs.h`
57937
57938
57939ac_libobjs=
57940ac_ltlibobjs=
57941U=
57942for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
57943  # 1. Remove the extension, and $U if already installed.
57944  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
57945  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
57946  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
57947  #    will be set to the directory where LIBOBJS objects are built.
57948  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
57949  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
57950done
57951LIBOBJS=$ac_libobjs
57952
57953LTLIBOBJS=$ac_ltlibobjs
57954
57955
57956
57957: "${CONFIG_STATUS=./config.status}"
57958ac_write_fail=0
57959ac_clean_files_save=$ac_clean_files
57960ac_clean_files="$ac_clean_files $CONFIG_STATUS"
57961{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
57962$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
57963as_write_fail=0
57964cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
57965#! $SHELL
57966# Generated by $as_me.
57967# Run this file to recreate the current configuration.
57968# Compiler output produced by configure, useful for debugging
57969# configure, is in config.log if it exists.
57970
57971debug=false
57972ac_cs_recheck=false
57973ac_cs_silent=false
57974
57975SHELL=\${CONFIG_SHELL-$SHELL}
57976export SHELL
57977_ASEOF
57978cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
57979## -------------------- ##
57980## M4sh Initialization. ##
57981## -------------------- ##
57982
57983# Be more Bourne compatible
57984DUALCASE=1; export DUALCASE # for MKS sh
57985if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
57986  emulate sh
57987  NULLCMD=:
57988  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
57989  # is contrary to our usage.  Disable this feature.
57990  alias -g '${1+"$@"}'='"$@"'
57991  setopt NO_GLOB_SUBST
57992else
57993  case `(set -o) 2>/dev/null` in #(
57994  *posix*) :
57995    set -o posix ;; #(
57996  *) :
57997     ;;
57998esac
57999fi
58000
58001
58002as_nl='
58003'
58004export as_nl
58005# Printing a long string crashes Solaris 7 /usr/bin/printf.
58006as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58007as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58008as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58009# Prefer a ksh shell builtin over an external printf program on Solaris,
58010# but without wasting forks for bash or zsh.
58011if test -z "$BASH_VERSION$ZSH_VERSION" \
58012    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58013  as_echo='print -r --'
58014  as_echo_n='print -rn --'
58015elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58016  as_echo='printf %s\n'
58017  as_echo_n='printf %s'
58018else
58019  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58020    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58021    as_echo_n='/usr/ucb/echo -n'
58022  else
58023    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58024    as_echo_n_body='eval
58025      arg=$1;
58026      case $arg in #(
58027      *"$as_nl"*)
58028	expr "X$arg" : "X\\(.*\\)$as_nl";
58029	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58030      esac;
58031      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58032    '
58033    export as_echo_n_body
58034    as_echo_n='sh -c $as_echo_n_body as_echo'
58035  fi
58036  export as_echo_body
58037  as_echo='sh -c $as_echo_body as_echo'
58038fi
58039
58040# The user is always right.
58041if test "${PATH_SEPARATOR+set}" != set; then
58042  PATH_SEPARATOR=:
58043  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58044    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58045      PATH_SEPARATOR=';'
58046  }
58047fi
58048
58049
58050# IFS
58051# We need space, tab and new line, in precisely that order.  Quoting is
58052# there to prevent editors from complaining about space-tab.
58053# (If _AS_PATH_WALK were called with IFS unset, it would disable word
58054# splitting by setting IFS to empty value.)
58055IFS=" ""	$as_nl"
58056
58057# Find who we are.  Look in the path if we contain no directory separator.
58058as_myself=
58059case $0 in #((
58060  *[\\/]* ) as_myself=$0 ;;
58061  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58062for as_dir in $PATH
58063do
58064  IFS=$as_save_IFS
58065  test -z "$as_dir" && as_dir=.
58066    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58067  done
58068IFS=$as_save_IFS
58069
58070     ;;
58071esac
58072# We did not find ourselves, most probably we were run as `sh COMMAND'
58073# in which case we are not to be found in the path.
58074if test "x$as_myself" = x; then
58075  as_myself=$0
58076fi
58077if test ! -f "$as_myself"; then
58078  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58079  exit 1
58080fi
58081
58082# Unset variables that we do not need and which cause bugs (e.g. in
58083# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58084# suppresses any "Segmentation fault" message there.  '((' could
58085# trigger a bug in pdksh 5.2.14.
58086for as_var in BASH_ENV ENV MAIL MAILPATH
58087do eval test x\${$as_var+set} = xset \
58088  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58089done
58090PS1='$ '
58091PS2='> '
58092PS4='+ '
58093
58094# NLS nuisances.
58095LC_ALL=C
58096export LC_ALL
58097LANGUAGE=C
58098export LANGUAGE
58099
58100# CDPATH.
58101(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58102
58103
58104# as_fn_error STATUS ERROR [LINENO LOG_FD]
58105# ----------------------------------------
58106# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58107# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58108# script with STATUS, using 1 if that was 0.
58109as_fn_error ()
58110{
58111  as_status=$1; test $as_status -eq 0 && as_status=1
58112  if test "$4"; then
58113    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58114    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58115  fi
58116  $as_echo "$as_me: error: $2" >&2
58117  as_fn_exit $as_status
58118} # as_fn_error
58119
58120
58121# as_fn_set_status STATUS
58122# -----------------------
58123# Set $? to STATUS, without forking.
58124as_fn_set_status ()
58125{
58126  return $1
58127} # as_fn_set_status
58128
58129# as_fn_exit STATUS
58130# -----------------
58131# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58132as_fn_exit ()
58133{
58134  set +e
58135  as_fn_set_status $1
58136  exit $1
58137} # as_fn_exit
58138
58139# as_fn_unset VAR
58140# ---------------
58141# Portably unset VAR.
58142as_fn_unset ()
58143{
58144  { eval $1=; unset $1;}
58145}
58146as_unset=as_fn_unset
58147# as_fn_append VAR VALUE
58148# ----------------------
58149# Append the text in VALUE to the end of the definition contained in VAR. Take
58150# advantage of any shell optimizations that allow amortized linear growth over
58151# repeated appends, instead of the typical quadratic growth present in naive
58152# implementations.
58153if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58154  eval 'as_fn_append ()
58155  {
58156    eval $1+=\$2
58157  }'
58158else
58159  as_fn_append ()
58160  {
58161    eval $1=\$$1\$2
58162  }
58163fi # as_fn_append
58164
58165# as_fn_arith ARG...
58166# ------------------
58167# Perform arithmetic evaluation on the ARGs, and store the result in the
58168# global $as_val. Take advantage of shells that can avoid forks. The arguments
58169# must be portable across $(()) and expr.
58170if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
58171  eval 'as_fn_arith ()
58172  {
58173    as_val=$(( $* ))
58174  }'
58175else
58176  as_fn_arith ()
58177  {
58178    as_val=`expr "$@" || test $? -eq 1`
58179  }
58180fi # as_fn_arith
58181
58182
58183if expr a : '\(a\)' >/dev/null 2>&1 &&
58184   test "X`expr 00001 : '.*\(...\)'`" = X001; then
58185  as_expr=expr
58186else
58187  as_expr=false
58188fi
58189
58190if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
58191  as_basename=basename
58192else
58193  as_basename=false
58194fi
58195
58196if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
58197  as_dirname=dirname
58198else
58199  as_dirname=false
58200fi
58201
58202as_me=`$as_basename -- "$0" ||
58203$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
58204	 X"$0" : 'X\(//\)$' \| \
58205	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
58206$as_echo X/"$0" |
58207    sed '/^.*\/\([^/][^/]*\)\/*$/{
58208	    s//\1/
58209	    q
58210	  }
58211	  /^X\/\(\/\/\)$/{
58212	    s//\1/
58213	    q
58214	  }
58215	  /^X\/\(\/\).*/{
58216	    s//\1/
58217	    q
58218	  }
58219	  s/.*/./; q'`
58220
58221# Avoid depending upon Character Ranges.
58222as_cr_letters='abcdefghijklmnopqrstuvwxyz'
58223as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
58224as_cr_Letters=$as_cr_letters$as_cr_LETTERS
58225as_cr_digits='0123456789'
58226as_cr_alnum=$as_cr_Letters$as_cr_digits
58227
58228ECHO_C= ECHO_N= ECHO_T=
58229case `echo -n x` in #(((((
58230-n*)
58231  case `echo 'xy\c'` in
58232  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
58233  xy)  ECHO_C='\c';;
58234  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
58235       ECHO_T='	';;
58236  esac;;
58237*)
58238  ECHO_N='-n';;
58239esac
58240
58241rm -f conf$$ conf$$.exe conf$$.file
58242if test -d conf$$.dir; then
58243  rm -f conf$$.dir/conf$$.file
58244else
58245  rm -f conf$$.dir
58246  mkdir conf$$.dir 2>/dev/null
58247fi
58248if (echo >conf$$.file) 2>/dev/null; then
58249  if ln -s conf$$.file conf$$ 2>/dev/null; then
58250    as_ln_s='ln -s'
58251    # ... but there are two gotchas:
58252    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
58253    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
58254    # In both cases, we have to default to `cp -pR'.
58255    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
58256      as_ln_s='cp -pR'
58257  elif ln conf$$.file conf$$ 2>/dev/null; then
58258    as_ln_s=ln
58259  else
58260    as_ln_s='cp -pR'
58261  fi
58262else
58263  as_ln_s='cp -pR'
58264fi
58265rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58266rmdir conf$$.dir 2>/dev/null
58267
58268
58269# as_fn_mkdir_p
58270# -------------
58271# Create "$as_dir" as a directory, including parents if necessary.
58272as_fn_mkdir_p ()
58273{
58274
58275  case $as_dir in #(
58276  -*) as_dir=./$as_dir;;
58277  esac
58278  test -d "$as_dir" || eval $as_mkdir_p || {
58279    as_dirs=
58280    while :; do
58281      case $as_dir in #(
58282      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
58283      *) as_qdir=$as_dir;;
58284      esac
58285      as_dirs="'$as_qdir' $as_dirs"
58286      as_dir=`$as_dirname -- "$as_dir" ||
58287$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58288	 X"$as_dir" : 'X\(//\)[^/]' \| \
58289	 X"$as_dir" : 'X\(//\)$' \| \
58290	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
58291$as_echo X"$as_dir" |
58292    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58293	    s//\1/
58294	    q
58295	  }
58296	  /^X\(\/\/\)[^/].*/{
58297	    s//\1/
58298	    q
58299	  }
58300	  /^X\(\/\/\)$/{
58301	    s//\1/
58302	    q
58303	  }
58304	  /^X\(\/\).*/{
58305	    s//\1/
58306	    q
58307	  }
58308	  s/.*/./; q'`
58309      test -d "$as_dir" && break
58310    done
58311    test -z "$as_dirs" || eval "mkdir $as_dirs"
58312  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
58313
58314
58315} # as_fn_mkdir_p
58316if mkdir -p . 2>/dev/null; then
58317  as_mkdir_p='mkdir -p "$as_dir"'
58318else
58319  test -d ./-p && rmdir ./-p
58320  as_mkdir_p=false
58321fi
58322
58323
58324# as_fn_executable_p FILE
58325# -----------------------
58326# Test if FILE is an executable regular file.
58327as_fn_executable_p ()
58328{
58329  test -f "$1" && test -x "$1"
58330} # as_fn_executable_p
58331as_test_x='test -x'
58332as_executable_p=as_fn_executable_p
58333
58334# Sed expression to map a string onto a valid CPP name.
58335as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58336
58337# Sed expression to map a string onto a valid variable name.
58338as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
58339
58340
58341exec 6>&1
58342## ----------------------------------- ##
58343## Main body of $CONFIG_STATUS script. ##
58344## ----------------------------------- ##
58345_ASEOF
58346test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
58347
58348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58349# Save the log message, to keep $0 and so on meaningful, and to
58350# report actual input values of CONFIG_FILES etc. instead of their
58351# values after options handling.
58352ac_log="
58353This file was extended by OpenJDK $as_me jdk9, which was
58354generated by GNU Autoconf 2.69.  Invocation command line was
58355
58356  CONFIG_FILES    = $CONFIG_FILES
58357  CONFIG_HEADERS  = $CONFIG_HEADERS
58358  CONFIG_LINKS    = $CONFIG_LINKS
58359  CONFIG_COMMANDS = $CONFIG_COMMANDS
58360  $ $0 $@
58361
58362on `(hostname || uname -n) 2>/dev/null | sed 1q`
58363"
58364
58365_ACEOF
58366
58367case $ac_config_files in *"
58368"*) set x $ac_config_files; shift; ac_config_files=$*;;
58369esac
58370
58371
58372
58373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58374# Files that config.status was made for.
58375config_files="$ac_config_files"
58376
58377_ACEOF
58378
58379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58380ac_cs_usage="\
58381\`$as_me' instantiates files and other configuration actions
58382from templates according to the current configuration.  Unless the files
58383and actions are specified as TAGs, all are instantiated by default.
58384
58385Usage: $0 [OPTION]... [TAG]...
58386
58387  -h, --help       print this help, then exit
58388  -V, --version    print version number and configuration settings, then exit
58389      --config     print configuration, then exit
58390  -q, --quiet, --silent
58391                   do not print progress messages
58392  -d, --debug      don't remove temporary files
58393      --recheck    update $as_me by reconfiguring in the same conditions
58394      --file=FILE[:TEMPLATE]
58395                   instantiate the configuration file FILE
58396
58397Configuration files:
58398$config_files
58399
58400Report bugs to <build-dev@openjdk.java.net>.
58401OpenJDK home page: <http://openjdk.java.net>."
58402
58403_ACEOF
58404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58405ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
58406ac_cs_version="\\
58407OpenJDK config.status jdk9
58408configured by $0, generated by GNU Autoconf 2.69,
58409  with options \\"\$ac_cs_config\\"
58410
58411Copyright (C) 2012 Free Software Foundation, Inc.
58412This config.status script is free software; the Free Software Foundation
58413gives unlimited permission to copy, distribute and modify it."
58414
58415ac_pwd='$ac_pwd'
58416srcdir='$srcdir'
58417AWK='$AWK'
58418test -n "\$AWK" || AWK=awk
58419_ACEOF
58420
58421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58422# The default lists apply if the user does not specify any file.
58423ac_need_defaults=:
58424while test $# != 0
58425do
58426  case $1 in
58427  --*=?*)
58428    ac_option=`expr "X$1" : 'X\([^=]*\)='`
58429    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
58430    ac_shift=:
58431    ;;
58432  --*=)
58433    ac_option=`expr "X$1" : 'X\([^=]*\)='`
58434    ac_optarg=
58435    ac_shift=:
58436    ;;
58437  *)
58438    ac_option=$1
58439    ac_optarg=$2
58440    ac_shift=shift
58441    ;;
58442  esac
58443
58444  case $ac_option in
58445  # Handling of the options.
58446  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
58447    ac_cs_recheck=: ;;
58448  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
58449    $as_echo "$ac_cs_version"; exit ;;
58450  --config | --confi | --conf | --con | --co | --c )
58451    $as_echo "$ac_cs_config"; exit ;;
58452  --debug | --debu | --deb | --de | --d | -d )
58453    debug=: ;;
58454  --file | --fil | --fi | --f )
58455    $ac_shift
58456    case $ac_optarg in
58457    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
58458    '') as_fn_error $? "missing file argument" ;;
58459    esac
58460    as_fn_append CONFIG_FILES " '$ac_optarg'"
58461    ac_need_defaults=false;;
58462  --he | --h |  --help | --hel | -h )
58463    $as_echo "$ac_cs_usage"; exit ;;
58464  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
58465  | -silent | --silent | --silen | --sile | --sil | --si | --s)
58466    ac_cs_silent=: ;;
58467
58468  # This is an error.
58469  -*) as_fn_error $? "unrecognized option: \`$1'
58470Try \`$0 --help' for more information." ;;
58471
58472  *) as_fn_append ac_config_targets " $1"
58473     ac_need_defaults=false ;;
58474
58475  esac
58476  shift
58477done
58478
58479ac_configure_extra_args=
58480
58481if $ac_cs_silent; then
58482  exec 6>/dev/null
58483  ac_configure_extra_args="$ac_configure_extra_args --silent"
58484fi
58485
58486_ACEOF
58487cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58488if \$ac_cs_recheck; then
58489  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
58490  shift
58491  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
58492  CONFIG_SHELL='$SHELL'
58493  export CONFIG_SHELL
58494  exec "\$@"
58495fi
58496
58497_ACEOF
58498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58499exec 5>>config.log
58500{
58501  echo
58502  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
58503## Running $as_me. ##
58504_ASBOX
58505  $as_echo "$ac_log"
58506} >&5
58507
58508_ACEOF
58509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58510_ACEOF
58511
58512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58513
58514# Handling of arguments.
58515for ac_config_target in $ac_config_targets
58516do
58517  case $ac_config_target in
58518    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
58519    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
58520    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
58521    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
58522    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
58523
58524  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
58525  esac
58526done
58527
58528
58529# If the user did not use the arguments to specify the items to instantiate,
58530# then the envvar interface is used.  Set only those that are not.
58531# We use the long form for the default assignment because of an extremely
58532# bizarre bug on SunOS 4.1.3.
58533if $ac_need_defaults; then
58534  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
58535fi
58536
58537# Have a temporary directory for convenience.  Make it in the build tree
58538# simply because there is no reason against having it here, and in addition,
58539# creating and moving files from /tmp can sometimes cause problems.
58540# Hook for its removal unless debugging.
58541# Note that there is a small window in which the directory will not be cleaned:
58542# after its creation but before its name has been assigned to `$tmp'.
58543$debug ||
58544{
58545  tmp= ac_tmp=
58546  trap 'exit_status=$?
58547  : "${ac_tmp:=$tmp}"
58548  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
58549' 0
58550  trap 'as_fn_exit 1' 1 2 13 15
58551}
58552# Create a (secure) tmp directory for tmp files.
58553
58554{
58555  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
58556  test -d "$tmp"
58557}  ||
58558{
58559  tmp=./conf$$-$RANDOM
58560  (umask 077 && mkdir "$tmp")
58561} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
58562ac_tmp=$tmp
58563
58564# Set up the scripts for CONFIG_FILES section.
58565# No need to generate them if there are no CONFIG_FILES.
58566# This happens for instance with `./config.status config.h'.
58567if test -n "$CONFIG_FILES"; then
58568
58569
58570ac_cr=`echo X | tr X '\015'`
58571# On cygwin, bash can eat \r inside `` if the user requested igncr.
58572# But we know of no other shell where ac_cr would be empty at this
58573# point, so we can use a bashism as a fallback.
58574if test "x$ac_cr" = x; then
58575  eval ac_cr=\$\'\\r\'
58576fi
58577ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
58578if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
58579  ac_cs_awk_cr='\\r'
58580else
58581  ac_cs_awk_cr=$ac_cr
58582fi
58583
58584echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
58585_ACEOF
58586
58587
58588{
58589  echo "cat >conf$$subs.awk <<_ACEOF" &&
58590  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
58591  echo "_ACEOF"
58592} >conf$$subs.sh ||
58593  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58594ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
58595ac_delim='%!_!# '
58596for ac_last_try in false false false false false :; do
58597  . ./conf$$subs.sh ||
58598    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58599
58600  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
58601  if test $ac_delim_n = $ac_delim_num; then
58602    break
58603  elif $ac_last_try; then
58604    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58605  else
58606    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
58607  fi
58608done
58609rm -f conf$$subs.sh
58610
58611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58612cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
58613_ACEOF
58614sed -n '
58615h
58616s/^/S["/; s/!.*/"]=/
58617p
58618g
58619s/^[^!]*!//
58620:repl
58621t repl
58622s/'"$ac_delim"'$//
58623t delim
58624:nl
58625h
58626s/\(.\{148\}\)..*/\1/
58627t more1
58628s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
58629p
58630n
58631b repl
58632:more1
58633s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58634p
58635g
58636s/.\{148\}//
58637t nl
58638:delim
58639h
58640s/\(.\{148\}\)..*/\1/
58641t more2
58642s/["\\]/\\&/g; s/^/"/; s/$/"/
58643p
58644b
58645:more2
58646s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58647p
58648g
58649s/.\{148\}//
58650t delim
58651' <conf$$subs.awk | sed '
58652/^[^""]/{
58653  N
58654  s/\n//
58655}
58656' >>$CONFIG_STATUS || ac_write_fail=1
58657rm -f conf$$subs.awk
58658cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58659_ACAWK
58660cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
58661  for (key in S) S_is_set[key] = 1
58662  FS = ""
58663
58664}
58665{
58666  line = $ 0
58667  nfields = split(line, field, "@")
58668  substed = 0
58669  len = length(field[1])
58670  for (i = 2; i < nfields; i++) {
58671    key = field[i]
58672    keylen = length(key)
58673    if (S_is_set[key]) {
58674      value = S[key]
58675      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
58676      len += length(value) + length(field[++i])
58677      substed = 1
58678    } else
58679      len += 1 + keylen
58680  }
58681
58682  print line
58683}
58684
58685_ACAWK
58686_ACEOF
58687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58688if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
58689  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
58690else
58691  cat
58692fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
58693  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
58694_ACEOF
58695
58696# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
58697# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
58698# trailing colons and then remove the whole line if VPATH becomes empty
58699# (actually we leave an empty line to preserve line numbers).
58700if test "x$srcdir" = x.; then
58701  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
58702h
58703s///
58704s/^/:/
58705s/[	 ]*$/:/
58706s/:\$(srcdir):/:/g
58707s/:\${srcdir}:/:/g
58708s/:@srcdir@:/:/g
58709s/^:*//
58710s/:*$//
58711x
58712s/\(=[	 ]*\).*/\1/
58713G
58714s/\n//
58715s/^[^=]*=[	 ]*$//
58716}'
58717fi
58718
58719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58720fi # test -n "$CONFIG_FILES"
58721
58722
58723eval set X "  :F $CONFIG_FILES      "
58724shift
58725for ac_tag
58726do
58727  case $ac_tag in
58728  :[FHLC]) ac_mode=$ac_tag; continue;;
58729  esac
58730  case $ac_mode$ac_tag in
58731  :[FHL]*:*);;
58732  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
58733  :[FH]-) ac_tag=-:-;;
58734  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
58735  esac
58736  ac_save_IFS=$IFS
58737  IFS=:
58738  set x $ac_tag
58739  IFS=$ac_save_IFS
58740  shift
58741  ac_file=$1
58742  shift
58743
58744  case $ac_mode in
58745  :L) ac_source=$1;;
58746  :[FH])
58747    ac_file_inputs=
58748    for ac_f
58749    do
58750      case $ac_f in
58751      -) ac_f="$ac_tmp/stdin";;
58752      *) # Look for the file first in the build tree, then in the source tree
58753	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
58754	 # because $ac_f cannot contain `:'.
58755	 test -f "$ac_f" ||
58756	   case $ac_f in
58757	   [\\/$]*) false;;
58758	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
58759	   esac ||
58760	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
58761      esac
58762      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
58763      as_fn_append ac_file_inputs " '$ac_f'"
58764    done
58765
58766    # Let's still pretend it is `configure' which instantiates (i.e., don't
58767    # use $as_me), people would be surprised to read:
58768    #    /* config.h.  Generated by config.status.  */
58769    configure_input='Generated from '`
58770	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
58771	`' by configure.'
58772    if test x"$ac_file" != x-; then
58773      configure_input="$ac_file.  $configure_input"
58774      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
58775$as_echo "$as_me: creating $ac_file" >&6;}
58776    fi
58777    # Neutralize special characters interpreted by sed in replacement strings.
58778    case $configure_input in #(
58779    *\&* | *\|* | *\\* )
58780       ac_sed_conf_input=`$as_echo "$configure_input" |
58781       sed 's/[\\\\&|]/\\\\&/g'`;; #(
58782    *) ac_sed_conf_input=$configure_input;;
58783    esac
58784
58785    case $ac_tag in
58786    *:-:* | *:-) cat >"$ac_tmp/stdin" \
58787      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
58788    esac
58789    ;;
58790  esac
58791
58792  ac_dir=`$as_dirname -- "$ac_file" ||
58793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58794	 X"$ac_file" : 'X\(//\)[^/]' \| \
58795	 X"$ac_file" : 'X\(//\)$' \| \
58796	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
58797$as_echo X"$ac_file" |
58798    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58799	    s//\1/
58800	    q
58801	  }
58802	  /^X\(\/\/\)[^/].*/{
58803	    s//\1/
58804	    q
58805	  }
58806	  /^X\(\/\/\)$/{
58807	    s//\1/
58808	    q
58809	  }
58810	  /^X\(\/\).*/{
58811	    s//\1/
58812	    q
58813	  }
58814	  s/.*/./; q'`
58815  as_dir="$ac_dir"; as_fn_mkdir_p
58816  ac_builddir=.
58817
58818case "$ac_dir" in
58819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
58820*)
58821  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
58822  # A ".." for each directory in $ac_dir_suffix.
58823  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
58824  case $ac_top_builddir_sub in
58825  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
58826  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
58827  esac ;;
58828esac
58829ac_abs_top_builddir=$ac_pwd
58830ac_abs_builddir=$ac_pwd$ac_dir_suffix
58831# for backward compatibility:
58832ac_top_builddir=$ac_top_build_prefix
58833
58834case $srcdir in
58835  .)  # We are building in place.
58836    ac_srcdir=.
58837    ac_top_srcdir=$ac_top_builddir_sub
58838    ac_abs_top_srcdir=$ac_pwd ;;
58839  [\\/]* | ?:[\\/]* )  # Absolute name.
58840    ac_srcdir=$srcdir$ac_dir_suffix;
58841    ac_top_srcdir=$srcdir
58842    ac_abs_top_srcdir=$srcdir ;;
58843  *) # Relative name.
58844    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
58845    ac_top_srcdir=$ac_top_build_prefix$srcdir
58846    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
58847esac
58848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
58849
58850
58851  case $ac_mode in
58852  :F)
58853  #
58854  # CONFIG_FILE
58855  #
58856
58857_ACEOF
58858
58859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58860# If the template does not know about datarootdir, expand it.
58861# FIXME: This hack should be removed a few years after 2.60.
58862ac_datarootdir_hack=; ac_datarootdir_seen=
58863ac_sed_dataroot='
58864/datarootdir/ {
58865  p
58866  q
58867}
58868/@datadir@/p
58869/@docdir@/p
58870/@infodir@/p
58871/@localedir@/p
58872/@mandir@/p'
58873case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
58874*datarootdir*) ac_datarootdir_seen=yes;;
58875*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
58876  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
58877$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
58878_ACEOF
58879cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58880  ac_datarootdir_hack='
58881  s&@datadir@&$datadir&g
58882  s&@docdir@&$docdir&g
58883  s&@infodir@&$infodir&g
58884  s&@localedir@&$localedir&g
58885  s&@mandir@&$mandir&g
58886  s&\\\${datarootdir}&$datarootdir&g' ;;
58887esac
58888_ACEOF
58889
58890# Neutralize VPATH when `$srcdir' = `.'.
58891# Shell code in configure.ac might set extrasub.
58892# FIXME: do we really want to maintain this feature?
58893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58894ac_sed_extra="$ac_vpsub
58895$extrasub
58896_ACEOF
58897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58898:t
58899/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
58900s|@configure_input@|$ac_sed_conf_input|;t t
58901s&@top_builddir@&$ac_top_builddir_sub&;t t
58902s&@top_build_prefix@&$ac_top_build_prefix&;t t
58903s&@srcdir@&$ac_srcdir&;t t
58904s&@abs_srcdir@&$ac_abs_srcdir&;t t
58905s&@top_srcdir@&$ac_top_srcdir&;t t
58906s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
58907s&@builddir@&$ac_builddir&;t t
58908s&@abs_builddir@&$ac_abs_builddir&;t t
58909s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
58910$ac_datarootdir_hack
58911"
58912eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
58913  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58914
58915test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
58916  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
58917  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
58918      "$ac_tmp/out"`; test -z "$ac_out"; } &&
58919  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58920which seems to be undefined.  Please make sure it is defined" >&5
58921$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58922which seems to be undefined.  Please make sure it is defined" >&2;}
58923
58924  rm -f "$ac_tmp/stdin"
58925  case $ac_file in
58926  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
58927  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
58928  esac \
58929  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58930 ;;
58931
58932
58933
58934  esac
58935
58936done # for ac_tag
58937
58938
58939as_fn_exit 0
58940_ACEOF
58941ac_clean_files=$ac_clean_files_save
58942
58943test $ac_write_fail = 0 ||
58944  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
58945
58946
58947# configure is writing to config.log, and then calls config.status.
58948# config.status does its own redirection, appending to config.log.
58949# Unfortunately, on DOS this fails, as config.log is still kept open
58950# by configure, so config.status won't be able to write to it; its
58951# output is simply discarded.  So we exec the FD to /dev/null,
58952# effectively closing config.log, so it can be properly (re)opened and
58953# appended to by config.status.  When coming back to configure, we
58954# need to make the FD available again.
58955if test "$no_create" != yes; then
58956  ac_cs_success=:
58957  ac_config_status_args=
58958  test "$silent" = yes &&
58959    ac_config_status_args="$ac_config_status_args --quiet"
58960  exec 5>/dev/null
58961  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
58962  exec 5>>config.log
58963  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
58964  # would make configure fail if this is the last instruction.
58965  $ac_cs_success || as_fn_exit 1
58966fi
58967if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
58968  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
58969$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
58970fi
58971
58972
58973# After AC_OUTPUT, we need to do final work
58974
58975
58976  # Try to move config.log (generated by autoconf) to the configure-support directory.
58977  if test -e ./config.log; then
58978    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
58979  fi
58980
58981  # Rotate our log file (configure.log)
58982  if test -e "$OUTPUT_ROOT/configure.log.old"; then
58983    $RM -f "$OUTPUT_ROOT/configure.log.old"
58984  fi
58985  if test -e "$OUTPUT_ROOT/configure.log"; then
58986    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
58987  fi
58988
58989  # Move configure.log from current directory to the build output root
58990  if test -e ./configure.log; then
58991    echo found it
58992    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
58993  fi
58994
58995  # Make the compare script executable
58996  $CHMOD +x $OUTPUT_ROOT/compare.sh
58997
58998
58999# Finally output some useful information to the user
59000
59001  # Finally output some useful information to the user
59002
59003  printf "\n"
59004  printf "====================================================\n"
59005  if test "x$no_create" != "xyes"; then
59006    if test "x$IS_RECONFIGURE" != "xyes"; then
59007      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59008    else
59009      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59010    fi
59011  else
59012    if test "x$IS_RECONFIGURE" != "xyes"; then
59013      printf "A configuration has been successfully checked but not created\n"
59014    else
59015      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59016    fi
59017  fi
59018  if test "x$CONFIGURE_COMMAND_LINE" != x; then
59019    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59020  else
59021    printf "using default settings.\n"
59022  fi
59023
59024  printf "\n"
59025  printf "Configuration summary:\n"
59026  printf "* Debug level:    $DEBUG_LEVEL\n"
59027  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59028  printf "* JDK variant:    $JDK_VARIANT\n"
59029  printf "* JVM variants:   $with_jvm_variants\n"
59030  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59031
59032  printf "\n"
59033  printf "Tools summary:\n"
59034  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59035    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59036  fi
59037  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59038  if test "x$TOOLCHAIN_VERSION" != "x"; then
59039    print_version=" $TOOLCHAIN_VERSION"
59040  fi
59041  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59042  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59043  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59044
59045  printf "\n"
59046  printf "Build performance summary:\n"
59047  printf "* Cores to use:   $JOBS\n"
59048  printf "* Memory limit:   $MEMORY_SIZE MB\n"
59049  if test "x$CCACHE_STATUS" != "x"; then
59050    printf "* ccache status:  $CCACHE_STATUS\n"
59051  fi
59052  printf "\n"
59053
59054  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59055    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59056    printf "will result in longer build times.\n"
59057    printf "\n"
59058  fi
59059
59060  if test "x$FOUND_ALT_VARIABLES" != "x"; then
59061    printf "WARNING: You have old-style ALT_ environment variables set.\n"
59062    printf "These are not respected, and will be ignored. It is recommended\n"
59063    printf "that you clean your environment. The following variables are set:\n"
59064    printf "$FOUND_ALT_VARIABLES\n"
59065    printf "\n"
59066  fi
59067
59068  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59069    printf "WARNING: Your build output directory is not on a local disk.\n"
59070    printf "This will severely degrade build performance!\n"
59071    printf "It is recommended that you create an output directory on a local disk,\n"
59072    printf "and run the configure script again from that directory.\n"
59073    printf "\n"
59074  fi
59075
59076  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59077    printf "WARNING: The result of this configuration has overridden an older\n"
59078    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59079    printf "proper build. Failure to do so might result in strange build problems.\n"
59080    printf "\n"
59081  fi
59082
59083  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59084    printf "WARNING: The result of this configuration was not saved.\n"
59085    printf "You should run without '--no-create | -n' to create the configuration.\n"
59086    printf "\n"
59087  fi
59088
59089
59090
59091  # Locate config.log.
59092  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59093    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59094  elif test -e "./config.log"; then
59095    CONFIG_LOG_PATH="."
59096  fi
59097
59098  if test -e "$CONFIG_LOG_PATH/config.log"; then
59099    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59100    if test $? -eq 0; then
59101      printf "The following warnings were produced. Repeated here for convenience:\n"
59102      # We must quote sed expression (using []) to stop m4 from eating the [].
59103      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59104      printf "\n"
59105    fi
59106  fi
59107
59108